コード例 #1
0
 def test_adminstate_down(self):
     intf = Interface('eth', '1', '1', '1', '1')
     intf.adminstatus = 'down'
     phys_domain_json, fabric_json, infra_json = intf.get_json()
     expected_json = ("{'fabricOOServicePol': {'children': [{'fabricRsOosPa"
                      "th': {'attributes': {'tDn': 'topology/pod-1/paths-1/"
                      "pathep-[eth1/1]', 'lc': 'blacklist'}, 'children': []"
                      "}}]}}")
     self.assertEqual(str(fabric_json), expected_json)
コード例 #2
0
 def test_adminstate_down(self):
     intf = Interface('eth', '1', '1', '1', '1')
     intf.adminstatus = 'down'
     phys_domain_json, fabric_json, infra_json = intf.get_json()
     expected_json = ("{'fabricOOServicePol': {'children': [{'fabricRsOosPa"
                      "th': {'attributes': {'tDn': 'topology/pod-1/paths-1/"
                      "pathep-[eth1/1]', 'lc': 'blacklist'}, 'children': []"
                      "}}]}}")
     self.assertEqual(str(fabric_json), expected_json)
コード例 #3
0
 def test_adminstate_up(self):
     intf = Interface('eth', '1', '1', '1', '1')
     intf.adminstatus = 'up'
     phys_domain_json, fabric_json, infra_json = intf.get_json()
     expected_json = ("{'fabricOOServicePol': {'children': [{'fabricRsOosPa"
                      "th': {'attributes': {'dn': 'uni/fabric/outofsvc/rsoo"
                      "sPath-[topology/pod-1/paths-1/pathep-[eth1/1]]', 'st"
                      "atus': 'deleted', 'tDn': 'topology/pod-1/paths-1/pat"
                      "hep-[eth1/1]'}, 'children': []}}]}}")
     self.assertEqual(str(fabric_json), expected_json)
コード例 #4
0
 def test_adminstate_up(self):
     intf = Interface('eth', '1', '1', '1', '1')
     intf.adminstatus = 'up'
     phys_domain_json, fabric_json, infra_json = intf.get_json()
     expected_json = ("{'fabricOOServicePol': {'children': [{'fabricRsOosPa"
                      "th': {'attributes': {'dn': 'uni/fabric/outofsvc/rsoo"
                      "sPath-[topology/pod-1/paths-1/pathep-[eth1/1]]', 'st"
                      "atus': 'deleted', 'tDn': 'topology/pod-1/paths-1/pat"
                      "hep-[eth1/1]'}, 'children': []}}]}}")
     self.assertEqual(str(fabric_json), expected_json)