770 Commits

Author SHA1 Message Date
Dave Chen
7cf779004e Not use the deprecated argument
`project` argument is deprecated in keystoneclient for V3 API,
and use `default_project` instead, should use `default_project`
as the argument name in the openstackclient accordingly.

Change-Id: Ib9d70801c933a184afcdab75204393efa764fa87
Closes-Bug: #1462389
2015-06-08 10:15:24 +08:00
Jenkins
4cc7313504 Merge "add --domain argument to v3 project set" 2015-06-04 22:21:44 +00:00
Jenkins
7e067c6f4f Merge "Allow --insecure to override --os-cacert" 2015-06-04 19:27:36 +00:00
Dean Troyer
31d785ec69 Allow --insecure to override --os-cacert
Change --insecure to ignore the --os-cacert setting.  This is a change
from before where OSC followed the requests pattern of cacert taking
priority.

This logic is also introduced in os-client-config 1.3.0; we
do not require that release yet so it is duplicated here for now.
That change will come with the upcoming global options refactor.

Closes-Bug: #1447784
Change-Id: Iaa6d499ed0929c00a56dcd92a2017487c702774a
2015-06-04 09:37:46 -05:00
Jenkins
0c5f12aec0 Merge "Clean up ec2 credentials help text" 2015-06-03 23:04:27 +00:00
Jenkins
7f658c0aca Merge "Add domain support for ec2creds in v3 identity" 2015-06-03 21:08:52 +00:00
Jenkins
1fff11a9ab Merge "Add EC2 support for identity v3 API" 2015-06-03 20:20:12 +00:00
Dean Troyer
3fa0bbc7ee Clean up ec2 credentials help text
Re-sync the text in v2 and v3 help and the docs

Depends-On: If4ac5356ade8cff347bb9eb9f88d1ace82bb7275
Change-Id: Iabef2f271fcf46748295c29713fea1811dcab29c
2015-06-03 15:03:57 -05:00
Steve Martinelli
7665d52a0c Add domain support for ec2creds in v3 identity
A follow up work item from I52ff2020ef2fcbdc8a98280b73c6fd4a93bc8e0f
to support domain scoped users and projects for ec2creds in the
v3 identity api.

Related-Bug: 1236326

Change-Id: If4ac5356ade8cff347bb9eb9f88d1ace82bb7275
2015-06-03 15:33:36 +00:00
Jamie Lennox
15d3717e73 Add EC2 support for identity v3 API
EC2 support is provided for the v2 identity API and is available in
almost exactly the same format in the v3 API and enabled by default.

Supporting EC2 in the v3 identity API in OSC will make it much easier to
transition devstack to a v3 only state.

Closes-Bug: 1236326

Change-Id: I52ff2020ef2fcbdc8a98280b73c6fd4a93bc8e0f
2015-06-03 15:33:15 +00:00
Jenkins
aa7145e0c9 Merge "Fix security group list command" 2015-06-03 14:37:33 +00:00
Jenkins
81558d9ce3 Merge "Get rid of oslo_i18n deprecation notice" 2015-06-03 14:35:11 +00:00
Jamie Lennox
226fc6c80a Change Credentials header to Blob from data
The payload data of credentials is the unfortunately named blob.
Currently when listing credentials the payload is excluded as OSC is
looking for a column called data which does not exist.

Change-Id: I6fa4579d7ec9ba393ede550191dbd8aa29767bf4
2015-06-02 17:10:48 -04:00
TerryHowe
f737160777 Get rid of oslo_i18n deprecation notice
Change-Id: I12aa58b808c05d3eb6f5efcdc84df57f54a9782e
2015-06-02 09:21:31 -06: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
Dean Troyer
a05cbf4c99 Rework shell tests
This is the first step in reworking the shell argument handling,
clean up and add tests to ensure functionality doesn't change.

* Rework shell tests to break down global options and auth options.
* Make tests table-driven
* Remove 'os_' from 'cacert' and 'default_domain' internal option names

