def test_parameters(self):
        pod = Pod('1')
        node1 = '2'
        node2 = '3'
        slot1 = '4'
        slot2 = '5'
        port1 = '6'
        port2 = '7'
        link = '101'

        link1 = Link(pod)
        link1.pod = pod.pod
        link1.link = link
        link1.node1 = node1
        link1.slot1 = slot1
        link1.port1 = port1
        link1.node2 = node2
        link1.slot2 = slot2
        link1.port2 = port2
        self.assertEqual(link1.pod, pod.pod)
        self.assertEqual(link1.link, link)
        self.assertEqual(link1.node1, node1)
        self.assertEqual(link1.slot1, slot1)
        self.assertEqual(link1.port1, port1)
        self.assertEqual(link1.node2, node2)
        self.assertEqual(link1.slot2, slot2)
        self.assertEqual(link1.port2, port2)
        self.assertEqual(link1.get_parent(), pod)

        self.assertEqual(link1.get_port_id1(), '1/2/4/6')
        self.assertEqual(link1.get_port_id2(), '1/3/5/7')
    def test_parameters(self):
        pod = Pod('1')
        node1 = '2'
        node2 = '3'
        slot1 = '4'
        slot2 = '5'
        port1 = '6'
        port2 = '7'
        link = '101'

        link1 = Link(pod)
        link1.pod = pod.pod
        link1.link = link
        link1.node1 = node1
        link1.slot1 = slot1
        link1.port1 = port1
        link1.node2 = node2
        link1.slot2 = slot2
        link1.port2 = port2
        self.assertEqual(link1.pod, pod.pod)
        self.assertEqual(link1.link, link)
        self.assertEqual(link1.node1, node1)
        self.assertEqual(link1.slot1, slot1)
        self.assertEqual(link1.port1, port1)
        self.assertEqual(link1.node2, node2)
        self.assertEqual(link1.slot2, slot2)
        self.assertEqual(link1.port2, port2)
        self.assertEqual(link1.get_parent(), pod)

        self.assertEqual(link1.get_port_id1(), '1/2/4/6')
        self.assertEqual(link1.get_port_id2(), '1/3/5/7')
    def test_parameters(self):
        pod = Pod("1")
        node1 = "2"
        node2 = "3"
        slot1 = "4"
        slot2 = "5"
        port1 = "6"
        port2 = "7"
        link = "101"

        link1 = Link(pod)
        link1.pod = pod.pod
        link1.link = link
        link1.node1 = node1
        link1.slot1 = slot1
        link1.port1 = port1
        link1.node2 = node2
        link1.slot2 = slot2
        link1.port2 = port2
        self.assertEqual(link1.pod, pod.pod)
        self.assertEqual(link1.link, link)
        self.assertEqual(link1.node1, node1)
        self.assertEqual(link1.slot1, slot1)
        self.assertEqual(link1.port1, port1)
        self.assertEqual(link1.node2, node2)
        self.assertEqual(link1.slot2, slot2)
        self.assertEqual(link1.port2, port2)
        self.assertEqual(link1.get_parent(), pod)

        self.assertEqual(link1.get_port_id1(), "1/2/4/6")
        self.assertEqual(link1.get_port_id2(), "1/3/5/7")
    def test_get_endpoint_objects(self):
        pod_id = '1'
        node1_id = '2'
        node2_id = '3'
        slot1_id = '4'
        slot2_id = '5'
        port1_id = '6'
        port2_id = '7'
        link_id = '101'

        pod = Pod(pod_id)
        node1 = Node(pod_id, node1_id, 'Spine', 'spine', pod)
        node2 = Node(pod_id, node2_id, 'Leaf', 'leaf', pod)
        linecard1 = Linecard(slot1_id, node1)
        linecard2 = Linecard(slot2_id, node2)
        interface1 = Interface(interface_type='eth',
                               pod=pod_id,
                               node=node1_id,
                               module=slot1_id,
                               port=port1_id,
                               parent=linecard1)
        interface2 = Interface(interface_type='eth',
                               pod=pod_id,
                               node=node2_id,
                               module=slot2_id,
                               port=port2_id,
                               parent=linecard2)
        link1 = Link(pod)
        link1.pod = pod_id
        link1.link = link_id
        link1.node1 = node1_id
        link1.slot1 = slot1_id
        link1.port1 = port1_id
        link1.node2 = node2_id
        link1.slot2 = slot2_id
        link1.port2 = port2_id

        self.assertEqual(node1, link1.get_node1())
        self.assertEqual(node2, link1.get_node2())
        self.assertEqual(linecard1, link1.get_slot1())
        self.assertEqual(linecard2, link1.get_slot2())
        self.assertEqual(interface1, link1.get_port1())
        self.assertEqual(interface2, link1.get_port2())
    def test_get_endpoint_objects(self):
        pod_id = '1'
        node1_id = '2'
        node2_id = '3'
        slot1_id = '4'
        slot2_id = '5'
        port1_id = '6'
        port2_id = '7'
        link_id = '101'

        pod = Pod(pod_id)
        node1 = Node(pod_id, node1_id, 'Spine', 'spine', pod)
        node2 = Node(pod_id, node2_id, 'Leaf', 'leaf', pod)
        linecard1 = Linecard(slot1_id, node1)
        linecard2 = Linecard(slot2_id, node2)
        interface1 = Interface(interface_type='eth', pod=pod_id,
                               node=node1_id, module=slot1_id,
                               port=port1_id, parent=linecard1)
        interface2 = Interface(interface_type='eth', pod=pod_id,
                               node=node2_id, module=slot2_id,
                               port=port2_id, parent=linecard2)
        link1 = Link(pod)
        link1.pod = pod_id
        link1.link = link_id
        link1.node1 = node1_id
        link1.slot1 = slot1_id
        link1.port1 = port1_id
        link1.node2 = node2_id
        link1.slot2 = slot2_id
        link1.port2 = port2_id

        self.assertEqual(node1, link1.get_node1())
        self.assertEqual(node2, link1.get_node2())
        self.assertEqual(linecard1, link1.get_slot1())
        self.assertEqual(linecard2, link1.get_slot2())
        self.assertEqual(interface1, link1.get_port1())
        self.assertEqual(interface2, link1.get_port2())
    def test_get_endpoint_objects(self):
        pod_id = "1"
        node1_id = "2"
        node2_id = "3"
        slot1_id = "4"
        slot2_id = "5"
        port1_id = "6"
        port2_id = "7"
        link_id = "101"

        pod = Pod(pod_id)
        node1 = Node(pod_id, node1_id, "Spine", "spine", pod)
        node2 = Node(pod_id, node2_id, "Leaf", "leaf", pod)
        linecard1 = Linecard(slot1_id, node1)
        linecard2 = Linecard(slot2_id, node2)
        interface1 = Interface(
            interface_type="eth", pod=pod_id, node=node1_id, module=slot1_id, port=port1_id, parent=linecard1
        )
        interface2 = Interface(
            interface_type="eth", pod=pod_id, node=node2_id, module=slot2_id, port=port2_id, parent=linecard2
        )
        link1 = Link(pod)
        link1.pod = pod_id
        link1.link = link_id
        link1.node1 = node1_id
        link1.slot1 = slot1_id
        link1.port1 = port1_id
        link1.node2 = node2_id
        link1.slot2 = slot2_id
        link1.port2 = port2_id

        self.assertEqual(node1, link1.get_node1())
        self.assertEqual(node2, link1.get_node2())
        self.assertEqual(linecard1, link1.get_slot1())
        self.assertEqual(linecard2, link1.get_slot2())
        self.assertEqual(interface1, link1.get_port1())
        self.assertEqual(interface2, link1.get_port2())