261 Commits

Author SHA1 Message Date
Jenkins
d4ae85db7f Merge "single point of entry for sample config generation" 2016-01-11 21:50:36 +00:00
Markus Zoeller
627fde8832 single point of entry for sample config generation
To create a "nova.conf.sample" file, we use "tox -e genconfig".
This command triggers the generator from "oslo.config" which needs
entry points in "setup.cfg". Right now we have multiple entry points
to "opts.py" files which are going to be consolidated to one single
point of entry "nova/conf/opts.py". Until all config options are
moved to that central place, we would often face merge conflicts
when multiple contributors commit patches to that one "opts.py".

To prevent that, and to make it easier for future config option
moduls in "nova/conf/", the new "nova/conf/opts.py" module collects
the config options in a dynamic way.

Co-Author: EdLeafe <ed@leafe.com>

bp centralize-config-options

Change-Id: I4e5d643cd93bb2822ff59c71669cedf3de7f86fc
2016-01-08 13:55:26 +00:00
Davanum Srinivas
4140eb4004 Remove Deprecated EC2 and ObjectStore impl/tests
In Id7936be290b6febd18deb4c2db8ea4d678d4d9b1, we removed
entries from api-paste.ini for EC2 API service. In this
review we remove all the unnecessary code, docs and tests
associated with objectstore and ec2 service. Note that this
does not cleanup the Instance object or change any of the
versioned objects. We just drop any code associated with
testing the REST endpoint(s) that are no longer needed.
Also added shims such that the api-paste.ini from liberty
will still work (grenade job) and added logs and response
messages for prompting administrators to cleanup their
old api-paste.ini and switching to the stand alone EC2 API
project for their needs.

Change-Id: I8bf7cbaa7015bb61656ab90ccc8f944aaeebb095
2016-01-08 06:30:20 -05:00
Davanum Srinivas
eec7a55319 Nuke EC2 API from api-paste and remove wsgi support
Tempest has already removed the EC2 API tests in:
Ib5e24e19bcba9808a9f49fe7f328668df77fe4f9

We have a review in devstack below that removes EC2
API service by default.

In this review, we are removing support for the really
old EC2 API support in Nova. Anyone who needs EC2 support
should use the new EC2-API project:
http://git.openstack.org/cgit/openstack/ec2-api/

The necessary changes in Tempest and DevStack are
already merged.  In a follow on review, will remove
the EC2 specific options, code and tests from Nova.

DocImpact

Change-Id: Id7936be290b6febd18deb4c2db8ea4d678d4d9b1
2015-12-21 18:48:15 -05:00
Jenkins
74168636da Merge "Remove version from setup.cfg" 2015-12-04 00:33:12 +00:00
Sylvain Bauza
ad30bd2f7d Remove version from setup.cfg
Per [1] we now want to use the git repository for knowing the version instead
of just trying to modify the setup.cfg file.

[1] http://lists.openstack.org/pipermail/openstack-dev/2015-November/080692.html

Change-Id: I5a4c890b2a4637f1b676273a2509ab8be9f9f034
Depends-On: Ie869901714a96e1dbb97ca58a5cab792b3c9f61d
2015-12-01 16:21:58 +01:00
Jeffrey Zhang
a4b2ade479 use graduated oslo.policy
- Add oslo.policy to requirements.txt
- Remove in-tree copy of oslo.policy

Change-Id: Ia6fef939cfe0df33476ccee365934a5d2878f90d
Partial-Bug: #1458945
2015-11-26 13:04:52 +08:00
Jenkins
7c5acd4f7b Merge "Remove vcpu resource from extensible resource tracker" 2015-11-13 02:59:31 +00:00
Anne Gentle
17961c41a3 Rearranges to create new Compute API Guide
Uses openstackdocstheme to match other content

Has a dependent change in project-config also so that
file will build to developer.openstack.org/compute
at https://review.openstack.org/#/c/231000/

Change-Id: Ic060a1e79e4b2f8695cb788ff4df018e0cfd3286
2015-11-12 10:47:23 +00:00
Paul Murray
d3bece175b Remove vcpu resource from extensible resource tracker
This patch makes vcpu resource tracking explicit in the
resource tracker and removes the corresponding VCPU
resource plugin from the extensible resource tracker.

This is a first step towards removing the extensible
resource tracker in a future release. A follow-on
patch will add deprecation notices for the
extensible resource tracker.

