Beispiel #1
0
 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'))
Beispiel #2
0
 def f():
     domain = CifsDomain('test.dev')
     VNXCifsServer.create(t_nas(),
                          'test',
                          1,
                          domain=domain,
                          interfaces='10.110.24.194')
Beispiel #3
0
 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'))
Beispiel #4
0
 def test_create_cifs_default_mover(self):
     cifs = VNXCifsServer.create(t_nas(), 's2', workgroup='work',
                                 interfaces='10.110.24.194',
                                 local_admin_password='******')
     assert_that(cifs.existed, equal_to(True))
     assert_that(cifs.workgroup, equal_to('WORK'))
     assert_that(cifs.name, equal_to('S2'))
Beispiel #5
0
 def test_create_cifs_default_mover(self):
     cifs = VNXCifsServer.create(t_nas(), 's2', workgroup='work',
                                 interfaces='10.110.24.194',
                                 local_admin_password='******')
     assert_that(cifs.existed, equal_to(True))
     assert_that(cifs.workgroup, equal_to('WORK'))
     assert_that(cifs.name, equal_to('S2'))
Beispiel #6
0
 def create_cifs_server(self, name, mover_id=None, is_vdm=False,
                        workgroup=None, domain=None,
                        interfaces=None, alias_name=None,
                        local_admin_password=None):
     return VNXCifsServer.create(
         cli=self._file_cli, name=name, mover_id=mover_id, is_vdm=is_vdm,
         workgroup=workgroup, domain=domain, interfaces=interfaces,
         alias_name=alias_name, local_admin_password=local_admin_password)
Beispiel #7
0
 def create_cifs_server(self, name, mover_id=None, is_vdm=False,
                        workgroup=None, domain=None,
                        interfaces=None, alias_name=None,
                        local_admin_password=None):
     return VNXCifsServer.create(
         cli=self._file_cli, name=name, mover_id=mover_id, is_vdm=is_vdm,
         workgroup=workgroup, domain=domain, interfaces=interfaces,
         alias_name=alias_name, local_admin_password=local_admin_password)
Beispiel #8
0
 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))
Beispiel #9
0
 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))
Beispiel #10
0
 def test_create_cifs_server_stand_alone(self):
     cifs = VNXCifsServer.create(t_nas(),
                                 's2',
                                 1,
                                 workgroup='work',
                                 interfaces='10.110.24.194',
                                 local_admin_password='******')
     assert_that(cifs.workgroup, equal_to('WORK'))
     assert_that(cifs.name, equal_to('S2'))
Beispiel #11
0
 def test_get_all(self):
     cifs_list = VNXCifsServer.get(t_nas())
     assert_that(len(cifs_list), greater_than_or_equal_to(1))
     cifs = next(cifs for cifs in cifs_list if cifs.name == 'CIFS')
     self.verify_pie_cifs(cifs)
Beispiel #12
0
 def test_get_by_name(self):
     cifs = VNXCifsServer.get(t_nas(), 'CIFS')
     self.verify_pie_cifs(cifs)
Beispiel #13
0
 def test_get_all_by_mover(self):
     cifs_list = VNXCifsServer.get(t_nas(), mover_id=1)
     cifs = next(cifs for cifs in cifs_list if cifs.name == 'CIFS')
     self.verify_pie_cifs(cifs)
Beispiel #14
0
 def f():
     cifs = VNXCifsServer('test1', t_nas())
     cifs.delete(1)
Beispiel #15
0
 def test_get_by_name_not_found(self):
     cifs = VNXCifsServer('not_found', t_nas())
     assert_that(cifs.existed, equal_to(False))
     assert_that(cifs._get_name(), equal_to('not_found'))
Beispiel #16
0
 def test_get_all_by_mover_not_found(self):
     cifs_list = VNXCifsServer.get(t_nas(), mover_id=1, is_vdm=True)
     assert_that(len(cifs_list), equal_to(0))
Beispiel #17
0
 def test_create_cifs_server_stand_alone(self):
     cifs = VNXCifsServer.create(t_nas(), 's2', 1, workgroup='work',
                                 interfaces='10.110.24.194',
                                 local_admin_password='******')
     assert_that(cifs.workgroup, equal_to('WORK'))
     assert_that(cifs.name, equal_to('S2'))
Beispiel #18
0
 def f():
     cifs = VNXCifsServer('test1', t_nas())
     cifs.remove(1)
Beispiel #19
0
 def test_remove_cifs_server(self):
     cifs = VNXCifsServer('test', t_nas())
     resp = cifs.remove()
     assert_that(resp.is_ok(), equal_to(True))
Beispiel #20
0
 def test_delete_cifs_server(self):
     cifs = VNXCifsServer('test', t_nas())
     resp = cifs.delete()
     assert_that(resp.is_ok(), equal_to(True))
Beispiel #21
0
 def test_get_all_by_mover(self):
     cifs_list = VNXCifsServer.get(t_nas(), mover_id=1)
     cifs = next(cifs for cifs in cifs_list if cifs.name == 'CIFS')
     self.verify_pie_cifs(cifs)
Beispiel #22
0
 def f():
     cifs = VNXCifsServer('test1', t_nas())
     cifs.delete(1)
Beispiel #23
0
 def get_cifs_server(self, name=None, mover_id=None, is_vdm=None):
     return VNXCifsServer.get(cli=self._file_cli, name=name,
                              mover_id=mover_id, is_vdm=is_vdm)
Beispiel #24
0
 def test_get_all(self):
     cifs_list = VNXCifsServer.get(t_nas())
     assert_that(len(cifs_list), greater_than_or_equal_to(1))
     cifs = next(cifs for cifs in cifs_list if cifs.name == 'CIFS')
     self.verify_pie_cifs(cifs)
Beispiel #25
0
 def test_get_by_name(self):
     cifs = VNXCifsServer('CIFS', t_nas())
     self.verify_pie_cifs(cifs)
Beispiel #26
0
 def test_get_all_by_mover_not_found(self):
     cifs_list = VNXCifsServer.get(t_nas(), mover_id=1, is_vdm=True)
     assert_that(len(cifs_list), equal_to(0))
Beispiel #27
0
 def get_cifs_server(self, name=None, mover_id=None, is_vdm=None):
     return VNXCifsServer.get(cli=self._file_cli,
                              name=name,
                              mover_id=mover_id,
                              is_vdm=is_vdm)
Beispiel #28
0
 def test_get_by_name_not_found(self):
     cifs = VNXCifsServer('not_found', t_nas())
     assert_that(cifs.existed, equal_to(False))
     assert_that(cifs._get_name(), equal_to('not_found'))
Beispiel #29
0
 def test_get_by_name(self):
     cifs = VNXCifsServer.get(t_nas(), 'CIFS')
     self.verify_pie_cifs(cifs)
Beispiel #30
0
 def f():
     domain = CifsDomain('test.dev')
     VNXCifsServer.create(t_nas(), 'test', 1, domain=domain)
Beispiel #31
0
 def f():
     domain = CifsDomain('test.dev')
     VNXCifsServer.create(t_nas(), 'test', 1, domain=domain)
Beispiel #32
0
 def f():
     domain = CifsDomain('test.dev')
     VNXCifsServer.create(t_nas(), 'test', 1,
                          domain=domain,
                          interfaces='10.110.24.194')
Beispiel #33
0
 def f():
     cifs = VNXCifsServer('test1', t_nas())
     cifs.remove(1)