don't mirror traffic if span fabric/ig doesn't exist
@@ -356,7 +356,7 @@ class BcfProxy(JsonMixin, CookieAuthControllerProxy):
uri = urljoin(self.base_uri, resource)
data = self.get_span_fabric() # first element is vent span rule
module_logger.debug('{0}'.format(data))
-
+ if data:
if mirror:
new_filter = {}
if s_dict is not None:
@@ -378,4 +378,9 @@ class BcfProxy(JsonMixin, CookieAuthControllerProxy):
retval = BcfProxy.parse_json(r)
sout = 'mirror_traffic return:{0}'.format(retval)
module_logger.debug(sout)
+ else:
+ retval = None
+ module_logger.debug("Configured combination of span fabric and interface group"
+ " does not exist. Traffic will not be mirrored")
+
return retval
