summaryrefslogtreecommitdiffstats
path: root/update.py
Commit message (Collapse)AuthorAgeFilesLines
* Adds --nodeps option to update.pyZhongyue Luo2013-05-141-2/+7
| | | | | | Discards dependencies of configured modules when set. Change-Id: I4210c9b2d96d4c0750175823b47e39b4097be6ac
* Copy Nova's workaround for RHEL6 eventlet issueMark McLoughlin2013-05-081-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The eventlet on PyPI basically doesn't work on RHEL because we (Red Hat) screwed up by not taking monkey patching into account when backporting an API from python 3. This is the series of events: 1) We backported a patch to RHEL6 from Python 3 which added an optional 'timeout' argument to subprocess.Popen: http://pkgs.devel.redhat.com/cgit/rpms/python/commit/?h=rhel-6.3&id=fc9a3f0e07 This might sound innocuous but it means the wait() function get called with a timeout argument 2) eventlet overrides this function, but doesn't know about the timeout argument, so it fails. To reproduce, try applying this to your python 2.7: https://gist.github.com/markmc/5500967 3) eventlet doesn't yet support Python 3, so the only time this issue crops up is if you use eventlet on RHEL6 4) We've fixed eventlet in EPEL6, but the issue still remains if you install eventlet from upstream 5) Dave Malcolm sent a pull request to eventlet, but it has stalled: https://bitbucket.org/eventlet/eventlet/pull-request/30/add-dummy-timeout-parameter-to Nova has long had a nasty workaround to patch eventlet in our virtualenv and we now need this workaround in oslo-incubator to test processutils. Let's add it here and make nova sync it from oslo-incubator. I really hope we can get eventlet upstream "fixed" and the fix released soon. When that happens, we can kill all this nastiness. Change-Id: I62ce43a330d7ae94eda4c7498782a655e63747fa
* Improve python3 compatibilityChuck Short2013-05-021-6/+8
| | | | | | | | Change print statements so that it works with python3 as well. Change-Id: Iff16b62e4b875c79862c9af7726ea77627aa7b4f Signed-off-by: Chuck Short <chuck.short@canonical.com>
* Merge "Finds dependencies of configured modules for update.py"Jenkins2013-04-091-1/+47
|\
| * Finds dependencies of configured modules for update.pyZhongyue Luo2013-04-081-1/+47
| | | | | | | | | | | | | | | | | | Looks up import lines in the configures modules and finds dependencies. Did not load modules since it seemed as an overkill Fixes bug #963509 Change-Id: I690cdf6fb149bbe243add3a35b96f6045ebe10f4
* | Move bin/ scripts to entrypoints.Monty Taylor2013-04-071-1/+0
|/ | | | | | | Instead of propogating more bin scripts, migrate these to be things that can be consumed as entrypoints. Change-Id: Ic01e0f16fe9e7634708fbb51499ccea3f4f40d63
* update.py: support one-module-per-line configurationMark McLoughlin2013-03-121-3/+7
| | | | | | | | | | | | | | | | | Fixes bug #1122701 Allow: module=foo module=bar rather than modules=foo,bar to make reviewing changes easier. Change-Id: Ic0a7fb28fd34f530c93806a5fb79ed3dc3bc494e
* update.py: DRY up using functools.partial()Mark McLoughlin2013-03-011-3/+7
| | | | | | | We call _copy_pyfile() a bunch of times with the same base and dest_dir arguments. Clean that up using functools.partial(). Change-Id: I22a3e748f2e138b17a6b99d90ec9eca72698f6e7
* Don't s/oslo/base/ for files in the rpc lib.Russell Bryant2013-02-201-1/+2
| | | | | | | This breaks some message envelope handling code and is not needed for any of the source files in rpc/, so just avoid it. Change-Id: I8519568be5102a5890ae5ed046d6fcebe9bbb198
* Make update.py work with oslo.configDoug Hellmann2013-02-181-0/+9
| | | | | | | | | | | | | | As we move modules out of openstack.common into the oslo namespace package, we need to prevent update.py from breaking any import statements using them. Rather than build a super complicated regex to only detect the proper instances of "oslo" to replace in places like the defaults for option settings, just do the simple translation between oslo -> base and then go back and fix the modules we know have been moved. Change-Id: I9686b94b4c7df8542964b30ba15f0a91d2b3d722 Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
* Use oslo-config-2013.1b3Mark McLoughlin2013-02-171-5/+1
| | | | | | | | | | | | | | | The cfg API is now available via the oslo-config library, so switch to it and remove the copied-and-pasted version. Add the 2013.1b3 tarball to tools/pip-requires - this will be changed to 'oslo-config>=2013.1' when oslo-config is published to pypi. This will happen in time for grizzly final. Remove the 'deps = pep8==1.3.3' and 'deps = pyflakes' from tox.ini as it means all the other deps get installed with easy_install which can't install oslo-config from the URL. Change-Id: I4815aeb8a9341a31a250e920157f15ee15cfc5bc
* Allow tools/install_venv_common.py to be run from within theJosh Kearney2013-02-051-0/+4
| | | | | | | | | source directory. Not doing this raised exceptions when it tried importing modules that didn't exist in the path. Change-Id: I10e02cd9ce6beb8fdf822dd397688450ac6981a1
* Allow update.py to copy toolsJoe Gordon2013-01-231-0/+1
| | | | | | With first tool: flakes.py Change-Id: Ie7880927c74ceff174b3b0d2730c499790650921
* Allow update.py copy config files and binariesMark McLoughlin2012-12-201-6/+22
| | | | | | | | | | | | | | | | | Implements blueprint common-binaries Add support to update.py for copying config files and binaries matching etc/oslo/$module*.conf bin/oslo-$module* into the destination project after replacing 'oslo' with the destination project name. This is specifically intended for rootwrap but may be applicable in other cases in the future. Change-Id: If8a3a815ef452b0dd73ed28cb61a7ff16a9dee5c
* Fixes update.py issue with EOL style on WindowsAlessandro Pilotti2012-12-011-1/+1
| | | | | | | | | | Fixes Bug #1075230 Files are saved with the OS EOL conversion unless "b" is specified in open(...). In this case we want to preserve the original EOL convention. Change-Id: Id756174d03c3e95db055d512ec4aa5a0eeb768b8
* Make project pyflakes clean.Monty Taylor2012-11-281-1/+0
| | | | | | | | | | | | | Added both a tox test-env for pyflakes and fixed the current pyflakes errors. This did actually fix a couple of bugs. The CI team has started using pyflakes on its projects and also has started using oslo for things, so ignoring pyflakes warnings on the oslo code was starting to get old. However, additionally, pyflakes is pretty solid, so we should maybe consider gating on it across the board. (% locals() is the biggest thing that we do that it doesn't like) Change-Id: Iac1ca62db301892b7863711162fcbc74807eb24f
* Fixup update.py after argparse breakageKiall Mac Innes2012-11-231-15/+12
| | | | | | | Commit 5b9cb4148 changed the way cfg support's positional arguments and broke update.py. Use the new positional argument infrastructure. Change-Id: I0dc8b5ec445daaf3b437eb524c6eb4b684e5a695
* Fix update.py string interpolationKiall Mac Innes2012-11-181-1/+1
| | | | Change-Id: I4b0d31089cbc329ae4bc4af94edd6ac647f49fa1
* Relax the update.py replace regex.Angus Salkeld2012-11-011-2/+2
| | | | | | | | | | | | | | In service.py there is an import like: try: from openstack.common import rpc except: rpc = None and this currently does not get converted. The only downside is some doc strings also get converted. Change-Id: If283b50b8e889c0a1878e30cd7ff58494fabe634
* fix bug lp:1019348,update openstack-common to support pep8 1.3.Yaguang Tang2012-07-181-1/+1
| | | | | | also,this patch turns off pep8 E125 check. Change-Id: I22d2a94d89530586d614af39af17ae542c5e0cbf
* Merge "Update strings like 'openstack.common.notifier.driver'."Jenkins2012-07-091-0/+8
|\
| * Update strings like 'openstack.common.notifier.driver'.Andrew Bogott2012-06-271-0/+8
| | | | | | | | | | | | | | I was running into trouble with driver names that were generically named in common but need to point to specific objects within nova. Change-Id: Ie75761c73a855b067b1bcec651a1bb998deba9f4
* | Add update.sh to avoid import conflictsMark McLoughlin2012-06-291-10/+4
|/ | | | | | | | | | | | | Attempts to fix #951197 The openstack nose plugin defines the openstack.common namespace which can result in exceptions when update.py attempts to import cfg. Avoid the issue by using an update.sh script which creates a no-site-packages virtualenv. Change-Id: I1ec5cf49361303b79306714122b860f6e4912215
* Get update.py to be able to copy rpc.Russell Bryant2012-06-111-1/+11
| | | | | | Part of blueprint common-rpc. Change-Id: I634bf7b0ce85900a34c9b5a4a295f1d806458bbf
* cfg: move constructor args to __call__() argsMark McLoughlin2012-05-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to effectively use a global ConfigOpts object, you need to be able to initialize the global object with none of the information we currently require at construction. By moving those constructor args to the __call__() method, we enable the global object usage model but also make the API generally more flexible. For example, you can now reset the object and re-use it for parsing a different set of config files with the same options. There are a couple of other minor behavior changes as a result: - print_usage() and print_help() no longer works before the object has been called to parse options - registration of duplicate short options are no longer detected until the options are parsed - the --config-file and --config-dir options aren't registered until just before parsing the options since the default set of config files can be specified at that time - find_file() can't be used until after the options have been parsed, again because of the late registration of --config-file and --config-dir Finally, an unregister_opt() method is added to support the re-registeration of the --config-file and --config-dir options. Change-Id: I650d8e299e92cbc5d10da47a7ce1b73ca8066bd0
* Create openstack/common/__init__.pyRick Harris2012-03-281-5/+16
| | | | | | Fixes bug 967808 Change-Id: Ic4c1fc5520cb96f40b6ed87bfff024906f983235
* Import cfg module directly if not in pathJason Kölker2012-03-091-4/+27
| | | | | | | | | | | | | If openstack.common is not installed, but another module has declared the openstack namespace an ImportError is thrown since the common doesnt exist in the openstack namespace. This falls back to importing cfg directly from ./openstack/common/cfg.py. Also ensures that openstack/__init__.py exists in the destination * Fixes LP951197 Change-Id: I88c26fb7cc1aed97e66b068e4f0562b1f00b2b29
* PEP8 cleanup (openstack-common)Zhongyue Luo2012-02-111-3/+3
| | | | | | | | | Fixes bug #930625 Remove backslash continuations in openstack-common. Fix type checking taboos. Change-Id: I49ddb9ff5fa5af760dcfccb52cb4793b71e02f19
* Re-factor update.py to avoid breaking testsMark McLoughlin2012-01-271-56/+74
| | | | | | | | | | | | nosetests tries to import update.py and fails. Re-factor the code so that we have a main function that doesn't get executed on import. Note: setup.py would break nose similarly, except nose ignores setup.py by default. Change-Id: I609019d492f6fc2d7f2e8b6165228f879cf1ddb7
* Add a script to copy code into other projectsMark McLoughlin2012-01-261-0/+157
See: http://wiki.openstack.org/CommonLibrary#Incubation Change-Id: Ie90d40952909f766fdcac38379bf6b1ac1a0e5c7