| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| | |
the deprecated stanza from nova had hard coded
"Deprecated Config", but is now be used in not config
scenarios. Update it to just "Deprecated".
Change-Id: Icf86447aea6cd509e4e67fe0be7e9157006410a4
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
argparse makes it awkward to implement the current cfg API where we
simply return the leftover arguments to the caller.
Very few cfg users actually rely on this functionality and for those
cases it probably makes more sense for them to explicitly register
positional arguments or sub-parsers.
Add support for positional arguments via a 'required' Opt attribute:
opt = StrOpt('foo', positional=True)
conf.register_cli_opt(opt)
conf(['bar'])
conf.foo == 'bar'
Change-Id: Iea746d710237e1ea26c1ef4871643941d1df09bd
|
|\| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
optparse would print "Options" but argparse prints "optional arguments".
The default argparse behaviour is fine, let's stick with that.
Change-Id: Ib53a2581af9d776e9a7c1cd90eebe89b70034e57
|
|\| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
optparse would substitute the program name for %prog, but argparse
requires %(prog)s. Also, optparse would print 'Usage:' whereas
argparse prints 'usage:'.
Neither optparse behaviour that's worth retaining, let's just use
the default argparse behaviour.
Change-Id: Ied2acb37c366f1a45aed72b6b76f11e2de23828e
|
|\| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
optparse prints the version to stdout, argparse prints the version to
stderr.
There's no need to preserve the old optparse behaviour, let's just stick
with argparse behaviour.
Change-Id: Ie141c72112a63149d098afa9db55a95a309e79d7
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
logging_context_format_string in log.py references fields
that don't exist in the common/context.py so we get errors
like:
---
File "/usr/lib64/python2.7/logging/__init__.py", line 467, in format
s = self._fmt % record.__dict__
KeyError: 'project_id'
Logged from file test_log.py, line 42
---
We could change the defaults in log.py but that might cause
too much disruption to other projects.
Change-Id: Ic3f6039baccb522b5eb2462a87b792c226ca13ef
|
|\ \ \
| |_|/
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The use case for disable_interspersed_args() is that nova-manage
needs to be able to parse sub-commands. We now have a
add_cli_subparsers() method which better supports this use case.
Change-Id: I1fcd15889745fe4ddff0ac4bacf385004f9b61af
|
|\| | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* openstack/common/cfg.py
Optparse is fading out since python 2.7, this
patch will help openstack/common work on more
advanded version of python(argparse).
Now, disable_interspersed_args() has no effect.
Added new method add_cli_subparsers, return
argparse subparser, for usages such as
subcommand.
* tests/unit/test_cfg.py
SubcommandTestCase added.
Disabled test_disable_interspersed_args test entry
for happiness of tox, temporarily.
Modified test_help for port of argparse.
* tools/pip-requires
include argparse module for python 2.6
Change-Id: Ie5cbde1a92a92786d64dea0ddfcfbf288c29f960
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the collector part of the bug 1075463.
Declaring a consumer topic on the same rpc connection after the consume
thread has started would result the eventlet raise RuntimeError
exception. So all the declaring work should be done before calling
rpc.conn.consume_in_thread().
If the manager of a rpc.Service wants to declare topic consumers other
than the default ones created by rpc.Service.start(), it could define
the following hook in the manager class:
def initialize_service_hook(self, service):
#
# Do initialization work after rpc connection is created and before
# starting consuming thread.
# Params:
# service: handle to the rpc.Service instance.
Change-Id: I80001c32ee4e51e394fed827c91ad5e1eb0f94dc
|
|
|
|
|
|
|
| |
Currently many projects have their own nearly identical methods for generating
uuids. This patch will change that.
Change-Id: I0af348ddbdea658331e8e701dcf1f8a12d968479
|
|\ |
|
| |
| |
| |
| | |
Change-Id: Ib7eed482bf452bf171462f9200fde9a83abf4606
|
|\| |
|
| |
| |
| |
| |
| |
| |
| | |
Make rpc.queue_get_for() just a tad more convenient by dealing with the
case of host=None. In that case, just return the base topic.
Change-Id: I2f55c2205c219df7481dd6e507caf7182622195b
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Addresses bug #1075022
Addresses bug #1075028
LoggerTestCase was no longer running
as another test was created with this name
(presumably due to copy-paste)
The duplicate has been renamed to a
more appropriate name: LogLevelTestCase.
Because LoggerTestCase was not executing,
bitrot has occurred. This patch also addresses
those resultant test failures.
Change-Id: I4f3820ba748d20606bb484d0adbfe678fa1fa38d
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove the config module. All core openstack projects are using the cfg
module instead so no further development will be done on this module.
Also remove the extensions module. This code was imported but there has
been no attempt to get any projects to use it.
Change-Id: I4a974ba1ea25e94fd55cad243cde5f1ef6a17289
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes bug #1050380
In the unit tests, we need to call CONF so that the config-file option
referenced by log_opt_values() is registered. We also need unregister
the default_publisher_id option to workaround bug #107372.
Change-Id: Icc63237ddf97aaa730c0484974ec05a3080f8f04
|
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes bug #1070198
Implements UUID processing functions used across projects.
Change-Id: Ife2c972cea727dc7e453008bcd5871607e883d5c
|
| |
| |
| |
| |
| |
| |
| | |
Also move the exceptions raised to being local to the executils
module.
Change-Id: Ibb2445f92840b9ce4b52373b0b09adb3d6a4a897
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes bug #1070511
nova has a common deprecation path which lets you turn
deprecation warnings into fatal errors via config. Make
this a function of the openstack common log to make it
available to other projects in a standard way.
Include exception directly in logging module.
Update exception to work correctly now that it's not
based off of nova's exception class.
Change-Id: I699e776c99c429e60dfb5cd6c0cdbb661bae0ce8
|
|/
|
|
|
|
|
|
|
| |
If an option has a dash in it and is required, the check fails because it
tries to self._get() on the name (with dash) rather than the dest (with
underscore).
Change-Id: I6448019f70f98bc2e58a325d0cf9ce88b8bb085b
Signed-off-by: Julien Danjou <julien@danjou.info>
|
|
|
|
|
|
|
| |
In the end I needed to port utils.ensure_tree as well. Resolves
bug 1063230.
Change-Id: I6e6fa8201de2cac3f17e6c60d7b16f7df7c64116
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Fixes bug 1034416
Change-Id: I06f9fb5fa9d86eefeebc82c0e31196b8d542c9e0
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 3fc46892
After a productive discussion here:
http://lists.openstack.org/pipermail/openstack-dev/2012-October/thread.html#1566
It appears that we don't yet have a really compelling use
case for this and folks are worried about the extra
complexity it brings. I think it's safe to say there's a
consensus that we shouldn't proceed with this idea yet. We
can always revisit this again later if needs be.
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Added is_newer_than function to compare if the provided
time is newer than current time for specified number of
seconds
Fixes bug 1036343
Change-Id: Ic133b0e7e2337b6b0fdad244ded6a93f8db48379
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Implements blueprint fine-grained-policy
Add support to the new policy language for finer-grained policy
decisions: policy checks can, using the "case" construct, return
values other than simply "True".
This means that a policy rule can be written that allows for fine
shades of permissions; for instance, a rule could return the values,
"fulladmin", "projectadmin", or False, and the caller can use these
values to decide whether to allow all modifications, only some
modifications, or no modifications at all.
Change-Id: Id2bbee5c34052692af12e4a028256131ed2747fc
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Implements blueprint fine-grained-policy
Inverting the sense of a check was not possible with the list-of-lists
syntax, but it clearly makes sense to support it.
Change-Id: Ibd92cd75a279efdafec16a26f9aec33f39614b5c
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Implements blueprint fine-grained-policy
Add a new policy language with "and" and "or" operators to replace
the old list-of-lists syntax. New '@' and '!' operators are also added.
This new language will enable us add more advanced features than the
old syntax would have allowed.
Backwards compat support for the old list-of-list syntax is retained.
Change-Id: I872cb6abf6f8051c3ff502a0fc7590cff4f63a25
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Implements blueprint fine-grained-policy
Remove the deprecated Brain/enforce API and support for using functions
as check types.
Change-Id: Idf79999ad402b2c79072d0547d60c7b0bfa20d5a
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implements blueprint fine-grained-policy
Complete rewrite of the policy engine, with careful thought given to
backwards-compatibility.
Policy rules are now represented internally by a tree of Check
objects.
A new API is added for parsing and enforcing rules:
set_rules(Rules.load_json(data, default_rule=...))
result = check(rule, target, credentials)
reset()
The old Brain/enforce API is deprecated and will be removed soon.
A new API is also added for registering new check types:
@register("key")
class KeyCheck(Check):
def __call__(self, target, creds):
return self.match in creds
Support for using functions as check types is deprecated and will
also be removed soon.
Change-Id: I2951a0de3751bd2ec868e7a661070fed624e4af2
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Part of blueprint service-infrastructure
Change-Id: Ie00efcb1c974d699ac6b2a38285abef1b295f3ce
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In Ceilometer, we need to consume messages from different exchanges of type
'topic', so being able to specify the exchange name rather than using the
default in TopicConsumer is necessary.
This fixes bug #1055483
Change-Id: Ibbaec8496f24c0b221cf489258af1e7fe362e84a
Signed-off-by: Julien Danjou <julien@danjou.info>
|
| |
| |
| |
| | |
Change-Id: I77bcbf03a18659cfa62e99da9ba2136f8348022b
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Use the rabbit_ha_queues boolean option.
It is off by default, and you need to wipe RabbitMQ Mnesia
database (/var/lib/rabbitmq/mnesia) when changing it.
Change-Id: Id06692a142d1e5316602f6ceed4ccad615ce74c1
|