From: lloretgalleg Date: Tue, 2 Jun 2020 05:17:17 +0000 (+0200) Subject: Corrected bug: If vlan provided is None raise an error X-Git-Tag: v7.1.0rc6^0 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F17%2F9017%2F1;p=osm%2FRO.git Corrected bug: If vlan provided is None raise an error Change-Id: Ide943ed5a2ae5e03028b90c266144a8051e616c7 Signed-off-by: lloretgalleg --- diff --git a/RO-SDN-juniper_contrail/osm_rosdn_juniper_contrail/sdn_assist_juniper_contrail.py b/RO-SDN-juniper_contrail/osm_rosdn_juniper_contrail/sdn_assist_juniper_contrail.py index b3d3eb49..2fcdb1d6 100644 --- a/RO-SDN-juniper_contrail/osm_rosdn_juniper_contrail/sdn_assist_juniper_contrail.py +++ b/RO-SDN-juniper_contrail/osm_rosdn_juniper_contrail/sdn_assist_juniper_contrail.py @@ -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")