本文整理汇总了Python中storops.vnx.resource.lun.VNXLun.get_id方法的典型用法代码示例。如果您正苦于以下问题:Python VNXLun.get_id方法的具体用法?Python VNXLun.get_id怎么用?Python VNXLun.get_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类storops.vnx.resource.lun.VNXLun
的用法示例。
在下文中一共展示了VNXLun.get_id方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: add_image
# 需要导入模块: from storops.vnx.resource.lun import VNXLun [as 别名]
# 或者: from storops.vnx.resource.lun.VNXLun import get_id [as 别名]
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)
示例2: test_get_id_with_update
# 需要导入模块: from storops.vnx.resource.lun import VNXLun [as 别名]
# 或者: from storops.vnx.resource.lun.VNXLun import get_id [as 别名]
def test_get_id_with_update(self):
m1 = VNXLun(name='m1', cli=t_cli())
assert_that(VNXLun.get_id(m1), equal_to(4057))
示例3: f
# 需要导入模块: from storops.vnx.resource.lun import VNXLun [as 别名]
# 或者: from storops.vnx.resource.lun.VNXLun import get_id [as 别名]
def f():
VNXLun.get_id('abc')
示例4: test_get_id
# 需要导入模块: from storops.vnx.resource.lun import VNXLun [as 别名]
# 或者: from storops.vnx.resource.lun.VNXLun import get_id [as 别名]
def test_get_id(self):
l1 = VNXLun(lun_id=11)
assert_that(VNXLun.get_id(l1), equal_to(11))
示例5: test_get_lun_id_int
# 需要导入模块: from storops.vnx.resource.lun import VNXLun [as 别名]
# 或者: from storops.vnx.resource.lun.VNXLun import get_id [as 别名]
def test_get_lun_id_int(self):
assert_that(VNXLun.get_id(23), equal_to(23))
示例6: test_get_lun_obj_property
# 需要导入模块: from storops.vnx.resource.lun import VNXLun [as 别名]
# 或者: from storops.vnx.resource.lun.VNXLun import get_id [as 别名]
def test_get_lun_obj_property(self):
lun = VNXLun(name='x', cli=t_cli())
assert_that(VNXLun.get_id(lun), equal_to(0))
示例7: test_get_lun_obj_member
# 需要导入模块: from storops.vnx.resource.lun import VNXLun [as 别名]
# 或者: from storops.vnx.resource.lun.VNXLun import get_id [as 别名]
def test_get_lun_obj_member(self):
lun = VNXLun(lun_id=12)
assert_that(VNXLun.get_id(lun), equal_to(12))
示例8: test_get_lun_id_str
# 需要导入模块: from storops.vnx.resource.lun import VNXLun [as 别名]
# 或者: from storops.vnx.resource.lun.VNXLun import get_id [as 别名]
def test_get_lun_id_str(self):
assert_that(VNXLun.get_id('123'), equal_to(123))
示例9: test_get_snap
# 需要导入模块: from storops.vnx.resource.lun import VNXLun [as 别名]
# 或者: from storops.vnx.resource.lun.VNXLun import get_id [as 别名]
def test_get_snap(self):
lun = VNXLun(lun_id=3, cli=t_cli())
snaps = lun.get_snap()
assert_that(len(snaps), equal_to(2))
for snap in snaps:
assert_that(snap.source_luns, has_item(lun.get_id(lun)))