Пример #1
0
 def test_rename_mgr_SourceNotFound_single_lfn(self):
     """(RSE/PROTOCOLS): Rename a single file on storage using LFN (SourceNotFound)"""
     mgr.rename(
         self.rse_settings, {
             'name': '1_rse_not_existing.raw',
             'scope': 'user.%s' % self.user,
             'new_name': '1_rse_new_not_created.raw'
         })
Пример #2
0
 def test_change_scope_mgr_ok_single_lfn(self):
     """(RSE/PROTOCOLS): Change the scope of a single file on storage using LFN (Success)"""
     mgr.rename(
         self.rse_settings, {
             'name': '1_rse_remote_change_scope.raw',
             'scope': 'user.%s' % self.user,
             'new_scope': 'group.%s' % self.user
         })
Пример #3
0
 def test_rename_mgr_ok_single_lfn(self):
     """(RSE/PROTOCOLS): Rename a single file on storage using LFN (Success)"""
     mgr.rename(
         self.rse_settings, {
             'name': '3_rse_remote_rename.raw',
             'scope': 'user.%s' % self.user,
             'new_name': '3_rse_remote_renamed.raw',
             'new_scope': 'user.%s' % self.user
         })
Пример #4
0
 def test_rename_mgr_FileReplicaAlreadyExists_single_lfn(self):
     """(RSE/PROTOCOLS): Rename a single file on storage using LFN (FileReplicaAlreadyExists)"""
     mgr.rename(
         self.rse_settings, {
             'name': '6_rse_remote_rename.raw',
             'scope': 'user.%s' % self.user,
             'new_name': '1_rse_remote_get.raw',
             'new_scope': 'user.%s' % self.user
         })
Пример #5
0
 def test_rename_mgr_FileReplicaAlreadyExists_single_pfn(self):
     """(RSE/PROTOCOLS): Rename a single file on storage using PFN (FileReplicaAlreadyExists)"""
     pfn = mgr.lfns2pfns(self.rse_settings, {
         'name': '12_rse_remote_rename.raw',
         'scope': 'user.%s' % self.user
     }).values()[0]
     pfn_new = mgr.lfns2pfns(self.rse_settings, {
         'name': '1_rse_remote_get.raw',
         'scope': 'user.%s' % self.user
     }).values()[0]
     mgr.rename(self.rse_settings, {'name': pfn, 'new_name': pfn_new})
Пример #6
0
 def test_rename_mgr_SourceNotFound_single_pfn(self):
     """(RSE/PROTOCOLS): Rename a single file on storage using PFN (SourceNotFound)"""
     pfn = mgr.lfns2pfns(self.rse_settings, {
         'name': '1_rse_not_existing.raw',
         'scope': 'user.%s' % self.user
     }).values()[0]
     pfn_new = mgr.lfns2pfns(self.rse_settings, {
         'name': '1_rse_new_not_created.raw',
         'scope': 'user.%s' % self.user
     }).values()[0]
     mgr.rename(self.rse_settings, {'name': pfn, 'new_name': pfn_new})
Пример #7
0
 def test_rename_mgr_ok_single_pfn(self):
     """(RSE/PROTOCOLS): Rename a single file on storage using PFN (Success)"""
     pfn = mgr.lfns2pfns(self.rse_settings, {
         'name': '9_rse_remote_rename.raw',
         'scope': 'user.%s' % self.user
     }).values()[0]
     pfn_new = mgr.lfns2pfns(self.rse_settings, {
         'name': '9_rse_new.raw',
         'scope': 'user.%s' % self.user
     }).values()[0]
     mgr.rename(self.rse_settings, {'name': pfn, 'new_name': pfn_new})
Пример #8
0
 def test_change_scope_mgr_ok_single_pfn(self):
     """(RSE/PROTOCOLS): Change the scope of a single file on storage using PFN (Success)"""
     pfn = list(
         mgr.lfns2pfns(
             self.rse_settings, {
                 'name': '2_rse_remote_change_scope.raw',
                 'scope': 'user.%s' % self.user
             }).values())[0]
     pfn_new = list(
         mgr.lfns2pfns(
             self.rse_settings, {
                 'name': '2_rse_remote_change_scope.raw',
                 'scope': 'group.%s' % self.user
             }).values())[0]
     mgr.rename(self.rse_settings, {'name': pfn, 'new_name': pfn_new})
