def _connect(self):
        try:
            self.client = RESTClient(
                service_address=self.service_address,
                user=self.user,
                password=self.password,
            )

            self.system_info = self.get_system_info()

            if parse(self.version) < parse(self.SUPPORTED_FROM_VERSION):
                raise array_errors.UnsupportedStorageVersionError(
                    self.version, self.SUPPORTED_FROM_VERSION)
        except (exceptions.ClientError, exceptions.Unauthorized) as e:
            # BE7A002D=Authentication has failed because the user name and
            # password combination that you have entered is not valid.
            if ERROR_CODE_INVALID_CREDENTIALS or KNOWN_ERROR_CODE_INVALID_CREDENTIALS in str(
                    e.message).upper():
                raise array_errors.CredentialsError(self.service_address)
            raise ConnectionError()
        except exceptions.ClientException as e:
            logger.error(
                'Failed to connect to DS8K array {}, reason is {}'.format(
                    self.service_address, e.details))
            raise ConnectionError()
    def _connect(self):
        try:
            self.client = RESTClient(service_address=self.service_address,
                                     user=self.user,
                                     password=self.password,
                                     )

            self.system_info = self.get_system_info()

            if parse(self.version) < parse(self.SUPPORTED_FROM_VERSION):
                raise array_errors.UnsupportedStorageVersionError(
                    self.version, self.SUPPORTED_FROM_VERSION
                )
        except exceptions.ClientException as ex:
            error_message = str(ex.message).upper()
            if ERROR_CODE_INVALID_CREDENTIALS in error_message or KNOWN_ERROR_CODE_INVALID_CREDENTIALS in error_message:
                raise array_errors.CredentialsError(self.service_address)
            logger.error(
                'Failed to connect to DS8K array {}, reason is {}'.format(self.service_address, ex.details))
            raise ex