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


Python lun.VNXLun类代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例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_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

示例6: 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

示例7: add_image

 def add_image(self, sp_ip, lun_id,
               recovery_policy=VNXMirrorViewRecoveryPolicy.AUTO,
               sync_rate=VNXMirrorViewSyncRate.HIGH):
     lun_id = VNXLun.get_id(lun_id)
     self._cli.add_mirror_view_image(self._get_name(), sp_ip, lun_id,
                                     recovery_policy, sync_rate,
                                     poll=self.poll)
开发者ID:optionalg,项目名称:storops,代码行数:7,代码来源:mirror_view.py

示例8: f

 def f():
     l2 = VNXLun(name='in_sg', cli=t_cli())
     l2.delete()
开发者ID:crook,项目名称:storops,代码行数:3,代码来源:test_lun.py

示例9: set_property

 def set_property():
     l1 = VNXLun(name='l1', cli=t_cli())
     l1.is_dedup = False
开发者ID:crook,项目名称:storops,代码行数:3,代码来源:test_lun.py

示例10: get_lun

 def get_lun(self):
     lun_list = VNXLun.get(self._cli, poll=self.poll)
     return [l for l in lun_list if l.pool_name == self.name]
开发者ID:optionalg,项目名称:storops,代码行数:3,代码来源:block_pool.py

示例11: method

 def method():
     l1 = VNXLun(lun_id=19, cli=t_cli())
     l1.enable_compression(VNXCompressionRate.HIGH)
开发者ID:crook,项目名称:storops,代码行数:3,代码来源:test_lun.py

示例12: test_get_id_list

 def test_get_id_list(self):
     l22 = VNXLun(lun_id=22)
     l23 = VNXLun(lun_id=23)
     assert_that(VNXLun.get_id_list(l22, l23), only_contains(22, 23))
开发者ID:crook,项目名称:storops,代码行数:4,代码来源:test_lun.py

示例13: test_get_id_with_update

 def test_get_id_with_update(self):
     m1 = VNXLun(name='m1', cli=t_cli())
     assert_that(VNXLun.get_id(m1), equal_to(4057))
开发者ID:crook,项目名称:storops,代码行数:3,代码来源:test_lun.py

示例14: test_get_id

 def test_get_id(self):
     l1 = VNXLun(lun_id=11)
     assert_that(VNXLun.get_id(l1), equal_to(11))
开发者ID:crook,项目名称:storops,代码行数:3,代码来源:test_lun.py

示例15: test_delete_lun_has_smp

 def test_delete_lun_has_smp(self):
     l = VNXLun(lun_id=196, cli=t_cli())
     # no error raised
     l.delete(force=True)
开发者ID:crook,项目名称:storops,代码行数:4,代码来源:test_lun.py


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