get endpoint values
@@ -206,6 +206,7 @@ class BcfProxy(JsonMixin, CookieAuthControllerProxy):
endpoints = self.get_endpoints()
match_list = []
for endpoint in endpoints:
+ self.logger.debug('endpoint values: {0}'.format(endpoint))
if mac_addr == endpoint.get('mac'):
record = {}
for value in ['mac', 'name', 'tenant', 'segment']:
@@ -298,7 +299,6 @@ class BcfProxy(JsonMixin, CookieAuthControllerProxy):
def get_seq_by_mac(self, mac):
my_filter = self.get_span_fabric().get('filter')
- self.logger.info('myfilter: {0}'.format(my_filter))
retval = []
if my_filter is not None:
for f in my_filter:
@@ -308,19 +308,19 @@ class BcfProxy(JsonMixin, CookieAuthControllerProxy):
src = f[
'match-specification'].get('src-mac', 'broke')
if src == mac or dst == mac:
- self.logger.debug('get_seq_by_mac: {0}'.format(f))
retval.append(f.get('seq'))
return retval
def mirror_mac(self, mac, switch, port, messages=None):
- status = None
my_start = self.get_highest(self.get_span_fabric())
- mac_list = self.get_seq_by_mac(mac)
- if my_start is not None:
- self.logger.debug('mirroring {0}'.format(my_start))
+ status = None
+ retval = self.get_bymac(mac)
+ for value in retval:
+ self.logger.debug('mirroring {0}'.format(value['segment']))
s_dict = {'interface': ''}
src = {'match-specification': {'src-mac': '{0}'.format(mac)}}
dst = {'match-specification': {'dst-mac': '{0}'.format(mac)}}
+ if my_start is not None:
self.mirror_traffic(my_start, mirror=True, s_dict=src)
self.mirror_traffic(my_start + 1, mirror=True, s_dict=dst)
status = True
