示例#1
0
    def test_connection_port_not_in_hba_port_set(self):
        ports = self.hba_port_set()
        c_port = VNXConnectionPort(sp='a', port_id=4, cli=t_cli())
        assert_that(ports, is_not(has_item(c_port)))

        c_port = VNXConnectionPort(sp='a', port_id=9, cli=t_cli())
        assert_that(ports, is_not(has_item(c_port)))
示例#2
0
 def test_hba_equal_connection_port(self):
     hba = test_hba()
     c_port = VNXConnectionPort(sp='a', port_id=3, vport_id=1, cli=t_cli())
     assert_that(hba, equal_to(c_port))
示例#3
0
 def test_connection_port_in_sp_port_list(self):
     c_port = VNXConnectionPort(sp='a', port_id=9, cli=t_cli())
     ports = VNXSPPort.get(t_cli())
     assert_that(ports, has_item(c_port))
示例#4
0
 def test_connection_port_in_hba_port_set(self):
     ports = self.hba_port_set()
     c_port = VNXConnectionPort(sp='a', port_id=6, vport_id=0, cli=t_cli())
     assert_that(ports, has_item(c_port))
示例#5
0
 def test_connection_port_equal_hba_port(self):
     c_port = VNXConnectionPort(sp='a', port_id=4, cli=t_cli())
     h_port = VNXHbaPort.create('a', 4, vport_id=0)
     assert_that(c_port, equal_to(h_port))
示例#6
0
 def test_connection_port_equal_sp_port(self):
     c_port = VNXConnectionPort(sp='a', port_id=9, cli=t_cli())
     s_port = VNXSPPort.get(t_cli(), VNXSPEnum.SP_A, 9)[0]
     assert_that(c_port, equal_to(s_port))
示例#7
0
 def test_connection_port_not_equal_sp_port(self):
     c_port = VNXConnectionPort(sp='a', port_id=4, cli=t_cli())
     s_port = VNXSPPort.get(t_cli(), VNXSPEnum.SP_A, 4)
     # one has vport_id, others not, not equal
     assert_that(c_port, is_not(equal_to(s_port)))
示例#8
0
 def test_port(self):
     return VNXConnectionPort(sp='a', port_id=4, cli=t_cli())