DocImpact: default value of compute_resources has
changed to an empty list.

blueprint resource-objects
Change-Id: If4318ce1c942292ef041a0b5c800304544207cb4
2015-11-05 14:19:51 +00:00
Jenkins
76fe5bf548 Merge "Rm openstack/common/versionutils from setup.cfg" 2015-10-29 08:59:22 +00:00
John Garbutt
d3a4797241 Open Mitaka development
Bump pre-version in setup.cfg to formally open Mitaka development.
Liberty stable branch will be cut from the previous commit.

Change-Id: I7f4867a3168cf5a318438febed87c0b1510c86bd
2015-09-22 15:11:02 +01:00
Jenkins
09ee56cbba Merge "Expose keystoneclient's session and auth plugin loading parameters" 2015-09-16 08:25:24 +00:00
EdLeafe
28d2b0df5a Remove more 'v3' references from the code
This is part of the V3 cleanup effort. The 'ApiSampleTestBaseV3' class
has been renamed to 'ApiSampleTestBaseV21', and all references to it
updated. Also, all references to the 'nova.api.v3' extension namespace
have been renamed to 'nova.api.v21'. Finally, some code that used short
variable names like 'v1', 'v2', etc., has been updated to rename these
'vers1', 'vers2', to avoid confusion with the v3 issue.

Change-Id: I23eab21c7158ba319e060bd075ef25afc5365381
2015-09-08 13:56:05 +00:00
Davanum Srinivas
9095b364bd Expose keystoneclient's session and auth plugin loading parameters
In change id (I7b3b825737dde333c8d88019d814304cbefdbfc7) support
was added to be able to specify and use the standard session and
auth plugin helpers from keystoneclient to standardize the
options available for talking to neutron.

However, these config options do not show up when we generate
the sample configuration file. Jamie Lennox has details in his
blog as well:
http://www.jamielennox.net/blog/2015/02/17/loading-authentication-plugins/

Since there are many auth plugins, we generate config params for
a few common ones.

DocImpact

Closes-Bug: #1486590
Change-Id: Id6b3ff845c2388fa01b1d3b28093f5bdf27136ff
2015-09-05 16:27:02 +00:00
Aditi Rajagopal
28e7d6fcf9 Rm openstack/common/versionutils from setup.cfg
Versionutils graduated a while ago, and Nova was updated to use it in this
patch: Id0e483c662231f678bddff7ddf77cdb0b0e1a5db. This removes a reference
to openstack/common/versionutils that was missed.

Change-Id: I8d289120f99f24663537ffffe816283a98c5e511
2015-08-28 13:58:47 -05:00
Davanum Srinivas
9cd9e66d0a Add rootwrap daemon mode support
Add a configuration option 'use_rootwrap_daemon' to
switch on the rootwrap daemon mode support. This
option is switched off by default to keep the current
behavior as is.

The code honors the various options available in
processutils.execute() like 'attempts', 'delay_on_retry'
etc to ensure that we don't regress any current behavior.

DocImpact

Part of blueprint nova-rootwrap-daemon-mode

Depends-On: I80c7b9dd8e9e0f940aa4e54a95b241dfc40d3574
Change-Id: I57dc2efa39b86fa1fa20730ad70d056e87617c96
2015-08-21 10:34:30 -04:00
EdLeafe
a389c6fb50 Remove last of the plugins/v3 from unit tests
This is part of the v3 cleanup effort. The last remaining files in the
n/t/u/a/o/c/plugins/v3 directory have been moved to the base directory,
and all references to them have been updated to reflect the new paths.

Partial-Bug: #1462901
Change-Id: I38d97803b1a9caea98a1b043b2bc2ad774add3b3
2015-08-18 15:25:46 +08:00
EdLeafe
003c868da7 Move v2.1 code to the main compute directory - remove v3 step3
Move all the plugins/v3 code to the main compute directory.

Partial-Bug: #1462901
Change-Id: I7df413b76ff0a6610ccd3cb90137ec99b372d5ab
2015-08-13 09:58:47 +08:00
Matt Riedemann
8b24bf766d Set autodoc_index_modules=True so tox -e docs builds module docs again
Commit bd7e62f796fe951fd42c2edad56e252a0b7393c8 disabled the
autodoc_index_modules flag for building docs but it wasn't really
necessary, that change was just to get the module index out of the main
docs page.

