792 Commits

Author SHA1 Message Date
Arata Notsu
4cfaa4a61c Do auth_url.rstrip('/') only if auth_url is set
auth_url can be None, for example, when we use bypass_url.

Also, add rstrip('/') for bypass_url (and management_url), which
is done when management_url is gotten from service catalog.

Change-Id: I4f59cc405386a15f8a266d279b27f279eacdb7f1
2014-03-18 11:25:05 +09:00
Gary Kotton
c40891b282 Nova CLI for server groups
CLI support for blueprint instance-group-api-extension

REST API support:- https://review.openstack.org/#/c/62557/

DocImpact
 - supports create, list, get and delete
 - only V2 is supported

Change-Id: Iaa5a2922b9a0eed9f682b7584c2acf582379b422
2014-03-13 04:14:11 -07:00
Jenkins
c92485e703 Merge "Fix some spelling mistakes" 2014-03-08 18:01:41 +00:00
Jenkins
3393cb9ff8 Merge "Add os-server-external-events support" 2014-03-07 20:32:01 +00:00
Phil Day
dd8bde71ff Allow user ID for authentication
In Keystone V3 user names are no longer necessarily unique
accross domains.

A user can still authenticate a user in the non default
domain via the V2 API providng they use IDs instead of names.

Tenant_ID is already supported, this change adds support
for user ID

Change-Id: I36ba75f3e67c8cdb959e31923d5e557414ab6f9b
2014-03-07 19:24:22 +00:00
Dan Smith
04a123cdee Add os-server-external-events support
This adds support for the os-server-external-events extension in nova,
which allows other services to deliver events to nova.

It also adds a shell command to trigger the "network-changed" event
manually, which will cause nova to refresh its network cache from
neutron.

Related to blueprint admin-event-callback-api

Change-Id: I1a302a43b6b7a6d8bdc03965a8f4c1a151bcab88
2014-03-07 06:51:57 -08:00
shihanzhang
e385cc4716 Fix some spelling mistakes
Change-Id: I8da3b73d108b11dc5bb3080215f16486fec95333
2014-03-07 09:03:47 +08:00
Masayuki Igawa
7c11b06bd4 Remove quota-class subcommand
quota-classes API was already removed.
  Change-Id: I1110022d6f628d03aaf363da707f2d2ef1600437
This patch removed quota-class subcommand from nova client.

Change-Id: I18bf7c255fabdb52c8ce8159f68c3e5c70e54993
2014-03-03 14:30:56 +09:00
Alan Pevec
360a3393f4 Revert "'name' should as be optional param on aggregate-update"
This reverts commit a2a1ef8f36644c3487bdaf00b2e70bcc6b948fb4.

Change-Id: I43bdc254e391c4b20254b8732c772fc9e728310c
Reopens-bug: #1280118
Partial-bug: #1281416
2014-02-27 13:13:14 +01:00
Jenkins
4a2c9b2621 Merge "Remove usage of module py3kcompat" 2014-02-27 03:26:33 +00:00
huangtianhua
a2a1ef8f36 'name' should as be optional param on aggregate-update
'name' should be an optional parameter not required on aggregate-update,
so we can update 'availability_zone' only.

Change-Id: I23e669a3362e0bea44adc88744eed823ec1e7ebb
Closes-Bug: #1280118
2014-02-26 10:00:41 +08:00
Eric Guo
d44e598692 Remove usage of module py3kcompat
Module py3kcompat was removed from oslo-incubator. We need remove its
usage in client side firstly. This make us move smoothly when sync
oslo-incubator code.

Change-Id: I8b07c32c9852e747579a23685f3c8a07ac13ec01
Partial-Bug: #1280033
2014-02-25 09:17:54 +08:00
Jenkins
43f1f7851a Merge "Replace assertEqual(None, *) with assertIsNone in tests" 2014-02-20 06:32:27 +00:00
zhang-jinnan
ca721d6e9b Remove None for dict.get()
Because If no default value is specified it defaults to None already.

Change-Id: I3caad9f17840347e30465c7bd4c9c4fe53d991e3
2014-02-19 21:02:11 +08:00
zhang-jinnan
93f9e68ca2 Replace assertEqual(None, *) with assertIsNone in tests
Replace assertEqual(None, *) with assertIsNone in tests to have
more clear messages in case of failure.

Change-Id: I6deee90c31adf61d80e2678a5f29ba9e187281c9
2014-02-19 12:12:12 +08:00
Haiwei Xu
aec2b6172a Fix element miss in client request body
Currently the client sends a request with wrong element name
'os-multiple-create:reservation_id' in the body.
The correct element should be 'os-multiple-create:return_reservation_id'.
The information can be got in this website.
https://wiki.openstack.org/wiki/NovaAPIv2tov3

