Somewhat doing usefull things

This commit is contained in:
Cory Hawkless 2022-10-13 14:37:43 +10:30
parent 74ebac01fd
commit 097e315193
2 changed files with 3 additions and 3 deletions

View File

@ -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"),

View File

@ -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():