X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=rwcal%2Fplugins%2Fvala%2Frwcal_openstack%2Frift%2Frwcal%2Fopenstack%2Futils%2Fnetwork.py;h=8e6f6087f03cabf3f78d1e833e8f9262cdac59c6;hb=812d2ec24829ccc60416bb310dc84114b089405f;hp=b0c58af24ae27c1c0c3ba37e96bc2b47f25dcd6c;hpb=eb223959413d75048f484c1978af10d6b551f19c;p=osm%2FSO.git 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 b0c58af2..8e6f6087 100644 --- 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 - 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 @@ -155,8 +159,11 @@ class NetworkUtils(object): 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