We want to autodoc the modules so we can view the actual module index in
the tox -d docs build results, which also tells us if we have correct
ReST format in doc strings.

Notes
-----

1. Several doc string blocks have to be fixed as part of this to get
   the docs tox job to pass.
2. A docstring in vhdutilsv2 is updated to remove the math directive
   since that requires the sphinx.ext.pngmath extension which requires
   latex and dvipng packages from the distro - which is overkill for
   what the docstring was actually doing with the math directive.
3. We exclude autodoc for tests since we don't really care about
   docstrings on unit tests.
4. We exclude the nova.wsgi.nova-* modules since those won't build with
   autodoc since they can't be imported (there is no
   nova/wsgi/__init__.py module). We could arguably add the __init__.py
   but it's not really necessary for what those scripts are used for.
5. The sphinx.ext.ifconfig extension is removed since there are no docs
   that use the ifconfig directive.
6. Update the developer docs to explicitly point out that graphviz must
   be installed prior to running tox -e docs.
7. Hide doc/source/api/autoindex.rst from the toctree so that we don't
   regress the point of commit bd7e62f796fe951fd42c2edad56e252a0b7393c8.
8. unused_docs and exclude_trees options are removed from conf.py since
   they are deprecated in Sphinx 1.2.3:

   https://github.com/sphinx-doc/sphinx/blob/1.2.3/sphinx/config.py#L54
9. Fix imports for moved libvirt volume options.

Closes-Bug: #1471934

Change-Id: I946e2f89f2c9fc70e870faaf84e4a8b0fc703344
2015-07-30 17:11:47 -07:00
Jenkins
6a24bbeecd Merge "Switch to oslo.service library" 2015-07-22 04:50:24 +00:00
Jay Pipes
973f31212a Use stevedore for loading monitor extensions
The compute monitor plugins were being loaded using the nova.loadables
module. This patch uses the stevedore library to load monitor
extensions. We keep the same semantics as the previous loading
mechanism: we use the CONF.compute_monitors configuration option to
winnow the set of all monitor plugins, and we ensure that no two
monitors that return the same set of metrics will be loaded.

However, this patch deprecates the CONF.compute_available_monitors
configuration option, since stevedore and setuptools entry points now
allow a set of plugins to be specified without any further configuration
options.

Change-Id: I97bf8bcd43faf9f3fe40983497c2360233d5f599
Fixes-bug: 1468012
DocImpact: deprecates the CONF.compute_available_monitors option.
2015-07-13 15:23:52 -04:00
Davanum Srinivas
79b280479c Switch to oslo.service library
Modules eventlet_backdoor, loopingcall, periodic_task,
service, sslutils, systemd, threadgroup were removed
from nova. These modules were imported from oslo.service
library.

Co-Authored-By: Marian Horban <mhorban@mirantis.com>
Depends-On: I305cf53bad6213c151395e93d656b53a8a28e1db
Change-Id: Iaef67e16af3d69f845742f7bdcb43667bf1576ee
2015-07-11 02:54:42 +00:00
Jenkins
6f3448bdbf Merge "Use oslo-config-generator instead of generate_sample.sh" 2015-06-25 13:23:02 +00:00
Davanum Srinivas
390fab8da4 Use oslo-config-generator instead of generate_sample.sh
Oslo team is actively getting rid of the old style generator.py
in openstack/common/config. So we should switch to the newer
oslo-config-generator which is the way forward. For simplicity's
sake, i used one single list_opts in opts.py. However we can
split this up and add entrypoints in setup.cfg if we decide to
do that instead.

blueprint oslo-config-generator

Change-Id: Ib7c72af7be47df08983708ac6da0ce103518b78c
2015-06-18 22:00:18 +00:00
Doug Hellmann
b44c3d31dc Update version for Liberty
Update the version for Liberty, switching from date-based versioning
to pre-versioning using SemVer. See
http://lists.openstack.org/pipermail/openstack-dev/2015-May/065211.html
and
http://lists.openstack.org/pipermail/openstack-dev/2015-June/067082.html
for details.

Any references to future versions are updated to match the new
semver style versions.

Change-Id: I6a35fa0dda798fad93b804d00a46af80f08d475c
2015-06-18 06:49:22 -07:00
Thierry Carrez
0358c9afb5 Open Liberty development
Bump pre-version in setup.cfg to formally open Liberty development.
Kilo release branch will be cut from the previous commit.

