Commit 0f3f5ab7 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Update Tools.py

parent e57862b5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -288,7 +288,7 @@ def compute_rules_to_add_delete(
            acl_ruleset_name = config_rule.acl.rule_set.name                     # get the acl name
            ACL_KEY_TEMPLATE = '/device[{:s}]/endpoint[{:s}]/acl_ruleset[{:s}]'
            key_or_path = ACL_KEY_TEMPLATE.format(device_uuid, endpoint_uuid, acl_ruleset_name)            
            context_config_rules[key_or_path] = config_rule.acl                  # get the resource value of the acl
            context_config_rules[key_or_path] = grpc_message_to_json(config_rule.acl)    # get the resource value of the acl
 
    request_config_rules = []
    for config_rule in request.device_config.config_rules:
@@ -304,7 +304,7 @@ def compute_rules_to_add_delete(
            ACL_KEY_TEMPLATE = '/device[{:s}]/endpoint[{:s}]/acl_ruleset[{:s}]'
            key_or_path = ACL_KEY_TEMPLATE.format(device_uuid, endpoint_uuid, acl_ruleset_name) 
            request_config_rules.append((
                config_rule.action, key_or_path, config_rule.acl
                config_rule.action, key_or_path, grpc_message_to_json(config_rule.acl)
            ))

    resources_to_set    : List[Tuple[str, Any]] = [] # key, value