| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
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
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Refactored the 'os security group rule list' command to use the
SDK when neutron is enabled, but continue to use the nova client
when nova network is enabled.
In addition, a release note was added to document the features
and fixes resulting from this refactor.
Change-Id: I24d04b720102ed1c60776e1ca67d4ca20e31b663
Partial-Bug: #1519512
Implements: blueprint neutron-client
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
--enable and --disable-reason should be mutually exclusive in "compute
service set" command, but now when they are present at the same time,
--disable-reason would be ignored silently. Fix these and add some hints
about --disable-reason argument is ignored in this situation.
Change-Id: I43254b6bc40fcae4fd0dc3457f26fad84c267072
Closes-Bug: #1556801
|
| |/ /
| |
| |
| | |
Change-Id: I138b1b8a3327947b8cd032d8d0c32d98548ce2ad
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch add the complete unit tests to cover compute v2
aggregate object.
Change-Id: Ifcf9248eabb5ca3ee5ca01c5843e96ba681c3b5a
Closes-Bug: #1560832
|
| |\ \ \
| |/ /
| | /
| |/
|/| |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Support "aggregate unset" command in order to
remove the property of aggregate object in OSC.
Change-Id: I49645135586362f0fd251f5e4a4c03eff273d9e9
Closes-Bug: #1559866
|
| |/
|
|
|
|
|
|
|
|
|
|
|
| |
Refactored the 'os security group rule create' command to use the
SDK when neutron is enabled, but continue to use the nova client
when nova network is enabled.
Added a release note for the change in security group rules output
due to Network v2.
Change-Id: I8c6c99d5272ff5d410a449f73d198d834c5cd96e
Partial-Bug: #1519512
Implements: blueprint neutron-client
|
| |\ |
|
| | |
| |
| |
| |
| |
| | |
set host command is missing, add it as SetHost class.
Change-Id: I7acb94150718b7150598632cbebc3d85018a0d59
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Add "--long" option in ListService so that compute service
disabled reason can be showed.
Change-Id: I1ace8f1c4e4efe0a1a8f6710425d73eb5db9e5e1
Closes-Bug: #1556815
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Refactored the 'os security group create' command to use the SDK
when neutron is enabled, but continue to use the nova client
when nova network is enabled.
Added a release note for the change in security group rules output
due to Network v2. The tenant_id column name was fixed to align
with the 'os security group show' command.
Change-Id: Ib29df42edcddcc73a123fff6a64743a6bfcb7fbf
Partial-Bug: #1519511
Implements: blueprint neutron-client
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Refactored the 'os security group show' command to use the SDK
when neutron is enabled, but continue to use the nova client
when nova network is enabled.
Added a release note for the change in security group rules output
due to Network v2. The column names remain unchanged to maintain
backwards compatibility.
Change-Id: I25233ddb8115d18b8b88affb3de13346084a339d
Partial-Bug: #1519511
Implements: blueprint neutron-client
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In unit tests, all real methods are faked. They should not
do any real operations in the tests. So, FakeFlavorResource
is not necessary. Just fake get_keys(), set_keys and unset_keys()
in FakeResource would be enough.
Change-Id: Icc3473ba9c77f4817d0edddb7ff3e1bd2946fac7
|
| |\ \ \
| |/ /
|/| | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
disbale service allow a reason to be input as disable reason.
This patch add support for it.
Change-Id: I59622c3970e055ebd46bf03c33c864b6d064db28
|
| | |/
|/|
| |
| | |
Change-Id: I18b1720af13b444527dda1ecab52e3cc8d8d9376
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | | |
Server in soft-delete state can be restored, add this command.
Change-Id: Id9d7246f89ae65273505f36dcb664996534ae986
|
| |\ \ \ |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
keypair do not have unit test, this patch adds it.
Change-Id: Id702ccaad239b916340bb17014d1ede0a28aaec9
|
| |\ \ \ \
| |_|_|/
|/| | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
"server image create"
"server rebuild"
"server resize"
Above 3 commands are not covered by unit test.
So add some unit tests.
Meanwhile, fix bug. Now that image name is an optional argument,
we'd better record error messages with positional arguments
instead of optional argument. So, record server name.
Change-Id: I41bc025d4824dc46f63a3213d82e1528bacbbe12
|