Hi,<div>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.</div><div>For that, I modified the following file:</div>

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

<div><br></div><div><div><b><i>fp = file('/root/inject.txt', 'r')</i></b></div><div><b><i>files = {'/root/inject.txt':fp}</i></b></div><div><b><i><br></i></b></div><div>I followed two methods to create instance:</div>

<div>1. Through Openstack Dashboard</div><div>2. Through nova boot command from CLI</div><div><br></div><div><b>Method 1:</b></div><div>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:</div>

<div><br></div><div><strong style="color:rgb(185,74,72);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(242,222,222)">Error: </strong><span style="color:rgb(185,74,72);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(242,222,222)">There was an error submitting the form. Please try again.</span></div>

<div><br></div><div><b>Method 2:</b></div><div>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 '<b><i>create</i></b>' in '/usr/lib/python2.7/dist-packages/novaclient/v1_1/servers.py'. </div>
<div><br></div><div>I used the following nova boot command:</div>
<div><b><i>#> nova boot --flavor=1 --image=4671e99b-1c01-42e8-94d6-2405a59bab57 testserver</i></b></div><div><br></div><div>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?</div>

<div>Thanks in advance.</div>-- <br>----<div>Srikanth.</div><br>
</div>