425 Commits

Author SHA1 Message Date
Tang Chen
106f928cb6 Support "server list" searching by both image name and ID.
Nova API only supports list servers searching by image ID.
In OSC, we can support both image name and ID by mapping
the name to ID.

This patch also fix the inconsistent doc in .py and .rst files.

Closes-Bug: 1521492

Change-Id: I70613843f82d74732bd32a457cd4a31aba57825f
2015-12-01 06:59:22 +00:00
Tang Chen
0069a01967 Support "server list" searching by both flavor name and ID.
Nova API only supports list servers searching by flavor ID.
In OSC, we can support both flavor name and ID by mapping
the name to ID.

This patch also fix the inconsistent doc in .py and .rst files.

Partial-Bug: 1521492

Change-Id: I1d1a6aa91aef4e2846745babe8382481185fa96e
2015-12-01 06:59:08 +00:00
xiexs
fad7126e79 Remove list output from "compute service set"
Replace the super class from lister.Lister to command.Command,
as no need to display the status for the "set" command.

Change-Id: Ibaf3c1e349633223fca19937bbd9060d4f9ecbda
Closes-Bug: #1517804
2015-12-01 06:18:13 +00:00
Jenkins
b221f2ceac Merge "Add --limit option to "server list" command." 2015-12-01 03:00:52 +00:00
Tang Chen
43c11c356b Add --limit option to "server list" command.
This option will limit the total amount of items the command will list up.

Change-Id: I46af0d479d795ebb6a74585d0f76629dd940b117
2015-12-01 10:12:58 +08:00
Tang Chen
b36b477e81 Add --marker option to "server list" command.
This option will give user a chance to display the server list
from wherever they want.

Change-Id: I92cca5e98cd473f1113a9106eb9d1f490694b1fe
2015-12-01 09:30:43 +08:00
Jenkins
e63de0db2d Merge "Add --marker option to "server list" command." 2015-11-30 18:58:14 +00:00
xiexs
af5dbf72c4 Add "openstack server unshelve" into OSC
The unshelve operation is not supported by OSC,
and this patch tries to add it.

Change-Id: Ic60a4616cb63ad21c1a3c8e02611da8bad3a8bd0
Implements: blueprint introduce-shelve-into-osc
2015-11-28 11:21:05 +08:00
Richard Theis
74f84f32f5 Refactor: Order of security group class names
Per comment in [1], refactor the security group class names to
be in alphabetical order.

[1] https://review.openstack.org/#/c/249223

Change-Id: If28a153cdab57c0659ff5c78b276766d4043467f
2015-11-25 08:54:52 -06:00
Jenkins
13dfacc5ff Merge "Add "openstack server shelve" into OSC" 2015-11-24 23:23:30 +00:00
Jenkins
b42396d445 Merge "Doc: Update and add IP address" 2015-11-24 23:08:55 +00:00
Jenkins
11ea5b31af Merge "Doc: Add security group and security group rule" 2015-11-24 21:21:20 +00:00
Richard Theis
325420f6d1 Doc: Update and add IP address
Fix the 'ip floating' command documentation file name.
Add missing command list documentation for the 'ip fixed'
and 'ip floating pool' commands.  In addition, update the
command description and argument help to fix minor issues
and use consistent terminology.  And finally, cleanup the
Network command object formatting.

Change-Id: I0168891bc674c9f0d4df4062f7e93f497dc8fe6f
2015-11-24 14:03:51 -06:00
Richard Theis
41133fb82e Doc: Add security group and security group rule
Add missing command list documentation for the 'security group'
and 'security group rule' commands.  In addition, update the
command description and argument help to fix minor issues and
use consistent terminology.

Change-Id: I9f4a3fbac5637289f19511874e16391d3fe27132
2015-11-24 12:49:57 -06:00
Tang Chen
bfa223f615 Enable "openstack server resume" command to take multiple servers.
Current "openstack server resume" command could only resume one server.
Improve it to be able to handle more than one servers. Also improve
the doc to reflect the new feature.

Change-Id: I726eb86bfa3df3a9911f45770e6641264dbc1e0b
Implements: blueprint cmd-with-multi-servers
2015-11-24 18:54:03 +08:00
Tang Chen
4955117dff Enable "openstack server suspend" command to take multiple servers.
Current "openstack server suspend" command could only suspend one server.
Improve it to be able to handle more than one servers. Also improve
the doc to reflect the new feature.

Change-Id: Ic0417ee28f46c9198a35744c0180342e61966b26
Implements: blueprint cmd-with-multi-servers
2015-11-24 18:47:26 +08:00
xiexs
a41a8c42af Add "openstack server shelve" into OSC
Currently, the shelve operation is not supported by OSC.
So, this patch attempts to add it into OSC.

