| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently the timeutils.normalize_time() returns naive datetime
object when parameter timestamp is an naive object or a non-UTC
aware datetime object, and returns aware datetime object if
parameter timestamp is a UTC aware datetime object.
The basic problem here is that utcoffset() of None means the object is naive
but a utcoffset() of zero means that the object is aware but represents
UTC time.
This is fragile implementation and will trigger potential issue, because
aware/native datetime is not interoperatable. For example,
"timeutils.utcnow() > timeutils.normalize_time(m)" will success at most
time, while trigger TypeError if m is a UTC aware object.
We want to normalize all objects into naive objects.
Fixes bug 1048636
Change-Id: I4a09246fa8f0dd63ca54362b877aa825d9b79772
Signed-off-by: Yunhong, Jiang <yunhong.jiang@intel.com>
|
|/
|
|
|
|
|
| |
Fixed indents which violate pep8 1.3.3
Also added .mailmap file to coalesce commits
Change-Id: Ia7a788a28e6c0fd9cb52fb7ea477cddd7d589e58
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The 'control_exchange' option needs to have a project-specific default
value. Just don't register this option and expect it to be registered
by the project using this code, at least for now.
****** IMPORTANT NOTE WHEN IMPORTING THIS CHANGE ******
If you are importing this change into a project that uses rpc, you must
add the control_exchange option in your code!
*******************************************************
Change-Id: Ida5a8637c419e709bbf22fcad57b0f11c31bb959
|
|/
|
|
|
|
|
|
|
|
|
|
| |
The method works correctly with ipv6.
An alternative way would be to use urlparse, but urlparse
only works correctly starting with Python 2.7, so to be
compatible, we have to reimplement this part.
The method will be used for parsing Glance API server
addresses, RabbitMQ addresses and perhaps other things.
Change-Id: Ie5014891c6abcd80681a370d5dd94cb0406f7f61
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The generic checking in policy allows us to match against data from the
creds_dict using a very simple syntax. For example, in policy.json if
you had something like:
"some_action": [["project_id:foo"]]
it would only allow project foo to perform that action, but something
like:
"some_action": [["is_admin:True"]]
where is_admin is a boolean fails.
This modifies the check to convert the value to unicode before
attempting to compare it. It includes a test.
Fixes bug 1039132
Change-Id: I0e53a6ea2709212d4a1536f901bcf1e717a232ca
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The narwhal, or narwhale, Monodon monoceros, is a medium-sized toothed whale
that lives year-round in the Arctic. One of two living species of whale in
the Monodontidae family, along with the beluga whale, narwhal males are
distinguished by a long, straight, helical tusk, actually an elongated upper
left canine. Found primarily in Canadian Arctic and Greenlandic waters,
rarely south of 65°N latitude, the narwhal is a uniquely specialized Arctic
predator. In the winter, it feeds on benthic prey, mostly flatfish, at
depths of up to 1500 m under dense pack ice. Narwhals have been harvested
for over a thousand years by Inuit people in northern Canada and Greenland
for meat and ivory, and a regulated subsistence hunt continues to this day.
While populations appear stable, the narwhal has been deemed particularly
vulnerable to climate change due to a narrow geographical range and
specialized diet.
Via Wikipedia
Change-Id: I0aa6fb9a29f6e851eb2621d70d400e1505ae2d32
|