161 Commits

Author SHA1 Message Date
Jenkins
aa7145e0c9 Merge "Fix security group list command" 2015-06-03 14:37:33 +00:00
TerryHowe
b2cf651100 Fix security group list command
Security group list command tries to get a project list and
this may fail with a multitude of exceptions including but
not limited to 401, 404, ConnectionRefused and EndpointNotFound.
Rather than try to capture every possibility, this patch just
catches the base class.  Converting project ids to names is
less important than having a working security group list command.

Change-Id: I68214d2680bad907f9d04ad3ca2f62cf3feee028
Closes-Bug: #1459629
2015-06-02 08:55:54 -06:00
Matt Riedemann
224d375ef4 Add --wait to server delete
This allows the server delete command to wait for the server to be
deleted (obviously).

The wait method is the same model that Tempest uses, i.e. wait for a 404
on server GET (successful deletion), fail if the server went to ERROR
status, or fail if a timeout is reached.  The default timeout of 300
seconds is also what Tempest uses.

Closes-Bug: #1460112

Change-Id: I0e66c400903e82832944d1cad61e7eb30177c3e8
2015-05-29 14:32:51 -07:00
Amey Bhide
7ef9f97b95 Fix client error while rescuing an instance
Typo server._info -> server

Closes-Bug: #1457983

Change-Id: I606505d73b3aae90bac636e960275926284b4ea6
2015-05-22 10:25:57 -07:00
TerryHowe
62bb88f621 Security group rule delete broken
Nova client was changed to take a rule id for security group
rule delete.

https://github.com/openstack/python-novaclient/blob/master/novaclient/v2/security_group_rules.py#L72

Change-Id: I0a69f3f196a36f267ee85a651b09aa8d3c328121
Closes-Bug: #1450872
2015-05-07 13:10:06 -06:00
Jenkins
00be0dfc0f Merge "Fix security group create description bug" 2015-04-23 20:05:43 +00:00
Jenkins
f6ac88333c Merge "Security group rule create fails" 2015-04-23 19:57:54 +00:00
Ramaraja Ramachandran
9b6dada8e3 Security group rule create fails
By default the --dst-port value is set to None when no --dst-port
argument is provided. By making the default value (0, 0), this allows
novaclient to proceed without any error.

Change-Id: Ibb58f5df5ed1890a8f499dd2467b12b0e79d547b
Closes-Bug: #1443963
2015-04-22 23:45:33 +00:00
Dean Troyer
11c39530f5 Fix security group create description bug
--description is optional in our CLI but the server requires it to be
non-empty.  Set a default value of the given name.

Closes-Bug: #1434172
Change-Id: I81507a77ad8d815000ff411784ae71e229c77f78
2015-04-22 18:37:31 -05:00
Steve Martinelli
e85971b1a6 Update the docs for new nic options
Change-Id: I4c8b93ede80f993eab8badfbba6bf1c530844d54
2015-04-19 01:43:40 -04:00
Jenkins
a5e79d58ae Merge "Defer client imports" 2015-04-19 03:23:12 +00:00
Dean Troyer
f43c1f7655 Defer client imports
So we really weren't deferring the loading of client libs dadgummit,
do that for real where possible.  This shaves a couple of tenths off
the static import times.

Also defer as much import-time procesing as possible.  This is a little
ugly in api.auth but this also eliminates import of the auth plugins
until they are needed.

Change-Id: Ia11d4b9cf98231d37449103fc29101dc17afb009
2015-04-15 22:40:52 -05:00
Davanum Srinivas
459526e25d Better help for --nic in create server
Use the help string from python-novaclient for a better user
experience.

Closes-Bug: #1444685
Change-Id: If7b8e3f68a0c6ad82b9959f162670b5568d5d12d
2015-04-15 21:17:00 -04:00
TerryHowe
a0fe37e189 Add warning message if unknown version supplied
Print a warning message if an unknown api version is supplied.
An attempt will be made to run the command anyway.

Change-Id: Idec8e88fe9621f10ec4b7eecd90708fb3730f56f
2015-04-13 16:21:50 -06:00
Marek Aufart
621434451f Add the ability to set and unset flavor properties
Added flavor set and unset command which allow manage flavor
properties called extra_specs.

Command flavor show output was extended with these properties.

Closes-Bug: 1434137
Change-Id: Ie469bade802de18aab9d58eda3fff46064008163
2015-03-19 13:54:19 -04:00
Jenkins
6edbb63594 Merge "Add ability for diplaying hypervisor statistics" 2015-03-10 03:51:26 +00:00
Jenkins
5d98bb3800 Merge "Add 'uptime' in 'hypervisor show'" 2015-03-08 14:27:49 +00:00
Jenkins
707b5b022f Merge "Fix help messages" 2015-03-06 13:37:55 +00:00
lin-hua-cheng
90c4a0a24f Add ability for diplaying hypervisor statistics
Added new command 'hypervisor stats show' for displaying
the hypervisor stats over all compute nodes.

