Somewhat doing usefull things
This commit is contained in:
parent
74ebac01fd
commit
097e315193
4
main.py
4
main.py
|
@ -13,8 +13,8 @@ x.keystone.getCatalog()
|
|||
|
||||
# neutronService=x.keystone.getServicebyName("Neutron")
|
||||
# print(neutronService)
|
||||
neutronEndpointInternal=x.keystone.getEndpointByNameIDAndInterface("NeuTrOn","internal")
|
||||
print(neutronEndpointInternal)
|
||||
neutronURL=x.keystone.getEndpointByNameIDAndInterface("NeuTrOn","internal")['url']
|
||||
print(neutronURL)
|
||||
|
||||
# token = ng_openstack.auth.getToken(os.getenv("OS_USERNAME"), os.getenv("OS_PASSWORD"),
|
||||
# os.getenv("OS_USER_DOMAIN_NAME"), os.getenv("OS_USER_DOMAIN_NAME"),
|
||||
|
|
|
@ -54,7 +54,7 @@ class Openstack_Keystone():
|
|||
return(_endpoint)
|
||||
|
||||
def getEndpointByNameIDAndInterface(_self,name,interface):
|
||||
serviceID=_self.getServicebyName(name)['id']
|
||||
id=_self.getServicebyName(name)['id']
|
||||
for _endpoint in _self.catalogData['endpoints']:
|
||||
if str(_endpoint['service_id']).lower()==str(id).lower():
|
||||
if str(_endpoint['interface']).lower()==str(interface).lower():
|
||||
|
|
Loading…
Reference in New Issue