<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/openstack/python-openstackclient.git/openstackclient/compute/v2, branch stable/queens</title>
<subtitle>opendev.org: openstack/python-openstackclient
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-openstackclient.git/'/>
<entry>
<title>Merge "Fix server show for microversion 2.47" into stable/queens</title>
<updated>2020-07-22T12:39:19+00:00</updated>
<author>
<name>Zuul</name>
<email>zuul@review.opendev.org</email>
</author>
<published>2020-07-22T12:39:19+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-openstackclient.git/commit/?id=fd85a3cde361a8e3eae7bd9e0760150459afe5c2'/>
<id>fd85a3cde361a8e3eae7bd9e0760150459afe5c2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix server show for microversion 2.47</title>
<updated>2020-07-21T17:20:32+00:00</updated>
<author>
<name>Matt Riedemann</name>
<email>mriedem.os@gmail.com</email>
</author>
<published>2018-06-08T18:43:41+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-openstackclient.git/commit/?id=1c754197b58a28e9d30ae158560bd9921e7a8e9c'/>
<id>1c754197b58a28e9d30ae158560bd9921e7a8e9c</id>
<content type='text'>
Compute API version 2.47 embeds the server's internal
flavor in the response. The original flavor id is not
preserved since it could have changed if the flavor
was deleted and re-created after the server was created,
which was the dreaded Horizon "Edit Flavor" issue.
So the flavor dict in the server response is a dict of
information about the flavor representing the server
"right now" excluding the id. The original flavor name
is shown though along with the ram/disk/vcpu etc
information.

The server list command has a similar issue which
will be fixed in a follow up change.

Change-Id: I1a92999758006d02567c542b6be8902a049899cc
Task: 13864
Story: 1751104
(cherry picked from commit da7572a5ff9f54dbab4f8328632c562a2816a4fb)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Compute API version 2.47 embeds the server's internal
flavor in the response. The original flavor id is not
preserved since it could have changed if the flavor
was deleted and re-created after the server was created,
which was the dreaded Horizon "Edit Flavor" issue.
So the flavor dict in the server response is a dict of
information about the flavor representing the server
"right now" excluding the id. The original flavor name
is shown though along with the ram/disk/vcpu etc
information.

The server list command has a similar issue which
will be fixed in a follow up change.

Change-Id: I1a92999758006d02567c542b6be8902a049899cc
Task: 13864
Story: 1751104
(cherry picked from commit da7572a5ff9f54dbab4f8328632c562a2816a4fb)
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix BFV server list handling with --name-lookup-one-by-one</title>
<updated>2020-07-21T03:26:42+00:00</updated>
<author>
<name>melanie witt</name>
<email>melwittt@gmail.com</email>
</author>
<published>2019-06-28T18:17:10+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-openstackclient.git/commit/?id=13bab18888f56ae076250a0c90a09a05152be675'/>
<id>13bab18888f56ae076250a0c90a09a05152be675</id>
<content type='text'>
When the --name-lookup-one-by-one option passed to the 'server list'
command, the image and flavor names will be looked up for each
server being listed instead of fetching all image/flavor names.

The current code assumes all servers have an image attribute, but
servers booted from volumes have no image, so the following error is
raised when listing BFV servers with --name-lookup-one-by-one:

  AttributeError: ('unicode'|'str') object has no attribute 'get'

The error occurs when the code attempts server.image.get('id').

This fixes the --name-lookup-one-by-one code not to assume an image
for a server. The unit tests for 'server list' have also been
robustified to feature one BFV server to enhance our test coverage.

Story: #2006063
Task: #34777

Change-Id: I312c971346c7ded93f6fcaa515098554b8580295
(cherry picked from commit bfc34e11b3437506508b3e120accc0e212268ac6)
(cherry picked from commit 83359fbe4fd7e5850abd45a467bf197c284519b1)
(cherry picked from commit 9698c6675033664fd262bad7844af12067ff3bea)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the --name-lookup-one-by-one option passed to the 'server list'
command, the image and flavor names will be looked up for each
server being listed instead of fetching all image/flavor names.

