summaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* xenapi: script to rotate the guest logsJohn Garbutt2013-06-191-0/+62
| | | | | | | | | | | | | | | | | Xen will produce the guest logs in a specified directory. This scripts configures the above logging as expected by the xapi plugin nova uses to read the logs. In addition it ensures that any log that grows bigger than 1MB will be truncated down to 5KB. Ensuring the log directory is inside a loop back device of a restricted size, and running this script every minute using cron, will stop guests from using up too much Dom0 disk space, and taking out the hypervisor Part of blueprint xenapi-server-log Change-Id: I4caa82f4d0620d924e37e3b605cf62b4d5b73570
* Remove bin lookup in conf sample generatorZhongyue Luo2013-06-141-7/+1
| | | | | | | As of 584b2f, the bin directory has been removed. No longer need to handle bin/ Change-Id: Ic5013cd27d7e420a6a01d207546f7ac0258d62d1
* Refactor conf sample generator scriptZhongyue Luo2013-06-141-6/+8
| | | | | | | Optimized grep calls to not create a grep process per file. Defined variables to enhance readability. Change-Id: Ic873f2c3b600a737ce54444dec973720c8813285
* Merge "Enhance group handling in extract_opts"Jenkins2013-06-102-271/+4
|\
| * Enhance group handling in extract_optsJulien Danjou2013-06-102-271/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When there's 2 options with the same name, the script gets confused and doesn't know in which group it goes. This fixes it, and fixes also the template generation which is broken for various reasons: - gettext.install was missing - nova-rootwrap when imported calls exit() because it doesn't find a valid configuration file, so let's exclude it entirely anyway - eventlet/greendns needs to be ignored for this Change-Id: Iaa4e9a806e79032ce1675b46a6b7a7628c3eff89 Signed-off-by: Julien Danjou <julien@danjou.info>
* | Update analyze_opts to work with new nova.conf sample formatJoe Gordon2013-06-071-2/+2
|/ | | | | | | 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
* Improve Python 3.x compatibilityDirk Mueller2013-06-011-3/+3
| | | | | | | | | 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
* Make pylint ignore nova/objects/Dan Smith2013-05-301-1/+3
| | | | | | | | | | | 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
* Fix colorizier thowing exception when a test failsMichael Kerrin2013-05-291-0/+2
| | | | | | | | | | 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 requires files to standard names.Ruby Loo2013-05-224-59/+4
| | | | | | | | | 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
* Add requests requirement capped <1.2.1.Jeremy Stanley2013-05-211-0/+1
| | | | | | | | | | | | | | | | | | 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
* Switch to flake8+hacking.Monty Taylor2013-05-174-722/+6
| | | | | | | | Remove a bunch of local custom scripts. Replace with configurable external tools. Use local hacking checks for nova specifics. Change-Id: I75a01375ba0ec36d2ff05abc47abe0a3f225eda5
* Merge "Copy the RHEL6 eventlet workaround from Oslo"Jenkins2013-05-161-1/+1
|\
| * Copy the RHEL6 eventlet workaround from OsloMark McLoughlin2013-05-021-1/+1
| | | | | | | | | | | | | | | | | | 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
* | Sync rpc from oslo.Russell Bryant2013-05-151-0/+1
| | | | | | | | | | | | | | | | 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
* | Transition from openstack.common.setup to pbr.Monty Taylor2013-05-072-1/+3
| | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Sync oslo-incubator print statement changes"Jenkins2013-05-071-10/+12
|\ \
| * | Sync oslo-incubator print statement changesMatthew Sherborne2013-05-061-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "xenapi: Always set other_config for VDIs"Jenkins2013-05-061-0/+106
|\ \ \ | |/ / |/| |
| * | xenapi: Always set other_config for VDIsRick Harris2013-05-021-0/+106
| |/ | | | | | | | | | | | | | | | | | | | | | | | | 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
* / Update oslo-incubator import.Michael Still2013-05-031-7/+10
|/ | | | | | | These are all minor changes bringing nova up to commit 90e83530d4dc49d570fa05ea63a93805717dcfa0 in oslo-incubator. Change-Id: I0291eed31b1e650da211fe2a8b65fad0c35c9053
* Sync small and safe changes from osloMatthew Sherborne2013-05-011-6/+2
| | | | | | | Ran the oslo-incubator sync script and brought across only the files that have small and safe changes. Change-Id: I41b400c189e52a2e7f642a03ad143d821aaa807c
* import and install gettext in vm_vdi_cleaner.pyAndrew Laski2013-04-301-0/+2
| | | | | | | importing some nova modules expects _() to be defined, so lets define it before we start importing them. Change-Id: I7f951a24c19a53434c090cd2c01eded77c703943
* Merge "Fix up regression tester"Jenkins2013-04-291-64/+92
|\
| * Fix up regression testerJoe Gordon2013-04-171-64/+92
| | | | | | | | | | | | | | | | | | | | * Clean up to support pydoc * Support -h * Make it actually work * Improve docstrings * Add copyright Change-Id: I977df71e8213e39e9eebf9cc56b2dd7625959870
* | Remove "undefined name" pyflake errorsStanislaw Pitucha2013-04-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | 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
* | Move console scripts to entrypoints.Monty Taylor2013-04-041-2/+0
|/ | | | | | | | | | | | 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
* Merge "Fix the python version comparison."Jenkins2013-04-011-1/+1
|\
| * Fix the python version comparison.Joshua Harlow2013-04-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The comparison to (2, 6) doesn't seem to be correct. For example: >>> import sys >>> sys.version_info <= (2, 6) False >>> sys.version_info[0:2] <= (2, 6) True >>> sys.version_info (2, 6, 6, 'final', 0) Change-Id: I2076d23e58a8777fe4bab81665b9b570656561e9
* | Remove gettext.install() from nova/__init__.pyMark McLoughlin2013-04-011-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Bring back colorizer again with error results.Vishvananda Ishaya2013-03-261-0/+16
| | | | | | | | | | | 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
* Merge "Sync everything from oslo-incubator."Jenkins2013-03-251-5/+14
|\
| * Sync everything from oslo-incubator.Russell Bryant2013-03-221-5/+14
| | | | | | | | Change-Id: If602b424086abb3edbd4703bc0e3befedbf37925
* | py2.6 doesn't support TextTestRunner resultclassDan Prince2013-03-221-2/+6
|/ | | | | | | | | | | | 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
* Merge "Bring back sexy colorized test results."Jenkins2013-03-211-0/+313
|\
| * Bring back sexy colorized test results.Vishvananda Ishaya2013-03-201-0/+313
| | | | | | | | | | | | | | Also attempt to keep test results together and print out a nice display of the ten slowest tests. Change-Id: Ib54eb6dede8650ebafc3f069ee7b4a8c4c1a523c
* | Require netaddr>=0.7.6 to avoid UnboundLocalErrorAlessio Ababilov2013-03-191-1/+1
| | | | | | | | | | | | | | | | 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
* | Merge "Update to Quantum Client 2.2.0"Jenkins2013-03-131-1/+1
|\ \
| * | Update to Quantum Client 2.2.0Aaron Rosen2013-03-081-1/+1
| |/ | | | | | | | | | | | | | | | | | | 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
* | Switch to final 1.1.0 oslo.config releaseMark McLoughlin2013-03-131-1/+1
| | | | | | | | | | | | | | | | | | 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
* | Merge "Pin SQLAlchemy to 0.7.x"Jenkins2013-03-131-1/+1
|\ \
| * | Pin SQLAlchemy to 0.7.xDirk Mueller2013-03-121-1/+1
| |/ | | | | | | | | | | | | 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
* / websockify 0.4 is bustedChris Behrens2013-03-121-1/+1
|/ | | | | | | | | | 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
* Update tox.ini to support RHEL 6.x.Dan Prince2013-03-072-1/+40
| | | | | | | | | | | | | | | | | | 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
* Switch to oslo.config.Dan Prince2013-03-051-1/+1
| | | | | | | The oslo-config package has been renamed. Switch to the new version. (should fix SmokeStack). Change-Id: I6a0fa803b0076bc5338c996e21bbcef54e1d75cd
* Merge "docs should indicate proper git commit limit"Jenkins2013-03-051-1/+3
|\
| * docs should indicate proper git commit limitSteven Dake2013-03-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | 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 oslo-config update for deprecated_groupAlessandro Pilotti2013-03-041-1/+1
|/ | | | | | | | | | | 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
* Merge "Improve hackings docstring detection"Jenkins2013-03-021-25/+50
|\
| * Improve hackings docstring detectionJoe Gordon2013-02-261-25/+50
| | | | | | | | | | | | | | | | | | | | | | Previously: def foo():\n a = '''This is not a docstring''' would be counted as a docstring even though it isn't. Fix this and add docstring tests. Fix bug 1100912 Change-Id: Id4d4aa382713eea340720e166e418262ba68eaaf