Patch set [1] fixed timing issues related to the server functional
tests. As part of the review, additional enhancements were
suggested. This patch set provides those enhancements. In particular,
the functional tests will now check for the cirros256 flavor and
the cirros-*-uec image.
[1] https://review.openstack.org/#/c/313870/
Change-Id: I7fe18e26b3d09db92bbe669ffafcd16618cae383
Currently a user is allowed to specify either a resource ID or name
when running openstack identity comands. In some cases, when a name
is specified instead of an ID, the command will return as not able
to find the resource when it in fact does exist.
The changes here are to check the client against the token on such
requests and to extract the ID of the resource specified if enough
information exists between the two. We then use the ID associated
with the resource to complete the user requests.
Change-Id: I40713b0ded42063b786dc21247e854224b9d2fe2
Closes-Bug: #1561599
The unit test of "compute service list" only checked the
"Disabled Reason" columns and its data. It is not enough.
This patch change the test to check all datas in the list.
Also, this patch modify the "Id" to "ID" in this command.
Change-Id: I988fd6365f2652185dd96d9417f294eba9c31cd9
Clean up fakes.py , use FakeCatalog, FakeProject, FakeService,
FakeEndpoint, FakeRole classes instead, also update their unit tests.
Change-Id: I510d175ec194165b0595ebd430e8cc596d363587
Partially-Implements: blueprint refactor-identity-unit-test
"Host set" command cannot work. Because:
1.Host has no 'ID' attribute, so 'ID' attribute cannot be found
in "host set" command.
2.value "True" and "Flase" are invalid in updata() method of host.
3.Some update functionalities is not supported in host API now.
This patch solves the problems 1 and 2 in OSC. But the problem 3
is a API problem and can't be solved in OSC, only XenServer driver
support to set enable/disable and maintenance host, it is a normal
problem.
After this patch the output of "host set" command is:
The requested functionality is not supported. (HTTP 501)
(Request-ID: req-14031fce-8c90-48a0-8492-dc8e3dd349f3)
Just the same as the "host-update" command in novaclient.
Change-Id: Ibe94c4d3d492d3d63355de803810edb988e1b4e9
Closes-Bug: #1594689
[This is not quite reduced from the original proposed fix as some
changes have merged that complicate the switch to OSC_Config and
v2 auth broke anyway.]
Fix the --os-token --os-url breakage in the switch to ksa.
Closes-bug: 1593664
Change-Id: I3ac23234fbf647fb145c7bd151d53c5c105462bf
Add ``--project`` and ``--project-domain`` options to the
``flavor create`` command. We can use these options to add
the flavor access to a givin project when we create the flavor.
Change-Id: Ic1907272c1d1ae526f9c9e86f32ba06c6da147c0
After this patch, all set/unset commands will return normally
when nothing specified.
Change-Id: Id94d0329faa1a674006a9aae901f834b41917317
Close-bug: #1588588
The command "configuration show" tries to redact some of the secrets
that are shown on the screen. However, this failed redacting options
that were marked as secrete by the auth plugins (if any) and it redacted
other options that were not redacted at all. For example, when using
the OpenID Connect plugins, it redacted the "access_token_endpoint" as
the word "token" appears there, but it failed to redact "client_secret"
even when this option is marked as secret in the corresponding plugin.
Change-Id: Idfad4fbbe5ddcff5e729e1dcd756d0379ad31dee
The code is setting defaults for some scope parameters, cheking if the
name ends with some specific substring (namely ending in "password")
causing failures in some plugins that end with the same string, but do
not allow those parameters (like "user_domain_id" in "v3oidcpassword").
Closes-Bug: #1582774
Change-Id: Id7036db3b783b135353d035dc4c1df7c808d6474
The functions check_valid_auth_options() function was relying on the name
for checking the set of required options, but this could cause errors
with external auth plugins. If somebody defines an auth plugin plugin
named "footoken" the check function would check for a "token" option,
even if the plugin has not defined that option. This change tries to
improve this situation, cheking for some options only if they have been
defined in the plugin.
Change-Id: I4255f2e7d4d23449c95be957ea7b6b60983f2608
When OSC failed to set a image's property, it will print
the image name and status, which is an useful info to
users. So translate this massage, and record it in log.
Change-Id: Icdff4dab17dedcb40289700c4cd278e6e62eea25
Support bulk deletion and error handling for "aggregate delete"
and "flavor delete" commands.
Change-Id: I3f6105cbeeab1c9f8cd571c63ce0e7ac3d4252b3
Partially-Implements: blueprint multi-argument-compute
Partial-Bug: #1592906
If the default identity API version were to change
in devstack, the v2.0 tests would fail today,
resulting in a broken OSC gate.
Change-Id: Id634ea7e0fab9f3772383b5512ccac19f5119ac0
Update the "--binding-profile" option on the "port create" and
"port set" commands to support both <key>=<value> and JSON input
for the port custom binding profile data. The JSON input is
sometimes needed to maintain the value type (e.g. integer) for
more advanced data.
The port custom binding profile data is unique across neutron
so a custom argparse.Action class was created instead of
writting a generic class in osc-lib.
Change-Id: I82ac6d4f95afdc866f5282fc00d390f850f54d21
Implements: blueprint neutron-client
Added the ability to delete multiple volume types at once. Note
there are no unit tests exist for v1 volume-types, so instead
a functional test was created.
Partial-Bug: #1592906
Change-Id: I99f3f22901ab35252b91a3072b14de7d19cb17ca
Use file logger for all command specific logs.
This patch also fixes some usage that doesn't
follow rules in:
http://docs.openstack.org/developer/oslo.i18n/guidelines.html
After this patch, all self.log and self.app.log
will be standardized to LOG().
NOTE: In shell.py, we got the log in class OpenStackShell,
which is also known as self.app.log in other classes.
This logger is used to record non-command-specific logs.
So we leave it as-is.
Change-Id: I114f73ee6c7e84593d71e724bc1ad00d343c1896
Implements: blueprint log-usage
"Router delete" command supports multi deletion but no error
handling. This patch add the error handling follow the rule
in doc/source/command-error.rst
Change-Id: I3376d957b4dc28d8282599dc909ecc5ed2b5f46a