153 Commits

Author SHA1 Message Date
Alessandro Pilotti
630a349bc3 Adds get_console_connect_info API
Implements: blueprint hyper-v-rdp-console

Currently graphical console access to Nova instances is limited to
clients which are part of Nova itself (novnc, xvpvnc, spice-html5).
The mentioned clients verify the validity of a console access token
with the following private API:
nova.consoleauth.rpcapi.ConsoleAuthAPI.check_token

The usage of a private API precludes the possibility of employing
external graphical console clients, including FreeRDP-WebConnect, used
to connect to Hyper-V instances via RDP.

This change adds a public API method that wraps the aforementioned
check_token private API. This allows external clients to obtain the
necessary protocol connection information by providing a token
previously obtained with calls to get_vnc_console, get_spice_console
or get_rdp_console.

Includes V2 and V3 API implementations.

Change-Id: Idd1e4f57b16bd1488f3b72bb064cef51321a7c79
2014-02-28 22:05:29 +02:00
Jenkins
52a191640e Merge "Removes os-instance-usage-audit-log from the V3 API" 2014-02-17 20:44:54 +00:00
Jenkins
d96a6ddb86 Merge "Adds migrate server extension for V3 API" 2014-02-13 01:12:40 +00:00
Jenkins
3ca3dce140 Merge "Remove quota classes extension from the V3 API" 2014-02-12 06:48:33 +00:00
Chris Yeoh
830ac0f065 Adds migrate server extension for V3 API
Moves the migrate/live-migrate server functionality out of admin_actions into
its own extension. This part of the blueprint v3-admin-actions-split
allows more selective enablement of features contained in the admin
actions extension.

Note the XML api samples are no longer generated because
bp remove-v3-xml-api has been approved.

Refactor removes some exception handling for migrate along with the relevant tests
as those exceptions will never occur.

Partially implements bp v3-api-admin-actions-split
DocImpact: Adds os-migrate-server extension and moves migrate/live-migrate
functionality out of os-admin-actions into this new extension.

Change-Id: I6b29f501ad6bb9a6401b1c20cd419d9e05fe369b
2014-02-11 22:20:12 -07:00
Christopher Yeoh
1b15b23b0a Remove quota classes extension from the V3 API
As per discussion at the Nova mid cycle meetup the
quota classes extension is being removed from the
V3 API. The extension was apparently part of a larger
body of work the rest of which never managed to merge.
So its not really useful by itself.

Partially implements bp v3-api-remove-extensions

Change-Id: Id1f288baa723df825151bd84aa27089271c2b8e4
2014-02-10 16:30:11 -07:00
Christopher Yeoh
f5cc4f4a7a Removes os-instance-usage-audit-log from the V3 API
The extension pre-dates ceilometer and equivalent
functionality is now much better managed using
ceilometer. So we're removing this before the V3 API
is officially released.

Partially implements blueprint v3-api-remove-extensions

Change-Id: I9b7892346a4ad7c54a903cfcbcb97156dfc8c734
2014-02-09 18:07:49 -07:00
Christopher Yeoh
d090d3d8c6 Removes os-simple-tenant-usage from the V3 API
The extension pre-dates ceilometer and equivalent
functionality is now much better managed using
ceilometer. So we're removing this before the V3 API
is officially released.

Partially implements blueprint v3-api-remove-extensions

Change-Id: Ia8fd475e6f0c4dbc67f3c47279cbaa2280b3af0b
2014-02-08 22:55:01 -07:00
Phil Day
def860c240 Typo in backwards compat names for notification drivers
The switch to oslo.messaging uses setup.cfg to provide a mapping
for the Nova notification drivers, but mis-spelt them.   This will
break any existing Nova systems that use notifictaions for things
like billing, monitoring, etc

Change-Id: I217d6b68a64ee008a82426b890a32a97b849cb4d
2014-02-07 12:56:54 +00:00
Jenkins
54ebd15491 Merge "Port to oslo.messaging" 2014-02-02 11:08:37 +00:00
Mark McLoughlin
1a91aacb85 Port to oslo.messaging
The oslo.messaging library takes the existing RPC code from oslo and
wraps it in a sane API with well defined semantics around which we can
make a commitment to retain compatibility in future.

