当前位置: 首页>>代码示例>>Python>>正文


Python cli_mock.t_cli函数代码示例

本文整理汇总了Python中test.vnx.cli_mock.t_cli函数的典型用法代码示例。如果您正苦于以下问题:Python t_cli函数的具体用法?Python t_cli怎么用?Python t_cli使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了t_cli函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_connection_port_not_in_hba_port_set

    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)))
开发者ID:crook,项目名称:storops,代码行数:7,代码来源:test_port.py

示例2: test_set_path_with_fcoe_port_success

 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')
开发者ID:crook,项目名称:storops,代码行数:7,代码来源:test_port.py

示例3: test_hba_in_sp_port

 def test_hba_in_sp_port(self):
     sg = VNXStorageGroup(name='server7', cli=t_cli())
     hba = None
     for hba in sg.ports:
         if hba.sp == VNXSPEnum.SP_A and hba.port_id == 0:
             break
     ports = VNXSPPort.get(t_cli())
     assert_that(ports, has_item(hba))
开发者ID:crook,项目名称:storops,代码行数:8,代码来源:test_port.py

示例4: test_mount_point_properties

 def test_mount_point_properties(self):
     lun = VNXLun(name='l1', cli=t_cli())
     m1 = lun.create_mount_point(name='m1')
     assert_that(m1.name, equal_to('m1'))
     assert_that(m1.lun_id, equal_to(4057))
     s1 = m1.attached_snapshot
     assert_that(s1, instance_of(VNXSnap))
     assert_that(s1._cli, equal_to(t_cli()))
     assert_that(s1._get_name(), equal_to('s1'))
开发者ID:crook,项目名称:storops,代码行数:9,代码来源:test_lun.py

示例5: test_disks

 def test_disks(self):
     rg = VNXRaidGroup(4, t_cli())
     disks = rg.disks
     assert_that(len(disks), equal_to(5))
     for disk in disks:
         assert_that(disk, instance_of(VNXDisk))
         assert_that(disk.existed, equal_to(True))
开发者ID:crook,项目名称:storops,代码行数:7,代码来源:test_rg.py

示例6: test_get_lun

 def test_get_lun(self):
     pool = VNXPool(pool_id=1, cli=t_cli())
     assert_that(pool.name, equal_to('Pool_daq'))
     lun_list = pool.get_lun()
     assert_that(len(lun_list), equal_to(50))
     assert_that(pool.lun_list, equal_to(lun_list))
     assert_that(len(set(lun_list.pool_name)), equal_to(1))
开发者ID:crook,项目名称:storops,代码行数:7,代码来源:test_block_pool.py

示例7: test_get

 def test_get(self):
     mv = VNXMirrorView.get(t_cli(), 'mv_sync_2')
     assert_that(mv.uid, equal_to(
         '50:06:01:60:88:60:05:FE:04:00:00:00:00:00:00:00'))
     assert_that(mv.name, equal_to('mv_sync_2'))
     assert_that(mv.description, equal_to(''))
     assert_that(mv.logical_unit_numbers, 30)
     assert_that(mv.quiesce_threshold, equal_to(60))
     assert_that(mv.recovery_policy,
                 equal_to(VNXMirrorViewRecoveryPolicy.MANUAL))
     assert_that(len(mv.images), equal_to(2))
     assert_that(mv.images[0], instance_of(VNXMirrorViewImage))
     assert_that(mv.synchronization_rate,
                 equal_to(VNXMirrorViewSyncRate.MEDIUM))
     assert_that(mv.existed, equal_to(True))
     assert_that(mv.state, equal_to('Active'))
     assert_that(mv.image_transitioning, equal_to(False))
     assert_that(mv.image_size, equal_to(2097152))
     assert_that(mv.image_count, equal_to(2))
     assert_that(mv.image_faulted, equal_to(False))
     assert_that(mv.minimum_number_of_images_required, equal_to(0))
     assert_that(mv.write_intent_log_used, equal_to(True))
     assert_that(mv.synchronizing_progress, equal_to(100))
     assert_that(mv.remote_mirror_status, equal_to('Secondary Copy'))
     assert_that(mv.faulted, equal_to(False))
     assert_that(mv.transitioning, equal_to(False))
开发者ID:optionalg,项目名称:storops,代码行数:26,代码来源:test_mirror_view.py

示例8: test_modify_snap_failed

 def test_modify_snap_failed(self):
     snap = VNXSnap(cli=t_cli(), name='s2')
     try:
         snap.modify(new_name='s1')
         self.fail('should have raise an exception.')
     except VNXSnapError:
         assert_that(snap._name, equal_to('s2'))
开发者ID:optionalg,项目名称:storops,代码行数:7,代码来源:test_snap.py

示例9: test_attach_alu

 def test_attach_alu(self):
     sg = self.test_sg()
     lun = VNXLun(name='x', cli=t_cli())
     assert_that(sg.has_alu(0), equal_to(False))
     sg.attach_alu(lun)
     assert_that(sg.has_alu(0), equal_to(True))
     assert_that(sg.get_hlu(0), equal_to(1))
