Re: [openstack-dev] [nova][neutron][openstackclient] The way to assign floating IPs to VM

2018-03-05 Thread Dean Troyer
On Mon, Mar 5, 2018 at 10:56 AM, Andrey Kurilin  wrote:
> Dean, I propose a patch (https://review.openstack.org/549820) which should
> work for all environments where neutron is installed. Please check it when
> you have free time.

Thank you Andrey.  Monty started one approach, I just pushed up
https://review.openstack.org/#/c/549864/ as an example that follows
the pattern we[0] established in the Network commands long ago to
auto-detect between nova-net and Neutron.  This involves moving the
commands from the compute.v2.server classes to network.v2.floating_ip
(etc) and subclassing network.common.NetworkAndComputeCommand to
leverage that work.

dt

[0] I can't take credit for this, rtheis, amotoki and others worked
this out very nicely.

-- 

Dean Troyer
dtro...@gmail.com

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [nova][neutron][openstackclient] The way to assign floating IPs to VM

2018-03-05 Thread Andrey Kurilin
Matt, thanks! Unfortunately, I missed your thread.

Dean, I propose a patch (https://review.openstack.org/549820) which should
work for all environments where neutron is installed. Please check it when
you have free time.

2018-03-05 17:17 GMT+02:00 Dean Troyer :

> On Mon, Mar 5, 2018 at 8:07 AM, Matt Riedemann 
> wrote:
> > On 3/5/2018 6:26 AM, Andrey Kurilin wrote:
> >> - openstackclient
> >>
> >> * command `openstack server add floating ip` calls `add_floating_ip`
> >> method of novaclient's server object[4]. This method is missed in the
> latest
> >> novaclient (see [2]).
> >>It means that this command is broken now.
>
> >> So here we have 2 global issues:
> >> - openstackclient has a broken command (or I missed something?)
> >> - there is no easy way to associate a floating ip with a vm using CLI or
> >> via python.
>
> > I mentioned the related issue back in January:
> >
> > http://lists.openstack.org/pipermail/openstack-dev/2018-
> January/126741.html
> >
> > Adding a floating IP to an instance is possible using OSC CLI, it's
> > essentially something like:
> >
> > a) get the server id (openstack server show/list)
> > b) get the port id using the server id (openstack port list --device-id
> > $server_id)
> > c) assign the floating IP to the port (openstack floating ip set --port
> > $port_id)
>
> 
> We keep removing Python API bindings from client libraries that are
> still in use for old clouds that are still in much wider use than we
> would like.  Why do we not give a rats ass about our users?
> Especially when some deployers have multiple clouds lying about,
> requiring them to maintain multiple venvs of CLIs is just stupid to be
> able to work on their clouds and migrations to the cool new stuff.
>
> OSC is not done because I have about 3 hours a week left to work on
> it.  Continued shit like this isn't helping me want to keep going.
> Maybe my brain is just snow-fried.   And for the love of all the snow
> in Dublin, please, NOBODY USE THE SDK IN A SERVICE.  Keeping service
> assumptions out of client-side stuff is the biggest reason OSC NEEDS
> to get changed over to the SDK, like, 2 years ago.  Then I'll not give
> a rats ass about the legacy python client libs.
> 
>
> dt
>
> --
>
> Dean Troyer
> dtro...@gmail.com
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>



-- 
Best regards,
Andrey Kurilin.
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [nova][neutron][openstackclient] The way to assign floating IPs to VM

2018-03-05 Thread Dean Troyer
On Mon, Mar 5, 2018 at 8:07 AM, Matt Riedemann  wrote:
> On 3/5/2018 6:26 AM, Andrey Kurilin wrote:
>> - openstackclient
>>
>> * command `openstack server add floating ip` calls `add_floating_ip`
>> method of novaclient's server object[4]. This method is missed in the latest
>> novaclient (see [2]).
>>It means that this command is broken now.

>> So here we have 2 global issues:
>> - openstackclient has a broken command (or I missed something?)
>> - there is no easy way to associate a floating ip with a vm using CLI or
>> via python.

> I mentioned the related issue back in January:
>
> http://lists.openstack.org/pipermail/openstack-dev/2018-January/126741.html
>
> Adding a floating IP to an instance is possible using OSC CLI, it's
> essentially something like:
>
> a) get the server id (openstack server show/list)
> b) get the port id using the server id (openstack port list --device-id
> $server_id)
> c) assign the floating IP to the port (openstack floating ip set --port
> $port_id)


We keep removing Python API bindings from client libraries that are
still in use for old clouds that are still in much wider use than we
would like.  Why do we not give a rats ass about our users?
Especially when some deployers have multiple clouds lying about,
requiring them to maintain multiple venvs of CLIs is just stupid to be
able to work on their clouds and migrations to the cool new stuff.

OSC is not done because I have about 3 hours a week left to work on
it.  Continued shit like this isn't helping me want to keep going.
Maybe my brain is just snow-fried.   And for the love of all the snow
in Dublin, please, NOBODY USE THE SDK IN A SERVICE.  Keeping service
assumptions out of client-side stuff is the biggest reason OSC NEEDS
to get changed over to the SDK, like, 2 years ago.  Then I'll not give
a rats ass about the legacy python client libs.


dt

-- 

Dean Troyer
dtro...@gmail.com

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [nova][neutron][openstackclient] The way to assign floating IPs to VM

2018-03-05 Thread Matt Riedemann

On 3/5/2018 6:26 AM, Andrey Kurilin wrote:
A year ago, Nova team decided to deprecate the addFixedIP, 
removeFixedIP, addFloatingIP, removeFloatingIP server action APIs and it 
was done[1].


It looks like not all the consumers paid attention to this change so 
after novaclient 10.0.0 release (which includes removal of these 
interfaces[2]) got in u-c file [3] I found broken code in my repo :(


I tried to find an alternative way to associate a floating ip with an 
instance and I faced several new issues:


- openstackclient

* command `openstack server add floating ip` calls `add_floating_ip` 
method of novaclient's server object[4]. This method is missed in the 
latest novaclient (see [2]).

   It means that this command is broken now.

- neutronclient

* CLI is deprecated
* the python binding accepts floating ip id (need to list all floating 
IPs to find the id)  and port id to attach floating to (where should I 
take port id?!).



So here we have 2 global issues:
- openstackclient has a broken command (or I missed something?)
- there is no easy way to associate a floating ip with a vm using CLI or 
via python.


[1] 
https://github.com/openstack/python-novaclient/blob/master/releasenotes/notes/microversion-v2_44-d60c8834e436ad3d.yaml
[2] 
https://github.com/openstack/python-novaclient/blob/master/releasenotes/notes/remove-virt-interfaces-add-rm-fixed-floating-398c905d9c91cca8.yaml
[3] 
https://github.com/openstack/requirements/commit/c126685c2007c818e65c53cc9c32885fae16fd34
[4] 
https://github.com/openstack/python-openstackclient/blob/b10941ddf6f7f6894b7d87f25c173f227b111e4e/openstackclient/compute/v2/server.py#L266-L267


I mentioned the related issue back in January:

http://lists.openstack.org/pipermail/openstack-dev/2018-January/126741.html

Adding a floating IP to an instance is possible using OSC CLI, it's 
essentially something like:


a) get the server id (openstack server show/list)
b) get the port id using the server id (openstack port list --device-id 
$server_id)
c) assign the floating IP to the port (openstack floating ip set --port 
$port_id)


--

Thanks,

Matt

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev