Commit Graph

7 Commits

Author SHA1 Message Date
Chris Yeoh c836f425bc Adds keypair type in nova-api
X509 certificates are used by Windows for passwordless
authentication (WinRM) in a way which can be considered
consistent with the usage of SSH keys on Linux, as both
are based on public / private keypairs.

Enables nova-api to return the keypair type, updates
nova-api version to reflect the changes and updates the
unit and functional tests to validate the API changes.

Unit tests have been updated to ensure that the keypair
type is not being returned on previous API versions.

Note: x509 keypair implementation is added in the next
commit.

DocImpact - See nova/api/openstack/rest_api_version_history.rst
for details

APIImpact

Depends-On: Id5b210d7afe5c0a590abcbd42b9ff85b071a5c55

Co-Authored-By: Chris Yeoh <cyeoh@au1.ibm.com>
Partially implements: blueprint keypair-x509-certificates

Change-Id: I215662f2f92a01921a866c3218031787a9eaf915
2015-03-04 22:16:37 +00:00
Ken'ichi Ohmichi 590e8abce4 Change v3 keypairs API to v2.1
This patch changes v3 keypairs API to v2.1 and makes v2 unit tests
share between v2 and v2.1.

The differences between v2 and v3 are described on the wiki page
https://wiki.openstack.org/wiki/NovaAPIv2tov3 .

Partially implements blueprint v2-on-v3-api

Change-Id: I1fcb93a00816eab2d87f251b7cf8a8992e920308
2014-08-27 05:46:04 +00:00
Juerg Haefliger 8f299f5545 Remove spaces from SSH public key comment
An SSH key generated by Nova contains the comment 'Generated by Nova'. Older
versions (prior to 0.7.2) of cloud-init trip over the spaces in the comment
and as a result of that the key injected into the root account is not disabled
by cloud-init. Yes, it's a cloud-init bug but it's also a regression in the
sense that older OpenStack installations (Essex and older) don't contain
spaces in Nova generated key comments and thus older cloud-init's are not
affected in these environments.

This patch replaces the spaces with dashes, i.e., 'Generated-by-Nova'.

Spaces were introduced by commit: 114109dbf4
Ubuntu cloud images with cloud-init < 0.7.2: 10.04 LTS and 12.04 LTS
cloud-init bug report: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1220273

Closes-Bug: #1297685
Change-Id: I1761f61dfbba58be98351ae4a51884b03268cf09
2014-05-20 12:08:07 +02:00
Ghanshyam c3cb44d688 Add Nova API Sample file & test for get keypair
This patch adds the new API Sample file and its test for Nova V2 and V3
get keypair APIs.

This patch extend the timstamps reg exp to allow the combination
of TZ and microsecond/

Closes-Bug: 1298769
Closes-Bug: 1298818

Change-Id: If695a23cf95862b7bec6fbc5bdf7fc1733d08d4a
2014-05-07 21:06:37 +09:00
Ghanshyam da3a02243d Correct the keypairs-get-resp.json API sample file
Current keypair sample files 'keypairs-get-resp.json/xml contain
'keypairs' as the first key and that means its sample response
of "list keypairs" API not "get keypair" API.

The tests don't pass a keypair id, so current tests also are for
"list keypairs" API.

Details-
Below API sample files- from their name it looks like these are for
get keypair API. But in actual content of these files are written as
List keypair API response. So it create the confusion that for which
API these API sample file are. Name suggest for GET and content
suggest for LIST Keypair.

    /nova/tests/integrated/api_samples/os-keypairs/
    keypairs-get-resp.json.tpl
    /nova/tests/integrated/api_samples/os-keypairs/
    keypairs-get-resp.xml.tpl

Their API sample test cases are written corrosponding to list keypair
APIs.

This patch correct the above API sample file name from get to list
Keypair APIs.
API Sample test cases names are also modified accordingly.

Partial-Bug: 1298769

Change-Id: I88d894ff9b0f6236221fa922601b641f26a87301
2014-04-01 08:57:06 +09:00
Russell Bryant c2336e2405 Remove v3 xml API sample tests
This is a step toward removing XML support from the v3 compute API.
First, we need to remove all of the tests that would fail once we start
ripping out the real code.

Part of blueprint remove-v3-xml-api

Change-Id: Ie2c280d5ea1e6b8756535deb05982a92561552db
2014-01-28 17:01:44 -05:00
Chris Yeoh 12c8ea8569 Adds v3 API samples for hide server addresses and keypairs
Adds the v3 API samples for the hide server addresses and
keypairs extensions. Bundled together to reduce review load

Partially implements blueprint v3-api-specification

+DocImpact

Change-Id: If331d79a878af7543c8792ab4d675fc996c3cd04
2013-09-25 01:04:10 +09:30