예제 #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
파일: test_port.py 프로젝트: seven/storops
 def test_set_path_with_fcoe_port_success(self):
     uid = 'iqn.1992-04.com.abc:a.b.c'
     port = VNXConnectionPort.get(sp=VNXSPEnum.SP_A, port_id=8,
                                  vport_id=0, cli=t_cli())
     sg = VNXStorageGroup(cli=t_cli(), name='sg0')
     # no error raised
     sg.connect_hba(port, uid, 'host0')
예제 #3
0
 def f():
     uid = 'iqn.1992-04.com.abc:a.b.c'
     port = VNXConnectionPort.get(sp=VNXSPEnum.SP_A,
                                  port_id=10,
                                  cli=t_cli())[0]
     sg = VNXStorageGroup(cli=t_cli(), name='sg0')
     sg.set_path(port, uid, 'host0')
예제 #4
0
파일: test_port.py 프로젝트: crook/storops
 def test_set_path_with_fcoe_port_success(self):
     uid = 'iqn.1992-04.com.abc:a.b.c'
     port = VNXConnectionPort.get(sp=VNXSPEnum.SP_A, port_id=8,
                                  vport_id=0, cli=t_cli())
     sg = VNXStorageGroup(cli=t_cli(), name='sg0')
     # no error raised
     sg.connect_hba(port, uid, 'host0')
예제 #5
0
    def get_fcoe_port(self, sp=None, port_id=None, vport_id=None, poll=False):
        ret = VNXConnectionPort.get(self._cli,
                                    sp=sp,
                                    port_id=port_id,
                                    vport_id=vport_id,
                                    port_type=VNXPortType.FCOE)

        return self._update_poll(ret, poll)
예제 #6
0
 def test_get_by_sp_port_id(self):
     ports = VNXConnectionPort.get(t_cli(), VNXSPEnum.SP_A, 4)
     assert_that(len(ports), equal_to(1))
     port = ports[0]
     assert_that(port.port_id, equal_to(4))
     assert_that(port.sp, equal_to(VNXSPEnum.SP_A))
     assert_that(port.virtual_port_id, equal_to(0))
     assert_that(port.vport_id, equal_to(0))
예제 #7
0
파일: system.py 프로젝트: crook/storops
 def get_iscsi_port(self, sp=None, port_id=None, vport_id=None,
                    has_ip=None):
     return VNXConnectionPort.get(self._cli,
                                  sp=sp,
                                  port_id=port_id,
                                  vport_id=vport_id,
                                  port_type=VNXPortType.ISCSI,
                                  has_ip=has_ip)
예제 #8
0
파일: system.py 프로젝트: seven/storops
 def get_iscsi_port(self, sp=None, port_id=None, vport_id=None,
                    has_ip=None, poll=False):
     ret = VNXConnectionPort.get(self._cli,
                                 sp=sp,
                                 port_id=port_id,
                                 vport_id=vport_id,
                                 port_type=VNXPortType.ISCSI,
                                 has_ip=has_ip)
     return self._update_poll(ret, poll)
예제 #9
0
 def test_hba_port_with_connection_port(self):
     sg = VNXStorageGroup.get(cli=t_cli(), name='microsoft')
     h_port = sg.get_ports(
         initiator_uid='iqn.1991-05.com.microsoft:abc.def.dev')
     c_port = VNXConnectionPort.get(sp=VNXSPEnum.SP_A,
                                    port_id=1,
                                    cli=t_cli())
     assert_that(len(h_port), equal_to(2))
     r = set(h_port) - {item for item in c_port}
     assert_that(len(r), equal_to(1))
     assert_that(list(r)[0].port_id, equal_to(1))
     assert_that(list(r)[0].sp, equal_to(VNXSPEnum.SP_B))
예제 #10
0
파일: test_port.py 프로젝트: crook/storops
 def f():
     port = VNXConnectionPort.get(t_cli(), VNXSPEnum.SP_A, 10)[0]
     port.delete_ip()
예제 #11
0
파일: test_port.py 프로젝트: crook/storops
 def test_ping_node_multiple_success(self):
     port = VNXConnectionPort.get(t_cli(), VNXSPEnum.SP_A, 8)[0]
     # success, no error raised
     port.ping_node('10.244.211.5')
예제 #12
0
파일: test_port.py 프로젝트: crook/storops
 def test_get_port_with_vport_not_found(self):
     port = VNXConnectionPort.get(t_cli(), VNXSPEnum.SP_B, 10, 0)
     assert_that(port.existed, equal_to(False))
예제 #13
0
파일: test_port.py 프로젝트: crook/storops
 def test_get_single(self):
     ports = VNXConnectionPort.get(t_cli(), VNXSPEnum.SP_A, 4)
     assert_that(len(ports), equal_to(1))
     port = ports[0]
     assert_that(port.port_id, equal_to(4))
     assert_that(port.sp, equal_to(VNXSPEnum.SP_A))
예제 #14
0
파일: test_port.py 프로젝트: crook/storops
 def test_get_by_port(self):
     ports = VNXConnectionPort.get(t_cli(), port_id=8)
     assert_that(len(ports), equal_to(2))
예제 #15
0
파일: test_port.py 프로젝트: crook/storops
 def test_get_all(self):
     ports = VNXConnectionPort.get(t_cli())
     assert_that(len(ports), equal_to(20))
예제 #16
0
 def test_get_by_port(self):
     ports = VNXConnectionPort.get(t_cli(), port_id=8)
     assert_that(len(ports), equal_to(2))
