Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

keystone v3 API not working as expected

I have a Mirantis 9 cloud setup (OpenStack Mitaka). I am trying to write a python program which uses python clients to fetch network list. I have followed OpenStack documentation in the following link -

https://docs.openstack.org/developer/python-keystoneclient/using-api-v3.html

So my code look like this -

auth = v3.Password(auth_url=url, user_id="user", password="abcdef", project_id="tenant1")

sess = session.Session(auth=auth)

keystone = client.Client(session=sess)

neutron = neutronclient.Client(session=sess)

print(neutron)

print(neutron.list_networks())

But after printing neutron object successfully, it failed with error message -

keystoneauth1.exceptions.http.Unauthorized: The request you have made requires authentication. (HTTP 401) (Request-ID: ....)

But the documentation does not mention other ways or other parameters needed in Password(). So, what am I missing? Thanks for your help.

keystone v3 API not working as expected

I have a Mirantis 9 cloud setup (OpenStack Mitaka). I am trying to write a python program which uses python clients to fetch network list. I have followed OpenStack documentation in the following link -

https://docs.openstack.org/developer/python-keystoneclient/using-api-v3.html

So my code look like this -

auth = v3.Password(auth_url=url, user_id="user", password="abcdef", project_id="tenant1")

sess = session.Session(auth=auth)

keystone = client.Client(session=sess)

neutron = neutronclient.Client(session=sess)

print(neutron)

print(neutron.list_networks())

But after printing neutron object successfully, it failed with error message -

keystoneauth1.exceptions.http.Unauthorized: The request you have made requires authentication. (HTTP 401) (Request-ID: ....)

But the documentation does not mention other ways or other parameters needed in Password(). So, what am I missing? Thanks for your help.

Couldn't get network list whil using keystone v3 API not working as expectedAPI

I have a Mirantis 9 cloud setup (OpenStack Mitaka). I am trying to write a python program which uses python clients to fetch network list. I have followed OpenStack documentation in the following link -

https://docs.openstack.org/developer/python-keystoneclient/using-api-v3.html

So my code look like this -

auth = v3.Password(auth_url=url, user_id="user", password="abcdef", project_id="tenant1")

sess = session.Session(auth=auth)

keystone = client.Client(session=sess)

neutron = neutronclient.Client(session=sess)

print(neutron)

print(neutron.list_networks())

But after printing neutron object successfully, it failed with error message -

keystoneauth1.exceptions.http.Unauthorized: The request you have made requires authentication. (HTTP 401) (Request-ID: ....)

But the documentation does not mention other ways or other parameters needed in Password(). So, what am I missing? Thanks for your help.

Couldn't get network list whil while using keystone v3 API

I have a Mirantis 9 cloud setup (OpenStack Mitaka). I am trying to write a python program which uses python clients to fetch network list. I have followed OpenStack documentation in the following link -

https://docs.openstack.org/developer/python-keystoneclient/using-api-v3.html

So my code look like this -

auth = v3.Password(auth_url=url, user_id="user", password="abcdef", project_id="tenant1")

sess = session.Session(auth=auth)

keystone = client.Client(session=sess)

neutron = neutronclient.Client(session=sess)

print(neutron)

print(neutron.list_networks())

But after printing neutron object successfully, it failed with error message -

keystoneauth1.exceptions.http.Unauthorized: The request you have made requires authentication. (HTTP 401) (Request-ID: ....)

But the documentation does not mention other ways or other parameters needed in Password(). So, what am I missing? Thanks for your help.

Couldn't get network list while using keystone v3 APIAPI for authentication

I have a Mirantis 9 cloud setup (OpenStack Mitaka). I am trying to write a python program which uses python clients to fetch network list. I have followed OpenStack documentation in the following link -

https://docs.openstack.org/developer/python-keystoneclient/using-api-v3.html

So my code look like this -

auth = v3.Password(auth_url=url, user_id="user", password="abcdef", project_id="tenant1")

sess = session.Session(auth=auth)

keystone = client.Client(session=sess)

neutron = neutronclient.Client(session=sess)

print(neutron)

print(neutron.list_networks())

But after printing neutron object successfully, it failed with error message -

keystoneauth1.exceptions.http.Unauthorized: The request you have made requires authentication. (HTTP 401) (Request-ID: ....)

But the documentation does not mention other ways or other parameters needed in Password(). So, what am I missing? missing?

I have seen it works if I pass project_domain_name and user_domain_name in Password(). What confuses me more is why this two params? Including single domain_name doesn't work. But by definition users and the project must belong to one domain. Can user (say U) belongs to project (say P) reside in different domains (say P in domain D1, U in domain D2)?

Thanks for your help.