747 Commits

Author SHA1 Message Date
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
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
Jenkins
634004f33e Merge "Add parent field to project creation" 2015-04-30 03:16:20 +00:00
Dean Troyer
cf52e722c0 Minor logging/debug cleanups
This removed the rarely useful cliff command list from the debug output.

Change-Id: I48f22086733acf90e79a6ddac8712734ee2d0b60
2015-04-28 18:15:24 -05:00
Juan Antonio Osorio Robles
48b52a0d40 Raise exception if no session is created
If the clientmanager is unable to create a keystone session (due to
insufficient auth parameters or something else) then the exception
caused by this shouldn't be ignored, as was the case.

On the other hand, we don't want this behaviour in the case of the
'complete' command, so this is now properly detected.

Change-Id: If4f453d23cc87900cda752e9ffbcf41ded59e26f
Closes-Bug: #1444640
2015-04-27 16:54:28 +03: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
Jenkins
856f641582 Merge "Refactor utility to find identity resources" 2015-04-22 20:26:57 +00:00
Dag Stenstad
2ee904cb2d Adds support for container selection for backup
Changed argument from parsed_args.volume to parsed_args.container as per what
is expected in python-cinderclient.

If not defined, defaults to "backup_swift_container" in cinder.conf.

Stops there being a container for every volume you take backups off.

Change-Id: I4a34894222f71b0f207d007c32427040589406aa
Closes-Bug: 1446751
2015-04-21 18:45:54 +02:00
Jenkins
e288e0194c Merge "Handle the pagination for image list" 2015-04-20 20:35:02 +00:00
TerryHowe
3c7b5185ca Handle the pagination for image list
Handle the paginatiion for image list.  We were sorting the
data here, so nothing lost for the generator.

Change-Id: I2d7d4b3d5c9f650953f309c971ac53b64f6f7f77
2015-04-20 11:23:15 -06:00
Steve Martinelli
d733e457e3 Refactor utility to find identity resources
Based on the comments made in this patch:
  https://review.openstack.org/#/c/174908/2/

We should simplify and refactor the way we handle finding identity
resources.

Change-Id: I77db2e3564faa90a917082a6c6cb87269e93aebe
2015-04-20 12:40:33 -04:00
Jenkins
2c6a5ca53a Merge "Update the docs for new nic options" 2015-04-19 14:23:12 +00:00
Jenkins
3f84731637 Merge "remove unnecessary conditionals" 2015-04-19 14:23:05 +00:00
Jenkins
c9d3addf2c Merge "Role operations should not require list object permission" 2015-04-19 13:55:33 +00:00
Steve Martinelli
00eeb3593c remove unnecessary conditionals
In several places we had else branches where a reasonable default
would do the job. This makes the code a mean cleaer and easier to
read.

Change-Id: I231e09aab85fd32b8300bc33c48d0899b728b96e
2015-04-19 02:41:04 -04:00
Jenkins
fd8b284164 Merge "Add --os-cloud support" 2015-04-19 06:17:31 +00:00
Jenkins
61fb68e8b3 Merge "Add support for showing limits of a specific project" 2015-04-19 06:15:08 +00:00
Steve Martinelli
e85971b1a6 Update the docs for new nic options
Change-Id: I4c8b93ede80f993eab8badfbba6bf1c530844d54
2015-04-19 01:43:40 -04:00
Dean Troyer
5649695c65 Add --os-cloud support
This adds a new option --os-cloud that allows the configuration values
for multiple clouds to be stored in a local file and selected with
a single option.

Internal option names have had 'os_' removed to be comptible with
the options returned from OpenStackConfig().get_one_cloud().

The config file is ~/.config/openstack/clouds.yaml:

Sample
------
clouds:
  devstack:
    auth:
      auth_url: http://192.168.122.10:35357/
      project_name: demo
      username: demo
      password: 0penstack
    region_name: RegionOne
  devstack:
     auth:
       auth_url: http://192.168.122.10:35357/
       project_name: demo
       username: demo
       password: 0penstack
     region_name: RegionOne

Co-Authored-By: Monty Taylor <mordred@inaugust.com>
Change-Id: I4939acf8067e44ffe06a2e26fc28f1adf8985b7d
Depends-On: I45e2550af58aee616ca168d20a557077beeab007
2015-04-18 23:04:51 -05:00
Jenkins
a5e79d58ae Merge "Defer client imports" 2015-04-19 03:23:12 +00:00
Jenkins
2ea6f10691 Merge "Suppress warnings user can't fix" 2015-04-18 07:12:03 +00:00
Jenkins
fbb7641694 Merge "Print warning on authentication error" 2015-04-18 05:27:26 +00:00