Change-Id: I4f98c69135b04d4f6cea67cd6350d5d99fb79dba
Partial-Bug: #1423748
2015-03-06 00:11:20 -08:00
lin-hua-cheng
5fddec359d Add 'uptime' in 'hypervisor show'
Fetch the 'uptime' by making a call to hypervisor-uptime.

Update the help for 'hypervisor show' to mention that it
supports by Name or Id.

Change-Id: I31060d203e87749cfc05810c2d9db42f2416051d
Partial-Bug: #1423748
2015-03-06 00:09:20 -08:00
lin-hua-cheng
09665052ac Add hypervisor docs
Change-Id: I444734925316e876afcbfdeffafea9973a837022
2015-03-05 21:42:03 -08:00
Jenkins
5b8f18fe4b Merge "Rename --verify for server resize to avoid conflict" 2015-03-05 20:27:32 +00:00
Ramaraja
8e512017c4 Fix help messages
Update help message for openstack security group rule delete
Update help message for openstack security group rule list

Change-Id: I017ffd424ca25b6c62193b91068eb1ba7de6c919
Closes-Bug: #1417854
2015-03-04 09:48:40 +05:30
Dean Troyer
5d92fc0d0a Handle novaclient >2.20.0
As of 2.21.0 novaclient moved all of the v1_1 classes to v2 with a
deprecation warning.  The version-non-specific interfaces provided in
novaclient.client are insufficient to support a few specific commands in
OSC so we need to conditionally import directly from the correct classes.

Closes-Bug: #1418024
Change-Id: I864b1908737803069dc1419c9cbca391b985c932
2015-03-03 13:02:11 +00:00
zhiyuan_cai
a33f14e298 Rename --verify for server resize to avoid conflict
Currently server resize command has a verify argument for user to
confirm resize operation. But this argument is also registered by
openstack client shell which is used to enable server certificate
verification. So verify argument can not be correctly passed to
server resize command.

This patch renames --verify to --confirm (nova client has a
resize-confirm command) to solve this problem.

Change-Id: I751aa3df16c3b637b82944dd350afc5cbab62120
Closes-Bug: #1416542
2015-02-16 11:00:50 +08:00
Jenkins
1cb56a6a44 Merge "Added capabilities/options to 'openstack flavor list' command to match capabilities already provided by 'nova flavor-list':" 2015-02-06 23:29:57 +00:00
Marcos Fermin Lobo
0cc3955f0a tenant_id to project_id in server show
The result of 'server show VM_NAME' command shows tenant_id
instead of project_id. All openstack components are moving
from 'tenant' to 'project' naming when we are talking about
openstack projects.

Change-Id: I50053b72e79e1ff3167fa573728da1a81a8e5ed8
Closes-Bug: #1417614
2015-02-04 05:43:26 +00:00
Igor_Bolotin
6d4678185d Added capabilities/options to 'openstack flavor list'
command to match capabilities already provided by
'nova flavor-list':

—public | --private | --all options allows to list
public only (default), private only or all flavors.

—long displays more field. This option also fetches
properties (extra-specs) for each flavor using separate
API call for each flavor and it’s too slow to be done by
default. However as an administrator - sometimes I need
to be able to see them for all flavors.

Removed empty “Extra Specs” column as well as "Swap" and
"RXTX Factor" from default output.

DocImpact
Closes-Bug: #1416780

Change-Id: I30cfa2c75e28daf17b936543a177c23ae1743c37
2015-02-03 07:57:20 -08:00
Jenkins
b131692007 Merge "Improving the help of the lock command." 2015-02-02 05:07:04 +00:00
Pedro Navarro
ee062922d1 Improving the help of the lock command.
The lock command allows you to block the actions
on the server for the non-admin users. Improving
the help so that api users understands better
what locking a server implies.

Change-Id: I925c946751602dc0f6bd1d31b514bc20bca585fa
Closes-Bug: #1366279
2015-02-01 13:15:49 -08:00
zhiyuan_cai
520b2f10cf Add 'find by name' to --nic for creating server
Add 'find by name' feature to --nic option for creating server.

Closes-Bug: #1353040
Change-Id: Idd0a30415d8360a57e33efedf2467593652683d4
2015-01-27 05:34:32 +00:00
Dean Troyer
bc11c4d7d8 Deprecate project usage list command
Rather than pointing the 'project usage list' entry point directly to
ListUsage, this makes a ListProjectUsage subclass to alias the desired
command and still allow for changing behaviour or issuing a deprecation
messages.  This implementation simply sets a new 'deprecated' attribute
in the command class that cliff will use to skip this command when
generating help output.

The actual skipping of the command in help output is dependant on
https://review.openstack.org/147349 merging in cliff, this review will
simply have no effect on help output until a version of cliff with
that update is present.

