Esempio n. 1
0
    def create_remote_system(self,
                             management_address,
                             local_username=None,
                             local_password=None,
                             remote_username=None,
                             remote_password=None,
                             connection_type=None):
        """
        Configures a remote system for remote replication.

        :param management_address: the management IP address of the remote
            system.
        :param local_username: administrative username of local system.
        :param local_password: administrative password of local system.
        :param remote_username: administrative username of remote system.
        :param remote_password: administrative password of remote system.
        :param connection_type: `ReplicationCapabilityEnum`. Replication
            connection type to the remote system.
        :return: the newly created remote system.
        """
        return UnityRemoteSystem.create(self._cli,
                                        management_address,
                                        local_username=local_username,
                                        local_password=local_password,
                                        remote_username=remote_username,
                                        remote_password=remote_password,
                                        connection_type=connection_type)
Esempio n. 2
0
 def test_replicate(self, dst_nas, replication_name, remote_system,
                    expected_rep_name):
     if remote_system:
         remote_system = UnityRemoteSystem(_id=remote_system, cli=t_rest())
     nas = UnityNasServer.get(cli=t_rest(), _id='nas_6')
     rep_session = nas.replicate(dst_nas,
                                 60,
                                 replication_name=replication_name,
                                 remote_system=remote_system)
     assert_that(rep_session.name, equal_to(expected_rep_name))
Esempio n. 3
0
 def test_replicate(self, rep_name, rep_existing_snaps, remote_system):
     if remote_system:
         remote_system = UnityRemoteSystem(_id=remote_system, cli=t_rest())
     lun = UnityLun.get(cli=t_rest(), _id='sv_2498')
     rep_session = lun.replicate(
         'sv_5',
         60,
         replication_name=rep_name,
         replicate_existing_snaps=rep_existing_snaps,
         remote_system=remote_system)
     assert_that(rep_session.name, equal_to('remote-sv_2498-sv_5'))
Esempio n. 4
0
 def f():
     nas_server = UnityNasServer.get(cli=t_rest(), _id='nas_6')
     remote_system = UnityRemoteSystem(_id='RS_6', cli=t_rest())
     nas_server.replicate_with_dst_resource_provisioning(
         60,
         'pool_1',
         dst_nas_server_name='nas-liangr',
         remote_system=remote_system,
         replication_name='nas-server-rep',
         dst_sp=None,
         is_backup_only=False)
Esempio n. 5
0
 def test_create_replicate_cg_session_without_dst_cg(self):
     cg = UnityConsistencyGroup.get(cli=t_rest(), _id='res_21')
     rs = UnityRemoteSystem.get(cli=t_rest(), _id='RS_0')
     lun1 = UnityLun(cli=t_rest(), _id='sv_58')
     lun2 = UnityLun(cli=t_rest(), _id='sv_59')
     luns = [lun1, lun2]
     rep_session = cg.replicate_cg_with_dst_resource_provisioning(
         60, luns, 'pool_2', dst_cg_name=None, remote_system=rs)
     assert_that(
         rep_session.id,
         equal_to(
             '81866043753_A9221PM0010744_0604000_81378689_FNM84900101113_0000'
         ))
Esempio n. 6
0
 def test_replicate_with_dst_resource_provisioning(self,
                                                   dst_nas_server_name,
                                                   remote_system, rep_name,
                                                   dst_sp, is_backup_only,
                                                   expected_rep_session_id):
     nas_server = UnityNasServer.get(cli=t_rest(), _id='nas_6')
     if remote_system:
         remote_system = UnityRemoteSystem(_id=remote_system, cli=t_rest())
     rep_session = nas_server.replicate_with_dst_resource_provisioning(
         60,
         'pool_1',
         dst_nas_server_name=dst_nas_server_name,
         remote_system=remote_system,
         replication_name=rep_name,
         dst_sp=dst_sp,
         is_backup_only=is_backup_only)
     assert_that(rep_session.id, equal_to(expected_rep_session_id))
 def test_replicate_with_dst_resource_provisioning(self,
                                                   dst_fs_name,
                                                   remote_system,
                                                   rep_name,
                                                   dst_size,
                                                   is_dst_thin,
                                                   dst_tiering_policy,
                                                   is_dst_compression,
                                                   expected_rep_session_id):
     fs = UnityFileSystem.get(cli=t_rest(), _id='fs_4')
     if remote_system:
         remote_system = UnityRemoteSystem(_id=remote_system, cli=t_rest())
     rep_session = fs.replicate_with_dst_resource_provisioning(
         60, 'pool_1', dst_fs_name=dst_fs_name,
         remote_system=remote_system, replication_name=rep_name,
         dst_size=dst_size, is_dst_thin=is_dst_thin,
         dst_tiering_policy=dst_tiering_policy,
         is_dst_compression=is_dst_compression)
     assert_that(rep_session.id, equal_to(expected_rep_session_id))
Esempio n. 8
0
 def test_replicate_with_dst_resource_provisioning(
         self, dst_lun_name, remote_system, rep_name, dst_size, dst_sp,
         is_dst_thin, dst_tiering_policy, is_dst_compression):
     lun = UnityLun.get(cli=t_rest(), _id='sv_1876')
     if remote_system:
         remote_system = UnityRemoteSystem(_id=remote_system, cli=t_rest())
     rep_session = lun.replicate_with_dst_resource_provisioning(
         60,
         'pool_2',
         dst_lun_name=dst_lun_name,
         remote_system=remote_system,
         replication_name=rep_name,
         dst_size=dst_size,
         dst_sp=dst_sp,
         is_dst_thin=is_dst_thin,
         dst_tiering_policy=dst_tiering_policy,
         is_dst_compression=is_dst_compression)
     assert_that(
         rep_session.id,
         equal_to(
             '42949675780_FNM00150600267_0000_42949678642_FNM00152000052_0000'
         ))