837 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
efc49f656c Merge "Fix the indents of v3 API sample docs" 2014-02-23 10:55:38 +00:00
Jenkins
50d3ddaedc Merge "Adds host_ip to hypervisor show API" 2014-02-23 07:21:39 +00:00
Jason Dillaman
ac3972b0bc Add a new compute API method for deleting retired services
Services and related compute nodes cannot currently be deleted
from the command-line.  If a node is retired, the service list
will continue to show the retired services.

A delete service REST method has been added to the compute
APIs to support the command-line removal of retired services.

Blueprint: remove-nova-compute
Change-Id: I655a7f818bb59c8971feb5841feeefafc3a4580a
Flags: DocImpact
2014-02-21 16:50:23 -05:00
Jenkins
e0f0f14fb6 Merge "Add V3 api for pci support" 2014-02-20 20:12:50 +00:00
Jenkins
52a191640e Merge "Removes os-instance-usage-audit-log from the V3 API" 2014-02-17 20:44:54 +00:00
Ken'ichi Ohmichi
9ff7d02e9b Fix the indents of v3 API sample docs
There are some indent typos in v3 API sample docs.
Most API samples' indents are 4 spaces, but some samples' indents
are 2 spaces. This patch fixes them.

These typos have been found during the work for auto-generating API
API sample docs from API validation schemas. The auto-generator'll
output API sample docs with json.dumps() method and that would make
the difference between current docs which are fixed with this patch
because the generator would make API samples consistent.
This patch's purpose is also for preparing the generator.

Change-Id: Ieb6e587fcf4c01c128199950db93e1087bc43f41
2014-02-18 03:18:09 +09:00
Jenkins
215d646177 Merge "Replace oslo.sphinx with oslosphinx" 2014-02-14 17:34:18 +00:00
Shuangtai Tian
4d8c9a9040 Add V3 api for pci support
All pci passthrough code is merged into nova, but the APIs are not supported.
This patch provides a resource: endpoint to show PCI information. This is a
part of PCI APIs, for more information see the blueprint.

Partially implement blueprint pci-api-support

Change-Id: I05c502cb7564b8b71f12d8f06249124b3d2b370f
2014-02-14 16:09:28 +08:00
Jenkins
d96a6ddb86 Merge "Adds migrate server extension for V3 API" 2014-02-13 01:12:40 +00:00
Ben Nemec
c926216a9b Replace oslo.sphinx with oslosphinx
oslosphinx is now available as a replacement for oslo.sphinx that
won't conflict with oslo.config in virtual envs.

Change-Id: I7c116f816af895261e76af385ee3e9288e6fa70f
Closes-Bug: #1277168
2014-02-12 16:45:49 +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
Alessandro Pilotti
e638a8f2ec Adds RDP console support
Implements: blueprint hyper-v-rdp-console

Nova currently supports VNC and SPICE remote console protocols. This
commit adds support for the RDP protocol in a similar way.

Change-Id: I2c219d4a200122c6d6cfcbd8e074dca0f6fea598
2014-02-07 21:20:08 +02:00
Shane Wang
39870b603d Fix misspellings in nova
Fix misspellings detected by:
* pip install misspellings
* git ls-files | grep -v locale | misspellings -f -

Change-Id: I4e60889368b5e83275d59562613623c417a8e03f
Closes-Bug: #1257295
2014-02-07 13:09:24 +08:00
Jay Lau
e05566de71 Adds host_ip to hypervisor show API
After no-compute-fanout-to-scheduler, host_ip was stored in the table
of compute_nodes. Host ip address should be considered as the hypervisor
attribute similar to the hypervisor_type, hypervisor_version etc, and
now those attributes such as hypervisor_type, hypervisor_version etc
are all listed as the hypervisor attribute when calling "nova
hypervisor-show host", so we can also set "host_ip" as a new attribute
output for this command.

DocImpact
1) Only administrators can view hypervisor detail in nova.
2) It can help improve debug capabilities for nova. For example, if
admin using SimpleCIDRAffinityFilter, then after VM is deployed, admin
can check if the VM was deployed successfully to the desired host by
checking ip address of the host via "nova hypervisor-show host".
3) Add host_ip to the output for "nova hypervisor-show"

Implement bp hypervisor-show-ip
Change-Id: I006a504d030be1f47beb68a844647026a6daf0ce
2014-02-05 22:52:28 +08:00
Shuangtai Tian
1b0d1bebae Fix a bug in v3 API doc
This patch changes the wrong variable names 'addFixedIp' and 'networkId',
which were not used in V3 multinic API. We use 'add_fixed_ip' and
'network_id' in V3 multinic API.

Closes-bug: #1265716

