From 2f9b6f23e2d2872a339a432d535b45cd48c2feae Mon Sep 17 00:00:00 2001 From: Andriy Moroz Date: Fri, 7 Jul 2017 11:37:50 +0300 Subject: [PATCH 1/2] Fix ACL json translation --- src/sonic-config-engine/translate_acl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-config-engine/translate_acl b/src/sonic-config-engine/translate_acl index 696a433730a9..5525eff96774 100755 --- a/src/sonic-config-engine/translate_acl +++ b/src/sonic-config-engine/translate_acl @@ -120,7 +120,7 @@ def generate_table_json(aclset, aclname, ports, mirror, max_priority, output_pat table_props["ports"] = ports table_data = [{}] - table_data[0]["ACL_TABLE:"+table_name] = table_props + table_data[0]["ACL_TABLE:"+table_name.upper()] = table_props table_data[0]["OP"] = "SET" dump_json(os.path.join(output_path, "table_"+table_name+".json"), table_data) From 919e5a76d4f4df10053417c94b5b4cda4d2c4fb1 Mon Sep 17 00:00:00 2001 From: Andriy Moroz Date: Fri, 7 Jul 2017 18:01:27 +0300 Subject: [PATCH 2/2] Fix json translation tests --- src/sonic-config-engine/tests/sample_output/table_dataacl.json | 2 +- src/sonic-config-engine/tests/sample_output/table_everflow.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sonic-config-engine/tests/sample_output/table_dataacl.json b/src/sonic-config-engine/tests/sample_output/table_dataacl.json index ed10f3195636..a099680821d4 100644 --- a/src/sonic-config-engine/tests/sample_output/table_dataacl.json +++ b/src/sonic-config-engine/tests/sample_output/table_dataacl.json @@ -1,6 +1,6 @@ [ { - "ACL_TABLE:dataacl":{ + "ACL_TABLE:DATAACL":{ "policy_desc":"dataacl", "ports":"Ethernet112,Ethernet116,Ethernet120,Ethernet124", "type":"L3" diff --git a/src/sonic-config-engine/tests/sample_output/table_everflow.json b/src/sonic-config-engine/tests/sample_output/table_everflow.json index 4f3411ed8874..9686f8e3890d 100644 --- a/src/sonic-config-engine/tests/sample_output/table_everflow.json +++ b/src/sonic-config-engine/tests/sample_output/table_everflow.json @@ -1,6 +1,6 @@ [ { - "ACL_TABLE:everflow":{ + "ACL_TABLE:EVERFLOW":{ "policy_desc":"everflow", "ports":"Ethernet24,Ethernet40,Ethernet20,Ethernet44,Ethernet48,Ethernet28,Ethernet96,Ethernet92,Ethernet76,Ethernet116,Ethernet72,Ethernet112,Ethernet52,Ethernet108,Ethernet56,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet120,Ethernet8,Ethernet4,Ethernet0,Ethernet124,Ethernet68,Ethernet84,Ethernet100,Ethernet80,Ethernet60,Ethernet104,Ethernet64,Ethernet88", "type":"mirror"