There was only one sub-module in 'nova.common' but its presence
interferes with tab complete for the majority of people that want
'nova/compute'. Just move that sub-module to its own top-level module
and be done.
Change-Id: Iee886d915577f347e1ee4f54133ae0f87ae75841
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Set_defautls has been added into oslo.middleware, so
we use it to overrive the configuration defaults.
Change-Id: I9696ad8210a0ee4fee6c0f78be777a5939b221a4
Signed-off-by: Chuck Short <chuck.short@canonical.com>
This patch makes use of oslo.config's genconfig hooks to add
nova-specific default config values to the generated configuration.
It also adds this same method to nova's configuration parsing logic,
to ensure that these default values are also the ones used at runtime.
Closes-bug: 1551836
Change-Id: Ic799aea89f681ef8626e996f0357ade388f76ca9
Force console auth service to flush all tokens
associated with an instance when it is deleted.
This will fix bug 1125378, where the console for
the wrong instance can be connected to via the
console if the correct circumstances occur. This
change also adds a call to validate the token
when it is used. This check will ensure that all
tokens are valid for their target instances.
Tokens can become scrambled when a compute node is
restarted, because the virt driver may not
assign ports in the same way.
Change-Id: I0d83ec6c4dbfef1af912a200ee15f8052f72da96
fixes: bug 1125378
The cfg API is now available via the oslo-config library, so switch to
it and remove the copied-and-pasted version.
Add the 2013.1b4 tarball to tools/pip-requires - this will be changed
to 'oslo-config>=2013.1' when oslo-config is published to pypi. This
will happen in time for grizzly final.
Add dependency_links to setup.py so that oslo-config can be installed
from the tarball URL specified in pip-requires.
Remove the 'deps = pep8==1.3.3' from tox.ini as it means all the other
deps get installed with easy_install which can't install oslo-config
from the URL.
Make tools/hacking.py include oslo in IMPORT_EXCEPTIONS like it already
does for paste. It turns out imp.find_module() doesn't correct handle
namespace packages.
Retain dummy cfg.py file until keystoneclient middleware has been
updated (I18c450174277c8e2d15ed93879da6cd92074c27a).
Change-Id: I4815aeb8a9341a31a250e920157f15ee15cfc5bc
Bring in the new database code from oslo.
Uses get_session() from oslo as well as changing NovaBase to derive from
a common class.
Remove test_sqlalchemy.py now that this code is test in oslo.
Implements blueprint db-common.
Change-Id: I090754981c871250dd981cbbe1a08e7181440120
Add a factory function to nova.common.memorycache which consolidates
the code to choose between real or fake memcache. This then means that
memcached_servers is used in just one place and we can move the config
option there.
blueprint: scope-config-opts
Change-Id: I67c191e0db58364eda4162b9e881606063509b9d
Instead of using the copy of eventlet_backdoor in nova.common
this switches over to the synced version from oslo.
Change-Id: Ice2e38b9da66b34e19f04af0a99bcdc2cb5b5cd3
Signed-off-by: Matthew Treinish <treinish@linux.vnet.ibm.com>
This adds an rpc call for compute and network that will return
the eventlet_backdoor port for the service.
Change-Id: I95fdb5ca9bce9f3128300e3b5601fb2b2fc5e82f
Signed-off-by: Matthew Treinish <treinish@linux.vnet.ibm.com>
Use the global CONF variable instead of FLAGS. This is purely a cleanup
since FLAGS is already just another reference to CONF.
We leave the nova.flags imports until a later cleanup commit since
removing them may cause unpredictable problems due to config options not
being registered.
Change-Id: Ib110ba8d1837780e90b0d3fe13f8e6b68ed15f65
the nova common deprecated util is now part of openstack-common
log class as a deprecate method. Sync openstack-common and remove
nova common util. All the deprecated pieces from folsom appear
to have already been removed, so no additional code changes needed
for this.
Change-Id: I9cbd6a67c30567cd7002e8e7fec93cfc209787fc
Updates Nova's deprecated warn function so that we only log
messages about deprecated config options once.
The motivation for this change is to cut down the log file noise
when deprecated config code gets called more than once.
Change-Id: If8919817330dc9461a0472fea982d43c78a86f66
provide a convenience method for indicating in code that a config
option the operateor will have to deal with exists in their environment.
Change-Id: I17b0c120d54b1db75c6bb29d107e4a15a5202e76
Fixes bug 1010236
Implement a new sys.displayhook that doesn't overwrite __builtin__._
that was set by gettext
Change-Id: Id3c0a331eb6f98240fe1e4d0b083c72e28f99c53
This provides a FLAG to turn on Eventlet's builtin backdoor server which
allows you to connect over telnet and receive a Python prompt (which is
immensely helpful for debugging running systems).
Fixes bug 1000366
Change-Id: I779247a0796d34ba2a5478436d85b30ba76c4a01
* don't load every possible answer, only do what is needed
* cache instance data for a given address for a 15 seconds
using either memcache or fake memcache (in-memory).
This means only a single queue/db lookup for multiple calls
to metadata service
* add cache expirey to fake memcache (don't grow forever)
and move it to nova.common.memorycache
Addresses Bug #851159
Change-Id: Icf794156e055b18915b8b5be9ba2ab97d2338bbe
blueprint sphinx-doc-cleanup
bug 945160
- Correct parameter declarations, list formatting, cross-references, etc.
- We don't need "let" in generate_autodoc_index.sh since we aren't doing math.
- Change conf.py to not prefix class and function names with full namespace
in generated output to save width on the screen.
Change-Id: I9adc8681951913fd291d03e7142146e9d46841df
Move it here so that it can be kept in sync with openstack-common using
the new update.py script for code in openstack-common's incubation area.
See here for more details:
http://wiki.openstack.org/CommonLibrary#Incubation
Note: this commit just moves the existing code in Nova with no other
changes. A subsequent commit will sync it with latest openstack-common
so that it is easier see the new changes.
Change-Id: If88d678b1b9bad3d37117de7f7159d7fea8ab4c8
Update the default policy brain so that role checks ignore case.
Fixes an issue where roles in keystone didn't exactly match the
case of the role as specified in policy.json.
Fixes LP Bug #922660.
Change-Id: I05792755c9293e4dd80d642cb8eef6b0adda2ed4
* Moves openstack/v2 directory to compute and fixes tests accordingly
* Moves some code from api/openstack/compute to shared location, for use by volume api
* Implements basic volume functionality for types, volumes, and snapshots
* Changes service name from osapi to osapi_compute (and adds osapi_volume)
* Renames nova-api-os to nova-api-os-compute, adds nove-api-os-volume
* Separate extension mechanism for compute and volume
** Removes flag osapi_extension and replaces with osapi_compute_extension and osapi_volume_extension
* Updates the paste config
* Fixes setup.py to include nova-os-api-compute and nova-os-api-volume
* Fix bug in volume version code that occurred as result of trunk merge
* Update integrated/test_volumes.py to use new endpoint
Change-Id: I4c2e57c3cafd4e1a9e2ff3ce201c8cf28326afcd
* Second step of blueprint interim-nova-authz-service
* Adds policy.json to define policy
* Add nova.policy.wrap_enforce decorator
* wrap majority of compute api functions with wrap_enforce
Change-Id: If6702873db3249921f931a42e889ee7d0338e4b8
* First step of blueprint interim-nova-authz-service
* Common policy engine that can be used by other projects
* Nova specific policy engine that uses common policy
* Policy file can be generated by external tool (dashboard)
* Ultimately, policies will be requested from a service
Change-Id: Icaf934037e790bde6ce2346746ce38b11134423b
Fixes bug #910295
The None, True, and False values are singletons.
All variable *comparisons* to singletons should use 'is' or 'is not'.
All variable *evaluations* to boolean should use 'if' or 'if not'.
"== None", "== True", "== False", and "!= None" comparisons in sqlalchemy's
where(), or_(), filter(), and_(), and select() functions should not be changed.
Incorrect comparisons or evaluations in comments were not changed.
Change-Id: I087f0883bf115b5fe714ccfda86a794b9b2a87f7
Fixes bug #910763
According to PEP8,
- Object type comparisons should always use isinstance() instead
of comparing types directly.
Yes: if isinstance(obj, int):
No: if type(obj) is type(1):
When checking if an object is a string, keep in mind that it might be a
unicode string too! In Python 2.3, str and unicode have a common base
class, basestring, so you can do:
if isinstance(obj, basestring):
Change-Id: I7c0fdecf99872f5b8f72b2c2ed4f5c539c33def1
As discussed on the mailing list and described here:
http://wiki.openstack.org/CommonConfigModule
The module implements an API for defining configuration options and
reading values for those options that a user may have set in a config
file or on the command line.
The module will be part of openstack-common and glance will consume
it from there once openstack-common makes a release with an API
compatibility commitment.
Change-Id: Ib604c3de75d9066cd913c2de3007024b1f5ec9f8