Exemplo n.º 1
0
class VNXDomainNodeListTest(TestCase):
    @patch_cli
    def setUp(self):
        self.dnl = VNXDomainNodeList(t_cli())

    @patch_cli
    def test_iterable(self):
        assert_that(len(self.dnl), equal_to(2))

    @patch_cli
    def test_get_node(self):
        node = self.dnl.get_node('APM00153906536')
        assert_that(len(node.members), equal_to(2))

    @patch_cli
    def test_get_node_not_found(self):
        assert_that(self.dnl.get_node('abcde'), none())

    @patch_cli
    def test_get_spa_check_ip(self):
        node = self.dnl.get_node('APM00152904560')
        assert_that(node.spa.ip, equal_to('192.168.1.94'))
        assert_that(node.spb.ip, equal_to('192.168.1.95'))
        assert_that(node.control_station.ip, equal_to('192.168.1.93'))

    @patch_cli
    def test_get_cs_ip(self):
        assert_that(VNXDomainNodeList.get_cs_ip('APM00153042305', t_cli()),
                    equal_to('10.244.211.32'))
Exemplo n.º 2
0
class VNXDomainNodeListTest(TestCase):
    @patch_cli()
    def setUp(self):
        self.dnl = VNXDomainNodeList(t_cli())

    @patch_cli()
    def test_iterable(self):
        assert_that(len(self.dnl), equal_to(2))

    @patch_cli()
    def test_get_node(self):
        node = self.dnl.get_node('APM00153906536')
        assert_that(len(node.members), equal_to(2))

    @patch_cli()
    def test_get_node_not_found(self):
        def f():
            node = self.dnl.get_node('abcde')
            assert_that(len(node.members), equal_to(2))

        assert_that(f, raises(VNXObjectNotFound, 'abcde'))

    @patch_cli()
    def test_get_spa_check_ip(self):
        node = self.dnl.get_node('APM00152904560')
        assert_that(node.spa.ip, equal_to('192.168.1.94'))
        assert_that(node.spb.ip, equal_to('192.168.1.95'))
        assert_that(node.control_station.ip, equal_to('192.168.1.93'))

    @patch_cli()
    def test_get_cs_ip(self):
        assert_that(VNXDomainNodeList.get_cs_ip('APM00153042305', t_cli()),
                    equal_to('10.244.211.32'))
Exemplo n.º 3
0
 def control_station_ip(self):
     return VNXDomainNodeList.get_cs_ip(self.serial, self._cli)
Exemplo n.º 4
0
 def _get_cs_ip(self):
     return VNXDomainNodeList.get_cs_ip(self.serial, self._cli)
Exemplo n.º 5
0
 def setUp(self):
     dnl = VNXDomainNodeList(t_cli())
     self.dml = dnl[0].members
Exemplo n.º 6
0
 def test_get_cs_ip(self):
     assert_that(VNXDomainNodeList.get_cs_ip('APM00153042305', t_cli()),
                 equal_to('10.244.211.32'))
Exemplo n.º 7
0
 def setUp(self):
     self.dnl = VNXDomainNodeList(t_cli())
Exemplo n.º 8
0
 def _get_cs_ip(self):
     return VNXDomainNodeList.get_cs_ip(self.serial, self._cli)
Exemplo n.º 9
0
 def setUp(self):
     self.dnl = VNXDomainNodeList(t_cli())
Exemplo n.º 10
0
 def test_get_cs_ip(self):
     assert_that(VNXDomainNodeList.get_cs_ip('APM00153042305', t_cli()),
                 equal_to('10.244.211.32'))
Exemplo n.º 11
0
 def test_get_cs_ip(self):
     assert_that(VNXDomainNodeList.get_cs_ip('APM00153042305', t_cli()),
                 equal_to('192.168.1.93'))