Commit Graph

10 Commits

Author SHA1 Message Date
Matt Riedemann 1d88717e75 Remove deprecated os-hosts CLIs and python API bindings
These were all deprecated in the 9.0.0 release in Pike
via change I79091edf5a2569e49e79deba312456fdcdee09e1 and
can now be removed. This will go into the 10.0.0 release.

Change-Id: I85a287ff2666c2dcdcbbc8fd6c2e285176f7a67a
2018-01-11 21:02:55 -05:00
jichenjc d5ecc50063 Remove 1.1 extension comment
According to recent nova changes, extension is deprecated and
1.1 is also deprecated, so to avoid confusion, remove
those comments in the code

Change-Id: Idc78af2151a0fff159c9b32595ed72a04808b7ee
2017-04-27 15:40:29 +08:00
jichenjc ea3b9f7fef 2.43: Deprecate novaclient /os-hosts usage
os-hosts is deprecated in the compute REST API with
microversion 2.43 via change:

Ieb85653b85a1eff38a9fb0c9ff05e4cd39150ecc

So nova shell and API bindings should be deprecated as well.

Implements blueprint deprecate-os-hosts

Change-Id: I79091edf5a2569e49e79deba312456fdcdee09e1
2017-04-25 17:37:47 -04:00
Takashi NATSUME c1c69f6d3e Fix doc generation errors
The following files have been removed in
I09a6501603667350f49b1b1fa130353a6d5272a2.

* novaclient/v2/volume_types.py
* novaclient/v2/volume_snapshots.py

But doc/source/conf.py has not been fixed.
So fix it.
And return parameter format in novaclient/v2/hosts.py
is fixed.

Change-Id: Icd3c5aed776df291141b8c3df4d64aa234e4ed88
Closes-Bug: #1648007
2016-12-07 18:38:30 +09:00
bhagyashris d8c07006dd Fix 'UnicodeEncodeError' for unicode values
Used '%' instead of format() because "%" formatting operation
returns a unicode string for both unicode and non-unicode
format strings.

Encoded the exception error message in novaclient.shell.main and
novaclient.utils.do_action_on_many method to avoid
"UnicodeEncodeError" and print valid message.

NOTE:
Not used u'{0}.format(<str>) because in python 3 everything
is unicode so no need to add explicit 'u' to format string.

Closes-Bug: #1403379
Change-Id: I13f1ef2e1b41299b417cad3759a5cda241890df7
2016-08-30 15:30:16 +05:30
Takashi NATSUME 0ee5aea617 Fix a typo in novaclient/v2/hosts.py
TrivialFix
Change-Id: I6992edbb768f14d0d4f0a7d79521876832e12714
2016-03-07 14:25:54 +09:00
Cao Shufeng f535e6945b Provide user with coherent interface to get request_ids
Currently, users must use different interface to get request_ids.
1. Commonly, ListWithMeta, DictWithMeta or TupleWithMeta, etc is
returned to user. And request_ids is returned as an attribute of
*WithMeta.

    For a server delete action:
        result = serverManager.delete(server)
        # result = TupelWithMeta
        request_ids = result.request_ids

2. Some places reutrn a tuple which contains request_ids in one of
its elements.

    For a server stop action:
        result = serverManager.stop(server)
        # result = (Response, TupleWithMeta)
        request_ids = result[1].request_ids

Such kind of difference makes user confused.
This change provides a backwards compatibility solution for users
who don't care about request_ids as TupleWithMeta is subclass of
tuple.

Change-Id: I164bb95abce6dc96cf455033f02822ccb0d87b8f
Closes-Bug: 1542179
2016-02-15 09:49:33 +00:00
Takashi NATSUME f194a5abad Add return-request-id-to-caller function(2/5)
Add return-request-id-to-caller function to
resources and resource managers in the following files.
The methods in the resource class and resource manager return
a wrapper class that has 'request_ids' property.
The caller can get request ids of the callee via the property.

* novaclient/v2/agents.py
* novaclient/v2/aggregates.py
* novaclient/v2/availability_zones.py
* novaclient/v2/certs.py
* novaclient/v2/cloudpipe.py
* novaclient/v2/fixed_ips.py
* novaclient/v2/flavor_access.py
* novaclient/v2/flavors.py
* novaclient/v2/floating_ip_dns.py
* novaclient/v2/floating_ip_pools.py
* novaclient/v2/floating_ips_bulk.py
* novaclient/v2/floating_ips.py
* novaclient/v2/fping.py
* novaclient/v2/hosts.py
* novaclient/v2/hypervisors.py
* novaclient/v2/images.py

Co-authored-by: Ankit Agrawal <ankit11.agrawal@nttdata.com>
Change-Id: Ic624d532f1a468dd45105bbb5aa6d8a730984338
Implements: blueprint return-request-id-to-caller
2016-01-27 02:45:22 +00:00
melanie witt c3dda7636c Fix repr of a host from a hosts.list()
The os-hosts API uses different attribute names depending on
whether the host was returned as part of a list or not.
A host returned from 'show host' has the attribute "host"
whereas a host returned from 'list hosts' has the attribute
"host_name".

This adds a host_name property to the Host class that will set the
"host" attribute if necessary. Although this doesn't exactly mirror
the responses coming back from nova api, it will make it easier for
users to use the objects interchangeably for hosts.list() operations
and hosts.update() operations, for example.

Co-Authored-By: Chung Chih, Hung <lyan.h@inwinstack.com>

Closes-Bug: #1434167

Change-Id: I5c339bdd1ab867d972759ade9a10b86bfda1e70a
2015-11-25 07:58:38 +00:00
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