| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \ \
| | |/
| |/| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Part of blueprint common-rpc.
This patch updates the rpc_backend option handling in a couple of ways.
1) Set the default based on wherever this code has been copied to.
2) If we fail to import the backend, replace 'nova.rpc' with
'nova.openstack.common.rpc' just in case the value came from an older
nova configuration file. Backwards compatibility is a good thing.
Change-Id: I9ad7c084a2f0813ca1559115e7612f0a24fcce67
|
| | |
| | |
| | |
| | |
| | |
| | | |
bug 1014216
Change-Id: I3f8fa2e11c9d3f3d34fb20f65ce886bb9c94463d
|
|\| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fix bug 1012374.
Johannes Erdfelt pointed out that impl_qpid wasn't acking messages that
it received. This turned out to be a nasty oversight, resulting in
unbounded message queue growth inside of the python-qpid library. This
fixes it.
Change-Id: I446530239e16701009c4db8407a344596bb17952
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The logic is pulled from the nova code, but has been abstracted
from being nova specific. It allows us to duplicate less info,
because we know a lot of the meta information in setup.py anyway.
Once this is in, we'll get autodoc module information everywhere
pretty much for free, and we can delete the doc/ext dir and the
doc/*sh from nova. (thanks to bcwaldon for pushing things to be
better)
Change-Id: I4c55c370ea6c3790958b5412e21e3378f4474104
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| | |
Add realistic tests including objects with and without args to
importutils.
Change-Id: If23db5ef80cdfa4be95e95b90e647ac2455fffc8
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Part of blueprint common-rpc.
Change-Id: I634bf7b0ce85900a34c9b5a4a295f1d806458bbf
|
|\| | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Part of blueprint common-rpc.
This driver just went into nova.rpc. Pull it in over here. I haven't
been able to test this, but I can't get the tests to work in nova,
either.
There is a bit of a complication with impl_zmq worth mentioning. It
requires a service to run (nova/bin/nova-rpc-zmq-receiver). Only once
instance of this service should run on a given machine, so it shouldn't
be copied into each project that uses rpc. Once openstack-common is an
installed library, it can be distributed with that, but until then ...
we'll just leave it in nova for now.
Change-Id: I2bd067be58d943d4f3a90e013b22282217484872
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes bug #1011121
Use calendar.timegm instead of time.mktime
Change-Id: Idb8d470f1ef90162641d21122699a026fa38faf1
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes bug 1010570
pep8 suggests the former over the latter
Change-Id: Ice3a3b1cc2eea9228fffb4ee40fc360ff79054a3
|
|/
|
|
|
|
|
|
| |
Fixes bug #1009848
Fixed jsonutils.dumps to receive other parameters
Change-Id: I34836ae89359bccb689a36a7b486e85bb41d70e4
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes bug #1009410
1. Add the following functions from nova/utils.py
- strtime
- parse_strtime
- is_older_than
- utcnow_ts
- advance_time_delta
- advance_time_seconds
2. Write unittests in tests/unit/test_timeutils.py
Change-Id: Ie0bba90833e2ed31bb5ab867a7c1a76a9901cacb
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Implements blueprint config-aliases
* Supports loading deprecated aliased options from a config file
* Supports using deprecated aliased CLI options
* For MultiStrOpt Can use mix of name and alias
Change-Id: I04678880bc8ee1f85335f5656367bd1437245c6e
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fixes bug 1010124
Convert xmlrpclib.DateTime types to datetime so they can be serialized
without creating an exception.
Change-Id: Ifcab69ad81d39d7f4066df5c71c6ab6734fb1fab
|
| | |
| | |
| | |
| | |
| | |
| | | |
* Fixes Bug #1010244
Change-Id: Idac365a1719c49846ef105b90683e631310fbf6c
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: Iab7e703254a354764a5667425ef887b0afc89115
|
|\ \ \ \
| |/ / /
|/| | | |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Implements blueprint common-rpc.
This patch imports nova.rpc to openstack-common. All of the necessary
changes to the core code to make it compatible with openstack-common
have been done in nova, so the only changes made here are to imports.
There are more changes made to the tests, but nothing that changes the
core functionality of the tests.
Change-Id: I17330aa4adfd0f22c449a2376833c7fe9dfd0cf1
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | | |
* Fixes bug 1009639
* Adds tests
Change-Id: Id00563dfcc6f143c3e86ec380d66cffc967b8c48
|
|/ /
| |
| |
| | |
Change-Id: If0402077cc95811936c55182d90f15ccb37a6ad2
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 72840edc736b7f4d2366b5049f6516d8f5b901ff.
This change breaks kombu, so revert it since there is no specific need
for it.
Fixes bug 1009127.
Change-Id: Id0ef8b3948b63d0151289cb7ce8e617d9816bb4b
|
|/
|
|
|
|
|
|
|
|
| |
This patch adds gettext support for openstack-common modules. In the
process of pulling in the rpc code, I didn't want to remove the usage of
_() that was already in there. This allows it to stay in a way that
doesn't conflict with gettext usage in the project using
openstack-common.
Change-Id: I9cad006f81244f0cce7b7f28659fa1daa5a4268a
|
|
|
|
|
|
|
|
| |
Fixes bug #1008064
Replaced datetime.utcnow usage with timeutils.utcnow
Change-Id: I8bfdc1abefc3891497554335a3078d4028ef8ac9
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
This patch creates openstack.common.testutils which includes some
decorators used to conditionally skip tests. This is needed for the
rpc unit tests.
Change-Id: Ic6bc8d58f7dfcd9eb3acd2749c475b9d760b9578
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Both Glance and Nova make use of (almost) the same policy system,
defined in glance/common/policy.py and nova/common/policy.py,
respectively. They also have independent glue code
(glance/api/policy.py and nova/policy.py), so that the common
policy system is substantially similar. This makes policies a
perfect candidate for incorporation into openstack-common,
particularly given that this same code will soon be used by
Quantum.
This change adds the common policy module (along with some minor
interface changes and bug fixes) to openstack-common, along with
a test suite.
Change-Id: I0022a91f16ded28f9dc6b4975ef1b6e4cc8460ac
|
|
|
|
|
|
| |
Fixes a couple of pep8 errors that appeared due to a pep8 tool update.
Change-Id: Ida70b1fb962529d3a157f44dcf2e71af773a4431
|
|
|
|
|
|
| |
Fixes bug #1008065
Change-Id: I72aba29eea4637643cb7742f2fd4b1f05d15667f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implements blueprint cfg-global-object
Add an instance of the CommonConfigOpts class to the cfg module's
global namespace.
The usage pattern is:
from openstack.common import cfg
opts = [
cfg.StrOpt('foo', default='blaa'),
cfg.StrOpt('bar', default='blaa'),
]
CONF = cfg.CONF
CONF.register_opts(opts)
def do_something_later():
print CONF.foo, CONF.bar
def main():
CONF(project='pulsar')
Change-Id: I77e87b1e186c243b2638a4b1c202f865249dafce
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have a few places now where we do:
for opt in self.opts:
foo(opt)
for group in self.groups:
for opt in group.opts:
foo(opt, group)
Use generators to turn this into simply:
for opt, group in self.all_opts():
foo(opt, group)
Change-Id: I7a32779c20caeb1bacb85528d7e36c3c18c6c16a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
If we want to use github zipballs as a source of depends sometimes
(which we do) - we need to have the pip-requires parsing understand
that lines starting with http:// or https:// are urls and should go
to dependency_links.
Change-Id: I9218159872d6edfebd4b820e6db912e9aabdf7d7
|
|
|
|
|
|
|
|
| |
Fixes bug #1001361
Removes backslash continuations
Change-Id: I86fbb950b48a7681b3c1a010b0d0007cd2f12632
|
|
|
|
|
|
|
| |
I noticed that pep8 wasn't running on the tests. This patch fixes that,
as well as a couple of pep8 errors in test_cfg.
Change-Id: I4429bfe6813a2e9394efb1753cbebbadb9f23833
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch creates a new module, jsonutils. It is based on some code
from nova.utils that is used by nova.rpc. It is being added to
openstack-common as another step toward being able to eventually move
nova.rpc to openstack-common.
This module provides a few things:
1) A handy function for getting an object down to something that can
be JSON serialized. See to_primitive().
2) Wrappers around loads() and dumps(). The dumps() wrapper will
automatically use to_primitive() for you if needed.
3) This sets up anyjson to use the loads() and dumps() wrappers if
anyjson is available.
Change-Id: I41e5759360d515ed53defe69f3e8247aafbcc83a
|
|\ |
|
| |
| |
| |
| |
| |
| | |
In preparation for enabling alphabetized import checking in Nova
Change-Id: I709fca6a121ba44df193757e5ad838de710c2f15
|
|/
|
|
|
|
| |
This patch removes a couple of unused impots from test_utils.
Change-Id: I40a2f4086e33dbcdb2eceb699c82a1350665c181
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes bug #998396
Both Nova and Keystone need to clear the overrides on their config
object between test runs. It's reasonable to expect the reset()
method would do this, so let's make it so.
Also add a clear() method with the old behaviour.
Change-Id: I192c5bb07e81f0fb844fa2fd429dc2e7133800de
|