'Instantiate common class and login storage system.'

def do_setup(self, context):

    self.huawei_conf.update_config_value()
    self.get_local_and_remote_dev_conf()
    (client_conf, replica_client_conf) = self.get_local_and_remote_client_conf()
    if (not client_conf):
        msg = _('Get    active    client    failed.')
        LOG.error(msg)
        raise exception.VolumeBackendAPIException(data=msg)
    self.client = rest_client.RestClient(self.configuration, **client_conf)
    self.client.login()
    metro_san_address = self.configuration.safe_get('metro_san_address')
    metro_san_user = self.configuration.safe_get('metro_san_user')
    metro_san_password = self.configuration.safe_get('metro_san_password')
    if (metro_san_address and metro_san_user and metro_san_password):
        metro_san_address = metro_san_address.split(';')
        self.rmt_client = rest_client.RestClient(self.configuration, metro_san_address, metro_san_user, metro_san_password)
        self.rmt_client.login()
        self.metro_flag = True
    else:
        self.metro_flag = False
        LOG.warning('Remote    device    not    configured    in    cinder.conf')
    if replica_client_conf:
        self.replica_client = rest_client.RestClient(self.configuration, **replica_client_conf)
        self.replica_client.try_login()
        self.replica = replication.ReplicaPairManager(self.client, self.replica_client, self.configuration)