예제 #17
0
 def test_port_display_name(self):
     port = VNXConnectionPort.get(t_cli(), VNXSPEnum.SP_A, 5, 0)
     assert_that('A-10-0', port.display_name)
예제 #18
0
 def f():
     port = VNXConnectionPort.get(t_cli(), VNXSPEnum.SP_A, 10)[0]
     port.delete_ip()
예제 #19
0
 def f():
     port = VNXConnectionPort.get(t_cli(), VNXSPEnum.SP_A, 10)[0]
     port.config_ip('6.6.6.6', '255.255.255.0', '5.5.5.1')
예제 #20
0
 def test_ping_node_multiple_success(self):
     port = VNXConnectionPort.get(t_cli(), VNXSPEnum.SP_A, 8)[0]
     # success, no error raised
     port.ping_node('10.244.211.5')
예제 #21
0
 def f():
     port = VNXConnectionPort.get(t_cli(), VNXSPEnum.SP_A, 8)[0]
     port.ping_node('10.244.211.3', count=1)
예제 #22
0
 def test_get_port_with_vport_not_found(self):
     port = VNXConnectionPort.get(t_cli(), VNXSPEnum.SP_B, 10, 0)
     assert_that(port.existed, equal_to(False))
예제 #23
0
파일: test_port.py 프로젝트: crook/storops
 def f():
     uid = 'iqn.1992-04.com.abc:a.b.d'
     port = VNXConnectionPort.get(sp=VNXSPEnum.SP_A, port_id=8,
                                  vport_id=0, cli=t_cli())
     sg = VNXStorageGroup(cli=t_cli(), name='sg0')
     sg.set_path(port, uid, 'host0')
예제 #24
0
 def test_get_port_not_found(self):
     ports = VNXConnectionPort.get(t_cli(), VNXSPEnum.SP_A, 44)
     assert_that(len(ports), equal_to(0))
예제 #25
0
 def test_get_by_type(self):
     ports = VNXConnectionPort.get(t_cli(), port_type=VNXPortType.ISCSI)
     assert_that(len(ports), equal_to(19))
     ports = VNXConnectionPort.get(t_cli(), port_type=VNXPortType.FCOE)
     assert_that(len(ports), equal_to(4))
예제 #26
0
 def test_get_single(self):
     port = VNXConnectionPort.get(t_cli(), VNXSPEnum.SP_A, 4)
     assert_that(port, equal_to([]))
예제 #27
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)))
예제 #28
0
파일: test_port.py 프로젝트: crook/storops
 def test_get_by_sp(self):
     ports = VNXConnectionPort.get(t_cli(), VNXSPEnum.SP_A)
     assert_that(len(ports), equal_to(10))
예제 #29
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))
예제 #30
0
파일: test_port.py 프로젝트: crook/storops
 def test_get_by_type(self):
     ports = VNXConnectionPort.get(t_cli(), port_type=VNXPortType.ISCSI)
     assert_that(len(ports), equal_to(16))
     ports = VNXConnectionPort.get(t_cli(), port_type=VNXPortType.FCOE)
     assert_that(len(ports), equal_to(4))
예제 #31
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))
예제 #32
0
파일: test_port.py 프로젝트: crook/storops
 def test_get_port_not_found(self):
     ports = VNXConnectionPort.get(t_cli(), VNXSPEnum.SP_A, 44)
     assert_that(len(ports), equal_to(0))
예제 #33
0
파일: system.py 프로젝트: crook/storops
 def get_fcoe_port(self, sp=None, port_id=None, vport_id=None):
     return VNXConnectionPort.get(self._cli,
                                  sp=sp,
                                  port_id=port_id,
                                  vport_id=vport_id,
                                  port_type=VNXPortType.FCOE)
예제 #34
0
파일: test_port.py 프로젝트: crook/storops
 def f():
     port = VNXConnectionPort.get(t_cli(), VNXSPEnum.SP_A, 8)[0]
     port.ping_node('10.244.211.3', count=1)
예제 #35
0
 def test_get_all(self):
     ports = VNXConnectionPort.get(t_cli())
     assert_that(len(ports), equal_to(23))
예제 #36
0
파일: test_port.py 프로젝트: crook/storops
 def f():
     port = VNXConnectionPort.get(t_cli(), VNXSPEnum.SP_A, 10)[0]
     port.config_ip('6.6.6.6', '255.255.255.0', '5.5.5.1')
예제 #37
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))
예제 #38
0
 def test_get_by_sp(self):
     ports = VNXConnectionPort.get(t_cli(), VNXSPEnum.SP_A)
     assert_that(len(ports), equal_to(13))
예제 #39
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))
예제 #40
0
 def test_port(self):
     return VNXConnectionPort(sp='a', port_id=4, cli=t_cli())
예제 #41
0
 def test_get_single(self):
     port = VNXConnectionPort.get(t_cli(), VNXSPEnum.SP_A, 5, 2)
     assert_that(port.port_id, equal_to(5))
     assert_that(port.sp, equal_to(VNXSPEnum.SP_A))
     assert_that(port.virtual_port_id, equal_to(2))
     assert_that(port.vport_id, equal_to(2))
예제 #42
0
 def get_connection_port(self, sp=None, port_id=None, vport_id=None):
     return VNXConnectionPort.get(self._cli, sp, port_id, vport_id)
예제 #43
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))