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


Python nas_mock.t_nas函数代码示例

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


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

示例1: test_get_interfaces

 def test_get_interfaces(self):
     dm = VNXVdm(name='VDM_ESA', cli=t_nas())
     ifs = dm.get_interfaces()
     assert_that(len(ifs), equal_to(1))
     interface = ifs[0]
     assert_that(interface.name, equal_to('10-110-24-195'))
     assert_that(interface.share_type, equal_to(VNXShareType.NFS))
开发者ID:crook,项目名称:storops,代码行数:7,代码来源:test_vdm.py

示例2: test_get_all

 def test_get_all(self):
     fs_list = VNXFileSystemList(t_nas())
     assert_that(len(fs_list), equal_to(25))
     root_fs_1 = [fs for fs in fs_list if fs.name == 'root_fs_1'][0]
     self.verify_root_fs_1(root_fs_1)
     fs_src0 = [fs for fs in fs_list if fs.name == 'fs_src0'][0]
     self.verify_fs_src0(fs_src0)
开发者ID:optionalg,项目名称:storops,代码行数:7,代码来源:test_fs.py

示例3: test_get_by_mover

 def test_get_by_mover(self):
     mover = self.get_mover_1()
     shares = VNXCifsShare.get(cli=t_nas(), mover=mover)
     for share in shares:
         assert_that(share.mover.get_mover_id(),
                     equal_to(mover.get_mover_id()))
         assert_that(share.mover.is_vdm, equal_to(mover.is_vdm))
开发者ID:crook,项目名称:storops,代码行数:7,代码来源:test_cifs_share.py

示例4: test_create_nfs_share

 def test_create_nfs_share(self):
     dm = VNXMover(mover_id=1, cli=t_nas())
     share = dm.create_nfs_share(path='/EEE')
     assert_that(share.path, equal_to('/EEE'))
     assert_that(share.mover_id, equal_to(1))
     assert_that(share.existed, equal_to(True))
     assert_that(share.fs_id, equal_to(243))
开发者ID:crook,项目名称:storops,代码行数:7,代码来源:test_mover.py

示例5: test_create_cifs_server_invalid_domain_name

 def test_create_cifs_server_invalid_domain_name(self):
     try:
         domain = CifsDomain('test_domain')
         VNXCifsServer.create(t_nas(), 'test', 1, domain=domain)
         self.fail('should raise an exception.')
     except VNXBackendError as ex:
         assert_that(ex.message, contains_string('not facet-valid'))
开发者ID:optionalg,项目名称:storops,代码行数:7,代码来源:test_cifs_server.py

示例6: test_create_cifs_default_mover

 def test_create_cifs_default_mover(self):
     cifs = VNXCifsServer.create(t_nas(), 's2', workgroup='work',
                                 interfaces='10.110.24.194',
                                 local_admin_password='password')
     assert_that(cifs.existed, equal_to(True))
     assert_that(cifs.workgroup, equal_to('WORK'))
     assert_that(cifs.name, equal_to('S2'))
开发者ID:optionalg,项目名称:storops,代码行数:7,代码来源:test_cifs_server.py

示例7: test_create_success

 def test_create_success(self):
     mover = self.get_mover_1()
     share = VNXNfsShare.create(cli=t_nas(), mover=mover, path='/EEE')
     assert_that(share.path, equal_to('/EEE'))
     assert_that(share.mover_id, equal_to(1))
     assert_that(share.existed, equal_to(True))
     assert_that(share.fs_id, equal_to(243))
开发者ID:crook,项目名称:storops,代码行数:7,代码来源:test_nfs_share.py

示例8: test_create_cifs_server_w2k

 def test_create_cifs_server_w2k(self):
     domain = CifsDomain('test.dev')
     cifs = VNXCifsServer.create(t_nas(), 's8', 1, domain=domain,
                                 interfaces='10.110.24.194')
     assert_that(cifs.domain, equal_to('TEST.DEV'))
     assert_that(cifs.type, equal_to('W2K'))
     assert_that(cifs.comp_name, equal_to('S8'))
     assert_that(cifs.domain_joined, equal_to(False))
开发者ID:optionalg,项目名称:storops,代码行数:8,代码来源:test_cifs_server.py

示例9: f

 def f():
     host_config = NfsHostConfig(
         root_hosts=['1.1.1.1', '2.2.2.2'],
         ro_hosts=['3.3.3.3'],
         rw_hosts=['4.4.4.4', '5.5.5.5'],
         access_hosts=['6.6.6.6'])
     mover = self.get_mover_1()
     share = VNXNfsShare(cli=t_nas(), mover=mover, path='/not_found')
     share.modify(ro=False, host_config=host_config)
开发者ID:crook,项目名称:storops,代码行数:9,代码来源:test_nfs_share.py

示例10: test_create_with_host_config

 def test_create_with_host_config(self):
     mover = self.get_mover_1()
     host_config = NfsHostConfig(
         root_hosts=['1.1.1.1', '2.2.2.2'],
         ro_hosts=['3.3.3.3'],
         rw_hosts=['4.4.4.4', '5.5.5.5'],
         access_hosts=['6.6.6.6'])
     share = VNXNfsShare.create(cli=t_nas(), mover=mover, path='/FFF',
                                host_config=host_config)
     assert_that(share.fs_id, equal_to(247))
     assert_that(share.path, equal_to('/FFF'))
     assert_that(share.existed, equal_to(True))
     assert_that(share.access_hosts, has_item('6.6.6.6'))
开发者ID:crook,项目名称:storops,代码行数:13,代码来源:test_nfs_share.py

示例11: test_attach_interface_success

 def test_attach_interface_success(self):
     dm = VNXVdm(name='myvdm', cli=t_nas())
     dm.attach_nfs_interface('1.1.1.1-0')
开发者ID:crook,项目名称:storops,代码行数:3,代码来源:test_vdm.py

示例12: test_delete_vdm

 def test_delete_vdm(self):
     dm = VNXVdm(vdm_id=3, cli=t_nas())
     resp = dm.delete()
     assert_that(resp.is_ok(), equal_to(True))
开发者ID:crook,项目名称:storops,代码行数:4,代码来源:test_vdm.py

示例13: f

 def f():
     dm = VNXVdm(vdm_id=5, cli=t_nas())
     dm.delete()
开发者ID:crook,项目名称:storops,代码行数:3,代码来源:test_vdm.py

示例14: test_create_vdm

 def test_create_vdm(self):
     dm = VNXVdm.create(t_nas(), 2, 'myVdm')
     assert_that(dm.name, equal_to('myVdm'))
     assert_that(dm.vdm_id, equal_to(3))
     assert_that(dm.mover_id, equal_to(2))
     assert_that(dm.root_fs_id, equal_to(245))
开发者ID:crook,项目名称:storops,代码行数:6,代码来源:test_vdm.py

示例15: test_create

 def test_create(self):
     snap = VNXFsSnap.create(t_nas(), 'test', 222, 61)
     assert_that(snap.name, equal_to('test'))
     assert_that(snap.fs_id, equal_to(222))
     assert_that(snap.snap_id, equal_to(242))
开发者ID:optionalg,项目名称:storops,代码行数:5,代码来源:test_fs_snap.py


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