4629 Commits

Author SHA1 Message Date
Zuul
eed615e7d0 Merge "Remove token_endpoint auth type" 2019-08-29 00:02:31 +00:00
Zuul
fd63a909a8 Merge "Bump hacking version" 2019-08-28 02:42:06 +00:00
Stephen Finucane
6419533f43 Bump hacking version
Pick up newer versions of this library. Thankfully no serious changes
are needed.

Change-Id: I69e523844529fc1c8aa0c1ce764182dbe29cfeb6
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-08-27 17:12:15 -05:00
Zuul
c9cc8b0ae2 Merge "Format aggregate command fields and de-race functional tests" 2019-08-27 18:04:57 +00:00
Dean Troyer
6fcc2608b1 Remove token_endpoint auth type
The token_endpoint was a compatibility auth type to maintain support
for the --url global option that dated back to the beginning of
OpenStack CLI auth.  The common keystoneauth library implements
'admin_token' which provides the same functionality using
--endpoint rather than --url.

Change-Id: I1b9fbb96e447889a41b705324725a2ffc8ecfd9f
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-08-27 11:08:50 -05:00
Zuul
6c818c4925 Merge "Add CLI argument tests before making changes" 2019-08-27 00:59:46 +00:00
Dean Troyer
03a2accb2f Format aggregate command fields and de-race functional tests
Rename metadata to property in all aggregate commands

Beef up functional tests to reduce street racing

Change-Id: I4598da73b85a954f3e6a3981db21891b45d9548c
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-08-26 17:50:06 -05:00
Zuul
7b7488d51c Merge "Fix functional.base.TestCase.openstack() to optionally omit --os-auth-type" 2019-08-23 19:40:13 +00:00
Dean Troyer
75f0f82c41 Add CLI argument tests before making changes
Add these tests before hacking on the global args and removing
the compatibility stuff so we can clearly see what actually changes.

Change-Id: Ic86c89da1475b4914ff7cb2396199cd219a12097
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-08-22 23:50:24 -05:00
Zuul
0001404d7d Merge "Document 2.53 behavior for compute service list/delete" 2019-08-22 21:39:51 +00:00
Dean Troyer
3b2863e369 Fix functional.base.TestCase.openstack() to optionally omit --os-auth-type
Change the functional test TestCase.openstack() method to add a
way to not include the --os-auth-type option in order to test the
default auth-type logic.

Change-Id: I0f1ca2f7517a41278afaad5aaf4e98accb16bea2
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-08-22 11:05:09 -05:00
Zuul
a15e4741fa Merge "Add 'openstack server resize (confirm|revert)' commands" 2019-08-20 18:12:20 +00:00
Zuul
8ef2602447 Merge "Add openstack server create --boot-from-volume option" 2019-08-20 18:10:21 +00:00
Zuul
60da718fde Merge "Fix <id> description for --block-device-mapping" 2019-08-20 18:10:20 +00:00
Zuul
07fcb733fc Merge "Support type=image with --block-device-mapping option" 2019-08-20 17:58:30 +00:00
Zuul
b0ec909160 Merge "Fix compute service set handling for 2.53+" 2019-08-20 17:53:33 +00:00
Matt Riedemann
1557afb554 Document 2.53 behavior for compute service list/delete
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 <service>" 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
2019-08-20 15:38:59 +00:00
Zuul
9042668da4 Merge "Make configuration show not require auth" 2019-08-09 17:29:40 +00:00
Matt Riedemann
b9d6310556 Add openstack server create --boot-from-volume option
This adds a --boot-from-volume option to the server create
command which is used with the --image or --image-property
option and will create a volume-backed server from the
specified image with the specified size. Similar to the
--volume option, the created root volume will not be deleted
when the server is deleted. The --boot-from-volume option
is not allowed with the --volume option since they both create
a block device mapping with boot_index=0.

Change-Id: I88c590361cb232c1df7b5bb010dcea307080d34c
Story: 2006302
Task: 36017
2019-08-09 16:44:46 +00:00
Matt Riedemann
c28ed25e3a Fix <id> description for --block-device-mapping
The <id> portion of a --block-device-mapping value can be
the resource name or id since the code uses the appropriate
type-specific find_resource utility to lookup the resource
based on the value given.

This change simply fixes the description of <id> to mention
it's name or id rather than just "UUID". My guess is the
description was originally copied from novaclient where id
must be an id since name resolution does not happen in novaclient.