The patch is large, but the changes can be summarized as:

  * oslo.messaging>=1.3.0a4 is required; a proper 1.3.0 release will be
    pushed before the icehouse release candidates.

  * The new rpc module has init() and cleanup() methods which manage the
    global oslo.messaging transport state. The TRANSPORT and NOTIFIER
    globals are conceptually similar to the current RPCIMPL global,
    except we're free to create and use alternate Transport objects
    in e.g. the cells code.

  * The rpc.get_{client,server,notifier}() methods are just helpers
    which wrap the global messaging state, specifiy serializers and
    specify the use of the eventlet executor.

  * In oslo.messaging, a request context is expected to be a dict so
    we add a RequestContextSerializer which can serialize to and from
    dicts using RequestContext.{to,from}_dict()

  * The allowed_rpc_exception_modules configuration option is replaced
    by an allowed_remote_exmods get_transport() parameter. This is not
    something that users ever need to configure, but it is something
    each project using oslo.messaging needs to be able to customize.

  * The nova.rpcclient module is removed; it was only a helper class
    to allow us split a lot of the more tedious changes out of this
    patch.

  * Finalizing the port from RpcProxy to RPCClient is straightforward.
    We put the default topic, version and namespace into a Target and
    contstruct the client using that.

  * Porting endpoint classes (like ComputeManager) just involves setting
    a target attribute on the class.

  * The @client_exceptions() decorator has been renamed to
    @expected_exceptions since it's used on the server side to designate
    exceptions we expect the decorated method to raise.

  * We maintain a global NOTIFIER object and create specializations of
    it with specific publisher IDs in order to avoid notification driver
    loading overhead.

  * rpc.py contains transport aliases for backwards compatibility
    purposes. setup.cfg also contains notification driver aliases for
    backwards compat.

  * The messaging options are moved about in nova.conf.sample because
    the options are advertised via a oslo.config.opts entry point and
    picked up by the generator.

  * We use messaging.ConfFixture in tests to override oslo.messaging
    config options, rather than making assumptions about the options
    registered by the library.

The porting of cells code is particularly tricky:

  * messaging.TransportURL parse() and str() replaces the
    [un]parse_transport_url() methods. Note the complication that an
    oslo.messaging transport URL can actually have multiple hosts in
    order to support message broker clustering. Also the complication
    of transport aliases in rpc.get_transport_url().

  * proxy_rpc_to_manager() is fairly nasty. Right now, we're proxying
    the on-the-wire message format over this call, but you can't supply
    such messages to oslo.messaging's cast()/call() methods. Rather than
    change the inter-cell RPC API to suit oslo.messaging, we instead
    just unpack the topic, server, method and args from the message on
    the remote side.

    cells_api.RPCClientCellsProxy is a mock RPCClient implementation
    which allows us to wrap up a RPC in the message format currently
    used for inter-cell RPCs.

  * Similarly, proxy_rpc_to_manager uses the on-the-wire format for
    exception serialization, but this format is an implementation detail
    of oslo.messaging's transport drivers. So, we need to duplicate the
    exception serialization code in cells.messaging. We may find a way
    to reconcile this in future - for example a ExceptionSerializer
    class might work, but with the current format it might be difficult
    for the deserializer to generically detect a serialized exception.

  * CellsRPCDriver.start_servers() and InterCellRPCAPI._get_client()
    need close review, but they're pretty straightforward ports of code
    to listen on some specialized topics and connect to a remote cell
    using its transport URL.

blueprint: oslo-messaging
Change-Id: Ib613e6300f2c215be90f924afbd223a3da053a69
2014-02-01 09:53:24 +00:00
Chris Yeoh
496cf4871c Adds suspend server extension for V3 API
Moves the suspend/resume server functionality out of admin_actions into
its own extension. This part of the blueprint v3-admin-actions-split
allows more selective enablement of features contained in the admin
actions extension.

Note that XML api samples are no longer generated because
bp remove-v3-xml-api has been approved.

Partially implements bp v3-admin-actions-split
DocImpact: Adds os-suspend-server extension and moves suspend/resume
functionality out of os-admin-actions into this new extension

Change-Id: Ie2ad1c6085d65fee397d6ad5b5c9f3bd8e82ad3c
2014-01-31 15:10:41 +10:30
Chris Yeoh
6609dcf36b Adds pause server extension for V3 API
Moves the pause/unpause server functionality out of admin_actions into
its own extension. This part of the blueprint v3-api-admin-actions-split
allows more selective enablement of features contained in the admin
actions extension.

Note that XML api samples are no longer generated because
bp remove-v3-xml-api has been approved.

Partially implements bp v3-api-admin-actions-split
DocImpact: Adds os-pause-server extension and moves pause/unpause
functionality out of os-admin-actions into this new extension