Change-Id: I92545300bef006a069338168d2de800e8a58af69
Implements: blueprint introduce-shelve-into-osc
2015-11-24 00:40:26 -05:00
Dean Troyer
1a8020cc1b Remove deprecated 'project usage list' command
Remove the 'project usage list' command that was deprecated in version
1.0.2 in review Ie08d4f88d71a660fca1862405351109cd0aa86b6.

Note that the removed command class is a good example of how to wrap a
command and show a deprecation message.

Change-Id: I6c750730963615895f5d9953487d2d5a905885a8
2015-11-18 15:37:55 -06:00
Jenkins
74d53cdd50 Merge "Enable "openstack server unlock" command to take multiple servers." 2015-11-17 02:26:15 +00:00
Jenkins
5dffc9d860 Merge "Enable "openstack server lock" command to take multiple servers." 2015-11-16 03:28:01 +00:00
Jenkins
f177160991 Merge "Enable "openstack server unpause" command to take multiple servers." 2015-11-16 02:28:41 +00:00
Jenkins
c6949c782c Merge "Improve "server list" command to have the same output as "nova list"." 2015-11-13 22:54:27 +00:00
Tang Chen
fc32b0d76b Improve "server list" command to have the same output as "nova list".
"nova list" will also output "Task State" and "Power State" by default.
This patch improves "server list" command to have the same columns, but
not by default. These two columns will be output if --long is added.

The power state is an int, so also adds a formatter helper function
to translate it to human readable string, just as "Networks" does.

Change-Id: I0530a910bec03835839a5ba7687c66d5643338f3
2015-11-14 09:38:01 +08:00
Jenkins
5243b093ca Merge "Split the vol_id from a dev mapping" 2015-11-13 16:44:44 +00:00
Tang Chen
91fbb0e136 Enable "openstack server unlock" command to take multiple servers.
Current "openstack server unlock" command could only unlock one server.
Improve it to be able to handle more than one servers. Also improve the
doc to reflect the new feature.

Change-Id: Ibf57b2021a504da950a491d63139a438087aed0b
Implements: blueprint cmd-with-multi-servers
2015-11-13 11:02:01 +08:00
Tang Chen
c1f0ad6d71 Enable "openstack server lock" command to take multiple servers.
Current "openstack server lock" command could only lock one server.
Improve it to be able to handle more than one servers. Also improve
the doc to reflect the new feature.

Change-Id: Ifcf103b1c32e6c547ac09f688b887b1c03f92b09
Implements: blueprint cmd-with-multi-servers
2015-11-13 10:36:22 +08:00
Tang Chen
90d86ef01c Enable "openstack server unpause" command to take multiple servers.
Current "openstack server unpause" command could only unpause one server.
Improve it to be able to handle more than one servers. Also improve the
doc to reflect the new feature.

Change-Id: I069ebdd6dcd121f6e55c2bf40d42197f93830e0c
Implements: blueprint cmd-with-multi-servers
2015-11-13 10:36:16 +08:00
xiexs
8b23c2690c Split the vol_id from a dev mapping
Add a split into the dev mapping to get the right vol_id.

Change-Id: I1a7bf6351491b1321c5ca0fa4a27f29825400eaf
Closes-Bug: #1514394
2015-11-11 23:47:02 -05:00
Jenkins
ed0981f4d8 Merge "Fix the bug of "openstack console log show"" 2015-11-12 03:31:56 +00:00
Jenkins
53fc20fa6f Merge "Fix the bug of "openstack usage show"" 2015-11-11 21:46:38 +00:00
Jenkins
0cc0b8d112 Merge "Add compute service delete" 2015-11-11 19:31:01 +00:00
xiexs
ea63553925 Fix the bug of "openstack console log show"
The behaviors are inconsistent while different
negative line numbers specified.

Change-Id: I2573f3e789f5603c896758971830ffc0b94c5e2b
Closes-Bug: #1512263
2015-11-09 04:22:09 -05:00
Tang Chen
a337f664d2 Enable "openstack server pause" command to take multiple servers.
Current "openstack server pause" command could only pause one server.
Improve it to be able to handle more than one servers. Also improve
the doc to reflect the new feature.

Change-Id: I809f77f0720457c9cdc1028a70b391c75885984c
Implements: blueprint cmd-with-multi-servers
2015-11-09 04:27:45 +00:00
xiexs
db46666589 Fix a bug about "openstack server list --user"
Fix the bug to get the right user id.

