fix status array
@@ -319,8 +319,8 @@ class Parser:
endpoint.endpoint_data['mac'], endpoint.endpoint_data['segment'], endpoint.endpoint_data['port'], rule_acls))
obj_doc['dps'][endpoint.endpoint_data['segment']]['interfaces'][int(
endpoint.endpoint_data['port'])]['acls_in'] = rule_acls
- status[1].append('added acls', endpoint.endpoint_data['mac'],
- endpoint.endpoint_data['segment'], endpoint.endpoint_data['port'], rule_acls, rule)
+ status[1].append(['added acls', endpoint.endpoint_data['mac'],
+ endpoint.endpoint_data['segment'], endpoint.endpoint_data['port'], rule_acls, rule])
rewrite = True
else:
# remove ACLs that were previously applied
@@ -336,8 +336,8 @@ class Parser:
removed_acls.append(acl)
rewrite = True
if removed_acls:
- status[1].append('removed acls', endpoint.endpoint_data['mac'],
- endpoint.endpoint_data['segment'], endpoint.endpoint_data['port'], removed_acls, rule)
+ status[1].append(['removed acls', endpoint.endpoint_data['mac'],
+ endpoint.endpoint_data['segment'], endpoint.endpoint_data['port'], removed_acls, rule])
# add new ACLs
orig_rule_acls = rule_acls
rule_acls += obj_doc['dps'][endpoint.endpoint_data['segment']]['interfaces'][int(
@@ -349,8 +349,8 @@ class Parser:
endpoint.endpoint_data['port'])]['acls_in'] = rule_acls
self.logger.info('All rules met for: {0} on switch: {1} and port: {2}; applying ACLs: {3}'.format(
endpoint.endpoint_data['mac'], endpoint.endpoint_data['segment'], endpoint.endpoint_data['port'], orig_rule_acls))
- status[1].append('added acls', endpoint.endpoint_data['mac'],
- endpoint.endpoint_data['segment'], endpoint.endpoint_data['port'], orig_rule_acls, rule)
+ status[1].append(['added acls', endpoint.endpoint_data['mac'],
+ endpoint.endpoint_data['segment'], endpoint.endpoint_data['port'], orig_rule_acls, rule])
rewrite = True
if not rewrite:
