1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-26 06:50:09 +03:00

Bug #4580: Fix VM instantiate when NIC contains a fixed IP

This commit is contained in:
Carlos Martín 2016-06-17 18:12:46 +02:00
parent cc81681ba2
commit ca91c193a0
2 changed files with 11 additions and 4 deletions

View File

@ -116,11 +116,14 @@ define(function(require) {
nic["FLOATING_IP"] = "YES";
}
delete nic["IP"];
var ip4 = $("input.manual_ip4", $(this)).val();
if (ip4 != undefined && ip4 != ""){
nic["IP"] = ip4;
if (ip4 != undefined){
delete nic["IP"];
if (ip4 != ""){
nic["IP"] = ip4;
}
}
delete nic["VROUTER_MANAGEMENT"];

View File

@ -28,7 +28,11 @@
<span class="tip">
{{tr "Optionally, you can force the IP assigned to the network interface."}}
</span>
<input type="text" class="manual_ip4" />
{{#if options.nic.IP}}
<input type="text" class="manual_ip4" value="{{options.nic.IP}}"/>
{{else}}
<input type="text" class="manual_ip4"/>
{{/if}}
</label>
</div>
{{/if}}