| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |\ \ \
| |_|/
|/| | |
|
| | | |
| | |
| | |
| | | |
Change-Id: If37e82072bd7a32b81bfb1a8bb048f018dd5b04f
|
| |\ \ \
| | | |
| | | |
| | | | |
compute."
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| |\ \ \ \
| |/ / /
|/| | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| |\ \ \ |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This patch fixes the problems below:
1. flavor.unset_keys() is not checked in flavor unit tests.
So check them in the tests.
2. test_flavor_unset_no_project makes no sense. It is OK to
specify ``--project ''`` without raising any exception.
It can pass because in the test, we set nither project
nor property. So remove this test.
Change-Id: I04e537349936343b6d8c85b06bc6d0ba6bd41d6f
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Use osc-lib directly for utils.
Leave openstackclient.common.utils for deprecation period.
Change-Id: I5bd9579abc4e07f45219ccd0565626e6667472f7
|
| |/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Use osc-lib directly for exceptions.
Leave openstackclient.common.exceptions for deprecation period.
Change-Id: Iea3e862302372e1b31ccd27f69db59b4953ca828
|
| | |/
|/|
| |
| |
| |
| |
| | |
Add FakeExtension class in networkv2, computev2, volumev2,
identityv2_0 and update unit test test/common/test_extension.py
Change-Id: I94815de7801860edb7fa91a7d146455cab946652
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch changes the following:
1. --enable/disable option should follow the rules
in the doc below:
http://docs.openstack.org/developer/python-openstackclient/command-options.html#boolean-options
2. "--disable-resion" is specified but not "--disable",
an exception is raised instead of igoring
"--disable-reason" option.
Change-Id: I92e9234111e661bfe7119a8e19389a87c874ab0c
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
Unit test cases don't cover compute "server set/unset" commands,
the patch add some test cases for them.
Change-Id: I440c32968bd41b948352a9764a37c9af3e68803d
|
| |\ \ \
| |/ /
|/| | |
|
| | | |
| | |
| | |
| | |
| | | |
Change-Id: I3b19e4914d475b86d7e8aa8d76e62a2ac811272f
Partially-Implements: blueprint multi-argument-compute
|
| | |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In test_flavor_set_no_project(), we aimed to test a
situation like this: User specifies "--project" option,
but didn't specifies the project name or ID.
But in the source code, it becomes "--project ''".
The test could past because if project and property
are both None, the command will raise an exception.
Change-Id: I39567306debb901e8bad420fa2492f1b207efddc
|
| |/
|
|
|
|
|
|
| |
Add "--project" and "--project-domain" options in
"flavor unset" command to remove flavor access.
Change-Id: Ia5c5a80d9890d5af066b75b4e202647c18c7d915
Partial-Bug: #1575461
|
| |\ |
|
| | |
| |
| |
| | |
Change-Id: I966d5a3a307fcd7f4efb1267aa2896efd53be50d
|
| |\ \ |
|
| | |/
| |
| |
| |
| |
| |
| |
| | |
This patch adds "--project" option in "flavor set" command to support
for setting flavor access.
Change-Id: I75b473600080d8ab1dd6ad01561c4f989ed3c3bd
Partial-Bug: #1575461
|
| |\ \ |
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add server backup function
There is no return value for this command per following doc
http://developer.openstack.org/api-ref-compute-v2.1.html#createBackup,
also novaclient can't be updated now due to backward compatible issue
http://lists.openstack.org/pipermail/openstack-dev/2016-March/089376.html,
so we have to get the information ourselves.
The Image tests were not using warlock images, so that needed to be fixed
before we could completely test things like --wait.
Change-Id: I30159518c4d3fdec89f15963bda641a0b03962d1
|
| |/
|
|
|
|
|
|
|
|
| |
When a server is unexpected state, OSC don't support reset
the server to active or error state, that's supported by
novaclient, and it's an important command for operators, the
patch implement this function.
Change-Id: I3e7800feb192832b0719ef9a353945beb6bfd509
Implements: blueprint server-reset-state
|
| |
|
|
|
|
|
| |
Add a FakeService class, and refactor service unit tests
to use this class.
Change-Id: I650ad83386a58205ebe42274d2bf2f508436bfa6
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch rework "network delete" command following the
rules in doc/source/command-errors.rst.
In "network delete" command, there are multiple REST API
calls, and we should make as many of them as possible.
And log error for each one, give a better error message.
Also return a non-zero exit code.
Change-Id: I39ae087dd7bd08d049d513abfa6c5cab2bd13b2b
Partial-Bug: #1556719
|
| |\ \ |
|
| | | |
| | |
| | |
| | | |
Change-Id: I6eb0c4e7d5d3e677764b253e3324720a784a110b
|
| |\ \ \
| |/ /
|/| | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There is such a comment in test_server.py:
# Call .get() to retrieve all of the server information
# as findall(name=blah) and REST /details are not the same
# and do not return flavor and image information.
This is an out of date comment. There is no function named
findall() in OSC now. So use find_resource() instead of get(),
and remove this comment.
Change-Id: I8d79afc5f341fb5caf771d905506b7f1c7a41ae8
|
| |\ \ \
| |/ /
|/| | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| |\ \ \
| |/ /
|/| | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| |/ /
| |
| |
| |
| |
| |
| | |
There was not a unit test for "flavor create" command
in the "test_flavor.py".So I add the unit test.
Change-Id: Ib1e821ea524eb33c0ba73643164228c7b83253b4
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Support compute v2 "server group show" command in OSC.
Implements: blueprint nova-server-group-support
Closes-Bug: #1542171
Change-Id: I1a6d103151c704bda5b67cb9a49cc43c7d9f1d6a
|
| |\ \ \
| |/ /
|/| | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Support compute v2 "server group list" command in OSC.
Implements: blueprint nova-server-group-support
Partial-Bug: #1542171
Change-Id: I68b80e3c4458692472af671028cd1f939736bcb8
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Support compute v2 "server group delete" command in OSC.
Implements: blueprint nova-server-group-support
Partial-Bug: #1542171
Related-Bug: #1563301
Change-Id: I7d792d669b147b24dc774844cfc9dbacd60d017b
|
| |/ /
| |
| |
| |
| |
| |
| |
| |
| | |
Support compute v2 "server group create" command in OSC.
Implements: blueprint nova-server-group-support
Partial-Bug: #1542171
Change-Id: I96ffb07764d3adb715e048943cfee3b879c280f6
|
| | |
| |
| |
| |
| |
| |
| | |
methods argument is not necessary in FakeHypervisorStats class.
Remove it.
Change-Id: I288f71b412beb3e583e957a9fd99210bc6f3f543
|
| |/
|
|
|
|
|
|
|
|
|
|
| |
Network objects don't have any method needs to fake.
keys() method is only used by _get_columns() helper
to obtain all attributes of an object. But in compute
network implementation, attributes are obtained from
obj._info directly, which is a dictionary itself. So
there is no need to fake this method.
Change-Id: Ie6a46ef6a3042641e55a7002573ef501db7b60e1
|