Change-Id: Ib9cce57e2ff1270a82b9d7e39b23ec6b532b9e77
2014-01-31 15:09:31 +10:30
Jenkins
65d1071a09 Merge "Adds lock server extension for V3 API" 2014-01-30 17:04:43 +00:00
Chris Yeoh
237e990926 Adds lock server extension for V3 API
Moves the lock/unlock server functionality out of admin_actions into
its own extension. This part of the larger
blueprint v3-api-admin-actions-split allows more selective enablement of
features contained in the admin actions extension.

Some setup work is done in the tests directory with an
admin_only_action_common.py file. This allows tests which are
split out from test_admin_actions (as their corresponding features
are separated from the admin_actions extension) can continue to
share code.

Note that XML api samples are no longer generated because
bp remove-v3-xml-api has been approved.

Partially implements bp v3-api-admin-actions-split
DocImpact: Adds os-lock-server extension and moves lock/unlock
functionality out of os-admin-actions into this new extension

Change-Id: Ie4b6e856c2f5c33de5575aa8666e0b2784b58d05
2014-01-30 10:13:23 +10:30
Chris Yeoh
7157859926 Remove V3 API XML entry points
Removes the entry points defined in setup.cfg for
the V3 API XML. These are no longer called.

Partially implements blueprint remove-v3-xml-api

Change-Id: I1fd516b5a01f1ce2b4d42320594616a49b66952d
2014-01-29 23:36:12 +10:30
Thierry Carrez
e0e4b55930 Use oslo.rootwrap library instead of local copy
Remove rootwrap code copied from oslo-incubator, make the
nova-rootwrap console_script entrypoint point to oslo.rootwrap
code instead.

Change-Id: Iec7aaf2e1599b2faf403d11b779eeab199a89486
Implements: blueprint nova-oslo-rootwrap
2014-01-17 18:06:33 +01:00
Jenkins
77c58d8643 Merge "Adds user_data extension to nova.api.v3.extensions" 2014-01-16 11:05:49 +00:00
Jenkins
03b267f26c Merge "Removes disk-config extension from v3 api" 2014-01-06 05:26:15 +00:00
He Jie Xu
ec1711134e Removes disk-config extension from v3 api
This patch removes disk-config extension for v3 api, and also
remove related tests. And remove resize extension point for
servers core because there isn't any extension using it anymore
and there isn't good way to test resize extension point.

Implements bp api-v3-remove-disk-config
DocImpact

Change-Id: I894ae6f4e0d6c9f956a71e8e061ccb3fa1b039d8
2013-12-30 13:05:55 +08:00
Chris Yeoh
c7683c48a9 Adds user_data extension to nova.api.v3.extensions
Although the user_data extension does not create a resource
or controller extension and only implements server.create and
server.create.deserialize entry points it does need to be listed as
a nova.api.v3.extension entry point as the whitelist check
operates on that entry point.

This does not add any runtime overhead and allows user_data to be
specified in the whitelist.

Also adds missing discoverable policy for the user data extension

Partially implements blueprint nova-v3-api

Change-Id: Ia8ac2fa150ab2fe9c1848c5a7ddc416952adf0e4
2013-12-23 09:51:41 +10:30
He Jie Xu
93d3e47531 Remove middleware ratelimits from v3 api
The ratelimit middleware isn't really useful. That is pointed out
by https://review.openstack.org/#/c/34821/. And it didn't get any
object from mail-list:
http://lists.openstack.org/pipermail/openstack-dev/2013-November/020291.html

This patch remove ratelimit middleware and limits extension. The config option
'api_rate_limit' is only valid in v2 api. The pipeline factory for v3 api won't
check that option anymore. For compatibility, if user is still using old
'api-paste.init', pipeline factory will ignore to load ratelimit middleware, and
print warning message to user for notice ratelimit is deprecated in v3 api.

Closes-bug: 1255471
DocImpact

Change-Id: Ifeae0504e11089f95e4d8af58bcb7372dca87f81
2013-12-15 18:52:03 +08:00
Jenkins
457d3b799d Merge "Extends V3 servers api for pci support" 2013-12-11 22:08:53 +00:00
Jenkins
646332f225 Merge "Removes os-personalities extension from the V3 API" 2013-12-07 04:21:58 +00:00
Jenkins
da7cfbbb6b Merge "Remove used_limits extension from the V3 API" 2013-12-05 10:49:21 +00:00
Shuangtai Tian
c087250048 Extends V3 servers api for pci support
All pci passthrough code is merged into nova, but the API does not support.
this patch extends the servers to show PCI information for instance and compute
node. This is a part of PCI APIs, for more information see the  blueprint.

Partially implement blueprint pci-api-support