Пример #9
0
 def test_rename_mgr_SourceNotFound_multi(self):
     """(RSE/PROTOCOLS): Rename multiple files on storage (SourceNotFound)"""
     pfn_a = list(
         mgr.lfns2pfns(self.rse_settings, {
             'name': '12_rse_not_existing.raw',
             'scope': 'user.%s' % self.user
         }).values())[0]
     pfn_b = list(
         mgr.lfns2pfns(self.rse_settings, {
             'name': '1_rse_not_created.raw',
             'scope': 'user.%s' % self.user
         }).values())[0]
     status, details = mgr.rename(
         self.rse_settings, [{
             'name': '1_rse_not_existing.raw',
             'scope': 'user.%s' % self.user,
             'new_name': '1_rse_new_not_created.raw'
         }, {
             'name': pfn_a,
             'new_name': pfn_b
         }])
     if not status and isinstance(
             details['user.%s:1_rse_not_existing.raw' % self.user],
             type(details[pfn_a])):
         raise details['user.%s:1_rse_not_existing.raw' % self.user]
     else:
         raise Exception('Return not as expected: %s, %s' %
                         (status, details))
Пример #10
0
 def test_rename_mgr_SourceNotFound_multi(self):
     """(RSE/PROTOCOLS): Rename multiple files on storage (SourceNotFound)"""
     pfn_a = mgr.lfns2pfns(self.rse_settings, {'name': '12_rse_not_existing.raw', 'scope': 'user.%s' % self.user}).values()[0]
     pfn_b = mgr.lfns2pfns(self.rse_settings, {'name': '1_rse_not_created.raw', 'scope': 'user.%s' % self.user}).values()[0]
     status, details = mgr.rename(self.rse_settings, [{'name': '1_rse_not_existing.raw', 'scope': 'user.%s' % self.user, 'new_name': '1_rse_new_not_created.raw'},
                                                      {'name': pfn_a, 'new_name': pfn_b}])
     if not status and (type(details['user.%s:1_rse_not_existing.raw' % self.user]) == type(details[pfn_a])):
         raise details['user.%s:1_rse_not_existing.raw' % self.user]
     else:
         raise Exception('Return not as expected: %s, %s' % (status, details))
Пример #11
0
 def test_rename_mgr_FileReplicaAlreadyExists_multi(self):
     """(RSE/PROTOCOLS): Rename multiple files on storage (FileReplicaAlreadyExists)"""
     pfn_a = list(
         mgr.lfns2pfns(self.rse_settings, {
             'name': '10_rse_remote_rename.raw',
             'scope': 'user.%s' % self.user
         },
                       impl=self.impl).values())[0]
     pfn_a_new = list(
         mgr.lfns2pfns(self.rse_settings, {
             'name': '1_rse_remote_get.raw',
             'scope': 'user.%s' % self.user
         },
                       impl=self.impl).values())[0]
     pfn_b = list(
         mgr.lfns2pfns(self.rse_settings, {
             'name': '11_rse_remote_rename.raw',
             'scope': 'user.%s' % self.user
         },
                       impl=self.impl).values())[0]
     pfn_b_new = list(
         mgr.lfns2pfns(self.rse_settings, {
             'name': '11_rse_new_rename.raw',
             'scope': 'user.%s' % self.user
         },
                       impl=self.impl).values())[0]
     status, details = mgr.rename(self.rse_settings,
                                  [{
                                      'name': '4_rse_remote_rename.raw',
                                      'scope': 'user.%s' % self.user,
                                      'new_name': '1_rse_remote_get.raw',
                                      'new_scope': 'user.%s' % self.user
                                  }, {
                                      'name': '5_rse_remote_rename.raw',
                                      'scope': 'user.%s' % self.user,
                                      'new_name': '5_rse_new.raw'
                                  }, {
                                      'name': pfn_a,
                                      'new_name': pfn_a_new
                                  }, {
                                      'name': pfn_b,
                                      'new_name': pfn_b_new
                                  }],
                                  impl=self.impl)
     if (not status
             and details['user.%s:5_rse_remote_rename.raw' % self.user]
             and details[pfn_b]) and isinstance(
                 details['user.%s:4_rse_remote_rename.raw' % self.user],
                 type(details[pfn_a])):
         raise details['user.%s:4_rse_remote_rename.raw' % self.user]
     else:
         raise Exception('Return not as expected: %s, %s' %
                         (status, details))
