376 Commits

Author SHA1 Message Date
Joe Gordon
41b95b3bdf Update tools/flakes to work with pydoc
Change-Id: Ib141553017aa88d6edb65b5d51c06740699a2480
2012-12-06 11:31:10 +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
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
Sean Dague
9e03eab188 move python-cinderclient to pip-requires
python-cinderclient is now actually a requirement, move
this from test-requires to pip-requires to reflect that.

Fixes bug #1074085

Change-Id: Iea6c58faab2462d137049d690d58d951bd4e2c9e
2012-11-02 07:53:57 -04:00
Chris Yeoh
117db792b8 Force earlier version of sqlalchemy
Set the version of sqlalchemy to be earlier than the 0.8 beta as it
is incompatible with the latest available sqlalchemy-migrate and as
a result run_tests.sh does not run any tests.

Change-Id: I9c5515b76d35e4999f81d71e82f818685efe54ea
2012-10-31 23:28:46 +10:30
Joe Gordon
f82e765edb Remove extra print line in hacking.py
Change-Id: If3d5da52a55c1834f4dfa49d817010d314d1403a
2012-10-29 13:15:40 -07:00
Monty Taylor
c14bb9a677 Use testtools as the base testcase class.
As a step towards parallelizing the test runs, use testtools as the
base unittest test case class. In this patch, it has caused us to catch
places where setUp and tearDown were not being chained properly.
Additionally, we get to remove our custom skip decorators and a few
backported assert calls.

Part of blueprint grizzly-testtools

Change-Id: Ia2025e1b7191b65130b85b30ce6239d5c431c8ba
2012-10-29 06:27:54 +01:00
Joe Gordon
fcefe62547 Change hacking.py N306 to use logical_lines
Only logical lines (does not include comments) should be checked for
alphabetical import order.  This patch changes N306
(imports not in alphabetical order) to run on logical lines not physical lines.

Fixes bug 1071849

Change-Id: Ib2cb92f9eb82aeed1ff5879d3e38c8961b4f06cc
2012-10-26 20:40:36 +00:00
Dan Smith
88f252a3d4 Fix hacking.py naivete regarding lines that look like imports
Right now, any line that starts with "from" (after whitespace
removal) is considered an import line. That assumption leads to
some unsavory parsing and crashing if the line doesn't match
the expected format.

This patch checks to make sure that the word "import" is in the line
as well as starting with "from", which at least gets us a bit closer
to a reasonable assumption.

Fixes bug 1071849

Change-Id: Iab666fcd04a9aaa3a490737a173ee3189b9b8329
2012-10-26 11:39:46 -07:00
Jenkins
bd38d1eb80 Merge "Change install_venv to use setup.py develop." 2012-10-24 19:18:01 +00:00
Monty Taylor
36a8fe04c4 Change install_venv to use setup.py develop.
With the potential use of entry points, code from the current tree needs to
be installed into a venv created by install_venv.py via setup.py develop.
This will ensure that the appropriate meta-data and paths are set in the
virtualenv.

Change-Id: I1ca15959c98a24629d2f5b2c385296c4e2fe770c
2012-10-17 12:13:20 -07:00
Sulochan Acharya
3a0102668c Fixes syntax error in nova.tools.esx.guest_tools.py
Fixes syntax error in nova.tools.esx.guest_tools.py.
Fixes bug1067840.

Change-Id: Ib08e03a2be05f02c30e9578fa8773f1171a8b330
2012-10-17 14:04:01 -05:00
Jenkins
321868a2e0 Merge "Proxy floating IP calls to quantum" 2012-10-10 23:42:09 +00:00
Jenkins
a54ced97f9 Merge "Update tools hacking for pep8 1.2 and beyond" 2012-10-10 19:53:50 +00:00
Akihiro MOTOKI
7948b7a572 Proxy floating IP calls to quantum
Fixes bug 1023169. Also fixes bug 1031119.

In Folsom, floating IP support is moved to Quantum. By this commit floating IP
calls to nova are proxied to Quantum and nova command can be used to manage
floating IPs.

pip-requires is also updated and now requires python-quantumclient >=2.1 which
supports floating IP feature in Quantum.

Change-Id: I2c32948a8fe291601216dc62d546da64a8fb8428
2012-10-09 15:28:26 +09:00
Vishvananda Ishaya
8ca9ba946e Remove dependency on python-ldap for tests
We have a fake ldap implementation for testing, but the tests still
fail if ldap isn't installed. This modifies the usage of ldap in
the LdapDNS tests to stub the module before attempting to import
it. This allows us to test without having python-ldap installed.

It removes the unneccessary FakeLdapDNS in favor of using the real
LdapDNS with the module stubbed out. It also removes the dependency
on python-ldap from test-requires.

Change-Id: Ifbe09e16436afa6999dcb7385763492b0026556c
2012-10-02 16:01:49 -07:00
Joe Gordon
fbc4568eb0 Update tools hacking for pep8 1.2 and beyond
* b9f72b1601
  broke tools/hacking.py
* Upgrade pep8 to 1.2 and disable the following new tests: E12,E711,E712,E721,E502

Change-Id: I32a8808c6c9cccfedcc4d2a26649333aca1cd713
2012-10-01 16:33:35 -07:00
James E. Blair
6e9f3bb10a Revert "Add full test environment."
This reverts commit 30e513309fe25af358b4d9ed47da2c7574fc0f06.

