@property
    def host(self):
        """
        Rackspace uses a separate host for API calls which is only provided
        after an initial authentication request. If we haven't made that
        request yet, do it here. Otherwise, just return the management host.
        """
        if not self.__host:
            # Initial connection used for authentication
            conn = self.conn_classes[self.secure](self.auth_host, self.port[self.secure])
            conn.request(
                method='GET',
                url='/%s' % (AUTH_API_VERSION),
                headers={
                    'X-Auth-User': self.user_id,
                    'X-Auth-Key': self.key
                }
            )

            resp = conn.getresponse()

            if resp.status != httplib.NO_CONTENT:
                raise InvalidCredsError()

            headers = dict(resp.getheaders())

            try:
                self.server_url = headers['x-server-management-url']
                self.storage_url = headers['x-storage-url']
                self.cdn_management_url = headers['x-cdn-management-url']
                self.auth_token = headers['x-auth-token']
            except __HOLE__:
                raise InvalidCredsError()

            scheme, server, self.request_path, param, query, fragment = (
                urlparse.urlparse(getattr(self, self._url_key))
            )

            if scheme is "https" and self.secure is not True:
                raise InvalidCredsError()

            # Set host to where we want to make further requests to;
            self.__host = server
            conn.close()

        return self.__host
dataset/ETHPy150Open cloudkick/libcloud/libcloud/common/rackspace.py/RackspaceBaseConnection.host