Change-Id: I567f6f6efb3a3b6d387133d21aa81354b2d753bc
2019-08-09 16:44:39 +00:00
Matt Riedemann
6a199bd141 Support type=image with --block-device-mapping option
The --block-device-mapping option on the server create
command currently only supports booting from volume and
volume snapshot. A common boot-from-volume scenario is
providing an image and letting nova orchestrate the
creation of the image-backed volume and attaching it to
the server.

This adds support for type=image in the --block-device-mapping
option. The volume size is required in this case. Note that
the CLI currently says if type=snapshot that size is also required
but that's technically not true. When booting from a volume
snapshot, the compute API will use the size of the volume snapshot
to create the volume if an explicit size is not provided. For the
purposes of this patch, we need the size anyway for the image
being the block device mapping source type.

Change-Id: I57b3c261d8309f7b9f62a3e91612bce592a887a3
Story: 2006302
Task: 36016
2019-08-09 16:36:17 +00:00
Matt Riedemann
4bd53dc109 Fix compute service set handling for 2.53+
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.

Change-Id: I868e0868e8eb17e7e34eef3d2d58dceedd29c2b0
Story: 2005349
Task: 30302
2019-08-09 16:00:13 +00:00
Stephen Finucane
7561e062eb Add 'openstack server resize (confirm|revert)' commands
These are currently exposed as flags on the 'openstack server resize'
command but they are in fact operation and should be exposed as commands
in their own right.

The old flag-based variants are deprecated for removal in 4.0.

Change-Id: I733796d3bda6c3755a3d3548bbe695abb474a6a0
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-08-09 15:48:15 +00:00
Zuul
6f60f833e8 Merge "openstack port create support --extra-dhcp-option" 2019-08-01 21:56:43 +00:00
Zuul
005a247b60 Merge "Mention compute service set --up|--down requires 2.11 or greater" 2019-08-01 21:56:42 +00:00
Zuul
daadcd79c5 Merge "Support IPv6 addresses better" 2019-08-01 21:54:02 +00:00
Dean Troyer
865e182970 Make configuration show not require auth
The configuration show should not require auth to just display the
OSC config object.  Changes to make it not require auth have
knock-on effects of needing to change a bunch of tests that use it
assuming it _does_ require auth so change those to use 'extension list'
instead.

This sets up further testing of the command line options for changes
in behaviour when we switch to straight SDK usage for configuration.

Change-Id: I6c52485341214ba401064c0f2d1e2b95fdc225c0
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-08-01 14:53:02 -05:00
Akihiro Motoki
1bad2cb3c3 Fix module paths for volumev3 volume backup commands
https://review.opendev.org/#/c/612751/ renamed volume.v2.backup
to volume.v2.volume_backup. volume.v3 backup commands refer
volume.v2.backup but they were not updated.
This causes "volume backup xxx" commands
when OS_VOLUME_API_VERSION=3 is specified.

Change-Id: Ib897dd483a7963763016ee3f1e8e1c3cc81d0bb0
Story:o 2006284
Task: 35990
2019-07-26 17:38:28 +09:00
zhouhenglc
68809fce5a openstack port create support --extra-dhcp-option
neutron create-port API  has extra_dhcp_opts parameter, this parameter
can set port with special extra dhcp options.

Change-Id: I199f17e95c509a33f809ac85c65f685a37acd198
2019-07-25 06:13:11 +00:00
Matt Riedemann
b52a831f6b Mention compute service set --up|--down requires 2.11 or greater
This simply updates the docs for the compute service set --up
and --down options to mention that --os-compute-api-version 2.11
or greater is required to use those options.

Change-Id: I52891fe36c84d0df3e868ab4f3c8e2357e9ba529
2019-07-24 12:03:01 -04:00
Zuul
c474319909 Merge "Add host and hypervisor_hostname to create servers" 2019-07-23 01:32:32 +00:00
Andreas Jaeger
c609b98c40 Update api-ref location
The api documentation is now published on docs.openstack.org instead
of developer.openstack.org. Update all links that are changed to the
new location.

Note that redirects will be set up as well but let's point now to the
new location.

For details, see:
http://lists.openstack.org/pipermail/openstack-discuss/2019-July/007828.html