The current code assumes all servers have an image attribute, but
servers booted from volumes have no image, so the following error is
raised when listing BFV servers with --name-lookup-one-by-one:

  AttributeError: ('unicode'|'str') object has no attribute 'get'

The error occurs when the code attempts server.image.get('id').

This fixes the --name-lookup-one-by-one code not to assume an image
for a server. The unit tests for 'server list' have also been
robustified to feature one BFV server to enhance our test coverage.

Story: #2006063
Task: #34777

Change-Id: I312c971346c7ded93f6fcaa515098554b8580295
(cherry picked from commit bfc34e11b3437506508b3e120accc0e212268ac6)
(cherry picked from commit 83359fbe4fd7e5850abd45a467bf197c284519b1)
(cherry picked from commit 9698c6675033664fd262bad7844af12067ff3bea)
</pre>
</div>
</content>
</entry>
<entry>
<title>Add --name-lookup-one-by-one option to server list</title>
<updated>2020-07-21T03:26:42+00:00</updated>
<author>
<name>Pavlo Shchelokovskyy</name>
<email>shchelokovskyy@gmail.com</email>
</author>
<published>2018-05-14T18:13:28+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-openstackclient.git/commit/?id=defa0f562b8efc8fc917f1b195c998e2d6224260'/>
<id>defa0f562b8efc8fc917f1b195c998e2d6224260</id>
<content type='text'>
usually in a big cloud there are many images and flavors,
while each given project might use only some of those.

This patch introduces '--name-lookup-one-by-one' argument to
server list command (mutually exclusive with '--no-name-lookup')

When provided (or either '--image' or '--flavor' is specified) to the
`server list` command, name resolving for
corresponding entity is now using targeted GET commands instead of
full entities list.

In some situations this can significantly speedup the execution of the
`server list` command by reducing the number of API requests performed.

 Conflicts:
	openstackclient/compute/v2/server.py

NOTE(melwitt): The conflict is due to change
I93a56138c50b82fb4dce67a2f788107f71c5f423 which is not in Queens.

Change-Id: I59cbf3f75c55e5d3747654edcc9be86ad954cf40
Story: #2002039
Task: #19682
(cherry picked from commit e782f49927a6b142a35f85a1a4a759fd2b1ceedf)
(cherry picked from commit dda007ba33b5c7d1ae539926b826749727276e3c)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
usually in a big cloud there are many images and flavors,
while each given project might use only some of those.

This patch introduces '--name-lookup-one-by-one' argument to
server list command (mutually exclusive with '--no-name-lookup')

When provided (or either '--image' or '--flavor' is specified) to the
`server list` command, name resolving for
corresponding entity is now using targeted GET commands instead of
full entities list.

In some situations this can significantly speedup the execution of the
`server list` command by reducing the number of API requests performed.

 Conflicts:
	openstackclient/compute/v2/server.py

NOTE(melwitt): The conflict is due to change
I93a56138c50b82fb4dce67a2f788107f71c5f423 which is not in Queens.

Change-Id: I59cbf3f75c55e5d3747654edcc9be86ad954cf40
Story: #2002039
Task: #19682
(cherry picked from commit e782f49927a6b142a35f85a1a4a759fd2b1ceedf)
(cherry picked from commit dda007ba33b5c7d1ae539926b826749727276e3c)
</pre>
</div>
</content>
</entry>
<entry>
<title>Document 2.53 behavior for compute service list/delete</title>
<updated>2019-09-25T16:22:58+00:00</updated>
<author>
<name>Matt Riedemann</name>
<email>mriedem.os@gmail.com</email>
</author>
<published>2019-07-25T18:28:43+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-openstackclient.git/commit/?id=5eedf36db63ed5edc2315faa85bd95eb201eaefe'/>
<id>5eedf36db63ed5edc2315faa85bd95eb201eaefe</id>
<content type='text'>
With compute API microversion 2.53, nova-compute services
can only be deleted with the ID as a UUID to uniquely identify
the service in a multi-cell deployment. This documents that for
the "compute service delete &lt;service&gt;" argument. The description
of the "compute service list" command is also updated to mention
that the ID can be retrieved as a UUID using 2.53 or greater.