Change-Id: I7d2f006ef6dbbcd6b41c8adbeee0c0e048d35448
Closes-Bug: #1281342
2014-02-19 03:35:19 +09:00
Jenkins
7cf73f1942 Merge "Remove invalid parameter of quota-update" 2014-02-15 10:29:52 +00:00
Jenkins
0042874812 Merge "Adds support for the get_rdp_console API" 2014-02-15 05:03:58 +00:00
shihanzhang
ff815fb4d0 Remove invalid parameter of quota-update
nova quota-update doesn't support update '--gigabytes' and '--volumes', but
CLI  include these two parameter, so it should remove these two parameter
from novaclient

Change-Id: I9db39dd397ba3368f214377f37b56ac4f4f3864c
Closes-bug: #1277673
2014-02-11 14:57:46 +08:00
Jenkins
19a723a37c Merge "Fixed super constructor call for TestResponse class" 2014-02-11 01:54:12 +00:00
Jenkins
eca796aeb9 Merge "[UT] Removed duplicate key from dict in fake baremetal_node" 2014-02-10 04:23:07 +00:00
Jenkins
96870fba16 Merge "Fixed multi validation and wrong fail calls in unit tests" 2014-02-10 02:10:40 +00:00
Jenkins
5d4b8b5342 Merge "[UT] Fixed floating_ip_pools fake return to expected one" 2014-02-10 01:20:25 +00:00
Jenkins
b6c6084ce3 Merge "Fix Serivce class AttributeError" 2014-02-10 01:20:13 +00:00
Alessandro Pilotti
55249f777c Adds support for the get_rdp_console API
Hyper-V employs RDP to access virtual machine consoles, unlike most
other hypervisors which support VNC.

In order to support this scenario, the get_rdp_console API has been
added to Nova. This commit adds the corresponding client side feature,
implemented in a way consistent with existing VNC and SPICE console
support.

Nova Gerrit commit: https://review.openstack.org/#/c/43502/

Change-Id: I86b814797d234f1eb49a7fa67ed27a9bcda034ae
Implements: blueprint hyper-v-rdp-console
2014-02-08 20:15:37 +00:00
Andrew Lazarev
6e116a1532 Fixed polling after boot in shell
+ Added unit test to test that poll method is called.
  Testing of poll method itself is out of this CR scope.

Change-Id: I57adb80bacd76b0831ea63f74182f60a2033ab11
2014-02-05 16:47:19 -08:00
Masayuki Igawa
5e3a3a193b Fix Serivce class AttributeError
When we str(service_object), an AttributeError occurred like this:
========================
  File "/opt/stack/python-novaclient/novaclient/v1_1/services.py", line
24, in __repr__
    return "<Service: %s>" % self.service
  File
"/opt/stack/python-novaclient/novaclient/openstack/common/apiclient/base.py",
 line 463, in __getattr__
    raise AttributeError(k)
AttributeError: service
========================
This commit fixes it.

Change-Id: I496d522591273bf1b1e7dbadf19afaf5e64e41e3
Closes-Bug: #1276408
2014-02-05 13:31:33 +09:00
Andrew Lazarev
d979754704 [UT] Fixed floating_ip_pools fake return to expected one
It seems that author wanted to return two pools. But because of typo,
method now returns only one of them. Fixed typo to return two pools.

Change-Id: Ia77a8529fd4db1b06860073ebf33bd54b43438cd
2014-02-04 16:20:03 -08:00
Andrew Lazarev
bd09342779 [UT] Removed duplicate key from dict in fake baremetal_node
Python takes only the last value if several keys with the
same name listed. Removed the first one to make value evident.

Change-Id: I6cef783ff245073b4c0fde0e4d60ff69fb02fc22
2014-02-04 16:13:33 -08:00
Andrew Lazarev
788e05c0df Fixed multi validation and wrong fail calls in unit tests
* Positive test was calling the same check several times. Replaced
  with one call.
* Negative test was failing with "'object has no attribute 'assertFail'"
  error message in case of failure. Replaced with appropriate message.

Change-Id: Id03a452f7735d6b4d13f54036f1bd3ae50cb487a
2014-02-04 16:00:14 -08:00
Andrew Lazarev
d218088c22 Fixed super constructor call for TestResponse class
Change-Id: Idbd436d63af152d4a73e747bf00a82fc0308a036
2014-02-04 14:39:54 -08:00
Sergio Cazzolato
fc8579dfa8 Flavor ExtraSpecs containing '/' cannot be deleted
This change applies a regular expression in order to filter
flavor extraspects keys with invalid characters.
The characters allowed are: letters, numbers, underscores,
periods, colons, spaces and hyphens.
A new test flavor has been created which doesn't check the
keys in the post body. This flavor has been created in the
third place (instead of in the last) in order to keep
working existent test cases which depend on the last flavor
received in the get method.