Change-Id: I0c91764603d941df6d011a3b1266eb354c0bc54f
2014-02-03 18:16:34 +08:00
Jenkins
a103fcc69a Merge "Removes XML namespace definitions from V3 API plugins" 2014-02-01 23:02:27 +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
Chris Yeoh
0db1e4ed2a Removes XML namespace definitions from V3 API plugins
Removes the XML namespace definitions from the V3 API
plugins declarations. Deliberately avoids removing
the XML namespace definition from admin_actions to avoid
yet another rebase of the admin_actions split series.

Fixes up associated tests and requirement for V3 API extensions
to define a namespace property.

Partially implements blueprint remove-v3-xml-api

Change-Id: If3e1314cefdc1abcdd5eca44bcc2282cac664f05
2014-01-31 14:57:35 +10:30
Jenkins
65d1071a09 Merge "Adds lock server extension for V3 API" 2014-01-30 17:04:43 +00:00
Jenkins
11fe6780e7 Merge "Define "supported_instances" for fake compute" 2014-01-30 15:48:09 +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
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
Jenkins
76fb176005 Merge "Add alias as prefix for flavor_rxtx v3" 2014-01-28 02:47:04 +00:00
Jenkins
bbda5cec32 Merge "Added a new scheduler filter for metrics" 2014-01-26 03:46:01 +00:00
Jenkins
55fba353f0 Merge "Add explicit discussion of dependencies to README.rst" 2014-01-25 16:20:04 +00:00
Jenkins
744ee6bb90 Merge "Add preserve_ephemeral option to rebuild" 2014-01-25 12:02:46 +00:00
Cedric Brandily
bdecc8d233 Define "supported_instances" for fake compute
Allow fake computes to deploy images with hypervisor_type
defined and set to "fake" and by extension to be used in
multi hypervisor_type deployments.
Mixing fake and "real" computes on the same OpenStack
deployment allows to create many fake instances and some
working instances for testing applications on top of
OpenStack (ie: fake instances for stress tests, working
ones for functional tests).

Closes-bug: #1260771
Change-Id: Idc337c4a7ed024f236ca2b60d91e2c30f7d54536
2014-01-24 21:08:29 +00:00
Lianhao Lu
e8faf3a2a6 Added a new scheduler filter for metrics
The scheduler filter MetricsFilter filters out those hosts which don't
have the metrics data available as required by metric settings.

This is part of the blueprint utilization-aware-scheduling.

DocImpact: Added a new metrics filter.

Change-Id: Ib4a898774daf683c4496ef3e9953d23027f11ac0
2014-01-22 11:35:01 +08:00
Mike Spreitzer
27c8713840 Add explicit discussion of dependencies to README.rst
Noted that building the documentation has more dependencies
than merely running Nova.
Noted that the standard development environment is sufficient.
Noted that the standard runtime environment plus oslo.sphinx
is sufficient.

Change-Id: I37b84a1bdfbc906b005c0a53c2c570c0695937b3
Closes-Bug: #1266623
2014-01-20 23:07:34 -05:00
Jenkins
b89f1320cd Merge "Extends V3 os-hypervisor api for pci support" 2014-01-20 14:11:18 +00:00
Roman Podoliaka
c557472496 Add preserve_ephemeral option to rebuild
The preserve_ephemeral option for rebuild will preserve the content of
the ephemeral partition, making stateful golden image based
deployments possible even when clouds haven't deployed Cinder, or the
hypervisor doesn't support Cinder (e.g. BareMetal / Ironic).

Partial-Bug: #1174154
blueprint: baremetal-preserve-ephemeral
Co-Authored-By: Robert Collins <rbtcollins@hp.com>

Change-Id: Id33d5d4107f89814842a3f0b7f33690dd7e3aadc
2014-01-16 16:24:05 +02:00
Jenkins
8b9f924306 Merge "Aggregate: Hosts isolation based on image properties" 2014-01-07 08:01:35 +00:00
Jenkins
03b267f26c Merge "Removes disk-config extension from v3 api" 2014-01-06 05:26:15 +00:00
Shuangtai Tian
cfa202f33c Extends V3 os-hypervisor api for pci support
All pci passthrough code is merged into nova, but the APIs do not support.
this patch extends os-hypervisor 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: Ia366df257f077c74b1a6639b7078ba4230d3f1a7
2014-01-06 09:52:29 +08:00
He Jie Xu
65d2398388 Add alias as prefix for flavor_rxtx v3
As v3 api rules, the extended attribute should be with extension
alias as prefix. So fix this case for flavor-rxtx v3 extension.

Closes-bug: 1252986
DocImpact