Change-Id: I7cc3e0234cc320794551a78aa426fd14d6baf6f6
2015-04-07 10:24:39 +02:00
Chris Yeoh
45591b6da1 Disables pci plugin for v2.1 & microversions
The pci plugin was only ever merged into the v3 (now v2.1 microversions)
and never the v2 API. Since v2.1 i meant to be identical to v2 it should not
appear in v2 either.

This change disables the pci api functionality in v2.1. It will be renabled
soon after microversions is enabled using a microversion bump.

Related-Bug: 1426241
Partially implements blueprint v2-on-v3-api

Change-Id: Ifc1d6f24d5a637270154b996087a98b41133e014
2015-03-03 14:20:42 +10:30
Jenkins
3412d294ad Merge "Drop deprecated namespace for oslo.rootwrap" 2015-02-25 18:32:51 +00:00
Davanum Srinivas
0a95872e13 Remove backwards compat oslo.messaging entries from setup.cfg
Nuke unnecessary entries for messaging

Change-Id: I8da1c3c9378e95ecfec05b35096a56b1555ac7ce
2015-02-23 03:23:28 +00:00
Eugeniya Kudryashova
77ca9fdd83 Replace usage of LazyPluggable by stevedore driver
Stevedore lib support lazy loading, so this change replace
LazyPluggable class by stevedore extentions and remove it

Stevedore support usage of driver property since 0.4 release,
some of Openstack projects like glance is already using it.

Change-Id: I7d384a73861e18cac04e07f75abd60df7f183aa2
2015-02-17 14:49:48 +00:00
ChangBo Guo(gcb)
022882170b Drop deprecated namespace for oslo.rootwrap
The oslo team is recommending everyone to switch to the
non-namespaced versions of libraries.[1]
oslo.rootwrap suggests to use oslo_rootwrap.cmd:main.[2]

[1]https://blueprints.launchpad.net/oslo-incubator/+spec/drop-namespace-packages
[2]https://github.com/openstack/oslo.rootwrap#using
Change-Id: I2e9b72c77316c8d097e7e49ab09fcb18ac33078c
2015-02-13 07:05:47 +00:00
Chris Yeoh
9631e4836a Extract preserve ephemeral on rebuild from servers plugin
The preserve ephemeral on rebuild functionality was merged into the servers plugin
code. This should never have happened and the hook for handling extra parameters
for the rebuild api used instead (otherwise we end up with monster functions).

This patch splits the relevant bits out to their own plugin.

Partially implements bp v2-on-v3-api

Change-Id: I0f35f897b9470039d509a97e6513c6cc806169b4
2015-02-09 21:36:53 +10:30
Chris Yeoh
f1499e715d Add missing setup.cfg entry for os-user-data plugin
Although os-user-data has an entry in nova.api.v3.extensions.server.create
in setup.cfg it is missing one in the general nova.api.v3.extensions list.
Without an entry the plugin does not appear in the extension list so this
patch adds an entry for it.

Partially implements blueprint v2-on-v3-api

Change-Id: I13fa049539b07ff901b36ae18eca59fbb1354794
2015-02-05 17:15:54 +10:30
Chris Yeoh
39a5a736d0 Implement microversion support on api methods
Adds support for specifying api versioning information
on api methods and the infrastructure to route requests
to the correct method based on the request information.
The api_version decorator allows us to retain the same
method name for different implementations (versions) of
the API method (GET/PUT/POST, etc).

Note that currently the @api_version decorator must
be the first (outermost) decorator on an API method.
We should in future have at least a hacking rule to enforce
this but better would be to remove this restriction.

Partially Implements Blueprint api-microversions

Change-Id: Ifb6698c582d37284c42b9b81100a651fd8d1dd1a
2014-12-05 09:54:41 +08:00
Jenkins
289736bfcf Merge "Port virtual-interfaces plugin to v2.1(v3) API" 2014-12-02 07:01:28 +00:00
Jenkins
8425fbc01c Merge "Implement 'personality' plugin for V2.1" 2014-12-01 14:29:14 +00:00
Jenkins
1b3e99773e Merge "Port floating_ips extension to v2.1" 2014-12-01 12:57:15 +00:00
jichenjc
7ffdb2deaf Port virtual-interfaces plugin to v2.1(v3) API
Ports virtual-interfaces extension and adapts it to the
v2.1/v3 API framework. API behaviour is identical.

