• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python lun.VNXLun类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: test_create_mirror_view

 def test_create_mirror_view(self):
     l = VNXLun(lun_id=245, cli=t_cli())
     mv = l.create_mirror_view('mv0')
     assert_that(mv.state, equal_to('Active'))
开发者ID:crook,项目名称:storops,代码行数:4,代码来源:test_lun.py


示例17: method_call

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


示例18: get_lun

 def get_lun(self, lun_id=None, name=None, lun_type=None):
     return VNXLun.get(self._cli, lun_id=lun_id, name=name,
                       lun_type=lun_type)
开发者ID:optionalg,项目名称:storops,代码行数:3,代码来源:system.py


示例19: prop

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python _i18n._函数代码示例发布时间:2022-05-27
下一篇:
Python common.text_var函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap