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
Use osc-lib directly for exceptions.
Leave openstackclient.common.exceptions for deprecation period.
Change-Id: Iea3e862302372e1b31ccd27f69db59b4953ca828
This patch adds "--project" option in "flavor set" command to support
for setting flavor access.
Change-Id: I75b473600080d8ab1dd6ad01561c4f989ed3c3bd
Partial-Bug: #1575461
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
This patch fixes 2 problems:
1. The '\n' should be in the end of a message,
not the beginning.
i.e.:
The original code was:
sys.stdout.write(_('\nError deleting server'))
It will make the output look like this:
[root@tangchen /]# openstack server delete aaa bbb
Error deleting server
Error deleting server[root@tangchen /]#
We change it to:
sys.stdout.write(_('Error deleting server\n'))
Then the output will become:
[root@tangchen /]# openstack server delete aaa bbb
Error deleting server
Error deleting server
[root@tangchen /]#
which is much better.
2. Record the error in log for those who didn't.
Change-Id: I38b00c2321014757970183205f95f026e20a8090
"Server group delete" command supported deleting multi server
groups, but the help message was "Delete an existing server
group", so I change it in this patch.
Change-Id: I05b1a7e3f29b84b9190e7cc05c01734e3daa7a6d
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
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 don't support to use "X.latest" format in order to talk with the
latest nova microversion API, that is very helpful shortcut usage to
use new nova side features, this patch implement it.
Change-Id: I87918addff1f50fbc6eb72ca82b31813330753b5
Closes-Bug: #1561838
There are lots of "this option can be repeated" comments
in the doc, which are not consistent to other similar
docs.
This patch changes them to the following format:
"repeat option to do something"
Change-Id: I54e01053091c428bf87bb36bb95f73a0b80ab6e7
--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
compute-service.rst file uses 'describe' for below
optional parameters
1. --long
2. --service <service>
3. --host <host>
This patchset changes type of these argument to option.
Change-Id: Ifd57bdf058efaeaa6cb43a7d4a60ee61ddb8de14
Closes-bug:#1563700
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
Support "aggregate unset" command in order to
remove the property of aggregate object in OSC.
Change-Id: I49645135586362f0fd251f5e4a4c03eff273d9e9
Closes-Bug: #1559866