The python mysql module was removed from test-requires in favor
of test-options, but the work to actually use that was never
completed.  Revert the change so that mysql testing is actually
performed again.

Change-Id: Iaf35811cc748272229260f2dab95520995a69b44
2012-09-28 13:04:53 -07:00
Eoghan Glynn
a93ad200c2 Loosen anyjson dependency to avoid clash with ceilometer
Ceilometer depends on anyjson 0.3.1, whereas nova requires
exacly 0.2.4.

The net effect is a devstack with ceilometer installed will
appear to work initially, as ceilometer is sparked up after
nova. However, if any of the nova services are subsequently
restarted, they fail with:

  pkg_resources.DistributionNotFound: anyjson==0.2.4

By simply allowing the nova anyjson dependency version to
be greater than as opposed to an exact match, we can avoid
the clash.

Change-Id: I21737a2504705f15dd16e6762b44624678177442
2012-09-27 09:24:39 +01:00
Jenkins
be3c54ee0d Merge "Replaced default hostname function from gethostname to getfqdn" 2012-09-26 23:13:50 +00:00
Vishvananda Ishaya
02facfb9d4 Bump the version of SQLAlchemy in pip-requires
Fixes bug 1057145

Change-Id: I5960b28f4c4feb3f68b21ae09c6d7de0f098b8e5
2012-09-26 20:45:00 +00:00
Luis Fernandez Alvarez
5dd1553cca Replaced default hostname function from gethostname to getfqdn
Fixes bug 1055503

The standard behaviour of the 'gethostname' function in Python differs from
Linux to Windows. A common Linux configuration returns the FQDN, while a
Windows one returns only the host name.

To resolve inconsistent node naming in deployments that mix windows and
Linux, it is proposed to use 'getfqdn' as default function instead of
'gethostname'. This is function is more predictable in all cases.

Change-Id: I3164d9a36df2b8484bbf9a57879c31fa0e342503
2012-09-26 13:43:16 +02:00
Yaguang Tang
821271113d Move fakeldap.py from auth dir to tests.
Also removes the auth  dir from nova.
fix bug lp:1054848

Change-Id: I9c2710c9789ff8413bc80044eba94f3a851d8544
2012-09-23 16:47:26 +08:00
Jenkins
2934799fda Merge "Added script to find unused config options." 2012-09-19 19:47:54 +00:00
Yosef Berman
c5d724ff57 Added script to find unused config options.
The script analyze_opts.py is added to identify unused options
and options which are set to default values in the nova.conf file.

Change-Id: Iec42781a56f73b7d0960bdd569f5dd06edbb88df
2012-09-18 13:36:03 -07:00
Jenkins
677f6f6873 Merge "Add flag cinder_endpoint_template to volume.cinder" 2012-09-13 02:12:11 +00:00
Clay Gerrard
0fa231f718 Add flag cinder_endpoint_template to volume.cinder
Add optional flag to allow cinder endpoint to be defined by flag rather
than extracted from the request context's service catalog.  No change to
default behavior.

This flag allows deployers to use a seperate management endpoint for
cinder which compute can use exclusively to send messages to cinder, or
just use an auth system that doesn't add/forward the catalog along with
the request (e.g. noauth).

Add python-cinderclient to tools/test-requires

fix lp bug #1048798

Change-Id: Icb416bf4df2a6e37024f1fbc866006d46d30bcf2
2012-09-10 19:52:09 -05:00
Andrew Laski
4599261d63 More specific lxml versions in tools/pip-requires
Changed lxml version in tools/pip-requires from >=2.3,<3 to
>=2.3,<2.3.5.  pip was apparently accepting 3.0alpha as a <3 requirement
but the ordering of elements changes in that version.  Some of the
libvirt tests would pass with lxml 3.0alpha but fail with any 2.3.x
version.  The tests now pass with any version of lxml within the range
specified.

Change-Id: I2d84d32f1bf6fba2c6dbe05799a284a44d4c39d8
2012-09-10 18:58:26 -04:00
Jenkins
2e4c232793 Merge "Nail the pip requirement at 1.1." 2012-09-10 17:03:51 +00:00
Andrew Laski
ccc0bfb3e6 Set install_requires in setup.py.
Updates setup.py to set install_requires using parse_requirements from
openstack-common.  This allows DevStack to install nova requirements, as
currently they are not handled.

Also relaxes the version requirement for lxml to >=2.3,<3.  This allows
DevStack to install nova requirements without needing to install lxml
over the installed python-xml system package, currently 2.3.2.

Change-Id: Iccebf9604ba5c6fcacb4c5fa5004f9fcb08944f3
2012-09-07 17:47:24 -04:00
Dan Prince
4fc05bff1f Nail the pip requirement at 1.1.
The most recent version of pip (1.2.1 as of a couple days ago) fails
to install the required Nova .venv packages. Nailing the installed
pip version when using run_tests.sh seems like a reasonable solution
to this issue.

Fixes LP Bug #1047120.

Change-Id: Ic947c04603cf9423c0cf2835351785d4fe795c4b
2012-09-07 12:48:40 -04:00
Vishvananda Ishaya
d20b95ab06 Update requires to glanceclient >=0.5.0
Change-Id: If788b94a142f469b5ce47c49a4dcdb05f1455cce
2012-08-29 13:50:31 -07:00
Jenkins
2f2516f4c2 Merge "Add lintstack error checker based on pylint" 2012-08-27 18:38:59 +00:00