Commit Graph

406 Commits

Author SHA1 Message Date
Daniel P. Berrange e71e8c2a89 Pull NovaWebSocketProxy class out of nova-novncproxy binary
To allow sharing of proxy code between nova-novncproxy and
nova-spicehtml5proxy, pull the NovaWebSocketProxy class
out of nova-novncproxy into a new nova/console/websocketproxy.py
file

Adds previously missing websockify dep to pip-requires.

Blueprint: libvirt-spice
Change-Id: If1334256680e7075598f00ce153cf6f021cc720f
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-01-16 10:19:37 +00:00
James E. Blair 9576c6fdeb Revert "Use testr setuptools commands."
This reverts commit c945b71929
which caused the unit test command to always exit sucessfully.

Change-Id: I410cbc878675503f0ce6e50bddc4fd0552370c46
2013-01-14 14:05:50 -08:00
Jenkins 902d75b9b3 Merge "Use testr setuptools commands." 2013-01-14 06:26:24 +00:00
Jenkins 5d478f9606 Merge "Upgrade WebOb to 1.2.3" 2013-01-13 10:01:42 +00:00
Monty Taylor c945b71929 Use testr setuptools commands.
Replace the embedded shell scripts with setuptools commands provided by
upstream. Cleans up a few warnings that this cause tox to show.

Change-Id: I9eb47142eafb6ed038b358b94984462ca1632542
2013-01-12 13:33:42 -08:00
Jenkins f8ce2143ba Merge "Fix lintstack check for multi-patch reviews" 2013-01-12 10:13:33 +00:00
Mark McLoughlin ce27bca549 Try out a new nova.conf.sample format
The current format strikes me as fairly bizarre:

  - Having the help message after the option it's documenting seems
    backwards to me. Compare to the glance or swift samples.

  - Printing the type as e.g. "(StrOpt)" isn't very user friendly

  - We're creating a global pound symbol shortage

Switch to a new format that looks much more like a normal config file.

Change-Id: Ifba0a181667f3b81cad400f1cdd3812e388a9d64
2013-01-10 11:53:52 +00:00
Mark McLoughlin 8365e44856 Regenerate nova.conf.sample
Some pretty monstrous hacking in the extraction tool is required to
guess the group which options are in. It was pretty hacky to begin with
though.

Change-Id: Ie93dcfc82ab19af4e3cb7090bbb03d9efee83aa2
2013-01-10 11:53:51 +00:00
Sean Dague 1d350ba537 fix N402 on tools/
fix N402 (single line docstrings should end in a period)

Change-Id: I2086dfb33a6efeb6ef6edc6a326182b6deda2527
2013-01-09 15:47:22 -05:00
Jenkins fa4696ff03 Merge "fix N401 errors, stop ignoring all N4* errors" 2013-01-09 01:01:57 +00:00
Yun Mao 477722a849 Fix lintstack check for multi-patch reviews
Some patches in gerrit depend on other patches that are not yet
approved, i.e. not yet landed on master. In this patch lintstack
deals with these cases by currectly generating the right commit
to compare against to further reduce pylint errors.

Part of bp/lintstack

Change-Id: I77622a44949ad2b442d9f2cce6c807e1581830c7
2013-01-08 16:19:32 -05:00
Sean Dague 37bfdd3b38 fix N401 errors, stop ignoring all N4* errors
We had previously been ignoring all our custom N4xx hacking.py
errors. This fixes all the N401 errors "doc strings
should not start with a space" and reduces the ignore set down
to N402 only "single line docstrings should end with period".

It also fixes the N401 parser to catch only docstrings, and
not tripple quoted string blocks used later on in a function.

