def authenticate(self):
    result = self._get('/{0}'.format(self.options['domain']))
    if (not result['uid']):
        raise Exception('Error, domain {0} not found'.format(self.options['domain']))
    self.domain_id = result['uid']
def authenticate(self):
    result = self._get('/{0}'.format(self.options['domain']))
    if (not result['uid']):
        raise Exception('Error, domain {0} not found'.format(self.options['domain']))
    self.domain_id = result['uid']