Change-Id: Ifd86bed23a05a5946ae8b9ba6f6c9bf4b24b1d4c
Partial-Bug: #1256119
2014-01-31 17:38:19 -05:00
Chris Yeoh
c8ad315763 Adds ability to boot a server via the Nova V3 API
Creates an images client when attached to the the servers
client. This is necessary because the Nova V3 API no longer
proxies image queries to glance but when preparing a request to
boot a server it is necessary to retreive information about
images so we need to talk to both Nova and Glance in the same
command.

This is a bit ugly, but not much more than the already existing
ugliness of using the client class designed to talk to
Nova to talk to Glance and Cinder. The long term clean solution
is probably to a unified client that is designed to talk to
multiple openstack services.

Differences between the V2 and V3 API are described here:
https://wiki.openstack.org/wiki/NovaAPIv2tov3

Partially implements blueprint v3-api

Change-Id: Ib43682f38cd7a3e0f910b75e96685591246e7f67
2014-01-28 23:29:16 +10:30
Jenkins
20c4226725 Merge "Adds volume support for the V3 API" 2014-01-25 18:35:18 +00:00
Jenkins
292afcdbaf Merge "Fix QuotaClassSet and their tests" 2014-01-25 18:35:17 +00:00
Jenkins
01eff2319a Merge "Add tests for boot method of v3 shell" 2014-01-25 18:16:31 +00:00
Jenkins
1e32538cff Merge "Using common methods from oslo cliutils" 2014-01-24 21:06:18 +00:00
Jenkins
08a19c7520 Merge "Updates nova client to use the latest oslo files" 2014-01-24 21:00:48 +00:00
Jenkins
e3d686f39a Merge "Replace basestring by six.string_types" 2014-01-24 07:00:06 +00:00
Sahid Orentino Ferdjaoui
a5195c5033 Updates nova client to use the latest oslo files
This patchset updates modules based on the config file:
openstack-common.conf

Notes: Some corrections has been added to work with
new files.
  + utils.py: The method safe_decode from strutils.py
    was updated and it is now not necessary to check for
    decode string with py33.
  + base.py: base64 needs a 8-bit string for py33
  + test_shell.py: stdin.encoding is needed for strutils

Change-Id: Iebe474f1226f8b5faa7fb5722e65f41b80d1973c
Related to blueprint common-client-library-2
Closes-Bug: #1265473
2014-01-23 18:08:03 +00:00
Sahid Orentino Ferdjaoui
da11e62216 Using common methods from oslo cliutils
There are some common methods in cliutils we can use in novaclient:
 arg, env, unauthenticated, isunauthenticated.

 + Replaces utils.env to add alias env from cliutils.
 + Replaces utils.arg to add alias arg from cliutils.
 + Removes unused methods: add_arg, unauthenticated, isunauthenticated
   To use methods from clituils.

Related to blueprint common-client-library-2
Change-Id: Ic7c132c37d6a91cf3eae55530300efd153c31903
2014-01-23 09:53:42 +00:00
Jenkins
daa33c56c9 Merge "Fix logic for "nova flavor-show 0#"" 2014-01-23 01:55:54 +00:00
Andrey Kurilin
6ff02390a2 Add tests for boot method of v3 shell
Methods `do_boot` and `_boot` in v3.shell don't have tests at all.

Partially implements bp v3-api

Change-Id: Ic231f829459f22f26d1262d208cc4fc9cbb8676e
2014-01-22 12:17:52 +02:00
Jenkins
00ceee190b Merge "Allow multiple volume delete from cli like Cinder" 2014-01-22 03:45:50 +00:00
Andrey Kurilin
99e289ea86 Replace basestring by six.string_types
Method shell._boot uses class basestring instead of six.string_types.
Tests don't check this method with several hints, so we didn't have
NameError in py33 env.

Change-Id: I9b35cd7ba162140a15929f9fc8a6d21755b3570c
2014-01-21 18:09:15 +02:00
Jenkins
2383ae4bcc Merge "assertTrue(isinstance) replace by assertIsInstance" 2014-01-21 10:07:58 +00:00
Jenkins
e2b1de000a Merge "Don't call CS if a token + URL are provided" 2014-01-21 10:07:56 +00:00
Jenkins
9298a2a297 Merge "Removes use of timeutils.set_time_override" 2014-01-20 05:25:28 +00:00
Jenkins
4ab3686b32 Merge "add support for server set metadata item" 2014-01-19 00:56:41 +00:00
Zhongyue Luo
c71131a509 Removes use of timeutils.set_time_override
The set_time_override function in timeutils was written as a
helper function to mock utcnow for unittests before 'mock' was
generally used. Now that we have mock and fixture, we no longer
need to use it.

Change-Id: I809825560b0324498010bd93aa1ceef552554375
Partial-Bug: #1266962
2014-01-17 03:29:49 +00:00