[Openstack] openstack vs neutron CLI (mikata)

Darek Śmigiel smigiel.dariusz at gmail.com
Wed Aug 17 10:28:40 UTC 2016


Hey Sean,
Please remind, that transition is in progress. You can verify how far we are here [1].
But, according to OSC documentation [2] and release notes [3], you should be able to create subnet. It was released with OSC 2.4 version.

Could you verify, if you have correct version?

Darek

[1] https://etherpad.openstack.org/p/osc-neutron-support <https://etherpad.openstack.org/p/osc-neutron-support>
[2] https://github.com/openstack/python-openstackclient/blob/master/doc/source/command-objects/subnet.rst#subnet-create <https://github.com/openstack/python-openstackclient/blob/master/doc/source/command-objects/subnet.rst#subnet-create>
[3] http://docs.openstack.org/releasenotes/python-openstackclient/unreleased.html#id77 <http://docs.openstack.org/releasenotes/python-openstackclient/unreleased.html#id77>

> On Aug 17, 2016, at 10:10 AM, Sean.Boran at swisscom.com wrote:
> 
> 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
> 
> 
> 
> _______________________________________________
> Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> Post to     : openstack at lists.openstack.org
> Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20160817/ac604dad/attachment.html>


More information about the Openstack mailing list