Пример #12
0
 def test_rename_mgr_ok_multi(self):
     """(RSE/PROTOCOLS): Rename multiple files on storage (Success)"""
     protocol = mgr.create_protocol(self.rse_settings, 'write')
     pfn_a = protocol.lfns2pfns({'name': '7_rse_remote_rename.raw', 'scope': 'user.%s' % self.user}).values()[0]
     pfn_a_new = protocol.lfns2pfns({'name': '7_rse_new_rename.raw', 'scope': 'user.%s' % self.user}).values()[0]
     pfn_b = protocol.lfns2pfns({'name': '8_rse_remote_rename.raw', 'scope': 'user.%s' % self.user}).values()[0]
     pfn_b_new = protocol.lfns2pfns({'name': '8_rse_new_rename.raw', 'scope': 'user.%s' % self.user}).values()[0]
     status, details = mgr.rename(self.rse_settings, [{'name': '1_rse_remote_rename.raw', 'scope': 'user.%s' % self.user, 'new_name': '1_rse_remote_renamed.raw'},
                                                      {'name': '2_rse_remote_rename.raw', 'scope': 'user.%s' % self.user, 'new_name': '2_rse_remote_renamed.raw'},
                                                      {'name': pfn_a, 'new_name': pfn_a_new},
                                                      {'name': pfn_b, 'new_name': pfn_b_new}])
     if not status or not (details['user.%s:1_rse_remote_rename.raw' % self.user] and details['user.%s:2_rse_remote_rename.raw' % self.user] and details[pfn_a] and details[pfn_b]):
         raise Exception('Return not as expected: %s, %s' % (status, details))
Пример #13
0
 def test_rename_mgr_ok_multi(self):
     """(RSE/PROTOCOLS): Rename multiple files on storage (Success)"""
     protocol = mgr.create_protocol(self.rse_settings, 'write')
     pfn_a = protocol.lfns2pfns({'name': '7_rse_remote_rename.raw', 'scope': 'user.%s' % self.user}).values()[0]
     pfn_a_new = protocol.lfns2pfns({'name': '7_rse_new_rename.raw', 'scope': 'user.%s' % self.user}).values()[0]
     pfn_b = protocol.lfns2pfns({'name': '8_rse_remote_rename.raw', 'scope': 'user.%s' % self.user}).values()[0]
     pfn_b_new = protocol.lfns2pfns({'name': '8_rse_new_rename.raw', 'scope': 'user.%s' % self.user}).values()[0]
     status, details = mgr.rename(self.rse_settings, [{'name': '1_rse_remote_rename.raw', 'scope': 'user.%s' % self.user, 'new_name': '1_rse_remote_renamed.raw'},
                                                      {'name': '2_rse_remote_rename.raw', 'scope': 'user.%s' % self.user, 'new_name': '2_rse_remote_renamed.raw'},
                                                      {'name': pfn_a, 'new_name': pfn_a_new},
                                                      {'name': pfn_b, 'new_name': pfn_b_new}])
     if not status or not (details['user.%s:1_rse_remote_rename.raw' % self.user] and details['user.%s:2_rse_remote_rename.raw' % self.user] and details[pfn_a] and details[pfn_b]):
         raise Exception('Return not as expected: %s, %s' % (status, details))
Пример #14
0
 def test_rename_mgr_FileReplicaAlreadyExists_multi(self):
     """(RSE/PROTOCOLS): Rename multiple files on storage (FileReplicaAlreadyExists)"""
     pfn_a = mgr.lfns2pfns(self.rse_settings, {'name': '10_rse_remote_rename.raw', 'scope': 'user.%s' % self.user}).values()[0]
     pfn_a_new = mgr.lfns2pfns(self.rse_settings, {'name': '1_rse_remote_get.raw', 'scope': 'user.%s' % self.user}).values()[0]
     pfn_b = mgr.lfns2pfns(self.rse_settings, {'name': '11_rse_remote_rename.raw', 'scope': 'user.%s' % self.user}).values()[0]
     pfn_b_new = mgr.lfns2pfns(self.rse_settings, {'name': '11_rse_new_rename.raw', 'scope': 'user.%s' % self.user}).values()[0]
     status, details = mgr.rename(self.rse_settings, [{'name': '4_rse_remote_rename.raw', 'scope': 'user.%s' % self.user, 'new_name': '1_rse_remote_get.raw', 'new_scope': 'user.%s' % self.user},
                                                      {'name': '5_rse_remote_rename.raw', 'scope': 'user.%s' % self.user, 'new_name': '5_rse_new.raw'},
                                                      {'name': pfn_a, 'new_name': pfn_a_new},
                                                      {'name': pfn_b, 'new_name': pfn_b_new}])
     if (not status and details['user.%s:5_rse_remote_rename.raw' % self.user] and details[pfn_b]) and (type(details['user.%s:4_rse_remote_rename.raw' % self.user]) == type(details[pfn_a])):
         raise details['user.%s:4_rse_remote_rename.raw' % self.user]
     else:
         raise Exception('Return not as expected: %s, %s' % (status, details))