Clean up a few of the more crazy uses of """ in our code

Clean up additional funky comments to make indents a bit more
consistent, and pull in lines when possible.

Change-Id: I9040a1d2ca7efda83bd5e425b95d1408b5b63577
2013-01-07 21:39:58 -05:00
Doug Hellmann 4ff4edd600 Upgrade WebOb to 1.2.3
The version of WebOb being used in OpenStack was more than
1 year old. This change updates to the latest stable release.

Upgrading WebOb resolves a version conflict between OpenStack
and Pecan, the web framework used by the Ceilometer team for
version 2 of the ceilometer API.

Refer to http://docs.webob.org/en/latest/news.html
for the list of changes between 1.0.8 and 1.2.3.

bug 1092227

Change-Id: Ib5a005665a5b11198006ce2aa2432399a41fc3d9
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
2013-01-07 10:47:39 -05:00
Doug Hellmann 64bf6192da Make WebOb version specification more flexible
Change the WebOb version to >=1.0.8 as an temporary
measure to allow the actual version update to 1.2.3
to roll out across the projects one at a time without
breaking the integration tests.

Change-Id: Iea626ff758b352cc5cec2b2c9ab1a3dd3da53bf7
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
2013-01-07 10:47:25 -05:00
Dan Prince a2fd90aca2 Import cfg module in extract_opts.py.
Updates the tools/conf/extract_opts.py module so it
imports cfg again.

Fixes "global name 'cfg' is not defined" errors which occur
without it.

Change-Id: Idf7c2c5201c79e7aa359bc555306caadebcc18ce
2012-12-18 14:40:04 -05:00
Clark Boylan aef9802089 Replace fixtures.DetailStream with fixtures.StringStream.
Fixtures 0.3.12 adds StringStream as a successor to DetailStream (this
change was made for compatibility with python 3). Update Nova's tests to
use StringStream instead of DetailStream.

Change-Id: If697859a52f3a7db9dab38bd080b779bb3270287
2012-12-16 17:31:46 -08:00
Clark Boylan 4abc8cc64f Use testr to run nova unittests.
Convert nova from using nosetests to testr for its test runner. Some
tests had to be modified to get them to run properly under testr.

run_tests.sh has been updated to run testr instead of nosetests.

Coverage is collected by running subunit.run under coverage.py when the
coverage environment is selected.

Note that you will need to rebuild your virtualenvs as nose is being
removed from the dependency lists and is being replaced by testr. Tests
will run in different processes once this test is merged so you cannot
use test classes to pass information between tests. Each test should be
a proper independent unit. Additionally the -x and -d flags to
run_tests.sh have been removed as there are currently no decent
approximations for those functions.

Change-Id: I019ca098972ca749b195f59968cf21edd5ba9109
2012-12-14 14:22:20 -08:00
Jenkins 9202a8457a Merge "Port to argparse based cfg" 2012-12-12 23:30:43 +00:00
Jenkins 235239c97b Merge "Move zombie_instance_updated_at_window option" 2012-12-12 05:13:52 +00:00
Jenkins 83b104ad87 Merge "i18n raise Exception messages" 2012-12-11 17:45:46 +00:00
Mark McLoughlin 79ac64dd32 Move zombie_instance_updated_at_window option
The zombie_instance_updated_at_window option is only used in
vm_vdi_cleaner so declare it there.

blueprint: scope-config-opts
Change-Id: I8d95fbd858f8afe855c2b559dea6995497d8f682
2012-12-11 08:06:53 +00:00
Mark McLoughlin 5e09b2cab7 Port to argparse based cfg
Import latest cfg from oslo-incubator with these changes:

 Add deprecated --logdir common opt
 Add deprecated --logfile common opt.
 Allow nova and others to override some logging defaults
 Fixing the trim for ListOp when reading from config file
 Fix set_default() with boolean CLI options
 Improve cfg's argparse sub-parsers support
 Hide the GroupAttr conf and group attributes
 Fix regression with cfg CLI arguments
 Fix broken --help with CommonConfigOpts
 Fix ListOpt to trim whitespace
 updating sphinx documentation
 Don't reference argparse._StoreAction
 Fix minor coding style issue
 Remove ConfigCliParser class
 Add support for positional arguments
 Use stock argparse behaviour for optional args
 Use stock argparse --usage behaviour
 Use stock argparse --version behaviour
 Remove add_option() method
 Completely remove cfg's disable_interspersed_args()
 argparse support for cfg

The main cfg API change is that CONF() no longer returns the un-parsed
CLI arguments. To handle these args, you need to use the support for
positional arguments or sub-parsers.

Switching nova-manage to use sub-parser based CLI arguments means the
following changes in behaviour:

 - no more lazy matching of commands - e.g. 'nova-manage proj q' will
   no longer work. If we find out about common abbreviations used in
   peoples' scripts, we can easily add those.

 - the help output displayed if you run nova-manage without any args
   (or just a category) has changed

 - 'nova-manage version list' is no longer equivalent to
   'nova-manage version'

Change-Id: I19ef3a1c00e97af64d199e27cb1cdc5c63b46a82
2012-12-11 06:47:35 +00:00
Brian Lamar ee1b598ef1 Correctly init XenAPIDriver in vm_vdi_cleaner.py
Fixes bug 1088615

Change-Id: Iaf0569fd45ed180d141dc0367c547f014b7502e1
2012-12-10 17:24:47 -05:00
Chuck Short c454606ada i18n raise Exception messages
Provide i18n to some exceptions that were not
provided before.

Change-Id: Ia320ba5f12e82686c8ee7973a77f152eb4b02bd4
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2012-12-10 14:43:18 -06:00
Jenkins 994ff1fc74 Merge "Unpin lxml requirements" 2012-12-10 18:44:50 +00:00
Jenkins 734d9fb22b Merge "Add generic customization hooks via decorator." 2012-12-10 18:42:15 +00:00
Chuck Short 63f5839a19 Unpin lxml requirements
Ubuntu is using a much newer version of lxml so
we shouldn't lock the versions in our infrasctructure.

Change-Id: I688c0be196db526f220262e25afa79d84fcae632
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2012-12-08 15:32:35 -06:00
Jenkins 19470f4545 Merge "Update tools/flakes to work with pydoc" 2012-12-08 08:22:03 +00:00
Joe Gordon 41b95b3bdf Update tools/flakes to work with pydoc
Change-Id: Ib141553017aa88d6edb65b5d51c06740699a2480
2012-12-06 11:31:10 +02:00
Joe Gordon a44ace3196 Fix pep8 exclude logic for 1.3.3
* With pep8 1.3.3 the exclude logic monkey patch broke causing
  tools/hacking to run on openstack/common code
* Also add .git to exclude list

Fix bug 1086410

Change-Id: Ifc50ac1963c50c338432bbb4b1e15cdf58ed2128
2012-12-06 11:19:17 +02:00
Jenkins f354276930 Merge "Allow newer boto library versions" 2012-12-04 21:57:26 +00:00
Joe Gordon 65ee45c641 Add pyflakes option to tox
* Uses pyflakes wrapper to ignore gettext errors
* Based on: https://bugs.launchpad.net/pyflakes/+bug/844592

Change-Id: I4fd947176f5258f89f517acf5dda2ded4a2da15e
2012-12-04 11:53:29 +02:00
Attila Fazekas fb34f69ca1 Allow newer boto library versions
Change the boto dependency specification in pip-requires to just 'boto'
without version restriction, as it was before the build issue.

Change-Id: If6c317ffce867f9e544e47c5b0e4b1f2fe9f082f
2012-12-03 14:30:29 +01:00
Brian Elliott e937a53065 Add generic customization hooks via decorator.
Hooks add the ability to insert custom code around operations that
declare a named hook:

e.g.

@hooks.add_hooks('create_instance')
def create_instance(....):
   ....

The above hook allows Hook objects to be run 'pre' and 'post' the
execution of create_instance()

Hook objects are discovered via the setuptools entry point group
'nova.hooks'.

Change-Id: I3961df12ef415085de7459438967edacc34500c2
2012-11-30 20:47:53 +00:00
Jenkins a183ee749f Merge "Add keystoneclient to pip-requires" 2012-11-25 10:56:24 +00:00
Jenkins 4ff9b97723 Merge "Unpin amqplib and kombu requirements." 2012-11-22 09:27:11 +00:00
Chuck Short 560e5cd84e Pin pep8 to 1.3.3
Apart of making pep8 version standard across all openstack
projects.

With this change we ignore E712 since it is normal to use
"column == True" in sqlalchemy.

Change-Id: I73a162847a79558cb158112878033edf18039805
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2012-11-19 21:20:42 -06:00
Mark McLoughlin e237c86446 Use CONF.import_opt() for nova.config opts
The only reason for importing nova.config now is where one of the
options defined in that file is needed. Rather than importing
nova.config using an import statement, use CONF.import_opt() so
that it is clear which option we actually require.

In future, we will move many options out of nova.config so many
of these import_opt() calls will either go away or cause a module
other than nova.config to be imported.

Change-Id: I0646efddecdf2530903afd50c1f4364cb1d5dce1
2012-11-20 00:04:49 +00:00
Mark McLoughlin 94d87bce21 Remove nova.config.CONF
Modules import nova.config for two reasons right now - firstly, to
reference nova.config.CONF and, secondly, if they use one of the
options defined in nova.config.

Often modules import nova.openstack.common.cfg and nova.config
which is a bit pointless since they could just use cfg.CONF if
they just want to nova.config in order to reference CONF.

Let's just use cfg.CONF everywhere and we can explicitly state
where we actually require options defined in nova.config.

Change-Id: Ie4184a74e3e78c99658becb18dce1c2087e450bb
2012-11-20 00:00:21 +00:00
Joe Gordon 8ac7053c7c Add keystoneclient to pip-requires
As of I788300449e37ba1732f6482ebce5f480a2c14a41, we pull the auth_token
middleware from keystoneclient. (added to keystoneclient in version 0.2.0)

Change-Id: Ide0d562d96e5e426f9c7e532251efd57a0964f11
2012-11-19 14:23:21 -08:00
Mark McLoughlin 6e92a67fc3 Remove nova.flags
Now that options have all moved from nova.flags to nova.config, we can
safely remove the nova.flags imports and replace them with nova.config
imports.

Change-Id: Ic077a72dd6419bbf1e1babe71acfa43c4e8b55c8
2012-11-17 16:30:03 +00:00
Vishvananda Ishaya e1b153d419 Unpin amqplib and kombu requirements.
Ubuntu is using a much newer version of these libraries so we
shouldn't lock the versions in our infrasctructure. Using a > 1.0
of amqplib is particularly useful as it turns on keepalives by
default.

Change-Id: I956e70e0c39c76d1632fb708cd78aeb51adbd250
2012-11-14 11:02:46 -08:00
Robert Collins 18b9c7f29b Isolate tests from the environment variable http_proxy.
This fixes bug 1078548.

This is done by adding a dependency on the fixtures library, which has
dedicated code for just this sort of thing, and using it in the base class.

Change-Id: I841fbf912b1a3ab43ca8c52c779d930aaf4a0e96
2012-11-14 07:03:25 +00:00
Dan Smith 9471282626 Ban db import from nova/virt
This makes hacking.py complain if someone adds something like:

  from nova import db

into any of the files in nova/virt/* (aside from the fake.py file).
It also removes the rest of the dangling db imports that are no
longer needed.

Yay!

Change-Id: Iba3d53b87e65e33a55f8e5033b5d1d33b28d12f7
2012-11-12 12:37:33 -08:00
Jenkins ee3d2a1908 Merge "Switch from FLAGS to CONF in misc modules" 2012-11-07 05:41:57 +00:00
Jenkins 52cf3cae69 Merge "Remove flags.DECLARE" 2012-11-06 19:12:46 +00:00
Jenkins 79faed4832 Merge "move python-cinderclient to pip-requires" 2012-11-06 11:00:37 +00:00
Mark McLoughlin 637e805634 Switch from FLAGS to CONF in misc modules
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
2012-11-04 21:46:35 +00:00
Mark McLoughlin 8ce58defbe Remove flags.DECLARE
The cfg.ConfigOpts class has an equivalent method, so lets use that.

Change-Id: I5860230336d00d7531a0ffd255c766ff77661625
2012-11-04 21:38:38 +00:00
Mark McLoughlin efede80046 Move parse_args to nova.config
The flags module will eventually be removed and this is a first step
towards that.

Change-Id: I729b08900e53e2ae6db10633dcff3be59720fa6f
2012-11-04 21:37:39 +00:00