Corrected bug: If vlan provided is None raise an error 18/9018/2
authorlloretgalleg <illoret@indra.es>
Tue, 2 Jun 2020 05:17:17 +0000 (07:17 +0200)
committertierno <alfonso.tiernosepulveda@telefonica.com>
Fri, 12 Jun 2020 09:02:08 +0000 (11:02 +0200)
Change-Id: Ide943ed5a2ae5e03028b90c266144a8051e616c7
Signed-off-by: lloretgalleg <illoret@indra.es>
RO-SDN-juniper_contrail/osm_rosdn_juniper_contrail/sdn_assist_juniper_contrail.py

index b3d3eb4..2fcdb1d 100644 (file)
@@ -398,6 +398,8 @@ class JuniperContrail(SdnConnectorBase):
             if len(vlans) == 1:
                 vlan = vlans.pop()
                 self.logger.debug("Provided vlan: {}".format(vlan))
+                if not vlan:
+                    raise SdnConnectorError("No vlan provided")
             else:
                 raise SdnConnectorError("Provided more than one vlan")