The deprecation message printed is somewhat generic until
https://review.openstack.org/147381 is merged in cliff.
Until that is merged, the deprecation message will not have the name
of the actual command given by the user in it, but rather the text
'this command'.

Closes-bug: #1406654
Change-Id: Ie08d4f88d71a660fca1862405351109cd0aa86b6
2015-01-15 00:04:55 -06:00
Steve Martinelli
019c155e9b Fine tune some of the helps commands
try and add some consistency with the show and delete commands.

replace 'show x' with 'display x'
change 'delete a y' with just 'delete y'

Change-Id: I47dfa8ee23ac5c41b355796415eb515155832f65
2015-01-13 00:58:57 -05:00
Jenkins
8132072630 Merge "Add docs for usage show/list" 2015-01-02 17:54:30 +00:00
Steve Martinelli
480921d0e8 Add docs for usage show/list
Change-Id: Iaf911d69a0b63d705f8789a4640018a428b87be6
2014-12-31 14:21:48 -05:00
Dean Troyer
0720c78199 Command docs: flavor
Change-Id: Ie85ff7706ef08b70ab8ba99533465d90904cf393
2014-12-31 12:09:50 -06:00
Steve Martinelli
caef59a4a8 Add docs for listing availability zones
Change-Id: I4c005e1d8089b46feca6cd3266f63c408648f074
2014-12-31 02:54:36 -05:00
Jenkins
50a8377969 Merge "list availability zones for compute" 2014-12-31 01:54:05 +00:00
Jenkins
5206278992 Merge "Add usage show command" 2014-12-31 00:02:11 +00:00
Jenkins
95313d0a2d Merge "Fix a few issues with 'usage list'" 2014-12-31 00:02:04 +00:00
Steve Martinelli
5761a0f0b7 Add usage show command
Should show basic usage by project id, if not specified then
use the project id the user is authN'ing with.

Change-Id: I0284a5efd84075b18e1a7117cc9f8f7fecf16274
Closes-Bug: #1400796
2014-12-26 03:25:51 -05:00
Steve Martinelli
6e3c9a3d2d Fix a few issues with 'usage list'
* Added number of servers column, was missing
* Added a new line character after the initial usage message

Change-Id: I6c4e5bda6ba9ceafa92ecf13987c56d0bbe99961
2014-12-26 03:23:10 -05:00
Terry Howe
1927b03cc7 Compute calls ignore region selection
Calls to compute commands ignore region selection.  The region is
not passed to the get_endpoint call.

Change-Id: I1ccfc56d7cb27a00b8982232a40ace21f2c0e9a2
Closes-Bug: 1405416
2014-12-24 06:08:19 -07:00
wanghong
470b7e53a8 add multi-delete support for compute/image/net/volume
This is part1, add support for these objects:
compute.server
imagev1.image
imagev2.image
network.network
volume.volume
volume.backup
volume.snapshot

Closes-Bug: #1400597
Change-Id: Ice21fee85203a8a55417e0ead8b509b8fd6705c1
2014-12-23 09:31:10 +08:00
Jamie Lennox
25a7c1f27f Don't import form keystoneclient.openstack.common
The keystoneclient.openstack.common directory is where we sync files
from oslo incubator. It is not a public directory and should not be
being consumed by openstackclient.

Change-Id: I011bb95c2c824e2dbc4b822ca922ae77b8d9b955
2014-12-17 18:17:56 +10:00
Steve Martinelli
381b47ff05 list availability zones for compute
Adds the command `os availability zone list`

Change-Id: I77bf52a9b84a62c3771a4838c9ea0c3af03eedb2
Closes-Bug: #1400795
2014-12-16 23:00:52 -05:00
Dean Troyer
ac4950b46e Command object docs: server, server image
server
server image

Some cosmetic changes in the command source, sorting classes, help strings, etc.

Change-Id: I3f68dae77b9fe02bc6866684e05aeff943dd9cc3
2014-12-03 13:34:44 -06:00
Jenkins
7e6b68ded9 Merge "Command object docs: aggregate, console *, keypair" 2014-12-01 22:32:35 +00:00
Dean Troyer
9eb30efbf3 Command object docs: aggregate, console *, keypair
aggregate
console log
console url
keypair

Change-Id: Iec9b8404ed5febd061a5dfd674b76aaa8aba67bc
2014-11-19 14:47:53 -06:00
Dean Troyer
2b02beaa51 Liberalize version matching a bit
For class-loading purposes we can just use the major version,
so accept that. Only Identity and Compute were affected; Compute
is included just to be pedantically complete.

For command groups we also just use the major version so fix
Compute and the version option handling.

Change the internal default for Identity to a simple '2' so it
is also consistent with the rest of the world.

Then comes microversioning...

Closes-Bug: #1292638
Change-Id: Ibaf823b31caa288a83de38d2c258860b128b87d8
2014-11-16 11:37:52 -06:00