Change-Id: I99eeeca67983c49433ab0079f490a454d250f5e0
2013-12-04 10:01:40 +00:00
Chris Yeoh
01baf99b01 Removes os-personalities extension from the V3 API
As per the discussion on the mailing list here:

http://lists.openstack.org/pipermail/openstack-dev/2013-September/015490.html

and discussions at summit, this patch removes the os-personalities
from the V3 API.

DocImpact

Part of blueprint v3-api-remove-extensions

Change-Id: I1a57ca812a9d71c0b1bab5d16ffad8eb82cba539
2013-11-20 22:46:36 +10:30
Christopher Yeoh
97ed2a0f78 Remove V3 API version of coverage extension
As discussed at the summit in the QA session, this removes
the coverage extension from the V3 API. The coverage extension
doesn't work properly and has security issues. An alternative technique,
though more limited in nature will soon be proposed.

Partially implements blueprint nova-v3-api

Change-Id: Ib4296288fefeb7e1e11bb6e44bd1cf355f29b9b9
2013-11-18 21:53:33 +10:30
Chris Yeoh
7af1f66363 Remove used_limits extension from the V3 API
Remove the used_limits extension from the V3 API because
it shows usage for limits which are no longer going to be displayed
by the limits extension. See https://review.openstack.org/#/c/39872/
The limits are not being displayed there because they are already
available through the quotas extension.

Although the quotas extension currently only displays the quota limit
and not usage, the following proposed changeset adds display
of usage: https://review.openstack.org/#/c/32303/. And this is done
in a way which is much more consistent in terms of naming and interface
than used_limits does.

So we no longer need the used_limits extension

Partially implements blueprint nova-v3-api

Change-Id: I8ec1f300335ca4fc3b86323cc3af6bc1591da7bb
2013-11-15 10:59:45 +08:00
He Jie Xu
d61d1f62da Enable extension access_ips for v3 API
This patch enable extension access_ips, remove old 'access_ip_*'
attributes and related unittest from servers core. And remove
old attributes from api samples.

Partially implements bp nova-v3-api

DocImpact

Change-Id: Id4c8bb721550e317e0695d7876e2faa3d6e91a60
2013-10-26 17:19:46 +08:00
Jenkins
2492717615 Merge "Adds missing entry in setup.cfg for V3 API shelve plugin" 2013-10-09 08:20:04 +00:00
Thierry Carrez
2a970b76f5 Open Icehouse development
This should be accepted/merged once all the RC1 bugfixes are in.

This bumps the target version to 2014.1, effectively opening the master
branch to Icehouse development, ending the feature freeze.

The Havana release branch is cut from the previous commit in master.

Change-Id: Ia3a41177e3c91bd75b38833761f9f8af2b503e4b
2013-10-02 17:21:24 +02:00
Chris Yeoh
96895e29b1 Adds missing entry in setup.cfg for V3 API shelve plugin
Adds the missing entry in setup.cfg which allows the V3 API
shelve plugin to be loaded. Also adds a v3 version of the unittests
for the shelve plugin.

Change-Id: I737ca0cae503b726b0103a4ae169ffca91188c87
Closes-Bug: #1233454
2013-10-02 12:14:46 +10:00
Dan Smith
eef8473fa8 Revert baremetal v3 API extension
Baremetal is scheduled to be deprecated in Nova soon. Since
the V3 API is experimental in Havana, we should revert the
extension to avoid maintenance of the extension and its tests
for no real gain.

Things have changed enough since it was added that a simple
git-revert won't work. This reverts the following changes:

  5de5ae1b5d3763dbcf14bf3b4d43199ad5255adf
  92c9975bd2d53624ae595b895c2e96991ee43778
  2382186311794591fb4d35893ffa774157d6131b

Mailing list discussion:

http://lists.openstack.org/pipermail/openstack-dev/2013-September/014614.html

Change-Id: I3bdc7234f91eb4f9078ee24d7ab093b28f9930c9
2013-09-05 15:19:31 -07:00
Jenkins
8d900dacc6 Merge "Port flavormanage extension to v3 API Part 2" 2013-09-04 16:51:07 +00:00
Alexei Kornienko
75e00f8358 Port flavormanage extension to v3 API Part 2
Ports the flavormanage extension and the corresponding
unittests to the v3 framework.

Partially implements blueprint nova-v3-api

Change-Id: Iaf6b4a2d7f4e4993a6540e8a3afc774b7b158608
2013-09-03 16:31:25 +03:00
Xavier Queralt
c9e3434e29 Add os-block-device-mapping to v3 API
Create a new v3 extension called os-block-device-mapping to handle
the block devices specified on server creation. This extension was
os-block-device-mapping-v2-boot in the old API.

