1432 Commits

Author SHA1 Message Date
Sascha Peilicke
935501b0e4 Support building wheels (PEP-427)
Universal is used to identify pure-Python module(by bdist_wheel). For
these, it is sufficient to build a wheel with _any_ Python ABI version
and publish that to PyPI (by whatever means).

Change-Id: I900a7d2e3777a5c151778679f3049771047855e6
2014-02-07 12:00:28 +01: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
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
Jenkins
9dc888b686 Merge "Sync apiclient from oslo" 2014-01-21 10:08:00 +00: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
b0bd339db0 Merge "Sync with global requirements" 2014-01-21 10:07:54 +00:00
Jenkins
9298a2a297 Merge "Removes use of timeutils.set_time_override" 2014-01-20 05:25:28 +00:00
Jenkins
7b44ce6734 Merge "Fixes ambiguous cli output between "None" and NoneType" 2014-01-19 01:07:38 +00:00
Jenkins
4ab3686b32 Merge "add support for server set metadata item" 2014-01-19 00:56:41 +00:00
Jenkins
3d17f80d69 Merge "shell: refactor boot to use _print_server" 2014-01-17 15:33:11 +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
Masayuki Igawa
27de89af5f Fix logic for "nova flavor-show 0#"
For perviously logic, if flavor id is
start with "0Number", int(name_or_id)
will convert it to "Number". If flavor
id "Number" exist in DB, it will show
up for query with "0Number".
This fix enter flavor search logic at
the beginning. Also add one more UT
for this function.

Change-Id: Ic48ff4275978404064c0c6fce6f98181660aa84a
Fixes: bug 1268456
2014-01-17 10:09:26 +08:00
Sascha Peilicke
e650ffa5e8 Sync with global requirements
Change-Id: I239e319045433b57610dfd996b837a76124e15af
2014-01-16 09:20:52 +01:00
Alexis Lee
bd9ebc5d27 Don't call CS if a token + URL are provided
Adds --os-auth-token (matching Glance client at least) to accept a
pre-obtained authentication token.

CS will be called iff:
      One or both of token and URL are not provided;
  AND the cache is empty/disabled or we don't have a tenant-id.

Removed some code altering the auth request to a GET if a token is
supplied - did not work for me and I think the path was dead previously.
Fixed test to account for this change.

Completes blueprint token-endpoint-instantiation

Change-Id: I67410b80e506bb80c152223cd113b7139a62a536
2014-01-15 17:11:35 +00:00
Andrey Kurilin
871c5fc1be Sync cliutils from oslo
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: Ia5e4e60f07561849f75d88b8a2ea3d23d6d5ff6d
2014-01-15 15:03:22 +00:00
Andrey Kurilin
6cf101e9ee Sync apiclient from oslo
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: I078b7be864f34596c846832d6201fee9b18c42f8
2014-01-15 14:52:50 +00:00
Masayuki Igawa
ee0401585d Fix QuotaClassSet and their tests
Some parameters of quota_class_set are not used in Nova v1.1/v2 API. And
some items have wrong type and key name.
QuotaClassSet class has id property originally. But 'id' comes from Nova
API currently. So we can just use it as its id.

This commit fixes and cleanups them.

Change-Id: Ib963ff82e3107d7b78a3a63a2fc1cd6b6bbe47b0
2014-01-15 18:58:11 +09:00
lizheming
40e433469d assertTrue(isinstance) replace by assertIsInstance
some of tests use different method of assertTrue(isinstance(A, B))
or assertEqual(type(A), B). The correct way is to use
assertIsInstance(A, B) provided by testtools

Closes-Bug: #1268480
Change-Id: Ie3b3e49ea3cc4357a65605ad54ff4ee1fbde12c7
2014-01-15 10:49:12 +08:00
Masayuki Igawa
8e9c038f15 Remove the coverage extension code
The coverage extension has been removed from Nova V2 API by the
        I07d798129ee277a6f7691c25f88c07a5204c0943
This commit remove the code.

Change-Id: I430a8b17be11bb961dc5b89b2d098f373e0a27fa
2014-01-14 09:14:11 +09:00
Sahid Orentino Ferdjaoui
96eea0f156 shell: refactor boot to use _print_server
In the shell command when we use the command boot, at the end
we use code to print some server information.
We should use the already defined function _print_server.

Change-Id: I133d7706458c71974ba464ab686cf3679a562592
Closes-Bug: #1265534
2014-01-13 22:45:51 +00:00
Roman Rader
3c9a3d8d32 Don't slugify() None names
If image has no name, human_id can't be built.
Also slugify raises ValueError if None argument passed.
It affects Docker images.

Closes-Bug: #1267429
Closes-Bug: #1267130
Change-Id: Ib975775b441917eef2a650049cee9991d10c50d7
2014-01-13 20:23:22 +02:00
Jenkins
1a20d2964d Merge "Ensure that the diagnostics are user friendly" 2014-01-13 14:40:11 +00:00
Jenkins
b07f02dd61 Merge "Added v3 interfaces in reference doc" 2014-01-13 04:21:38 +00:00
Jenkins
9b20773b66 Merge "Enable pep8 check for config.py in doc" 2014-01-13 04:20:29 +00:00
Jenkins
0379ae813f Merge "Generate interfaces reference doc" 2014-01-13 04:19:10 +00:00
Jenkins
77bde21154 Merge "Adds quota usage support for the V3 API" 2014-01-13 01:15:46 +00:00
Jenkins
51a37b157a Merge "Fix tab-completion of --flags under OS X" 2014-01-12 06:11:22 +00:00
Jenkins
16c5337e79 Merge "Ensure that nova client prints dictionaries and arrays correctly" 2014-01-11 15:47:54 +00:00
Jenkins
220c10d75b Merge "Support list deleted servers for admin" 2014-01-11 13:16:21 +00:00
Chris Yeoh
61d88463da Adds volume support for the V3 API
Adds the ability to attach, detach and swap volumes on
servers. There is no code shared with the v1_1 version
because for V3 the volumes interface is completely different
and the attach/detach/swap functionality is simply a server
action rather than something accessed through a special resource.

Partially implements blueprint v3-api

Change-Id: Ib405f821fe557745d11cff9db08381fc15233fe5
2014-01-11 13:53:10 +08:00