Commit Graph

362 Commits

Author SHA1 Message Date
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
* https://github.com/jcrocholl/pep8/commit/b9f72b16011aac981ce9e3a47fd0ffb1d3d2e085
  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 30e513309f.

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
Jenkins 68e9a9e351 Merge "Add nosehtmloutput as a test dependency." 2012-08-27 04:20:58 +00:00
Yun Mao 09eb54c48f Add lintstack error checker based on pylint
Add a new silent test target lintstack based on pylint in Jenkins.
lintstack will compare the pylint errors between HEAD and HEAD~1,
filter out known false positives and report violations in pylint
original parseable format for Jenkins to consume.

Change-Id: Ic2962cb42a174bfe9535aea88475ff4ede3bf9ff
2012-08-24 15:36:47 -04:00
Jenkins 5c5ee02a7d Merge "Ensure log formats are quoted in sample conf" 2012-08-24 16:33:50 +00:00
Jenkins 30fd506e23 Merge "Don't include hostname and IP in generated sample conf" 2012-08-24 16:33:30 +00:00
Jenkins 13937c028d Merge "Allow generate_sample.sh to be run from toplevel dir" 2012-08-23 20:23:09 +00:00
Mark McLoughlin 63cc191c2d Include CommonConfigOpts options in sample config
Options defined by CommonConfigOpts are declared within the class rather
than at module level, so they weren't being included in the sample conf.

Also, in essex (and up until commit 991614add8), the sample conf file
didn't contain these options but they included the hyphen in the name.
The hyphen is only used on the command line, it is converted to an
underscore automatically in the config file. Use opt.dest rather than
opt.name as the config file key. Fixes bug #1034970.

DocImpact: update nova.conf docs
Change-Id: Ia7f3dded9148deedeb198c19a8d343db6dd93f99
2012-08-23 12:09:06 +01:00
Mark McLoughlin 680c80d9ea Ensure log formats are quoted in sample conf
Fixes bug #1040583

This ensures the sample conf has:

  # instance_format="[instance: %(uuid)s] "

rather than:

  # instance_format=[instance: %(uuid)s]

Fix suggested by Vish.

Change-Id: If20aa7276d6868a6885abc85f046733adc40331f
DocImpact: update nova.conf docs
2012-08-23 12:03:06 +01:00
Mark McLoughlin 705ee5e660 Don't include hostname and IP in generated sample conf
Avoid including the hostname and IP address of the machine generating
the sample config file.

Change-Id: Idf791efef8b0bf760c4c95f6f5f53d20bdf5ee7a
2012-08-23 11:49:15 +01:00
Mark McLoughlin 46de1cc267 Allow generate_sample.sh to be run from toplevel dir
I hit an issue where extract_opts.py couldn't import importutils
since it's not in my sys.path, so it's clear we need to set
PYTHONPATH before running.

The whole business of running the tool from the tools/conf dir
is fairly awkward, so change it to run from the top-level dir
instead.

Change-Id: I89b4d874a6ee3732234a9704a8ee6001a293ed71
2012-08-23 10:37:38 +01:00
Joe Gordon 6109970e2a Fix hacking.py git checks to propagate errors
Now when N801 or N802 is hit tools/hacking.py will return -1.

Fix bug 1039697

Change-Id: I9f6950a4396ae82861e5de0e4f3ba8b482c4fdf8
2012-08-22 10:52:05 -07:00
Clark Boylan b570a6182a Add nosehtmloutput as a test dependency.
Adding nosehtmloutput as a test dependency allows nose to output its
results to an html file. This will be used by Jenkins to save logs on
a different server.

Change-Id: I45191e872a41eed8e6a9e14757675ee7a28b3836
2012-08-21 14:25:14 -07:00
Joe Gordon 64c741ca94 Cleanup pip dependencies
Fix bug 1039745

* move feedparser to tools/test-requires
* remove python-daemon

Change-Id: I8da6ee6854e2064b44f3161b84f28d0bfc7f438d
2012-08-21 14:05:43 -07:00
Monty Taylor c1c068bb6b Make missing imports flag in hacking settable.
Change-Id: Ib1ada320588eb42370c9fa2c0eff4eb888258ea5
2012-08-17 13:38:29 -04:00
Dan Wendlandt 97dd343b16 update python-quantumclient dependency to >=2.0
Nova should depend on a version of quantum client that includes
API v2.0 support.  That means the client version should be 2.0+ .

This was just pushed to PyPi today:

http://pypi.python.org/pypi/python-quantumclient/2.0

Change-Id: Ib9d997ceff92f2da6986d184b7b0da9e564800aa
2012-08-13 07:31:58 -07:00