Change-Id: I9f5984a406d039245db4bef2df53cfe10a331cc2
2014-01-02 11:29:40 +08:00
Sahid Orentino Ferdjaoui
0ca6b81758 Aggregate: Hosts isolation based on image properties
Isolates hosts based on image properties and aggregate metadata
 - If a host doesn't belong to any aggregate it can create instances
   from all images.
 - if a host belongs to an aggregate and if this aggregate defines
   metadata that match with the image properties then the host
   is a candidate to boot the instance.

DocImpact
Change-Id: I3b9325e2e103f3bb6eed66789ac2c82941e94397
Implements: blueprint aggregate-host-isolation-based-image-properties
2013-12-31 15:06:09 +01: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
Jenkins
6df885f87c Merge "Remove middleware ratelimits from v3 api" 2013-12-28 11:13:50 +00:00
Jenkins
d10796ce29 Merge "Enable remote debugging for nova" 2013-12-17 22:49:08 +00:00
Jenkins
660a924002 Merge "Normalize the weights instead of using raw values" 2013-12-16 20:14:16 +00:00
Tracy Jones
2cbea24209 Enable remote debugging for nova
This patch added 2 command line parameters which are used to
connect to an external debugger such as pycharm or eclipse.
This feature is used when you want to connect to a nova
service via a debugger running on a different host.
To use it you start the nova service with  the following
command line parameters

--remote_debug-host <where the debugger is running>
--remote_debug-port <port> it's listening on>.

DocImpact
Closes-bug: #1251021
Change-Id: I6ede9bf0813eafbeb91d858c297d4c160aafceba
2013-12-16 09:36:33 -08:00
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
Alvaro Lopez Garcia
e5ba849437 Normalize the weights instead of using raw values
The weight system is being used by the scheduler and the cells code.
Currently this system is using the raw values instead of normalizing them.
This makes difficult to properly use multipliers for establishing the
relative importance between two wheighers (one big magnitude could
shade a smaller one). This change introduces weight normalization so
that:

- From an operator point of view we can prioritize the weighers that
  we are applying. The only way to do this is being sure that all the
  weighers will give a value in a known range, so that it is
  not needed to artificially use a huge multiplier to prioritize a
  weigher.

- From a weigher developer point of view, somebody willing to implement
  one has to care about 1) returning a list of values, 2) setting the
  minimum and maximum values where the weights can range, if they are
  needed and they are significant for the weighing. For a weigher
  developer there are two use cases:

    Case 1: Use of a percentage instead of absolute values (for example, %
    of free RAM). If we compare two nodes focusing on the percentage of free
    ram, the maximum value for the weigher is 100. If we have two nodes one
    with 2048 total/1024 free, and the second one 1024 total/512 free they
    will get both the same weight, since they have the same % of free RAM
    (that is, the 50%).

    Case 2: Use of absolute values. In this case, the maximum of the weigher
    will be the maximum of the values in the list (in the case above, 1024)
    or the maximum value that the magnitude could take (in the case above,
    2048). How this maximum is set, is a decision of the developer. He may
    let the operator choose the behaviour of the weigher though.

- From the point of view of the scheduler we ensure that it is using
  normalized values, and not leveraging the normalization mechanism to the
  weighers.

Changes introduced this commit:

1) it introduces weight normalization so that we can apply multipliers
   easily. All the weights for an object will be normalized between 0.0 and
   1.0 before being sumed up, so that the final weight for a host will be:

    weight = w1_multiplier * norm(w1) + w2_multiplier * norm(w2) + ...

2) weights.BaseWeigher has been changed into an ABC so that we enforce
   that all weighers have the expected methods.

3) weights.BaseWeigher.weigh_objects() does no longer sum up the
   computer weighs to the object, but it rather returns a list that will be
   then normalized and added to the existing weight by BaseWeightHandler

4) Adapt the existing weighers to the above changes. Namely
    - New 'offset_weight_multiplier' for the cell weigher
      nova.cells.weights.weight_offset.WeightOffsetWeigher
    - Changed the name of the existing multiplier methods.

5) unittests for all of the introduced changes.

Implements blueprint normalize-scheduler-weights

DocImpact: Now weights for an object are normalized before suming them
up. This means that each weigher will take a maximum value of 1. This
may have an impact for operators that are using more than one weigher
(currently there is only one weigher: RAMWeiger) and for operators using
cells (where we have several weighers). It is needed to review then the
multipliers used and adjust them properly in case they have been
modified.

Docimpact: There is a new configuration option 'offset_weight_multiplier'
in nova.cells.weights.weight_offset.WeightOffsetWeigher

Change-Id: I81bf90898d3cb81541f4390596823cc00106eb20
2013-12-11 20:24:16 +01:00