Skip to content

Commit

Permalink
Fix test cases after sample yang files name changes
Browse files Browse the repository at this point in the history
  • Loading branch information
li-pingmao authored and Praveen Chaudhary committed May 1, 2020
1 parent 2f315ee commit ba5cc32
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sonic-vlan:sonic-vlan": {
"sonic-vlan:VLAN_INTERFACE": {
"test-sonic-vlan:sonic-vlan": {
"test-sonic-vlan:VLAN_INTERFACE": {
"VLAN_INTERFACE_LIST": [{
"vlanid": 111,
"ip-prefix": "2000:f500:45:6709::1/64",
Expand Down Expand Up @@ -40,7 +40,7 @@
]
},

"sonic-vlan:VLAN": {
"test-sonic-vlan:VLAN": {
"VLAN_LIST": [{
"vlanid": 111,
"description": "server_vlan",
Expand Down Expand Up @@ -78,7 +78,7 @@
]
},

"sonic-vlan:VLAN_MEMBER": {
"test-sonic-vlan:VLAN_MEMBER": {
"VLAN_MEMBER_LIST": [{
"vlanid": 111,
"port": "Ethernet0",
Expand Down Expand Up @@ -117,8 +117,8 @@
]
}
},
"sonic-port:sonic-port": {
"sonic-port:PORT": {
"test-sonic-port:sonic-port": {
"test-sonic-port:PORT": {
"PORT_LIST": [{
"port_name": "Ethernet0",
"alias": "eth0",
Expand Down Expand Up @@ -203,8 +203,8 @@
}
},

"sonic-acl:sonic-acl": {
"sonic-acl:ACL_RULE": {
"test-sonic-acl:sonic-acl": {
"test-sonic-acl:ACL_RULE": {
"ACL_RULE_LIST": [{
"ACL_TABLE_NAME": "PACL-V4",
"RULE_NAME": "Rule_20",
Expand Down Expand Up @@ -237,7 +237,7 @@
]
},

"sonic-acl:ACL_TABLE": {
"test-sonic-acl:ACL_TABLE": {
"ACL_TABLE_LIST": [{
"ACL_TABLE_NAME": "PACL-V6",
"policy_desc": "Filter IPv6",
Expand All @@ -256,8 +256,8 @@
}
},

"sonic-interface:sonic-interface": {
"sonic-interface:INTERFACE": {
"test-sonic-interface:sonic-interface": {
"test-sonic-interface:INTERFACE": {
"INTERFACE_LIST": [{
"interface": "Ethernet8",
"ip-prefix": "10.1.1.65/26",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,15 @@
"parent":"/test-sonic-port:sonic-port/PORT/PORT_LIST[port_name='Ethernet9']"}
],
"prefix":[
{"module_name":"test-sonic-head", "module_prefix":"test-sonic-head"},
{"module_name":"test-sonic-port", "module_prefix":"test-sonic-port"},
{"module_name":"test-sonic-acl", "module_prefix":"test-sonic-acl"},
{"module_name":"test-sonic-interface", "module_prefix":"test-sonic-intf"},
{"module_name":"test-sonic-portchannel", "module_prefix":"test-sonic-lag"},
{"module_name":"test-sonic-vlan", "module_prefix":"test-sonic-vlan"}
{"module_name":"test-sonic-head", "module_prefix":"sonic-head"},
{"module_name":"test-sonic-port", "module_prefix":"port"},
{"module_name":"test-sonic-acl", "module_prefix":"acl"},
{"module_name":"test-sonic-interface", "module_prefix":"intf"},
{"module_name":"test-sonic-portchannel", "module_prefix":"lag"},
{"module_name":"test-sonic-vlan", "module_prefix":"vlan"}
],
"data_type":[
{"xpath":"/test-sonic-port:sonic-port/test-sonic-port:PORT/sonic-port:PORT_LIST/test-sonic-port:port_name", "data_type":"LY_TYPE_STRING"},
{"xpath":"/test-sonic-port:sonic-port/test-sonic-port:PORT/test-sonic-port:PORT_LIST/test-sonic-port:port_name", "data_type":"LY_TYPE_STRING"},
{"xpath":"/test-sonic-vlan:sonic-vlan/test-sonic-vlan:VLAN_INTERFACE/test-sonic-vlan:VLAN_INTERFACE_LIST/test-sonic-vlan:vlanid", "data_type":"LY_TYPE_LEAFREF"}
],
"leafref_type":[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def test_delete_node(self, data, yang_s):
for node in data['delete_nodes']:
expected = node['valid']
xpath = str(node['xpath'])
yang_s.delete_data_node(xpath)
yang_s._delete_node(xpath)

#test set node's value
def test_set_datanode_value(self, data, yang_s):
Expand Down

0 comments on commit ba5cc32

Please sign in to comment.