Change-Id: If7d4a27c0aaef588bcd77dd9edddec1e535fbf31
Story: 2005349
Task: 30302
(cherry picked from commit 1557afb554e908e097abd39081891ea78083e20e)
(cherry picked from commit 111d6a9b23d8c6b9bcce437039ff49536f0b5dd1)
(cherry picked from commit 72922ae1a1b842b1a5058377f8033cbf09086b4c)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With compute API microversion 2.53, nova-compute services
can only be deleted with the ID as a UUID to uniquely identify
the service in a multi-cell deployment. This documents that for
the "compute service delete &lt;service&gt;" argument. The description
of the "compute service list" command is also updated to mention
that the ID can be retrieved as a UUID using 2.53 or greater.

Change-Id: If7d4a27c0aaef588bcd77dd9edddec1e535fbf31
Story: 2005349
Task: 30302
(cherry picked from commit 1557afb554e908e097abd39081891ea78083e20e)
(cherry picked from commit 111d6a9b23d8c6b9bcce437039ff49536f0b5dd1)
(cherry picked from commit 72922ae1a1b842b1a5058377f8033cbf09086b4c)
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix compute service set handling for 2.53+</title>
<updated>2019-09-25T10:39:03+00:00</updated>
<author>
<name>Matt Riedemann</name>
<email>mriedem.os@gmail.com</email>
</author>
<published>2019-07-24T18:39:07+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-openstackclient.git/commit/?id=492a6c400169689182c077df5543f5ec1e481369'/>
<id>492a6c400169689182c077df5543f5ec1e481369</id>
<content type='text'>
With compute API microversion 2.53 there is a single
PUT /os-services/{service_id} API which takes the service
id as a UUID. Since the openstack compute service set
command only takes --host and --service (binary) to identify
the service, this change checks if 2.53 or greater is being
used and if so, looks up the service by host and binary and
calls the appropriate methods in novaclient.

If the command cannot uniquely identify a compute service
with the given host and binary, an error is raised. A future
change could add an --id option to be used with 2.53+ to
pass the service id (as UUID) directly to avoid the host/binary
filtering.

Conflicts:
    openstackclient/compute/v2/service.py
Note(elod.illes): conflict is due to missing patch on stable/queens:
I0a87e02e71ff025d30181fc17ebcd003a590f110

Change-Id: I868e0868e8eb17e7e34eef3d2d58dceedd29c2b0
Story: 2005349
Task: 30302
(cherry picked from commit 4bd53dc1090fda86f6ce25b76a079e250c9206d8)
(cherry picked from commit 100d34c54ecdfedf6fb40a2686e1aae1f54df97e)
(cherry picked from commit fc5f2978c0f4f1e3360325b00c1f1b99f1e6318f)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With compute API microversion 2.53 there is a single
PUT /os-services/{service_id} API which takes the service
id as a UUID. Since the openstack compute service set
command only takes --host and --service (binary) to identify
the service, this change checks if 2.53 or greater is being
used and if so, looks up the service by host and binary and
calls the appropriate methods in novaclient.

If the command cannot uniquely identify a compute service
with the given host and binary, an error is raised. A future
change could add an --id option to be used with 2.53+ to
pass the service id (as UUID) directly to avoid the host/binary
filtering.

Conflicts:
    openstackclient/compute/v2/service.py
Note(elod.illes): conflict is due to missing patch on stable/queens:
I0a87e02e71ff025d30181fc17ebcd003a590f110

