Hi,
I am trying to implement File Injection through Openstack Dashboard. That
means, while creating instance from 'Launch Instance', I will give file
path of a file, which I need to inject.
For that, I modified the following file:

*/usr/lib/python2.7/dist-packages/novaclient/v1_1/servers.py*
*
*
In the above file, in the function '*create*', I observed an argument '*
files*' wihch is taking 'None' by default. So, to test the primary
functionality, I gave the '*files*' argument statically in the function.
For that, the first line of that function (Line no. 472) implementation, I
defined '*files' *as below:

*fp = file('/root/inject.txt', 'r')*
*files = {'/root/inject.txt':fp}*
*
*
I followed two methods to create instance:
1. Through Openstack Dashboard
2. Through nova boot command from CLI

*Method 1:*
After that, I restarted apache, and tried to create (launch) an instance
from dashboard. It threw the following AJAX error, by clicking the Launch
button:

*Error: *There was an error submitting the form. Please try again.

*Method 2:*
If I did the same from nova boot command, the instance is creating and file
injection is happening. Both methods are using the same above function '*
create*' in '/usr/lib/python2.7/dist-packages/novaclient/v1_1/servers.py'.

I used the following nova boot command:
*#> nova boot --flavor=1 --image=4671e99b-1c01-42e8-94d6-2405a59bab57
testserver*

Can you please let me know, what I am doing wrong here? And also, If I want
to implement File Injection through Openstack Dashboard, what I need to
modify?
Thanks in advance.
-- 
----
Srikanth.
_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to     : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp

Reply via email to