- unittest code modified to share testing with both v2/v2.1
- Adds expected error decorators for API methods

Partially implements blueprint v2-on-v3-api

Change-Id: Ic25ae83ecfaaa461b6ddd044e04af844d02dd6b7
2014-12-01 11:04:08 +08:00
Eli Qiao
9a47137f53 Port floating_ips extension to v2.1
This patch ports floating_ips extension from v2 to v2.1,
and have v2 unit test cases shared between v2.1 and v2.

Partially implements blueprint v2-on-v3-api

Change-Id: Ib06c0d6c7ff123f09a99ed94f4b0009695897602
2014-11-28 13:19:30 +08:00
Chris Yeoh
9d311d1545 Change definition of API_EXTENSION_NAMESPACE to method
Moves definition of API_EXTENSION_NAMESPACE to a method so we can
mock it for unittests. This will allow us to do much better
unittesting for the API framework including the new microversion
features. It will also allow us to cleanup other framework type
tests which currently rely on real plugins.

Partially implements blueprint api-microversions

Change-Id: I093e15483fc84d823c09c84a218e5eb14f1de607
2014-11-28 11:07:33 +11:00
ghanshyam
d99b308e6d Implement 'personality' plugin for V2.1
User can specify 'personality' attribute while server creation
& rebuild to inject files into server.

This patch implement this as separate plugin for V2.1 API.

Also define the schema and unit tests for the same.

Partially implements blueprint v2-on-v3-api

Change-Id: Ia0c527539af7fe33eba4999822476653e1b96bc6
2014-11-27 15:02:15 +09:00
Chris Yeoh
c82f5886ab Port v2 quota_classes extension to work in v2.1(v3) framework
Port v2 quota_classes extension and adapts it to the v2.1/v3 API
framework. API behaviour is identical with the exception that
there is no support for XML. Also

- unittest code modified to share existing testing with both
  v2/v2.1
- Adds expected error decorators for API methods
- Adds API samples

Partially implements blueprint v2-on-v3-api

Change-Id: I372e9940f499d3e2cf621a58eafa9502d4e14cea
2014-11-26 13:56:13 +10:30
Julien Danjou
a826880d01 Remove Python 2.6 classifier
Nova does not support Python 2.6 anymore starting with Kilo and might
not work correctly with it, so remove the classifier.

Change-Id: If60c60af9ae28ce91bdcc3f7f47c906ec8250dd1
2014-11-25 16:45:03 +01:00
Eli Qiao
0621c2507f Port assisted-volume-snapshots extension to v2.1
This patch ports assisted-volume-snapshots to v2.1 and make v2 and v2.1
share unit test cases.
This patch addes a schema to do the input validation for snapshots_create
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: I5b7be1de8ac2628a287897dcc5ca0eaf7a8957a2
2014-11-19 10:09:58 +08:00
ghanshyam
550f1fb07a Add 'instance-usage-audit-log' plugin for V2.1
This patch adds 'instance-usage-audit-log' plugin for V2.1 API.
Also implement the API sample tests and share the unit tests
between V2 & V2.1.

Partially implements blueprint v2-on-v3-api

Change-Id: I152d00fb4b12942515d5db54a7ec381279c31ccd
2014-11-13 14:38:25 +09:00
He Jie Xu
c7d9924a08 Port security-group-default-rules extension into v2.1
This patch port security-group-default-rules into v2.1.

This patch just move the v2 code into v2.1 and share the unittest. The other
v2.1 related fix and improvement will be addressed by subsequent patchset.

Partially implements blueprint v2-on-v3-api

Change-Id: I4d65993d6413160d2c7c2eb2ce0c3f66768e1a36
2014-10-28 22:02:27 +08:00
Eli Qiao
8b0e091577 Port floating_ip_dns extention to v2.1
This patch ports floating_ip_dns extention from v2 to v2.1,
and have v2 unit test cases shared between v2.1 and v2.
Partially implements blueprint v2-on-v3-api

Change-Id: Ia1316697c141fde2b431ba79aebae5986687a4fa
2014-10-24 13:42:46 +08:00
Jenkins
e53cb39c29 Merge "Port floating_ips_bulk extention to v2.1" 2014-10-24 01:10:34 +00:00
Jenkins
10d73a7531 Merge "Port fixed_ip extention to v2.1" 2014-10-23 11:58:32 +00:00