Change-Id: I1572a21632740b4d9a233a6a31c49e3bac5394ef
2019-07-22 20:55:43 +02:00
Zuul
5b97dfa427 Merge "Fix BFV server list handling with --name-lookup-one-by-one" 2019-07-19 17:27:59 +00:00
zhu.boxiang
340f25fa14 Add host and hypervisor_hostname to create servers
Adds the --host and --hypervisor-hostname options to
``openstack server create`` CLI.

Depends-On: https://review.opendev.org/670558

Change-Id: If188c3d96fa506dbe62ef256418f2f9bca1520c2
Blueprint: add-host-and-hypervisor-hostname-flag-to-create-server
2019-07-19 15:45:18 +00:00
Zuul
afe1f02c8b Merge "docs: clarify compute service --service option" 2019-07-16 11:49:03 +00:00
Brian Haley
969e6abd20 Support IPv6 addresses better
When adding a security group rule, if no IP address is given
we will use '0.0.0.0/0', but if the ethertype is IPv6 we will
leave it as None.  Change this to be '::/0' to match what we
do for IPv4 - use the "any" address.  The neutron server
treats them both the same when checking for duplicates.

Because there are most likely entries in the DB using None
for the IP, print them as '0.0.0.0/0' or '::/0' so it is more
obvious what address they are actually referring to.

Also change to display the Ethertype column by default
instead of with --long, since easily knowing IPv4 or IPv6
is useful.

Change-Id: Ic396fc23caa66b6b0034c5d30b27c6ed499de5a6
Closes-bug: #1735575
2019-07-15 22:35:49 -04:00
Corey Bryant
b41d7518c3 Add Python 3 Train unit tests
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.

See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html

Change-Id: I7d0a996b33d4d1eec436f92fbd390968cd37630c
Story: #2005924
Task: #34232
2019-07-05 14:33:43 -04:00
Zuul
d270174a21 Merge "Add Python 3 Train unit tests" 2019-07-03 04:03:30 +00:00
Matt Riedemann
879f820778 docs: clarify compute service --service option
The compute service commands emit a "Binary" in the output but
the --service filter option isn't as clear that it's the binary
(for set it is but not list) nor do the docs give an example
of a binary (typically nova-compute but could be others like
nova-conductor, nova-scheduler, etc). This simply mentions that
the --service option is the binary for "compute service list"
and gives an example value for the option in both list and set
help.

Change-Id: If87fc37352c3a251cc89041723adbe04dedf4f8a
2019-07-01 15:06:56 -04:00
pengyuesheng
d16d98b27b Update the constraints url
For more detail, see http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Change-Id: Ie0a41fa97696bcd8b5fd2e670efdf9379ff1080e
2019-07-01 15:13:11 +08:00
pengyuesheng
5986f47306 Add Python 3 Train unit tests
See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html

Change-Id: I897645a4cb9f03ca464daa14f0895572212b81d9
2019-07-01 15:08:23 +08:00
melanie witt
bfc34e11b3 Fix BFV server list handling with --name-lookup-one-by-one
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
2019-06-28 22:06:39 +00:00
Zuul
eada2db332 Merge "Use cliff formattable columns in identity commands" 2019-06-23 04:49:33 +00:00
Zuul
f0fafec54f Merge "Use cliff formattable columns in image commands" 2019-06-23 04:30:51 +00:00
Zuul
34a92eebfa Merge "Use cliff formattable columns in object storage commands" 2019-06-23 02:31:15 +00:00
Zuul
46ef850ce9 Merge "Use cliff formattable columns in volume v2 commands" 2019-06-23 00:45:37 +00:00
Zuul
d3df7d67d7 Merge "Use cliff formattable columns in volume v1 commands" 2019-06-23 00:45:36 +00:00
Zuul
3258b9e5e3 Merge "Change default security group protocol to 'any'" 2019-06-22 21:39:31 +00:00
Akihiro Motoki
4cd614305f Use cliff formattable columns in volume v2 commands
Partial-Bug: #1687955
Partially implement blueprint osc-formattable-columns

Change-Id: I761ccac126208927594ad0d98a3cf5ad8b44bd48
2019-06-22 14:56:10 -05:00
Akihiro Motoki
1af3056e30 Use cliff formattable columns in volume v1 commands
Partial-Bug: #1687955
Partially implement blueprint osc-formattable-columns

Change-Id: Ib4c5798171e32a8ddc08a37ee1d416e366a71d76
2019-06-22 14:53:28 -05:00