本文整理汇总了Python中test.vnx.cli_mock.t_cli函数的典型用法代码示例。如果您正苦于以下问题:Python t_cli函数的具体用法?Python t_cli怎么用?Python t_cli使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了t_cli函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: test_property_instance_cache
def test_property_instance_cache(self):
m1 = VNXLun(name='m1', cli=t_cli())
s1 = m1.attached_snapshot
s2 = m1.attached_snapshot
assert_that(hash(s1), equal_to(hash(s2)))
m1.update()
s3 = m1.attached_snapshot
assert_that(hash(s3), is_not(equal_to(hash(s1))))
assert_that(s1._cli, not_none())
开发者ID:crook,项目名称:storops,代码行数:9,代码来源:test_lun.py
示例17: test_create_mount_point
def test_create_mount_point(self):
lun = VNXLun(name='l1', cli=t_cli())
m1 = lun.create_mount_point(mount_point_name='m1')
assert_that(m1.name, equal_to('m1'))
assert_that(m1.lun_id, equal_to(4057))
assert_that(m1.attached_snapshot, equal_to('s1'))
m2 = lun.create_mount_point(mount_point_name='m2')
assert_that(lun.snapshot_mount_points, only_contains(4056, 4057))
assert_that(m2.attached_snapshot, equal_to('N/A'))
开发者ID:optionalg,项目名称:storops,代码行数:9,代码来源:test_lun.py
示例18: test_properties
def test_properties(self):
mv = VNXMirrorView.get(t_cli(), 'mv_sync_2')
image = mv.get_image('50:06:01:60:88:60:05:FE')
assert_that(image.uid, equal_to('50:06:01:60:88:60:05:FE'))
assert_that(image.existed, equal_to(True))
assert_that(image.is_image_primary, equal_to(True))
assert_that(image.logical_unit_uid, equal_to(
'60:06:01:60:41:C4:3D:00:6E:1C:50:9D:05:95:E5:11'))
assert_that(image.image_condition, equal_to('Primary Image'))
assert_that(image.preferred_sp, equal_to(VNXSPEnum.SP_A))
开发者ID:optionalg,项目名称:storops,代码行数:10,代码来源:test_mirror_view.py
示例19: test_properties
def test_properties(self):
ms = VNXMigrationSession(0, t_cli())
assert_that(ms.source_lu_id, equal_to(0))
assert_that(ms.source_lu_name, equal_to('LUN 0'))
assert_that(ms.dest_lu_id, equal_to(1))
assert_that(ms.dest_lu_name, equal_to('LUN 1'))
assert_that(ms.migration_rate, equal_to(VNXMigrationRate.HIGH))
assert_that(ms.percent_complete, equal_to(50.0))
assert_that(ms.time_remaining, equal_to('0 second(s)'))
assert_that(ms.current_state, equal_to('MIGRATING'))
assert_that(ms.existed, equal_to(True))
开发者ID:crook,项目名称:storops,代码行数:11,代码来源:test_migration.py
示例20: test_create_mount_point_success
def test_create_mount_point_success(self):
lun = VNXLun(name='l1', cli=t_cli())
m2 = lun.create_mount_point(name='m2')
assert_that(lun.snapshot_mount_points, instance_of(VNXLunList))
assert_that(str(lun), contains_string('"VNXLunList": ['))
for smp in lun.snapshot_mount_points:
assert_that(smp, instance_of(VNXLun))
pl = smp.primary_lun
assert_that(pl, instance_of(VNXLun))
assert_that(pl._get_name(), equal_to('l1'))
assert_that(m2.attached_snapshot, none())
开发者ID:crook,项目名称:storops,代码行数:11,代码来源:test_lun.py
注:本文中的test.vnx.cli_mock.t_cli函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论