开发者ID:optionalg,项目名称:storops,代码行数:7,代码来源:test_sg.py

示例10: test_get_all

 def test_get_all(self):
     disks = VNXDisk.get(t_cli())
     assert_that(len(disks), equal_to(180))
     for disk in disks:
         if disk.index == '4_0_e8':
             verify_disk_4_0_e8(disk)
             break
开发者ID:optionalg,项目名称:storops,代码行数:7,代码来源:test_disk.py

示例11: test_lun_perf_counters

 def test_lun_perf_counters(self):
     l = VNXLun(lun_id=3, cli=t_cli())
     assert_that(l.read_requests, equal_to(1))
     assert_that(l.read_requests_sp_a, equal_to(2))
     assert_that(l.read_requests_sp_b, equal_to(3))
     assert_that(l.write_requests, equal_to(4))
     assert_that(l.write_requests_sp_a, equal_to(5))
     assert_that(l.write_requests_sp_b, equal_to(6))
     assert_that(l.blocks_read, equal_to(7))
     assert_that(l.blocks_read_sp_a, equal_to(8))
     assert_that(l.blocks_read_sp_b, equal_to(9))
     assert_that(l.blocks_written, equal_to(10))
     assert_that(l.blocks_written_sp_a, equal_to(11))
     assert_that(l.blocks_written_sp_b, equal_to(12))
     assert_that(l.busy_ticks, equal_to(13))
     assert_that(l.busy_ticks_sp_a, equal_to(14))
     assert_that(l.busy_ticks_sp_b, equal_to(15))
     assert_that(l.idle_ticks, equal_to(16))
     assert_that(l.idle_ticks_sp_a, equal_to(17))
     assert_that(l.idle_ticks_sp_b, equal_to(18))
     assert_that(l.sum_of_outstanding_requests, equal_to(19))
     assert_that(l.sum_of_outstanding_requests_sp_a, equal_to(20))
     assert_that(l.sum_of_outstanding_requests_sp_b, equal_to(21))
     assert_that(l.non_zero_request_count_arrivals, equal_to(22))
     assert_that(l.non_zero_request_count_arrivals_sp_a, equal_to(23))
     assert_that(l.non_zero_request_count_arrivals_sp_b, equal_to(24))
     assert_that(l.implicit_trespasses, equal_to(25))
     assert_that(l.implicit_trespasses_sp_a, equal_to(26))
     assert_that(l.implicit_trespasses_sp_b, equal_to(27))
     assert_that(l.explicit_trespasses, equal_to(28))
     assert_that(l.explicit_trespasses_sp_a, equal_to(29))
     assert_that(l.explicit_trespasses_sp_b, equal_to(30))
     assert_that(l.extreme_performance, equal_to(1.96))
     assert_that(l.performance, equal_to(5.68))
     assert_that(l.capacity, equal_to(92.37))
开发者ID:crook,项目名称:storops,代码行数:35,代码来源:test_lun.py

示例12: test_change_name_failed

 def test_change_name_failed(self):
     l = VNXLun(name='l1', cli=t_cli())
     try:
         l.name = 'l3'
         self.fail('should have raised an exception.')
     except VNXModifyLunError:
         assert_that(l._get_name(), equal_to('l1'))
开发者ID:crook,项目名称:storops,代码行数:7,代码来源:test_lun.py

示例13: test_get_snap

 def test_get_snap(self):
     lun = VNXLun(lun_id=196, cli=t_cli())
     assert_that(lun.name, equal_to('Exch-BronzePlan-AppSync-2.2'))
     assert_that(lun.lun_id, equal_to(196))
     snaps = lun.get_snap()
     assert_that(len(snaps), equal_to(13))
     for snap in snaps:
         assert_that(snap.source_luns, has_item(lun.lun_id))
开发者ID:optionalg,项目名称:storops,代码行数:8,代码来源:test_lun.py

示例14: test_get

 def test_get(self):
     ndu = VNXNdu.get(t_cli(), '-VNXSnapshots')
     assert_that(ndu.name, equal_to('-VNXSnapshots'))
     assert_that(ndu.revision, equal_to('-'))
     assert_that(ndu.commit_required, equal_to(False))
     assert_that(ndu.revert_possible, equal_to(False))
     assert_that(ndu.active_state, equal_to(True))
     assert_that(ndu.is_installation_completed, equal_to(True))
     assert_that(ndu.is_this_system_software, equal_to(False))
开发者ID:crook,项目名称:storops,代码行数:9,代码来源:test_ndu.py

示例15: test_get_rg_list

 def test_get_rg_list(self):
     rgs = VNXRaidGroup.get(t_cli())
     assert_that(len(rgs), equal_to(7))
     for rg in rgs:
         if rg.raid_group_id == 0:
             verify_raid0(rg)
             break
     else:
         self.fail('RAID group 0 not found.')
开发者ID:crook,项目名称:storops,代码行数:9,代码来源:test_rg.py


注:本文中的test.vnx.cli_mock.t_cli函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。