summaryrefslogtreecommitdiffstats
path: root/openstack
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Rename FLAGS to CONF; Remove self.conf"Jenkins2012-08-141-16/+14
|\
| * Rename FLAGS to CONF; Remove self.confEric Windisch2012-08-061-16/+14
| | | | | | | | | | | | Remove all uses of self.conf and rename FLAGS to CONF. Change-Id: If7b3a3e69fe3c3d2c83033d2b44eb106794ef087
* | Merge "cfg: clean up None value handling"Jenkins2012-08-131-23/+13
|\ \
| * | cfg: clean up None value handlingMark McLoughlin2012-08-131-23/+13
| | | | | | | | | | | | | | | | | | | | | | | | Remove the need for an internal NoneValue class by making the existence of the 'default' or 'override' keys signify whether a default or override is set. Change-Id: Iacf49553df5ba8414307904a3ee334c7b8c55758
* | | Merge "Allow set_default and set_override to use None"Jenkins2012-08-131-2/+39
|\| |
| * | Allow set_default and set_override to use NoneVishvananda Ishaya2012-08-111-2/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation interprets set_default('foo', None) and set_override('foo', None) as 'clear the existing default or override', which makes it impossible to override a value with None. This patch adds support for overriding with a None value by adding a special internal class. set_override('foo', None) will now override the existing value with None. This is a slight change to the existing behavior, so this patch adds two calls for the old functionality of clearing defaults and overrides. Example syntax for the new calls are shown below: conf.clear_default('foo') conf.clear_override('foo') The patch also updates the tests to reflect the change in functionality and adds new tests to verify the new functionality. Fixes bug 1035478 Change-Id: Iee5e20e44da9bef6b86e0483ab0b48b625fe503c
* | | Tilde expansion for --config-file and --config-dirMark McLoughlin2012-08-111-6/+11
|/ / | | | | | | | | | | | | | | | | Fixes bug #1012671 Allow a filename starting with ~ or ~user to be passed for --config-file or --config-dir. Change-Id: I67705401ed1c35c0cc2161095e36616552740aba
* | Support for marshalling datetime while preserving microseconds.SandyWalsh2012-08-101-0/+18
| | | | | | | | | | | | Needed for performance measurement via "inflight" service. Change-Id: I5c1a8395b4cbc5fc0f8649b3af8130f45dd401bb
* | Merge "Add import_opt() method to ConfigOpts"Jenkins2012-08-101-0/+19
|\ \ | |/ |/|
| * Add import_opt() method to ConfigOptsMark McLoughlin2012-07-311-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Related to blueprint cfg-global-object When using the global config object pattern, you often have modules which define options that are referenced in other options. So, for example if module A defined option 'foo' and module be needed to reference that option, you might do: import A print CONF.foo However, this makes it entirely unclear to the casual reader why module A was imported. Nova has a flags.DECLARE() function that helps with this problem by allowing you to do: flags.DECLARE('foo', 'A') The function simply imports module A and checks that the 'foo' option is now defined in the global config object. This is fine, but it is also implicit that this function applies to the global config object. Instead, let's do the following: CONF.import_opt('foo', 'A') Change-Id: I7b98f5be71068bbde70cc0eab991eaebb577de52
* | Add multiple-driver support to the notifier api.Andrew Bogott2012-08-025-152/+55
| | | | | | | | | | | | | | | | | | | | | | Move all of the functionality previously provided by the list_notifier into the basic notifier api. Move and restructure tests accordingly. Remove the list_notifier file and test file. For bug 1025820 Change-Id: Idf7cb975dd78e9951188781622a4d10ca466b154
* | Merge "Install a qualified except hook."Jenkins2012-08-021-6/+8
|\ \
| * | Install a qualified except hook.Mate Lakat2012-08-011-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes bug 1031351. As an Exception is raised, it was not visible in the log, because it wasn't qualified. The fix sets up the exception hook to be qualified as the product_name. Change-Id: Ie8061d003b05ea8b00db5d8ed8fa445ccc822942
* | | Merge "Copy eventlet_backdoor into common from nova."Jenkins2012-08-021-0/+78
|\ \ \
| * | | Copy eventlet_backdoor into common from nova.Angus Salkeld2012-08-021-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is debugging utility only used by service.py in nova. (needed in openstack-common to move service.py to common) Change-Id: I9a7a84a5f34517abf91d87e9d817d7e763e22829 Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
* | | | Merge "Fix errors reported by pyflakes."Jenkins2012-08-021-3/+2
|\ \ \ \ | |/ / / |/| | |
| * | | Fix errors reported by pyflakes.Bhuvan Arumugam2012-08-011-3/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | * openstack/common/setup.py get_reqs_from_files(): Remove unused variable. get_reqs_from_files(): Use local variables in a conventional way, to prevent errors like: local variable 'datestamp' is assigned to but never used. Change-Id: I44e137d383b96e1601b7bded1e36e84ff14a8f68
* | | Merge "Remove bogus conf argument from create_consumer()"Jenkins2012-08-011-4/+2
|\ \ \
| * | | Remove bogus conf argument from create_consumer()Mark McLoughlin2012-08-011-4/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes bug #1031713 Commit 0b11668 in nova added a conf parameter to the create_consumer() method in the base class, but not to the implementations. Looks to be a random thinko. Change-Id: I92b87eed2f7708af696e02e229bf6daa0d305fdd
* | | Merge "Use function registration for policy checks"Jenkins2012-08-011-46/+106
|\ \ \ | |/ / |/| |
| * | Use function registration for policy checksKevin L. Mitchell2012-07-301-46/+106
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | The original policy framework allowed new policy checks to be created through inheritance. This is somewhat clunky and unnecessary in Python. This change refactors policy.py to allow new policy checks to be registered using an @register() decorator. One consequence is that HttpBrain is deprecated. Care has been taken to ensure backwards compatibility; deprecation warnings will be emitted for uses of HttpBrain or the inheritance- based checks. Change-Id: I3ccef5868906ef64a3c24d6c92533471e89682ba
* | Merge "Remove code to clear basicConfig root log handlers"Jenkins2012-07-311-11/+0
|\ \
| * | Remove code to clear basicConfig root log handlersDan Prince2012-07-311-11/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes some old Nova specific code to clear out the log handlers from Nova's logging basicConfig. This code is arguably Nova specific and doesn't really belong in openstack-common's generic logging configuration. Additionally, This code was actually removing the root logger used by some command line tools and binaries and hiding log messages that should have otherwise gone to the console. Fixes LP Bug #1029577. Change-Id: Ia3531bea41a2226798f3910803a4323f1984e767
* / Copy LoopingCall from nova for service.pyAngus Salkeld2012-07-311-0/+88
|/ | | | | Change-Id: Ib6683324f92345c17cfd7234d08070b48ffb4d3e Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
* Merge "don't throw exceptions if %(color)s tag is used"Jenkins2012-07-301-2/+6
|\
| * don't throw exceptions if %(color)s tag is usedSean Dague2012-07-271-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fixed bug #1030078 If the log format strings include the %(color)s key in them and you enable file logging, your log files won't work, and instead you'll see exceptions on the console as the default python log handler doesn't support that keyword. This approach stubs out the extra keywords to be empty strings to avoid the KeyError. Tests are also added to demonstrate the KeyError as defined behavior, and test that color codes can be passed. Change-Id: Ia5dbaee9c530e243e2121667c8a54e6f9d66e1e7
* | fix the qpid_heartbeat option so that it's effectivePádraig Brady2012-07-301-1/+1
|/ | | | | | | | The 'hearbeat' typo caused this setting to be ineffective. This bug has been present since the initial nova qpid implementation. Fixes bug: 1030430 Change-Id: Ibb9d7484b9d11a6904cc9e2a8dde6d9164ee05b1
* Remove unused importsJoe Gordon2012-07-264-4/+0
| | | | Change-Id: Ia2900e50263950ba40ba86e685640cacaa2137a7
* Modifies _is_opt_registered fcn to check for duplicate optsGiampaolo Lauria2012-07-241-1/+4
| | | | | | | | | | This change fixes bug 999307 Currently, the check for duplicate options is done by checking whether they are the same object. The proposed fix is to check whether all the object fields have the same value. Change-Id: I2b72d630a0c8821df1d81e25d316d8d9195be492
* Merge changes I536e1ca0,Ifb878368,Ie1d71b85Jenkins2012-07-231-2/+4
|\ | | | | | | | | | | | | * changes: Add missing convert_instances arg. Track to_primitive() depth after iteritems(). Update iteritems test case to actually test iteritems.
| * Add missing convert_instances arg.Russell Bryant2012-07-181-1/+3
| | | | | | | | | | | | | | | | When calling jsonutils.to_primitive() recursively, the convert_instances argument should be passed along. This change fixes one place where it was not. Change-Id: I536e1ca05bb4e613fba71298797879587e8b4b00
| * Track to_primitive() depth after iteritems().Russell Bryant2012-07-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change jsonutils.to_primitive() to increase the recursion depth counter when calling to_primitive() on the result of iteritems() from the current element. Previously, the only time the counter was increased was when converting the __dict__ from an object. The iteritems() case risks cycles, as well. I hit a problem with this when trying to call to_primitive on an instance of nova.db.sqlalchemy.models.Instance. An Instance includes a reference to InstanceInfoCache, which has a reference back to the Instance. Without this change, to_primitive() would raise an exception for an Instance due to excessive recursion. Related to nova blueprint no-db-messaging. Change-Id: Ifb878368d97e92ab6c361a4dd5f5ab2e68fc16e2
* | Enable fanout_cast and fanout_cast_to_server to provide topicGary Kotton2012-07-231-4/+8
|/ | | | | | | The code would make use of the self.topic instead of allowing the user to define the topic. Change-Id: Ibdd4fab6dd019d223c3256d70f123829939056d2
* fix bug lp:1019348,update openstack-common to support pep8 1.3.Yaguang Tang2012-07-187-33/+34
| | | | | | also,this patch turns off pep8 E125 check. Change-Id: I22d2a94d89530586d614af39af17ae542c5e0cbf
* cfg: allow empty config valuesMark McLoughlin2012-07-171-1/+2
| | | | | | | | | | | | | | Fixes bug #1025522 Commit 83044a7 caused this to stop working in Quantum: api_extensions_path = and could only be worked around with: api_extensions_path = "" Change-Id: I8c1a57225a2c135e6baf567b8e71d61e974da4e2
* Don't switch to list_notifier unless necessary.Andrew Bogott2012-07-151-9/+17
| | | | | | | | | | | Some notification tests depend on a different, single notifier being used. So, don't switch to the list notifier just because we loaded this class; only switch if an actual plugin needs it. Also: improved the test that makes sure all this notifier-switching doesn't break the notifier that was present in the first place. Change-Id: I170477bccb3ad9505fe6dbfbc214f77c09f6862f
* Use strtime() in to_primitive() for datetime objs.Russell Bryant2012-07-161-1/+3
| | | | | | | | | | | This patch updates jsonutils.to_primitive() to use timeutils.strtime() to convert a datimetime object to a string instead of just using str(). This ensures that we can easily convert the string back to a datetime using timeutils.parse_strtime(). Required for the nova blueprint no-db-messaging. Change-Id: I725b333695930e12e2832378102514326fec639c
* Merge "Add additional usage info on rpc_zmq_host flag"Jenkins2012-07-161-1/+2
|\
| * Add additional usage info on rpc_zmq_host flagEric Windisch2012-07-131-1/+2
| | | | | | | | Change-Id: I8f1f3b42de7253c993e2afa44ed1c0ad4dbbb74f
* | Merge "Restore register_opts on impl_zmq module load"Jenkins2012-07-161-0/+3
|\ \
| * | Restore register_opts on impl_zmq module loadEric Windisch2012-07-131-0/+3
| | | | | | | | | | | | Change-Id: I6acdf1445e1f03246476292b38d7c52a29934af1
* | | Merge "Minor pep8 cleanup in rpc."Jenkins2012-07-151-1/+1
|\ \ \
| * | | Minor pep8 cleanup in rpc.Andrew Bogott2012-07-082-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Removed a space, reordered an import. Change-Id: I418d1f7c6a5a3b8ef231c88b4ef28114ca0eb7cd
* | | | Merge "pep8 cleanup in the plugin code"Jenkins2012-07-152-2/+3
|\ \ \ \ | |_|_|/ |/| | |
| * | | pep8 cleanup in the plugin codeAndrew Bogott2012-07-082-2/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | The nova hacking test turned up one alphabetization error that I missed previously. Also, our path-altering process caused one line to exceed 80 characters when copied into nova; that line is shorter now. Change-Id: Ia3acfc25ecc5ba388526766dae3ed03792e906e3
* | / Fix typo made in 372d11e990Eric Windisch2012-07-131-1/+1
| |/ |/| | | | | Change-Id: Iba232257595bb3084052a21a560f2f5551b5f1eb
* | Fix import order of gettextutils in amqp.pyEric Windisch2012-07-131-1/+1
| | | | | | | | Change-Id: I53ca8308fb61c53274ca1e3d801f22c9b65d41aa
* | Add more rpc version docs.Russell Bryant2012-07-131-0/+39
| | | | | | | | | | | | | | This patch adds some additional documentation, including some examples, on making changes to versioned RPC APIs. Change-Id: I5f40b11e07538f36d0f1299f7e822b408bf8e96a
* | Merge "Add SKIP_GENERATE_AUTHORS option to setup.py"Jenkins2012-07-131-11/+15
|\ \
| * | Add SKIP_GENERATE_AUTHORS option to setup.pyDan Prince2012-07-131-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updates the generate_authors function in setup.py so that it will skip generation of the authors file if the SKIP_GENERATE_AUTHORS env variable is set. Authors doesn't currently take that long to generate but having the option to explicitly skip it (regardless of whether .git is there) seems like a good addition. Change-Id: Ie18064d2450cecc86f18d0b10e1ce473253d1a51