juniper_contrail:sdn_api.py fix to use valid chars in vpg and vmi names 22/9122/1
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Fri, 19 Jun 2020 07:00:20 +0000 (07:00 +0000)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Fri, 19 Jun 2020 09:58:02 +0000 (09:58 +0000)
Change-Id: I16b78d564ba36976f2bffdbe93758ad325ac4405
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
RO-SDN-juniper_contrail/osm_rosdn_juniper_contrail/sdn_api.py

index c8cca22..6ef91af 100644 (file)
@@ -148,10 +148,10 @@ class UnderlayApi:
 
     # Aux methods to avoid code duplication of name conventions
     def get_vpg_name(self, switch_id, switch_port):
-        return "{}_{}".format(switch_id, switch_port)
+        return "{}_{}".format(switch_id, switch_port).replace(":","_")
 
     def get_vmi_name(self, switch_id, switch_port, vlan):
-        return "{}_{}-{}".format(switch_id, switch_port, vlan)
+        return "{}_{}-{}".format(switch_id, switch_port, vlan).replace(":","_")
 
     # Virtual network operations