This changes the scope validation to occur after a token has already
been created.
Previous flow:
1. Validate authentication options.
2. Validate authorization options if the command requires a scope.
3. Create a token (using authentication + authorization options)
4. Run command.
This means that scope was being checked, even if a default scope was
applied in step 3 by Keystone.
New flow:
1. Validate authentication options.
2. Create token (using authentication + authorization options)
3 Validate authorization options if the command requires a scope and
the token is not scoped.
4. Run command.
Change-Id: Idae368a11249f425b14b891fc68b4176e2b3e981
Closes-Bug: 1592062
Migrate 'change', 'update' to 'modify',
migrate 'user to delete' to 'user(s) to delete',
migrate '(name or ID)' to '(type, name or ID)'.
Change-Id: Ie425e178bb5ddf773e6e793fcd91c78e9c4a5053
not sure how this one release note was slotted into it's own
directory, but let's move it with the others.
Change-Id: I20eb36b1778b6fc9b5e550390962ec11dae38db4
The response data of nova get_xxx_console API is changed
from "console" to "remote_console" in microversion 2.6, and nova
server side API schema verify the spice vnc type to "spice-html5",
update OSC code to apply these change so that OSC can work in
different nova microversion cases.
Change-Id: I3bb4fe057e656209d00d2bb308ac3f7f837cb03f
Closes-Bug: #1590318
This patch support bulk deletion for delete commands below:
1.subnet delete
2.subnet pool delete
Up to now, all the delete commands in networkv2 support bulk deletion.
Change-Id: I63f6d1d02bad1fcc26e72b7028b53958a68ce2dc
Partially-Implements: blueprint multi-argument-network
Partial-Bug: #1592906
The formal of multi properties in most docs likes this:
[--property <key=value> [...] ]
[--property <key> [...] ]
This patch modify the formal of multi properties in
aggregate.rst.
Change-Id: I557cd51696d2721c8955c4a79f1ab85de3a0b9ce
<service> argument of `endpoint create` command doesn't mean
`new endpoint service`, but an existent service that the new endpoint attached to.
Change-Id: I846fdb501bdea14499f42288186f375a3b2b5951
The volume v2 functional tests occasionally fail with
"unrecognized arguments: --private". This appears to occur when
volume v1 and volume v2 functional tests are run at the same time
when one or more of the tests do not set OS_VOLUME_API_VERSION
appropriately.
This patch also fixes a timing issue seen when running the
tests locally due to a missing wait and moves the snapshot
test to volume v2 since it was written for v2.
Change-Id: I9c9863fe1aef81b0564920f36452c6f27211d5ba
Closes-Bug: #1589793
This could be a miss when we use osc_lib first in OSC.
command.py has been moved to osc_lib, and should reuse
it and print a deprecate msg if the old file is used.
Change-Id: Ibc35659f6f78b8f5e3c6026db2644a876ef7c549
There was not a default IP version in "ip availability list"
command, if we used this command without "--ip-version" option,
the output was different from the outputs with the option
"--ip-version 4" and "--ip-version 6" and it is not right.
This patch add default IP version (default is 4) in ``ip
availability list`` command and make this command work properly
without ``--ip-version`` option. And also fix the help message.
Change-Id: Idc08ab6eaf05946eb2ab59bfb3d4497a383d987d
Closes-Bug: #1592761
Some delete commands in networkv2 are exist in both network
and compute, They can use NetworkAndComputeDeleteclass to
supprot bulk deletion and error handling and the codes are
similar, so I change them all in this patch. The changed
commands including:
1.floating ip delete
2.security group delete
3.security group rule delete
Also, I update unit tests and docs for these commands in this patch.
Change-Id: I6c94c3d10ba579ddd9b14d17673c821e3481fd8a
Partially-Implements: blueprint multi-argument-network
self.app.log is the logger in class OpenStackShell,
which should be used to record logs that have nothing
to do with any specific command.
So, use the file logger instead.
This patch also fixes some usage that doesn't follow
rules in:
http://docs.openstack.org/developer/oslo.i18n/guidelines.html
1. add variables to logger as an argument
2. do not wrap variables with str()
Change-Id: I248861a38a4de0412a080046aa7a6f6473c3e082
Implements: blueprint log-usage
The OpenStack LLC copyrights date from before OpenStack was transferred
to the foundation. These appear to be getting copy-pasted to new files
so at least should reflect the correct entity.
Change-Id: I02953d752cb24ead6aa4ad8bfe257a48317c9f13
Currently OS_ENDPOINT_TYPE and --os-interface are being ignored for
network commands. This means the public URL is always used.
Make sure that these are picked up correctly so we hit the correct
endpoint (internal/admin/etc.) for commands such as:
$ openstack --os-interface internal network list
Change-Id: Iac05204e3056e386d84d3644b5da1a2bb322bb0a
Closes-bug: 1592368
Aims to evacuate servers from compute host as soon as possible,
operators might set the compute service force down manually.
Novaclient support the behavior, this patch support it in OSC.
Change-Id: I22ff1c5d670c449771fdcb3f4f39cd82f428531a
Closes-Bug: #1589348
1. We should assert flavor.set_keys() is called correctly
or not called in ``set flavor`` unit tests.
2. Commit c7e6973ff50ff84af9ad55f7bdaeeea83ae40f0b from me
removed test_flavor_unset_no_project which used to test
if --project was specified as '', and assert CommandError
was raised, which is incorrect. So I removed it. But after
looking into the code, I think we should not remove it,
but specify nothing after --project, and assert
ParserException was raised. So in this patch, we fix it
as so.
('--project', '') --> ('--project')
assert CommandError --> assert ParserException
Change-Id: Ifd33c72d5b7581aaabffb09e9b5e38ecc67e18c0