Guest User

Untitled

a guest
Dec 16th, 2016
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.93 KB | None | 0 0
  1.     creds = {
  2.                 "username": self._username,
  3.                 "password": self._password,
  4.                 "auth_url": self._auth_url
  5.             }
  6.  
  7.             if self._project_id is None:
  8.                 creds.update({
  9.                     "tenant_id": self._tenant_id
  10.                 })
  11.             else:
  12.                 creds.update({
  13.                     "project_id": self._project_id,
  14.                     "user_domain_id": self._user_domain_id
  15.                 })
  16.  
  17.             loader = loading.get_plugin_loader('password')
  18.             auth = loader.load_from_options(**creds)
  19.             sess = session.Session(auth=auth)
  20.  
  21.             self.logger.debug(
  22.                 "Looking for endpoint from %s" % sess)
  23.             heat_endpoint = sess.get_endpoint(auth=auth,
  24.                                               service_type="orchestration",
  25.                                               endpoint_type='publicURL')
Advertisement
Add Comment
Please, Sign In to add comment