-
Notifications
You must be signed in to change notification settings - Fork 660
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add verification for override (#2305)
What I did Add Yang verification for config override-config-table How I did it Make 3 step verification: running config, golden input, final config How to verify it Run unit test.
- Loading branch information
Showing
5 changed files
with
397 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
tests/config_override_input/final_config_yang_failure.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{ | ||
"running_config": { | ||
"ACL_TABLE": { | ||
"DATAACL": { | ||
"policy_desc": "DATAACL", | ||
"ports": [ | ||
"Ethernet4" | ||
], | ||
"stage": "ingress", | ||
"type": "L3" | ||
}, | ||
"NTP_ACL": { | ||
"policy_desc": "NTP_ACL", | ||
"services": [ | ||
"NTP" | ||
], | ||
"stage": "ingress", | ||
"type": "CTRLPLANE" | ||
} | ||
}, | ||
"AUTO_TECHSUPPORT_FEATURE": { | ||
"bgp": { | ||
"rate_limit_interval": "600", | ||
"state": "enabled" | ||
}, | ||
"database": { | ||
"rate_limit_interval": "600", | ||
"state": "enabled" | ||
} | ||
}, | ||
"PORT": { | ||
"Ethernet4": { | ||
"admin_status": "up", | ||
"alias": "fortyGigE0/4", | ||
"description": "Servers0:eth0", | ||
"index": "1", | ||
"lanes": "29,30,31,32", | ||
"mtu": "9100", | ||
"pfc_asym": "off", | ||
"speed": "40000", | ||
"tpid": "0x8100" | ||
}, | ||
"Ethernet8": { | ||
"admin_status": "up", | ||
"alias": "fortyGigE0/8", | ||
"description": "Servers1:eth0", | ||
"index": "2", | ||
"lanes": "33,34,35,36", | ||
"mtu": "9100", | ||
"pfc_asym": "off", | ||
"speed": "40000", | ||
"tpid": "0x8100" | ||
} | ||
} | ||
}, | ||
"golden_config": { | ||
"PORT": { | ||
"Ethernet12": { | ||
"admin_status": "up", | ||
"alias": "fortyGigE0/12", | ||
"description": "Servers2:eth0", | ||
"index": "3", | ||
"lanes": "37,38,39,40", | ||
"mtu": "9100", | ||
"pfc_asym": "off", | ||
"speed": "40000", | ||
"tpid": "0x8100" | ||
} | ||
} | ||
} | ||
} |
89 changes: 89 additions & 0 deletions
89
tests/config_override_input/golden_input_yang_failure.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
{ | ||
"running_config": { | ||
"ACL_TABLE": { | ||
"DATAACL": { | ||
"policy_desc": "DATAACL", | ||
"ports": [ | ||
"Ethernet4" | ||
], | ||
"stage": "ingress", | ||
"type": "L3" | ||
}, | ||
"NTP_ACL": { | ||
"policy_desc": "NTP_ACL", | ||
"services": [ | ||
"NTP" | ||
], | ||
"stage": "ingress", | ||
"type": "CTRLPLANE" | ||
} | ||
}, | ||
"AUTO_TECHSUPPORT_FEATURE": { | ||
"bgp": { | ||
"rate_limit_interval": "600", | ||
"state": "enabled" | ||
}, | ||
"database": { | ||
"rate_limit_interval": "600", | ||
"state": "enabled" | ||
} | ||
}, | ||
"PORT": { | ||
"Ethernet4": { | ||
"admin_status": "up", | ||
"alias": "fortyGigE0/4", | ||
"description": "Servers0:eth0", | ||
"index": "1", | ||
"lanes": "29,30,31,32", | ||
"mtu": "9100", | ||
"pfc_asym": "off", | ||
"speed": "40000", | ||
"tpid": "0x8100" | ||
}, | ||
"Ethernet8": { | ||
"admin_status": "up", | ||
"alias": "fortyGigE0/8", | ||
"description": "Servers1:eth0", | ||
"index": "2", | ||
"lanes": "33,34,35,36", | ||
"mtu": "9100", | ||
"pfc_asym": "off", | ||
"speed": "40000", | ||
"tpid": "0x8100" | ||
} | ||
} | ||
}, | ||
"golden_config": { | ||
"ACL_TABLE": { | ||
"EVERFLOWV6": { | ||
"policy_desc": "EVERFLOWV6", | ||
"ports": [ | ||
"Ethernet0" | ||
], | ||
"stage": "ingress", | ||
"type": "MIRRORV6" | ||
} | ||
}, | ||
"AUTO_TECHSUPPORT_FEATURE": { | ||
"bgp": { | ||
"state": "disabled" | ||
}, | ||
"database": { | ||
"state": "disabled" | ||
} | ||
}, | ||
"PORT": { | ||
"Ethernet12": { | ||
"admin_status": "up", | ||
"alias": "fortyGigE0/12", | ||
"description": "Servers2:eth0", | ||
"index": "3", | ||
"lanes": "37,38,39,40", | ||
"mtu": "9100", | ||
"pfc_asym": "off", | ||
"speed": "40000", | ||
"tpid": "0x8100" | ||
} | ||
} | ||
} | ||
} |
89 changes: 89 additions & 0 deletions
89
tests/config_override_input/running_config_yang_failure.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
{ | ||
"running_config": { | ||
"ACL_TABLE": { | ||
"DATAACL": { | ||
"policy_desc": "DATAACL", | ||
"ports": [ | ||
"Ethernet0" | ||
], | ||
"stage": "ingress", | ||
"type": "L3" | ||
}, | ||
"NTP_ACL": { | ||
"policy_desc": "NTP_ACL", | ||
"services": [ | ||
"NTP" | ||
], | ||
"stage": "ingress", | ||
"type": "CTRLPLANE" | ||
} | ||
}, | ||
"AUTO_TECHSUPPORT_FEATURE": { | ||
"bgp": { | ||
"rate_limit_interval": "600", | ||
"state": "enabled" | ||
}, | ||
"database": { | ||
"rate_limit_interval": "600", | ||
"state": "enabled" | ||
} | ||
}, | ||
"PORT": { | ||
"Ethernet4": { | ||
"admin_status": "up", | ||
"alias": "fortyGigE0/4", | ||
"description": "Servers0:eth0", | ||
"index": "1", | ||
"lanes": "29,30,31,32", | ||
"mtu": "9100", | ||
"pfc_asym": "off", | ||
"speed": "40000", | ||
"tpid": "0x8100" | ||
}, | ||
"Ethernet8": { | ||
"admin_status": "up", | ||
"alias": "fortyGigE0/8", | ||
"description": "Servers1:eth0", | ||
"index": "2", | ||
"lanes": "33,34,35,36", | ||
"mtu": "9100", | ||
"pfc_asym": "off", | ||
"speed": "40000", | ||
"tpid": "0x8100" | ||
} | ||
} | ||
}, | ||
"golden_config": { | ||
"ACL_TABLE": { | ||
"EVERFLOWV6": { | ||
"policy_desc": "EVERFLOWV6", | ||
"ports": [ | ||
"Ethernet12" | ||
], | ||
"stage": "ingress", | ||
"type": "MIRRORV6" | ||
} | ||
}, | ||
"AUTO_TECHSUPPORT_FEATURE": { | ||
"bgp": { | ||
"state": "disabled" | ||
}, | ||
"database": { | ||
"state": "disabled" | ||
} | ||
}, | ||
"PORT": { | ||
"Ethernet12": { | ||
"admin_status": "up", | ||
"alias": "fortyGigE0/12", | ||
"description": "Servers2:eth0", | ||
"index": "3", | ||
"lanes": "37,38,39,40", | ||
"mtu": "9100", | ||
"pfc_asym": "off", | ||
"speed": "40000", | ||
"tpid": "0x8100" | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.