def get_heat(): keystone_auth = V2Password(auth_url=os.environ['OS_AUTH_URL'], username=os.environ['OS_USERNAME'], password=os.environ['OS_PASSWORD'], tenant_name=os.environ['OS_TENANT_NAME']) session = KeystoneSession(auth=keystone_auth, verify=False) endpoint_url = session.get_endpoint(service_type='orchestration', endpoint_type='publicURL') heat = heatclient.Client(version='1', endpoint=endpoint_url, token=session.get_token()) return heat
# import ipdb; ipdb.set_trace() # print(sess.get("http://%s/identity/v3" % OS['url'])) # Authenticate auth.get_access(sess) auth_ref = auth.auth_ref print("Auth Token: %s" % auth_ref.auth_token) import ipdb ipdb.set_trace() # Service catalog print("Has service catalog: %s" % auth_ref.has_service_catalog()) print("Service catalog: %s" % auth_ref.service_catalog.catalog) print(sess.get_endpoint(service_type='identity')) # import ipdb; ipdb.set_trace() ks_adap = Adapter(auth=auth, session=sess, service_type='identity', interface='admin', region_name=OS['name']) services = ks_adap.get('/v3/services') print(services.json()) # Discover net net_adap = Adapter(auth=auth, session=sess, service_type='network',