Change-Id: I868e0868e8eb17e7e34eef3d2d58dceedd29c2b0
Story: 2005349
Task: 30302
(cherry picked from commit 4bd53dc1090fda86f6ce25b76a079e250c9206d8)
(cherry picked from commit 100d34c54ecdfedf6fb40a2686e1aae1f54df97e)
(cherry picked from commit fc5f2978c0f4f1e3360325b00c1f1b99f1e6318f)
</pre>
</div>
</content>
</entry>
<entry>
<title>Handle multiple ports in AddFloatingIP</title>
<updated>2018-11-08T20:44:40+00:00</updated>
<author>
<name>melanie witt</name>
<email>melwittt@gmail.com</email>
</author>
<published>2018-11-02T22:27:55+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-openstackclient.git/commit/?id=010da92ff3711873e40c0f5a1c262010400bf53b'/>
<id>010da92ff3711873e40c0f5a1c262010400bf53b</id>
<content type='text'>
AddFloatingIP refers to an old nova proxy API to neutron that was
deprecated in nova. The neutron API for floating IP associate requires
a port to be specified. Currently, the code is selecting the first port
if the server has multiple ports. But, an attempt to associate the
first port with a floating IP can fail if the first port is not on a
network that is attached to an external gateway.

In order to make the command work better for users who have a server
with multiple ports, we can:

  1. Select the port corresponding to the fixed_ip_address, if one was
     specified

  2. Try to associate the floating IP with each port until one of the
     attempts succeeds, else re-raise the last exception.
     (404 ExternalGatewayForFloatingIPNotFound from neutron)

This also fixes incorrect FakeFloatingIP attributes that were being set
in the TestServerAddFloatingIPNetwork unit tests, which were causing
the tests to use None as parsed args for ip-address and
--fixed-ip-address and thus bypassing code in the
'if parsed_args.fixed_ip_address:' block.

Task: 27800
Story: 2004263

Change-Id: I11fbcebf6b00f12a030b000c84dcf1d6b5e86250
(cherry picked from commit 013c9a4f3a44cb0b81fc7affe9b933e701cb5dba)
(cherry picked from commit e09c358e7b35ac938595aad90c5c42dfe402a42a)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
AddFloatingIP refers to an old nova proxy API to neutron that was
deprecated in nova. The neutron API for floating IP associate requires
a port to be specified. Currently, the code is selecting the first port
if the server has multiple ports. But, an attempt to associate the
first port with a floating IP can fail if the first port is not on a
network that is attached to an external gateway.

In order to make the command work better for users who have a server
with multiple ports, we can:

  1. Select the port corresponding to the fixed_ip_address, if one was
     specified

  2. Try to associate the floating IP with each port until one of the
     attempts succeeds, else re-raise the last exception.
     (404 ExternalGatewayForFloatingIPNotFound from neutron)

This also fixes incorrect FakeFloatingIP attributes that were being set
in the TestServerAddFloatingIPNetwork unit tests, which were causing
the tests to use None as parsed args for ip-address and
--fixed-ip-address and thus bypassing code in the
'if parsed_args.fixed_ip_address:' block.

Task: 27800
Story: 2004263

Change-Id: I11fbcebf6b00f12a030b000c84dcf1d6b5e86250
(cherry picked from commit 013c9a4f3a44cb0b81fc7affe9b933e701cb5dba)
(cherry picked from commit e09c358e7b35ac938595aad90c5c42dfe402a42a)
</pre>
</div>
</content>
</entry>
<entry>
<title>Default --nic to 'auto' if creating a server with &gt;= 2.37</title>
<updated>2018-10-25T20:53:42+00:00</updated>
<author>
<name>Matt Riedemann</name>
<email>mriedem.os@gmail.com</email>
</author>
<published>2018-02-19T18:14:58+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-openstackclient.git/commit/?id=46074312583febe948c8ec8780aacd6850617cf5'/>
<id>46074312583febe948c8ec8780aacd6850617cf5</id>
<content type='text'>
Compute API version &gt;= 2.37 requires a 'networks' value in
the server create request. The novaclient CLI defaults this
to 'auto' if not specified, but the novaclient ServerManager.create
python API binding code does not, as it wants clients to be explicit.

