[Openstack] openstack vs neutron CLI (mikata)
Sean.Boran at swisscom.com
Sean.Boran at swisscom.com
Wed Aug 17 09:10:11 UTC 2016
A bit of help with scripting CLIs for managing network objects would be appreciated…
Networks can be created:
openstack network create --project my-project1 my_net1
-- but how does one create a subnet? Neutron can do it:
neutron subnet-create --tenant-id my-project1 --name my_subnet1 my_net1 10.7.98.0/24
Likewise, one can create a router:
openstack router create --project my-project1 my-router1
-- but how to add a subnet (“openstack router add subnet” does not exist), nor attach admin_floating_net.
If it is essential to use the neutron CLI, operations can be done with the default “admin” user,
-- but not with a user from ldap. (Domains are also in use).
neutron subnet-list
The request you have made requires authentication. (HTTP 401) (Request-ID: req-6e9131e7-bb27-462a-bd38-ddf8ca90bfe0)
(I expect it to prompt for a password)
(Note: “openstack router create” works fine with the ldap user, i.e. is has rights on the project).
Aside from the environment for the normal admin user, I also set
export OS_USERNAME=myldapuser
export OS_PROJECT_NAME=my-project1'
export OS_DOMAIN_NAME=my.net'
export OS_IDENTITY_API_VERSION=3
export OS_USER_NAME=$OS_USERNAME
export OS_USER_DOMAIN_NAME=$OS_DOMAIN_NAME
export OS_PROJECT_DOMAIN_NAME=$OS_PROJECT_NAME
Also tried:
export OS_IDENTITY_API_VERSION=2
Is the problem that neutron only works with v2, but v2 doesn’t not support domains?
Thanks in advance,
Sean
More information about the Openstack
mailing list