Only the new block device mapping syntax has been ported although the
old one can still be used with v2 API.

blueprint: improve-block-device-handling

Change-Id: I898ae56539c6101680983d1eca4bce6d92bd5ce6
2013-09-03 15:23:40 +02:00
Jenkins
88fb94f5fa Merge "Adds API version discovery support for V3" 2013-09-02 10:34:02 +00:00
Jenkins
e138115aef Merge "Adds support for security_groups for V3 API server create" 2013-08-29 15:34:40 +00:00
Jenkins
1b96b77211 Merge "Removes fixed ips extension from V3 API" 2013-08-29 13:38:56 +00:00
Chris Yeoh
15b1f6b6e0 Adds support for security_groups for V3 API server create
Adds support for specifying the security group during the V3 API
server create to the security groups extensions. This was
accidentally missed during the initial port. Adds the
corresponding XML deserialization and unittests.

Partially implements blueprint nova-v3-api
Fixes bug #1208746

Change-Id: Ie9d9e03ae20357212b0f270d97a19a0d0f9b0557
2013-08-29 22:20:52 +09:30
Chris Yeoh
a1baa247a4 Adds API version discovery support for V3
Adds version information for the V3 API which is only displayed
when the V3 API is enabled. Even if the the V3 API is enabled the
V3 API status is "EXPERIMENTAL" and the V2 one "CURRENT". This was
done so autodiscovery tools would not yet use the V3 version by
default.

Ports the relevant parts of the version extension and associated
tests to the V3 API to display V3 version information for /v3 GET
requests.

DocImpact

Partially implements blueprint nova-v3-api

Change-Id: Idd335ce0df63d91e94a4a757f1fbae94b576c37e
2013-08-28 14:49:05 +09:30
Chris Yeoh
3970091a7b Port multiple_create extension to V3 API
Ports the multiple create extension to the V3 API. There is no part1
patch for this changeset because the original V2 file was just a stub
with all of the code in servers.py

DocImpact
Partially implements blueprint nova-v3-api

Change-Id: I5eba468e9c4b753215b91607a3e2441626d2cb57
2013-08-28 14:17:08 +09:30
Chris Yeoh
5303209b73 Removes V3 API images and image_metadata extensions
Removes V3 API images and image_metadata extensions as the
same functionality can be accessed directly through glance. Also
removes the associated testcases. There is a discussion about
the decision here:

http://lists.openstack.org/pipermail/openstack-dev/2013-August/012958.html

Fixes the image bookmark links in server information requests
so they point to glance

Partially implements blueprint nova-v3-api

Change-Id: Id32be0c0794b0f4dd220a928345ddf0133e9ffca
2013-08-27 11:11:15 +09:30
Chris Yeoh
40e5f49fd7 Removes fixed ips extension from V3 API
The fixed ip extension was one of the first ported to the V3 API
but a later decision around not supporting nova network in the V3 API
means that this extension is not required for V3. The fixed ip extension
only supports nova network, not neutron and the same functionality
can be accessed directly through neutron.

Also changes some extension tests to use a different extension
for white/black list testing

Partially implements bp nova-v3-api

Change-Id: Ie589170e863ee489661e789c5134ed8349ced279
2013-08-26 20:36:41 +09:30
ivan-zhu
5336843936 Demote personalities from core of API v3 as extensions os-personality
This patch move 'personality' from core into extensions.
* demote personality the attribute of server from servers
* add corresponding tests
* move some tests about personality from test_servers to test_personality

Partially implements blueprint nova-v3-api

Change-Id: I62254a94476271b1d8bcc206dfda1236f155960b
2013-08-15 11:41:52 +08:00
ivan-zhu
5fa97808b1 Port disk_config API to v3 Part 2
This patch contains the changes required to adapt the agent
extension and the corresponding unittest to the v3 framework.
Moves the commented out tests from the v3 version of test_servers
to the user data extension unittests.

Partially implements: bp v3-api-extension-versioning
Partially implements blueprint nova-v3-api

Change-Id: I7eef3ba18d7cc36c1ef78d093f50fd9122ac26c7
2013-08-15 11:36:27 +08:00
Jenkins
f09f5b2aaf Merge "Merged flavor_disabled extension into V3 core api" 2013-08-12 17:55:32 +00:00
Jenkins
185bb45b13 Merge "Merged flavorsextraspecs extension into core API" 2013-08-12 17:46:39 +00:00
Jenkins
e361273dae Merge "Port server_usage API to v3 part 2" 2013-08-09 22:58:12 +00:00