projects
/
osm
/
SO.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix ordering of elements for Openstack block device mapping
[osm/SO.git]
/
rwcal
/
plugins
/
vala
/
rwcal_openstack
/
rift
/
rwcal
/
openstack
/
utils
/
network.py
diff --git
a/rwcal/plugins/vala/rwcal_openstack/rift/rwcal/openstack/utils/network.py
b/rwcal/plugins/vala/rwcal_openstack/rift/rwcal/openstack/utils/network.py
index
b0c58af
..
8e6f608
100644
(file)
--- a/
rwcal/plugins/vala/rwcal_openstack/rift/rwcal/openstack/utils/network.py
+++ b/
rwcal/plugins/vala/rwcal_openstack/rift/rwcal/openstack/utils/network.py
@@
-131,7
+131,11
@@
class NetworkUtils(object):
network_ids.append(self.driver._mgmt_network_id)
### Create ports and collect port ids
network_ids.append(self.driver._mgmt_network_id)
### Create ports and collect port ids
- port_ids = self.driver.neutron_multi_port_create(port_args)
+ if port_args:
+ port_ids = self.driver.neutron_multi_port_create(port_args)
+ else:
+ port_ids = list()
+
return port_ids, network_ids
return port_ids, network_ids
@@
-155,8
+159,11
@@
class NetworkUtils(object):
else:
raise NotImplementedError("Port Type: %s not supported" %(cp.type_yang))
else:
raise NotImplementedError("Port Type: %s not supported" %(cp.type_yang))
- if cp.static_ip_address:
- args["fixed_ips"] = [{"ip_address" : cp.static_ip_address}]
+ try:
+ if cp.static_ip_address:
+ args["fixed_ips"] = [{"ip_address" : cp.static_ip_address}]
+ except Exception as e:
+ pass
if 'port_security_enabled' in cp:
args['port_security_enabled'] = cp.port_security_enabled
if 'port_security_enabled' in cp:
args['port_security_enabled'] = cp.port_security_enabled