analyze_opts is a tool to help clean out a nova.conf file by checking
for unused and default values set in your nova.conf
Change-Id: I01fff134f8906bff929c55bea8c152653d3e9760
Mechanical translation of the deprecated
except x,y: construct with except x as y:
The latter works with any Python >= 2.6.
Add Hacking check.
Change-Id: I845829d97d379c1cd9b3a77e7e5786586f263b64
The dynamic nature of our object model is going to cause lots of
heartache for pylint, especially in the actual definitions. This
just excludes that whole directory from pylint's view, which will
limit the heartache to only everywhere objects are actually used.
Related to blueprint unified-object-model
Change-Id: I7f1a4b10b8a5098aab2ab2e8ea5da15ec43f0e2e
This failure in colorizier was hidding the actual error
in the tests. If we ran enough tests it also became difficult
to see which test had actually failed.
Fixes: bug 1183602
Change-Id: I806da8f13040b38258de7f3e0fa7b62700bdcead
Rename tools/pip-requires to requirements.txt and tools/test-requires
to test-requirements.txt. These are standard files, and tools in the
general world are growing intelligence about them.
Change-Id: I68ece8406fb1d4e082a42db8e76e17b1aaa7e775
Fixes: bug #1179008
Fixes bug 1182271.
* tools/pip-requires: The requests library released 1.2.1 today
which brings in sphinx as a new dependency. One of sphinx's
transitive dependencies is on a newer version of jinja than is
provided in the python-jinja2 package on CentOS 6, and since nova's
unit tests allow site-packages in the venv for libvirt support this
cap is needed so that gate-nova-python26 will continue to work.
Because requests is actually a dependency of python-cinderclient but
is only breaking nova's unit tests, it has to be added and come
before python-cinderclient in the pip-requires list. A separate
change has been proposed to openstack/requirements which will need
to merge first. https://review.openstack.org/29850
Change-Id: Ia198192d6231f71272d3aa4f5942828a45d86ceb
Remove a bunch of local custom scripts. Replace with configurable
external tools.
Use local hacking checks for nova specifics.
Change-Id: I75a01375ba0ec36d2ff05abc47abe0a3f225eda5
Sync some trivial Python 3 compatibility and pep8 improvements from oslo.
I just want to have this in sync so that pulling in a feature I'm working
on comes in without unrelated changes
Change-Id: I13fcb0bd538a153b90acf0b18497e335a64dc9d1
Declarative approach to packaging, obviates the need for copying files.
Also, removes the need for setup.py to import files from the nova
module.
./run_tests.sh now ensure's that nova.egg-info/entry_points.txt is up to
date before running tests.
Change-Id: I7b7a18e065a62491ade54fbed5d8400db1d4e6c7
Just changes openstack.common to use the new print statements.
This is in preparation for another sync coming shortly for the
scheduler library.
Change-Id: I17a86ef87f3253d6bb756cbd40a3ff5df9be23ff
These are all minor changes bringing nova up to commit
90e83530d4dc49d570fa05ea63a93805717dcfa0 in oslo-incubator.
Change-Id: I0291eed31b1e650da211fe2a8b65fad0c35c9053
The existing code only set `other_config` on a VDI when it was created using
`create_vdi`. This patch updates the code so that `other_config` is also set
when a VDI is created from a dom0 plugin or during a migration.
Also included is a one-time script to set the other_config for existing
VDIs that were affected by this bug.
Fixes bug 1162029
Change-Id: I4fa856754487f77ce9c8e39d45eee7ea5187123e
Tests in oslo-incubator now need the horrendous hack to workaround an
issue with eventlet on RHEL6. We've moved the patch_tox_venv tool
and redhat-eventlet.patch into oslo-incubator, so add them to
openstack-common.conf.
Change-Id: I1acfec282b64d7582144b155119bedb1741db2f7
Ran the oslo-incubator sync script and brought across only the files
that have small and safe changes.
Change-Id: I41b400c189e52a2e7f642a03ad143d821aaa807c
importing some nova modules expects _() to be defined, so lets define it
before we start importing them.
Change-Id: I7f951a24c19a53434c090cd2c01eded77c703943
* Clean up to support pydoc
* Support -h
* Make it actually work
* Improve docstrings
* Add copyright
Change-Id: I977df71e8213e39e9eebf9cc56b2dd7625959870
A number of places tried to use undefined names. This included one
powervm test which turned out to not check anything at all (used
fake implementation of tested method) and needed to be moved.
Make sure that this class of errors causes run_pep8 failure in the
future.
Change-Id: I82ccb63bbc6f6d2b20ecb7f06b2fc22f8f034a33
As part of the move of plugins to entrypoints, take advantage of the
entrypoints based console scripts, which will make our command line scripts
available for unittesting.
Part of blueprint entrypoints-plugins
Co-authored-by: Michael Still <mikal@stillhq.com>
Change-Id: I5f17348b7b3cc896c92263dd518abb128757d81f
The gettext.install() function installs a builtin _() function which
translates a string in the translation domain supplied to the install()
function. If gettext.install() is called multiple times, it's the last
call to the function which wins and the last supplied translation domain
which is used e.g.
>>> import os
>>> os.environ['LANG'] = 'ja.UTF-8'
>>> import gettext
>>> gettext.install('keystone', unicode=1, localedir='/opt/stack/keystone/keystone/locale')
>>> print _('Invalid syslog facility')
無効な syslog ファシリティ
>>> gettext.install('nova', unicode=1, localedir='/opt/stack/nova/nova/locale')
>>> print _('Invalid syslog facility')
Invalid syslog facility
Usually this function is called early on in a toplevel script and we
assume that no other code will call it and override the installed _().
However, in Nova, we have taken a shortcut to avoid having to call it
explicitly from each script and instead call it from nova/__init__.py.
This shortcut would be perfectly fine if we were absolutely sure that
nova modules would never be imported from another program. It's probably
quite incorrect for a program to use nova code (indeed, if we wanted to
support this, Nova code shouldn't use the default _() function) but
nevertheless there are some corner cases where it happens. For example,
the keystoneclient auth_token middleware tries to import cfg from
nova.openstack.common and this in turn causes gettext.install('nova')
in other projects like glance or quantum.
To avoid any doubt here, let's just rip out the shortcut and always
call gettext.install() from the top-level script.
Change-Id: If4125d6bcbde63df95de129ac5c83b4a6d6f130a
This was actually a pretty simple fix. When I switched the base
test result class to testtools I lost the methods that were
printing out the errors at the end. This adds the (colorized!)
methods so errors print successfully.
fixes bug 1159116
Change-Id: Ib09d7e18ddf27015ff735a30137421d865382359
Updates tools/colorizer to account for the fact that Python
2.6 doesn't support resultclass.
This fixes issue in trying to use run_tests.sh on distributions
which use python 2.6.
Fixes LP Bug #1158940
Change-Id: I763cd9c7a4b5ec5baaad3a3d9ee96e6e3cd13b3e
This issue is discussed at https://github.com/drkjam/netaddr/issues/2.
The bug in netaddr was fixed in release 0.7.6 on 13th Sep 2011.
Change-Id: Iea75a30963a09f9b0dd94138460bf041ab98fc66
Fixes: bug #1157058
Fixes bug #1128256
oslo.config has now been released to PyPI in time for Grizzly RC1 so
we can switch to using it directly.
Change-Id: I655f831718ae5f4e25e941ee206fe195214a9a91
This was just released and it is broken, stalling our gates. When
attempting to install it, we get:
"error: can't copy 'include/util.js': doesn't exist or not a regular
file"
Change-Id: I9d93bff92cc4a9d837382acce78bff587f52fb99
0.7.10 has been released and is compatible with 0.7.x. Instead
of pinning to 0.7.9, simply pin to 0.7.x to avoid SQLAlchemy 0.8
Change-Id: Iea57598698b4faf906e82a2974497221d07f4d16
This patch updates tools/pip-requires to use the python-quantumclient 2.2
It also limits the version to <3.0.0 to prevent breaking something accidently
when 3.0.0 is released.
Fixes bug 1152695
Change-Id: Ic47deccac1df5a1b6b5171f1f7d80b250b57ebc9
In order to support running unit tests on RHEL 6.x we need to patch
eventlet with contrib/redhat-eventlet.patch. We already
have support for this in the tools/install_venv_common.py but we need
to make a couple changes to allow tox to consume this:
1) Sync in the latest intall_venv_common.py from oslo. This changes
patch to use the -N option (ignore already applied patches) and makes
it safe to call the patching function more than once.
2) Add a new patch_tox_venv.py script in tools.
3) Update tox.ini to call patch_tox_venv.py before it runs tests and
coverage.
Change-Id: I3e2b07c3f718e4aede5c5f231ff0cdb7721ec885
The nova gate should recommend 50 characters or less for a git commit
but actually enforce 72 characters.
This patch changes the hacking.rst docs to indicate the actual limit
is 72 characters rather then 50 characters.
Change-Id: I47f1f1f1007f5744bf1fef419df7e033803b4a53
Fixes: Bug #1144840
Fixes bug: 1140310
The oslo-config dependency referenced in pip-requires should be updated to
the latest version to include support for "deprecated_group".
This is needed to move specific driver options from the DEFAULT group w/o
losing backwards compatibility.
Change-Id: I5d18a5ee704a1f781c8acd6f903b0e3ca07bc070
Fix generate_sample.sh script so that we include options from the bin/
scripts too. In order to make this work, sync a zmq-receive fix from
oslo-incubator to delay parsing its config file.
Change-Id: Ia3f9083b2ebc16425dbad8a2a55c2d45f1ff2be3