Change-Id: Ie60a719a40654802772884ff94271b37aa061ac3
Closes-Bug: #1513701
2015-11-06 09:16:51 -05:00
Jenkins
8a1fb85dba Merge "Trivial: Fix wrong comment of _format_servers_list_networks()." 2015-11-05 13:37:45 +00:00
Tang Chen
45a07afd54 Trivial: Fix wrong comment of _format_servers_list_networks().
The parameter name should be 'networks'.

Change-Id: I140c3d61dccbbec40c14bd7a8f2aeac0eb24384d
2015-11-06 19:02:36 +08:00
Tang Chen
7107b5536e Add "server stop" command to osc.
There is no stop command in osc. Add it.

Change-Id: Ia11a8f3b1245c884f7da442292009342d2ffde1e
Implements: blueprint cmd-with-multi-servers
2015-11-05 15:43:39 +08:00
Tang Chen
1809faaf1f Add "server start" command to osc.
There is no start command in osc. Add it.

Change-Id: Ic50f83413ab17c53396065aabb3f5a1506b52959
Implements: blueprint cmd-with-multi-servers
2015-11-05 15:43:15 +08:00
xiexs
9e50752321 Fix the bug of "openstack usage show"
When there is no resouce usage associated with the project,
an odd output will be displayed.
This patch tried to fix this issue.

Change-Id: I6f254c6ba37fbb760ada08e640c4938668d560dc
Closes-Bug: #1512220
2015-11-02 04:28:17 -05:00
Tang Chen
0ee5527fa5 Trivial clean up: do not use plural form in command arguments.
It is a general rule that we don't use plural form for the name of
command arguments. But class DeleteServer() is still using "servers".
So use "server instead".

Change-Id: I2d76de14ec34b88547b9f728b41e9bd93b2a22c5
2015-10-24 11:44:40 +08:00
liyingjun
9471115a9a Support pagination params for flavor list
Missing 'marker' and 'limit' params for `openstack flavor list` shell
command. It would be nice to have this when there are many flavors.

Closes-bug: #1505874
Change-Id: I088ac5d24f0d7595f5cbce14f063e296a449eb26
2015-10-21 08:24:58 +08:00
Alex Schultz
d1bc15f498 Add compute service delete
This change adds 'compute service delete <service>' to the openstack
client. This is the equivalent of 'nova service-delete <id>'

Change-Id: I69ef1cac72cbe125c2114f8e958e22350a70f367
Closes-Bug: #1503510
2015-10-16 14:01:37 +00:00
Alex Schultz
80e3a2dedb Add ID column to compute service list
This change adds the ID to the compute service list command so that the
ID can be leveraged by scripts trying to remove or update a specific
service.

Change-Id: I446b4c0071988133195eb2382313b3918b7ffa72
Closes-Bug: #1503430
2015-10-06 16:00:59 -05:00
Andrey Kurilin
9e6f99e2ab Use discover_extensions for novaclient
novaclien v2.26.0 includes `discover_extensions` method, which returns
list of all nova extensions based of version. Such method allows us to
reduce imports of novaclient's modules and construct novaclient instance
simpler.

Change-Id: Idbe3ed275fb4a7e3918b11669dcfad47b8de4fb9
2015-09-11 16:23:54 +03:00
Jenkins
0daa096939 Merge "Use a common decorator to log 'take_action' activation" 2015-09-11 02:43:54 +00:00
Jenkins
fa4b11a86f Merge "Add filtering by user for 'openstack server list'" 2015-09-10 20:19:43 +00:00
Jenkins
1e36b122f8 Merge "Add support for listing servers of other projects" 2015-09-10 20:18:45 +00:00
Andrey Kurilin
c513f05ce9 Use novaclient.client.Client for initialization Nova client
`novaclient.client.Client` is a recommended entry point for novaclient.
It supports backward-compatibility and allows Nova-folks to change
interfaces of inner versioned clients classes.

Change-Id: Iaf20714f63c307f88a451759f041ca509fbcf6f8
2015-09-09 18:00:50 +03:00
Jenkins
b4421e3802 Merge "Properly handle port arguments for ICMP" 2015-09-08 21:18:06 +00:00
kafka
10db0df857 Add filtering by user for 'openstack server list'
Add a new option to search by user when listing servers,
include support for domain scoped users, also update
docs

Co-Authored-By: Steve Martinelli <stevemar@ca.ibm.com>

Closes-Bug: #1483974
Change-Id: Ifdade6dc9ca8400fbd85f6b55793ab15ed17b97d
2015-09-08 18:36:56 +00:00