Пример #15
0
 def test_rename_mgr_FileReplicaAlreadyExists_single_lfn(self):
     """(RSE/PROTOCOLS): Rename a single file on storage using LFN (FileReplicaAlreadyExists)"""
     mgr.rename(self.rse_settings, {'name': '6_rse_remote_rename.raw', 'scope': 'user.%s' % self.user, 'new_name': '1_rse_remote_get.raw', 'new_scope': 'user.%s' % self.user})
Пример #16
0
 def test_rename_mgr_FileReplicaAlreadyExists_single_pfn(self):
     """(RSE/PROTOCOLS): Rename a single file on storage using PFN (FileReplicaAlreadyExists)"""
     pfn = mgr.lfns2pfns(self.rse_settings, {'name': '12_rse_remote_rename.raw', 'scope': 'user.%s' % self.user}).values()[0]
     pfn_new = mgr.lfns2pfns(self.rse_settings, {'name': '1_rse_remote_get.raw', 'scope': 'user.%s' % self.user}).values()[0]
     mgr.rename(self.rse_settings, {'name': pfn, 'new_name': pfn_new})
Пример #17
0
 def test_rename_mgr_SourceNotFound_single_lfn(self):
     """(RSE/PROTOCOLS): Rename a single file on storage using LFN (SourceNotFound)"""
     mgr.rename(self.rse_settings, {'name': '1_rse_not_existing.raw', 'scope': 'user.%s' % self.user, 'new_name': '1_rse_new_not_created.raw'})
Пример #18
0
 def test_rename_mgr_SourceNotFound_single_pfn(self):
     """(RSE/PROTOCOLS): Rename a single file on storage using PFN (SourceNotFound)"""
     pfn = mgr.lfns2pfns(self.rse_settings, {'name': '1_rse_not_existing.raw', 'scope': 'user.%s' % self.user}).values()[0]
     pfn_new = mgr.lfns2pfns(self.rse_settings, {'name': '1_rse_new_not_created.raw', 'scope': 'user.%s' % self.user}).values()[0]
     mgr.rename(self.rse_settings, {'name': pfn, 'new_name': pfn_new})
Пример #19
0
 def test_change_scope_mgr_ok_single_lfn(self):
     """(RSE/PROTOCOLS): Change the scope of a single file on storage using LFN (Success)"""
     mgr.rename(self.rse_settings, {'name': '1_rse_remote_change_scope.raw', 'scope': 'user.%s' % self.user, 'new_scope': 'group.%s' % self.user})
Пример #20
0
 def test_change_scope_mgr_ok_single_pfn(self):
     """(RSE/PROTOCOLS): Change the scope of a single file on storage using PFN (Success)"""
     pfn = mgr.lfns2pfns(self.rse_settings, {'name': '2_rse_remote_change_scope.raw', 'scope': 'user.%s' % self.user}).values()[0]
     pfn_new = mgr.lfns2pfns(self.rse_settings, {'name': '2_rse_remote_change_scope.raw', 'scope': 'group.%s' % self.user}).values()[0]
     mgr.rename(self.rse_settings, {'name': pfn, 'new_name': pfn_new})
Пример #21
0
 def test_rename_mgr_ok_single_lfn(self):
     """(RSE/PROTOCOLS): Rename a single file on storage using LFN (Success)"""
     mgr.rename(self.rse_settings, {'name': '3_rse_remote_rename.raw', 'scope': 'user.%s' % self.user, 'new_name': '3_rse_remote_renamed.raw', 'new_scope': 'user.%s' % self.user})