X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=common%2Fpython%2Frift%2Fmano%2Ftosca_translator%2Frwmano%2Ftosca%2Ftosca_network_network.py;fp=common%2Fpython%2Frift%2Fmano%2Ftosca_translator%2Frwmano%2Ftosca%2Ftosca_network_network.py;h=88a8a31b5a3de43b15d13e05641861aa195aa2e1;hb=4870d0ee29789b859931e4e2c73e13dcb29537d5;hp=a9f9c778dc693a66b9b707c39ff3e7fca3c6bba0;hpb=6f1a3fe149e4a6b9803382cb299c902f4cf58ec9;p=osm%2FSO.git diff --git a/common/python/rift/mano/tosca_translator/rwmano/tosca/tosca_network_network.py b/common/python/rift/mano/tosca_translator/rwmano/tosca/tosca_network_network.py index a9f9c778..88a8a31b 100644 --- a/common/python/rift/mano/tosca_translator/rwmano/tosca/tosca_network_network.py +++ b/common/python/rift/mano/tosca_translator/rwmano/tosca/tosca_network_network.py @@ -91,8 +91,8 @@ class ToscaNetwork(ManoResource): ip_profile_param['ip-version'] = 'ipv' + str(specs['ip_version']) if 'cidr' in specs: ip_profile_param['subnet-address'] = specs['cidr'] + ip_profile_prop['ip-profile-params'] = ip_profile_param - ip_profile_prop['ip-profile-params'] = ip_profile_param return ip_profile_prop tosca_props = self.get_tosca_props() self._vld = get_vld_props(tosca_props) @@ -128,7 +128,8 @@ class ToscaNetwork(ManoResource): ip_profile_props = convert_keys_to_python(self._ip_profile) try: nsd.vld.add().from_dict(vld_props) - nsd.ip_profiles.add().from_dict(ip_profile_props) + if len(ip_profile_props) > 1: + nsd.ip_profiles.add().from_dict(ip_profile_props) except Exception as e: err_msg = _("{0} Exception vld from dict {1}: {2}"). \ format(self, props, e)