fix issue at install-openvim.sh
[osm/openvim.git] / osm_openvim / httpserver.py
index edf1e8d..d0d494a 100644 (file)
@@ -1645,7 +1645,7 @@ def http_post_server_id(tenant_id):
                         dhcp_firt_ip = str(server_net['network']['dhcp_first_ip'])
                         dhcp_last_ip = str(server_net['network']['dhcp_last_ip'])
                         dhcp_cidr = str(server_net['network']['cidr'])
-                        gateway = str(server_net['network']['gateway'])
+                        gateway = str(server_net['network']['gateway_ip'])
                         vm_dhcp_ip = c2[0]["ip_address"]
                         config_dic['host_threads'][server['host_id']].insert_task("create-ovs-bridge-port", vlan)
 
@@ -1831,7 +1831,9 @@ def http_server_action(server_id, tenant_id, action):
             delete_dhcp_ovs_bridge(vlan, net_id)
             delete_mac_dhcp(vm_ip, vlan, mac)
             config_dic['host_threads'][server['host_id']].insert_task('del-ovs-port', vlan, net_id)
-    return format_out(data + warn_text)
+    if warn_text:
+        data["result"] += warn_text
+    return format_out(data)