Commit Graph

24 Commits

Author SHA1 Message Date
Andrey Kurilin 0a60aae852 Rename v1_1 to v2
Module novaclient.v1_1 is used as implementation of V1.1, V2 and V3.
Since future development(microversioning) will be done across V2,
implementation should be done in appropriate module(to prevent misleading).

Despite the fact that implementation for all versions are equal, discover
method for contrib path worked only for v1.1. This patch fixes this bug and
modifies shell tests to check all versions.

Change-Id: Ib6798f4dfe177586302141f522dc593560ce6a5b
2015-02-04 17:40:46 +02:00
Chris Yeoh cfd38a7ef6 Adds first part of quotas support for Nova V3 API
Adds support and tests for the os-quotas extension
for the Nova V3 API. Note that compared to the V2
version this removes the ability to set quotas
which are not relevant to the V3 API (eg injected
file quotas are not relevant because the
os-personalities extension has been removed)

Partially implements blueprint v3-api

Change-Id: Ifa1c77428424bedf7fb88ef6d7b3843376799d24
2013-12-19 23:36:00 +10:30
Sushil Kumar 953734d727 Enables H403 pep8 rules
Updates tox.ini to reduce ignored rules.

Updates code for H403 violation.

Change-Id: Iee7b34a27c62ce8cb0f26166b3c16e3386e2fecd
2013-12-14 15:16:20 +00:00
Alex Gaynor 35e03a92e2 Corrected several usage of keys() for Python 3
Under Python2 dict.keys() returns a list, under Python 3 it returns an
iterator. Some places assumed that if they called keys() then it was
safe to modify the dict in a loop. Corrected this by calling list().

Change-Id: I7638263f288dd20590bd751d09194a919b921545
2013-09-22 09:04:20 -07:00
liyingjun 8b5dcee15e Add user quota client API support
Implements blueprint user-quota-related-client-api

    This patch adds user arguments to the following subcommands:
        * quota-show
        * quota-update
        * quota-delete

Change-Id: I6556de366a758f7550e9b26357f231666caae419
2013-07-30 10:59:25 +08:00
gengjh 267dbd292c Support force update quota
Once we have additional check when update quota in
https://review.openstack.org/#/c/25887/, we need provide --force option
when run 'nova quota-update'.

Since the change in nova server has been merged, we need re-enable the
changes in nova client side.

Fix bug 1160749

Change-Id: Iceb67c5816312fafed8a68e48a8a136c03d0bb5b
2013-06-18 21:04:57 +08:00
Aarti Kriplani d43b923d8a Delete a quota through admin api.
Exposes the quota-delete api implemented as part of
blueprint admin-api-for-delete-quota
Change-Id: Iab358f0fcf2dfb41bcd9a3a5b73d590d3f55cd6c
2013-06-06 20:54:46 +05:30
Sean Dague c305a45892 Revert "Support force update quota"
This reverts commit e8b665edbf.

The previous commit created an incompatibility in using new nova
client with older nova server. Nova client needs to be always
releasable, and work with all nova server API versions out there.

Fixes bug #1173353

Change-Id: I2c07d109af4a35bc3b98dedaf991d5d3cc6fdd3b
2013-05-24 09:06:01 -04:00
Alessio Ababilov c9fc9b5b8f Make ManagerWithFind abstract and fix its descendants
ManagerWithFind requires list() method in its descendants.
Make it abstract and fix its improper descendants that do
not implement list() (SecurityGroupRuleManager and many others).

Fixes: bug #1180393
Change-Id: Ic8b466a57554018092c31c6d6b3ea62f181d7000
2013-05-15 21:47:05 +03:00
gengjh e8b665edbf Support force update quota
Once we have additional check when update quota in
https://review.openstack.org/#/c/25887/, we need provide --force option
when run 'nova quota-update'.

Fix bug 1160749

DocImpact

Change-Id: Ib8d94d4eaa846f620abad5fb55017ac3fb0b322a
2013-04-11 17:11:08 +08:00
Michael Still 59f8360d7e Add support for the new fixed_ip quota.
Required for bug 1125468.

Change-Id: If9f8f31a9fd35497a308ae13351685e470e20cd0
2013-03-16 11:22:28 +11:00
Davanum Srinivas c5b579926f Fix Copyright Headers from LLC to Foundation
follow the lead from nova and oslo projects

Change-Id: I270c5f1e4eefa4b72e292bfb4a4c60de0c3f6e4a
2013-03-13 20:12:23 -04:00
Alessio Ababilov 6307310466 Unify Manager._update behaviour
Now _update call usually returns an instance of self.resource_class.
This simplifies the code and makes novaclient closer to keystoneclient.

Also, update hosts and services API according to changes on nova.
(If50a6b6e20f9b3fe66d486bb9b15d3eb4b62daf9).

Change-Id: I447e49e5fce0afba8a9c1a5df6dfa7200cc93e18
2012-12-23 14:50:38 +02:00
Dan Prince cf70a2d6f6 Adds support for security group/rules quotas.
Updates novaclient's quota and quota_class handlers to support
the security_groups and security_group_rules quotas that are now in
Nova.

Fixes LP Bug #1084682.

Change-Id: I04d90681d535124d7d497e06e8c1ea4f2cb8f4f4
2012-12-11 12:18:56 -05:00
Dan Prince f279433e53 Adds support for key_pairs quota.
Updates novaclient's quota and quota_class handlers to support
the key_pairs quota that is now in Nova.

Fixes LP Bug #1084674.

Change-Id: I0eb357a5f7d5dba73f002066ea381cec818f1492
2012-12-04 09:57:03 -05:00
Dan Prince 955b94c1f7 Adds support for injected_file_path_bytes quota.
Updates novaclient's quota and quota_class handlers to support
the injected_file_path_bytes quota that is now in Nova.

Fixes LP Bug #1084672.

Change-Id: I2156816fd09bdd388e3acb8143b041e927f33511
2012-12-04 09:57:03 -05:00
Jenkins a2508aa920 Merge "Fix Quota ant SecurityGroup resources refreshing." 2012-01-17 00:21:17 +00:00
lzyeval 4ff27703d0 PEP8 python-novaclient cleanup
Fixes bug #911552

The None, True, and False values are singletons.

All variable *comparisons* to singletons should use 'is' or 'is not'.
All variable *evaluations* to boolean should use 'if' or 'if not'.
All Object type comparisons should use isinstance()
instead of comparing types directly

Change-Id: Ia5571e58e2662c652f0e996d8c1a1acb4531623d
2012-01-06 20:16:31 +08:00
François Charlier d17505462d Fix Quota ant SecurityGroup resources refreshing.
The Quota and SecurityGroup resources were not refreshed correctly.

Change-Id: I5b0a9efc07bc7ef05673256df5785aca931f64d8
2012-01-04 16:08:18 +01:00
François Charlier d18954f4a8 Add missing returns and remove superfluous ones
Some methods which should have returned  objects dit not return and some
methods which don't  return anything used return ... Fixed  all that and
added tests to detect two returns which were missing.

Fixes bug 892058

Change-Id: If59468cfe1c7b1ab74ed0bfc6f81590dfd5dd668
2011-12-30 17:40:02 +01:00
Jake Dahn 0476cb6b75 updating quotas and tests with the format which recently landed in nova 2011-08-16 13:38:34 -07:00
Jake Dahn 5a53520698 fixing up a few pep8 issues, and pointing client to the new endpoint 2011-08-16 13:38:34 -07:00
termie 461d3e7e2f add license headers 2011-08-09 13:12:09 -07:00
termie 17208cec6a add support for quotas 2011-08-08 14:48:07 -07:00