docs: def get_endpoints(url_base, tenant_id, user, password):
      """It get the endpoints
      :param url_base: keystone url
      :param tenand_id: the id of the tenant
      :param user: the user
      :param paassword: the password
      """
      url = 'http://' + url_base + '/v2.0/tokens'
      headers = {'Content-Type': 'application/json'}
      payload = {'auth': {'tenantId': '' + tenant_id + '',
                          'passwordCredentials': {'username':
                          '' + user + '', 'password': '' +
                          password + ''}}}
      try:
          response = requests.post(url, headers=headers,
                                   data=json.dumps(payload))
          response_json = response.json()
          services = response_json['access']['serviceCatalog']
      except Exception as e:
          raise Exception('Error to obtain a image ' + e.message)
  
      endpoints = {}
      for service in services:
          service_endpoints = {}
          for endpoint in service['endpoints']:
              service_endpoints.update({endpoint['region']:
                                        endpoint['publicURL']})
          endpoints.update({service['type']: service_endpoints})
      return endpoints