This patch supports creating a new address scope,
with --ip-version,--project,--project-domain
and --share or --no-share options.
Change-Id: I37c73391a41ac239dd72d55dbc0adbebd7701f4a
Partial-Bug: #1566269
Currently, "/usr/bin/openstack --insecure token issue"
fails when OS_AUTH_URL and OS_IDENTITY_API_VERSION
indicate keystone v2 if OS_PROJECT_DOMAIN_NAME or
OS_USER_DOMAIN_NAME are set. This patchset ignore domain
related configs if using with keystone v2 and print warning
for each ignored config.
Change-Id: I8afbda787df7855c3f8e868b0f07cbf3b9cd97fd
Closes-bug: #1447704
In _prep_server_detail(), power_state is not formatted
by _format_servers_list_power_state(). So when executing
"server show" or "server create", the power state is
represented by number. This patch map the numbers to
meanful strings.
This patch also adds power_state attribute to FakeServer,
and improves unit tests for this attribute.
Change-Id: I2ec674327de4e5133b8712ba6bb53fa5ce55e3f4
"Missing required args should bail here" is not understandable
and not necessary. The code is obvious enough. And some of the
comments are misused because of code copy. So remove them.
Change-Id: I031395f2c882386c7a708db5cf4eee75393dc639
In some tests, when comparing the results data with the
expected ones, many unnecessary type conversions are used.
So remove them to clean up.
Change-Id: I560ca78a3ab5e7b99087bfe1667de500f92c68de
Partial-bug: #1550633
Currently, "/usr/bin/openstack --insecure token issue"
fails when OS_AUTH_URL and OS_IDENTITY_API_VERSION
indicate keystone v2 if OS_PROJECT_DOMAIN_NAME or
OS_USER_DOMAIN_NAME are set. This patchset ignore domain
related configs if using with keystone v2.
Change-Id: If7eea2ed1a4877c60d055ed0114a5e5f31e282a0
Closes-bug: #1447704
In OS_IDENTITY_API_VERSION=3, the "openstack help service delete"
allows the user to remove a service based on the name of the
service. So, this patch includes name as positional argument.
Change-Id: Iae7cb0a82af3cdd4d88e0ed2eb651abf9af30fd9
Closes-Bug: #1566909
There was not a unit test for "flavor create" command
in the "test_flavor.py".So I add the unit test.
Change-Id: Ib1e821ea524eb33c0ba73643164228c7b83253b4
the assert usage in the NonNegativeAction has the potential to allow
unexpected behavior when the python is byte-compiled with optimization
turned on.
Changes
* remove assert in favor of if/else in NonNegativeAction class
* add type specifier to parser arguments for non-negative actions
* correct tests for new int based values
Change-Id: I093e7440b8beff4f179e2c4ed81daff82704c40e
Closes-Bug: #1576375
The "flavor show" command could not show a
private flavor by flavor name becauce it could
not find a private flavor by flavor name.
In "until.find_resource(parsed_args.flavor)",
If parsed_args.falvor is a name of a flavor,
"flavors.find(name=parsed_args.flavor)"will be
called to find a flavor.But the default value of
"is_public" is "Ture" in "flavors.find()" so that
we can only find public flavors.If we want to find
all flaovrs by flavor name,we should add
"is_public=None" in "flavors.find()".
So I tried to change
"until.find_resource(parsed_args.flavor)" to
"until.find_resource(parsed_args.flavor, is_public=None)",
but then I could not find any flavor by flavor id
because "is_public" is an unexpected argument of
"flavors.get()" in "until.find_resource()".
In this case,I think "until.find_resource()"
can not find a private flavor properly,and
we should combine "manager.get(flavor.id)" and
"manager.find(name=flavor.name, is_public=None)"
by ourselve to find a flavor.
Also,this bug affects other flavor commands like
"flavor set/unset/delete",so I fix them in this patch too.
Change-Id: I4a4ed7b0a2f522ee04d1c3270afcda7064285c39
Closes-Bug: #1575478
In the "flavor set/unset" command,the "flavor" parameter
can be a name but can not be a id of a flavor.
I think we should find a flavor by using "utils.find_resource()"
in these commands.
Change-Id: I5836788f7ed18813f1ebde31bb808b7c3f932b80
Closes-Bug: #1575624
OSC does not support to list volume services.
This patch will provide support for adding volume service related
support.
Closes-bug:#1550999
Implements: bp cinder-command-support
Change-Id: I50ac14aeb96c4b8ddbf7b33e519feea0d126f752
The "os quota show" command "<project/class>" argument is now
optional. If not specified, the user's current project is used.
This allows non-admin users to show quotas for their current
project.
Change-Id: I602d4cc09c9d29ce84271eff78137f8810cb1a47
Closes-Bug: #1572733
Add the "share" and "default" parms to subnet pool create command.
Add the "default" and "no-default" parms to subnet pool set command.
Note that "share" can not be modified once subnet pool has been
created, so do not add this to the set command.
Change-Id: I1eecad69527a1cde7fb234669f4aff2be2db491e
Partial-Bug: #1544591
Partial-Bug: #1544586
Fixed the "os subnet create", "os subnet list" and
"os subnet show" command output for host routes to
improve readability and to align with the "--host-route"
option on the "os subnet create" and "os subnet set"
commands.
Change-Id: Ida69ae1a0bdb2e1648f8b5c978fc80cf1bbe752f
Closes-Bug: #1572309
Python’s default arguments are evaluated only once
when the function is defined, not each time the
function is called. This means that if you use a
mutable default argument (like list and dict) and
mutate it, you will and have mutated that object
for all future calls to the function as well.
More details about this wrong usage here:
http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments
In unit tests, most FakeXXX classes' methods take
mutable arguments with default values [] or {}.
We should change them to None.
Change-Id: Iea833b66aa1379829511ad5c6d4432b72f3488e2
Closed-bug: #1550320