Change-Id: Icf69c7e84f3f44b366fe64b6bbf4e3fe958eb302
2015-06-02 09:49:17 -05:00
Jenkins
9bf24f3ae1 Merge "Set tenant options on parsed namespace" 2015-06-02 02:15:52 +00:00
Jenkins
4d57e9f62a Merge "Add --wait to server delete" 2015-06-01 20:07:27 +00:00
Jenkins
c4bc05b945 Merge "Add support for volume v2 API" 2015-05-31 05:17:38 +00:00
Jamie Lennox
3ae247fdce Set tenant options on parsed namespace
Because of the way OSC registers all plugins together we end up
with os-tenant-X parameters being saved to the project-X attribute after
parsing. If you are using the v2 plugins directly then they and os-client-config
expect the tenant_X values and will assuming no scoping information if
they are not present.

Validating options for scope will also fail in this situation, not just
because the resultant auth dictionary is missing the tenant-X
attributes, but because OSC validates that either project or domain
scope information is present.

Fix this by just always setting the v2 parameters if the v3 parameters
are present. This will have no effect on the generic or v3 case but fix
the v2 case.

Expand validation to include the tenant options so it knows that v2
plugins are scoped.

Change-Id: I8cab3e423663f801cbf2d83106c671bddc58d7e6
Closes-Bug: #1460369
2015-05-31 15:03:42 +10:00
Amey Bhide
5361652d8f Add support for volume v2 API
Added following commands for volume V2 API:
volume show
volume delete
volume type show
volume type delete
snapshot show
snapshot delete
backup show
backup delete

Implements: blueprint volume-v2
Change-Id: I68bd303c194f304ad15f899d335b72a8bf3ebe10
2015-05-30 11:26:14 -07:00
Guojian Shao
542f587364 add --domain argument to v3 project set
Currently argument 'domain' is not supported by command 'os project
set', but it is required by keystone v3 update project API to match
the domain id.

Closes-Bug: #1460122
Change-Id: I1b32f67f78b369f6134a74cdf9a4811b7539d44b
2015-05-29 22:42:42 -04: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
Dean Troyer
2c4b87869b Add cli tests for --verify and friends
The tests that will change after the verify-always-true bug is fixed
are currently commented out.  The commented asserts show where we
want to go.

Also fixes --verify parser value

Change-Id: I891e3ead5fc3da3ed2ecba5d2befd9e910778655
2015-05-28 18:01:49 -05:00
TerryHowe
211c14c638 Fix shell tests
Personally, I think these tests should be removed, they are
testing OCC.  An internal OCC change on a private method broke
this test.

Change-Id: I760bf90ef8bd97e30be7838874337be695d45285
2015-05-28 11:01:13 -06:00
Jenkins
3d239eddc7 Merge "Add support for v2 image set command" 2015-05-27 20:38:00 +00:00
Jenkins
6e4d6923cd Merge "Remove oslo serialization requirement" 2015-05-27 20:03:06 +00:00
Amey Bhide
ce05822a3a Add support for v2 image set command
Partial-Bug: #1405562
Change-Id: Ie30802d720a247748c45099c38450cc6c76bbc2a
2015-05-27 11:49:06 -07:00
Jenkins
aed5af47a1 Merge "Add missing properties to image set command" 2015-05-26 22:43:49 +00:00
Steve Martinelli
575dcdfc8e Remove oslo serialization requirement
Recently oslo serialization has started to also include
python-msgpack. Since we were only using it for json support, we
should just use python's json support. Especially since it's only
used by our tests.

Change-Id: I0f8d939d6fca7608eaa3eea7ea4ca93296aaab3a
2015-05-26 17:40:01 -04:00
Amey Bhide
ba21d463de Add missing properties to image set command
Enable user to update the following image properties from OSC:
container-format, disk-format, size

Closes-Bug: #1446362
Change-Id: Id9f40f15702e8f14f0327a37fcc7d7971338c258
2015-05-25 22:49:55 -07:00
Jenkins
e72d350316 Merge "Fix client error while rescuing an instance" 2015-05-23 16:37:11 +00:00
Jenkins
61cfebb8aa Merge "Enable specifing domains in "role add"" 2015-05-22 20:00:01 +00:00
Jenkins
7cc9632939 Merge "Fix insecure/verify options" 2015-05-22 19:57:46 +00: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
Terry Howe
12f1bdde2a Fix insecure/verify options
The insecure and verify options are broken so that verify always
gets set to True.  One problem was that the parsed args not
defaulted so os_cloud_config thinks there was always a command
line specified.  The other problem was getattr was called on cloud
config instead of get.

