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
+ Added unit test to test that poll method is called.
Testing of poll method itself is out of this CR scope.
Change-Id: I57adb80bacd76b0831ea63f74182f60a2033ab11
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
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
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
* 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
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
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
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
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
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
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
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
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
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
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
The coverage extension has been removed from Nova V2 API by the
I07d798129ee277a6f7691c25f88c07a5204c0943
This commit remove the code.
Change-Id: I430a8b17be11bb961dc5b89b2d098f373e0a27fa
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
Nova api supported a parameter named 'deleted' which allow Admin to list
deleted servers. This patch make novaclient support this.
Change-Id: Ifc492fd0ba9d885e37c04c165d6397832ae6ebe0
Closes-Bug: #1266631
This patch implements a blueprint to add more consistency into
nova command, especially for the subcommand "floating-ip-*"
Currently when we want to associate or disassociate an ip with
nova we have to use add-floating-ip and remove-floating-ip. This
is not consitent with the actual scheme of the subcommands:
example:
nova image-*
nova flavor-*
nova floating-ip-*
+ In the client v1.1 this patch displays a deprecated message when printing
the help message for add-floating-ip and remove-floating-ip.
+ In the client v3 this patch do nothing because all floating ip commands are being
removed.
$:~/python-novaclient$ nova help | grep floating
add-floating-ip DEPRECATED, use floating-ip-associate instead.
floating-ip-associate
Associate a floating IP address to a server.
floating-ip-bulk-create
Bulk create floating ips by range.
floating-ip-bulk-delete
Bulk delete floating ips by range.
floating-ip-bulk-list
List all floating ips.
floating-ip-create Allocate a floating IP for the current tenant.
floating-ip-delete De-allocate a floating IP.
floating-ip-disassociate
Remove a floating IP address from a server.
floating-ip-list List floating ips for this tenant.
floating-ip-pool-list
List all floating ip pools.
remove-floating-ip DEPRECATED, use floating-ip-disassociate instead.
Implements: blueprint commands-floating-ip
Change-Id: I5337d0f1ce5ec4826da6ecd2b6ae4ae7b97801e0
- Removes vim headers: It's not needed to set tabstop tons of times,
this can be done by setting vimrc.
- I did not update files in common/* and install_venv_common.py because
these files are sync with oslo.
Note:
http://lists.openstack.org/pipermail/openstack-dev/2013-October/017353.html
Closes-Bug: #1265474
Change-Id: Ia09dc2c908187a756bf55eaba74655484304517d
Adds the ability to do a detailed query from the
os-quota-sets V3 API extension. This was an interface
added in V3 to allow for the querying of current quota
usage. Adds a shell command quota-usage which
uses this interface to show current quota usage as well
as the limit.
The absolute limits response was removed from
the limits extension in a9e29b7e9fbe14ab42f24802a6d2a457a6317ba3
and so the corresponding novaclient command is also removed.
The "quota-show-usage" command now shows the same information.
Differences between the V2 and V3 API are described here:
https://wiki.openstack.org/wiki/NovaAPIv2tov3
Partially implements blueprint v3-api
Change-Id: I5db72d42120f4ad7a86fbfce20382988f6bbf5d3
class_name parameter is not used in both Nova v1.1/v3 API.
Nova considers the part of url as class_name.
For example, bar is considered as class_name in the following case:
curl -i 'http://localhost:8774/v3/os-quota-class-sets/bar' -X PUT ..
This patch removes this unused paramter from quota_class.
Change-Id: Id4eba5b2a17506bc04ea23ef1097ef9cdb9caf8a
In the case when the value is a dictionary or array or longer than
the line then the diagnostics output will automatically wrap around
to ensure that the output is user friendly.
Part of the blueprint v3-diagnostics
Change-Id: Ia158fd99aeb0e6296fb232e881d0f01a13407dfc
Closes-bug: #1266402
Print the dictionaries and arrays without the unicode tags.
The patch also updated tests that did not return valid data.
Change-Id: Ia787f98a9510b68beb3ceaf00c285ca5c934f5c0
Closes-bug: #1265002
'nova aggregate-details' shows Hosts, Availability Zone
and Metadata in the python unicode notation.
+ Adds some tests about aggregates ported from v1 to the
v3 shell
Change-Id: I69d80b2e76833d78248dee782ae5e53f42a4f4a9
Closes-Bug: #1132961