For the purposes of the OSC CLI, we should follow suit and if the
user is requesting OS_COMPUTE_API_VERSION&gt;=2.37 without specific
nics, we should just default to 'auto'.

Change-Id: Ib760c55e31209223338a4086ff1f4fee88dc6959
Closes-Bug: #1750395
(cherry picked from commit 1008544882fbdae16b045abca05cf3e2e8a14787)
(cherry picked from commit 4944d4eaa9aaeffdee358680550ac7d7f0c6e8d8)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Compute API version &gt;= 2.37 requires a 'networks' value in
the server create request. The novaclient CLI defaults this
to 'auto' if not specified, but the novaclient ServerManager.create
python API binding code does not, as it wants clients to be explicit.

For the purposes of the OSC CLI, we should follow suit and if the
user is requesting OS_COMPUTE_API_VERSION&gt;=2.37 without specific
nics, we should just default to 'auto'.

Change-Id: Ib760c55e31209223338a4086ff1f4fee88dc6959
Closes-Bug: #1750395
(cherry picked from commit 1008544882fbdae16b045abca05cf3e2e8a14787)
(cherry picked from commit 4944d4eaa9aaeffdee358680550ac7d7f0c6e8d8)
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't sent disk_over_commit if nova api &gt; 2.24</title>
<updated>2018-10-25T20:53:26+00:00</updated>
<author>
<name>Artom Lifshitz</name>
<email>alifshit@redhat.com</email>
</author>
<published>2018-07-12T18:34:51+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-openstackclient.git/commit/?id=1a7aee61d98b766de64c2f31124e1e8a07193988'/>
<id>1a7aee61d98b766de64c2f31124e1e8a07193988</id>
<content type='text'>
In API microversion 2.25 Nova removed the disk_over_commit parameter
to the live migration server action. This patch makes sure that we
don't include it in our request if we're running with 2.25 or higher.

Story: #2002963
Task: #22966
Change-Id: I1bbdd33be96d82422a05982508e370237c3560f3
(cherry picked from commit d6121782d3aa6a95b883220b27a154e641b61f7f)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In API microversion 2.25 Nova removed the disk_over_commit parameter
to the live migration server action. This patch makes sure that we
don't include it in our request if we're running with 2.25 or higher.

Story: #2002963
Task: #22966
Change-Id: I1bbdd33be96d82422a05982508e370237c3560f3
(cherry picked from commit d6121782d3aa6a95b883220b27a154e641b61f7f)
</pre>
</div>
</content>
</entry>
<entry>
<title>Prevent "server migrate --wait" from hanging</title>
<updated>2018-06-05T13:20:35+00:00</updated>
<author>
<name>Julie Pichon</name>
<email>jpichon@redhat.com</email>
</author>
<published>2018-05-09T16:43:09+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-openstackclient.git/commit/?id=814ffb2a6f22aed640ba6adad62c1288f917b09a'/>
<id>814ffb2a6f22aed640ba6adad62c1288f917b09a</id>
<content type='text'>
Migrate uses the same mechanism in the backend than Resize and so the
steps and step names are similar. Currently when using the --wait
option with 'migrate', we wait forever because the status won't get to
active until the user performs an action. This makes it return on
verify_resize status just like 'resize' does, so that the user can
perform the next manual step.

Change-Id: Ie1aeac52506bc8801f88fd6a6eb4f6094cf20050
Story: 2001994
Task: 19620
(cherry picked from commit de9a6fc0700d821f9fca6bf347407eccd87f0064)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Migrate uses the same mechanism in the backend than Resize and so the
steps and step names are similar. Currently when using the --wait
option with 'migrate', we wait forever because the status won't get to
active until the user performs an action. This makes it return on
verify_resize status just like 'resize' does, so that the user can
perform the next manual step.

Change-Id: Ie1aeac52506bc8801f88fd6a6eb4f6094cf20050
Story: 2001994
Task: 19620
(cherry picked from commit de9a6fc0700d821f9fca6bf347407eccd87f0064)
</pre>
</div>
</content>
</entry>
</feed>