Closes-Bug: #1450855
Change-Id: Ib5f004f51a7453cc8f5a89759e2031ec42e04a30
2015-05-17 08:52:03 -06:00
Juan Antonio Osorio Robles
3ca96ef93c Enable specifing domains in "role add"
If users, projects or groups are provided by name, there is a
possibility of the existence other users/projects/groups with the same
name in other domain.  Even though this is not a problem if the actual
ID is given instead of a name; this is mostly a usability enhancement.

So, three options were added, one for specifying the domain where the
user belongs, another one to specify the project's domain, and finally
one to specify the group's domain.

Change-Id: Iab04b0e04fa75ea5aa3723b8ea42a45f58a6cdb2
Closes-Bug: #1421328
2015-05-12 11:48:01 +03:00
Roxana Gherle
c126a2ae56 Send the correct user-agent to Keystone
When we execute an Openstack CLI command, keystone should log in
Keystone access log that the user-agent that made the request was
'python-openstackclient' instead of the default 'python-keystoneclient'.
Therefore, when we create the authentication session we
need to send the explicit user-agent.

Closes-Bug: #1453995

Change-Id: I75087fd4bb1ff1e6f2a911bc70bf8008268276bb
2015-05-11 17:00:39 -07:00
Jenkins
83d73c2143 Merge "Add os-client-config cli tests" 2015-05-11 19:52:42 +00:00
Jenkins
04d1fc69cf Merge "Security group rule delete broken" 2015-05-07 23:13:24 +00: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
a6deef6ef1 Merge "Don't create empty quota set requests" 2015-05-06 15:44:40 +00:00
Jenkins
c6c1098d2e Merge "Add docs for service provider CRUD" 2015-05-06 15:40:48 +00:00
Jenkins
ec6fbe1abf Merge "Federation Service Providers CRUD operations" 2015-05-06 15:40:15 +00:00
Jamie Lennox
179ed18c30 Don't create empty quota set requests
The way that getattr is called with the None default you will always
create a compute_kwargs dictionary with key: None values. This means
that we will always send these empty requests to the servers.

Change so that only actually changed values end up in the quota set
requests and get sent.

Change-Id: I33bc3f4e1a8013ec672e995648d27513064baf26
Closes-Bug: #1451640
2015-05-05 12:45:42 +10:00
Dean Troyer
90705f191e Add os-client-config cli tests
Add tests for --os-cloud handling and precedence between CLI,
env vars and clouds.yaml.

Change-Id: I91d96f483d395f19ffcf74ec0187718ba01a1c41
2015-05-01 17:44:57 -05:00
Jenkins
b50ff9d3c5 Merge "Add image show tests" 2015-05-01 21:13:03 +00:00
Dean Troyer
47791a1639 Add image show tests
Image v2 uses warlock objects rather than the usua Resource objects
so we need to test for those.  This adds a subset of the Image v2
schema that should be enough to test for proper warlock image handling.

Depends-On: Ic95db2f63d9f5f37e29f0d7e048397da311fbf8c
Change-Id: Ib89cce87f110a554f40e726718e31d39b500a6ae
2015-05-01 11:12:35 -05:00
Amey Bhide
1bb4bb3baf Minor fix to openstack image show command
image show using V2 api was failing.

openstack --os-image-api-version 2 image show <image_id>
ERROR: openstack _info

Closes-Bug: #1450829
Change-Id: Ic95db2f63d9f5f37e29f0d7e048397da311fbf8c
2015-05-01 08:44:59 -07:00
Lin Yang
af2a665a63 Fix tiny typo in comment message
compatability => compatibility

Change-Id: I3181fb2b83df1e2cb60a9eedf319f2ad0a487dba
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
2015-04-30 17:21:45 +08:00