1460 Commits

Author SHA1 Message Date
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
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
Jenkins
265a6ead1b Merge "Fix spelling miss of password_func variable" 2014-02-15 02:36:12 +00:00
Jenkins
f488e9e1c9 Merge "Update broken command line reference link" 2014-02-15 02:28:12 +00:00
Eric Guo
dacbe0b070 Update broken command line reference link
The old reference link of nova command line was broken, update it
with latest one.

Change-Id: I4ab8a4750c7090ba20def6e47d1c4fe905a8256d
2014-02-13 23:17:34 +08:00
Haiwei Xu
8edc9b6a6a Fix spelling miss of password_func variable
In novaclient/shell.py there is a variable called 'password_fun'
which isn't used anywhere.
In fact it's a spelling miss, and should be modified to 'password_func'
which is used in novaclient/client.py
This patch fixes this bug.

Change-Id: Ibb8e95a2efc77575dcc8544584c708c5c62b7dea
2014-02-13 17:34:19 +09:00
huangtianhua
adcdf11661 Fix copy/paste errors in print messages
"Aggregate %s has been successfully updated." as the print message of
do_aggregate_set_metadata/do_aggregate_add_host/do_aggregate_remove_host
is incorrect.

Change-Id: I18c1c3a4403a8ebe3062ef7a695b0e643619dc74
2014-02-13 09:56:08 +08: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
7c3c1bb0dd Merge "Remove tox locale overrides" 2014-02-11 01:54:13 +00: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
Jeremy Stanley
09bef81e9c Remove tox locale overrides
* tox.ini: The LANG and LANGUAGE environment overrides were
introduced originally during the testr migration in an attempt to be
conservative about the possibility that locale settings in the
calling environment could cause consistency problems for test runs.
In actuality, this should be unnecessary and any place where it does
cause issues ought to be considered an actual bug.

Change-Id: I0f30b45033145c61ad2a9b232cb1178c48c7fc97
2014-02-10 03:21:02 +00:00
Jenkins
d703381c45 Merge "Fix i18n messages in novaclient, part I" 2014-02-10 02:25:23 +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
Jenkins
d0cdd28c47 Merge "Update my mailmap" 2014-02-10 00:55:19 +00:00
Jenkins
f92160312c Merge "Fixed polling after boot in shell" 2014-02-10 00:55:18 +00:00
Russell Bryant
f6fdff657f Fix python 3.3 unit test job
Change-Id: Ibb253e51ec2412d71d04a1994cef4fb60e77f234
Closes-bug: 1277495
2014-02-09 17:49:29 -05: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
Alex Meade
81794c14f8 Update my mailmap
Using new email address.

Change-Id: Ib2303680e6219b4fb8bdd67c016b14dd515d6d05
2014-02-05 19:37:46 +00: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
Jenkins
810857849e Merge "Flavor ExtraSpecs containing '/' cannot be deleted" 2014-02-01 20:12:07 +00: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
Victor Morales
0194492059 Removed undefined method in install_env.py file
There was a call from install_venv.py file to post_process method
of InstallVenv class, but this method is not defined in this class
as result it was raising an error. Even when this error doesn't
affect dependencies installation, it is not allowing to display user
information.

Change-Id: I499c0399eb961588d7e1491e1481412ffdda38b8
Closes-Bug: #1275025
2014-01-31 11:33:54 -06:00
Sergio Cazzolato
6b070c82d4 Fix i18n messages in novaclient, part I
This change make all the text visible by the user i18n. The
messages changes are in prints, logs, exceptions, helps, etc
Pep8 errors about "Multiple positional placeholders" also fixed

Change-Id: I731afea790baddbc34d059b93a35e3d275fc1df8
2014-01-28 14:56:00 -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
eb0b6d167d Merge "Reuse Resource from oslo" 2014-01-28 04:46:48 +00:00
Christopher Yeoh
1151c8ec5d Removes unsupported volume commands from V3 API support
Removes the volume commands which are not supported by the V3 API.
They are removed only from the V3 part of novaclient and so
the V2 support remains the same.

Partially implements blueprint v3-api

Change-Id: I343885c72e7cd020060249ece61135eacab68039
2014-01-27 23:00:07 +10:30
Andrey Kurilin
4045979418 Reuse Resource from oslo
All methods of Resource class novaclient is equal to common code.
In the process of unification of the clients code we should
reuse common functionality from Oslo.

Related to blueprint common-client-library-2

Change-Id: I2b72c6b34a44dec3572ca8ad70e41e42a32d48c0
2014-01-26 14:21:58 +02:00
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
Jenkins
e4af1e1b9c Merge "Don't slugify() None names" 2014-01-21 22:00:56 +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
30dd919f30 Merge "Sync cliutils from oslo" 2014-01-21 10:18:26 +00:00