Use oslo-config-2013.1b3
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. For each testenv in tox.ini which overrides the base testenv deps list, explicitly include {pip,test}-requires in the list so that oslo-config doesn't fail to install later when easy_install attempts to install the tarball when doing 'python setup.py install'. Retain dummy cfg.py file until keystoneclient middleware has been updated (I18c450174277c8e2d15ed93879da6cd92074c27a). Change-Id: I4815aeb8a9341a31a250e920157f15ee15cfc5bc
This commit is contained in:
parent
f6ae203c98
commit
5181724ece
@ -21,10 +21,11 @@ import eventlet
|
||||
eventlet.monkey_patch()
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer import service as ceilo_service
|
||||
from ceilometer.central import manager
|
||||
from ceilometer.service import prepare_service
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.openstack.common import service
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
@ -21,10 +21,11 @@ import eventlet
|
||||
eventlet.monkey_patch()
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer import service as ceilo_service
|
||||
from ceilometer.compute import manager
|
||||
from ceilometer.service import prepare_service
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.openstack.common import service
|
||||
|
||||
|
||||
|
@ -20,9 +20,10 @@
|
||||
"""
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.api.v1 import app
|
||||
from ceilometer import service
|
||||
from ceilometer.openstack.common import cfg
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
@ -22,9 +22,10 @@ import os
|
||||
import sys
|
||||
from wsgiref import simple_server
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.api import app
|
||||
from ceilometer import service
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.openstack.common import log as logging
|
||||
|
||||
|
||||
|
@ -21,10 +21,10 @@ import eventlet
|
||||
eventlet.monkey_patch()
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.collector import service as coll_service
|
||||
from ceilometer.service import prepare_service
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.openstack.common import service
|
||||
|
||||
|
||||
|
@ -19,9 +19,11 @@
|
||||
"""
|
||||
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer import service
|
||||
from ceilometer import storage
|
||||
from ceilometer.openstack.common import cfg
|
||||
|
||||
if __name__ == '__main__':
|
||||
service.prepare_service(sys.argv)
|
||||
|
@ -30,7 +30,8 @@ POSSIBLE_TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
||||
if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'ceilometer', '__init__.py')):
|
||||
sys.path.insert(0, POSSIBLE_TOPDIR)
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.openstack.common import log as logging
|
||||
from ceilometer.openstack.common import rpc
|
||||
from ceilometer.openstack.common.rpc import impl_zmq
|
||||
|
@ -23,9 +23,10 @@
|
||||
import logging
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer import counter
|
||||
from ceilometer import publish
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.openstack.common import timeutils
|
||||
from ceilometer.openstack.common import context
|
||||
|
||||
|
@ -16,8 +16,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo.config import cfg
|
||||
from stevedore import dispatch
|
||||
from ceilometer.openstack.common import cfg
|
||||
|
||||
from ceilometer.openstack.common import log
|
||||
from ceilometer import pipeline
|
||||
|
||||
|
@ -17,8 +17,8 @@
|
||||
# under the License.
|
||||
|
||||
import flask.helpers
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.openstack.common import jsonutils
|
||||
|
||||
# Replace the json module used by flask with the one from
|
||||
|
@ -17,14 +17,12 @@
|
||||
# under the License.
|
||||
"""Set up the ACL to acces the API server."""
|
||||
|
||||
from ceilometer import policy
|
||||
from ceilometer.openstack.common import cfg
|
||||
|
||||
import keystoneclient.middleware.auth_token as auth_token
|
||||
from oslo.config import cfg
|
||||
from pecan import hooks
|
||||
|
||||
from webob import exc
|
||||
|
||||
import keystoneclient.middleware.auth_token as auth_token
|
||||
from ceilometer import policy
|
||||
|
||||
OPT_GROUP_NAME = 'keystone_authtoken'
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo.config import cfg
|
||||
from pecan import make_app
|
||||
from pecan import configuration
|
||||
|
||||
@ -23,7 +24,6 @@ from ceilometer.api import config as api_config
|
||||
from ceilometer.api import acl
|
||||
from ceilometer.api import hooks
|
||||
from ceilometer.api import middleware
|
||||
from ceilometer.openstack.common import cfg
|
||||
|
||||
|
||||
def get_pecan_config():
|
||||
|
@ -16,9 +16,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo.config import cfg
|
||||
from pecan import hooks
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer import storage
|
||||
|
||||
|
||||
|
@ -19,8 +19,8 @@
|
||||
"""
|
||||
|
||||
import flask
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.openstack.common import jsonutils
|
||||
from ceilometer import storage
|
||||
from ceilometer.api.v1 import blueprint as v1_blueprint
|
||||
|
@ -17,10 +17,10 @@
|
||||
# under the License.
|
||||
|
||||
from keystoneclient.v2_0 import client as ksclient
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer import agent
|
||||
from ceilometer import extension_manager
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer import service # For cfg.CONF.os_*
|
||||
|
||||
OPTS = [
|
||||
|
@ -22,7 +22,7 @@ import hashlib
|
||||
import hmac
|
||||
import uuid
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from oslo.config import cfg
|
||||
|
||||
METER_OPTS = [
|
||||
cfg.StrOpt('metering_secret',
|
||||
|
@ -16,6 +16,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo.config import cfg
|
||||
from stevedore import dispatch
|
||||
|
||||
from ceilometer.collector import meter as meter_api
|
||||
@ -24,7 +25,6 @@ from ceilometer import pipeline
|
||||
from ceilometer import service
|
||||
from ceilometer import storage
|
||||
from ceilometer.openstack.common import context
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.openstack.common import log
|
||||
from ceilometer.openstack.common import timeutils
|
||||
from ceilometer.openstack.common.rpc import dispatcher as rpc_dispatcher
|
||||
|
@ -16,13 +16,13 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo.config import cfg
|
||||
from stevedore import driver
|
||||
|
||||
from ceilometer import agent
|
||||
from ceilometer import extension_manager
|
||||
from ceilometer import nova_client
|
||||
from ceilometer.compute.virt import inspector as virt_inspector
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.openstack.common import log
|
||||
|
||||
OPTS = [
|
||||
|
@ -18,10 +18,11 @@
|
||||
"""Converters for producing compute counter messages from notification events.
|
||||
"""
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer import counter
|
||||
from ceilometer import plugin
|
||||
from ceilometer.compute import instance
|
||||
from ceilometer.openstack.common import cfg
|
||||
|
||||
|
||||
OPTS = [
|
||||
|
@ -16,7 +16,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.openstack.common import log as logging
|
||||
|
||||
from ceilometer.compute.manager import AgentManager
|
||||
|
@ -18,9 +18,9 @@
|
||||
"""Implementation of Inspector abstraction for libvirt"""
|
||||
|
||||
from lxml import etree
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.compute.virt import inspector as virt_inspector
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.openstack.common import log as logging
|
||||
|
||||
libvirt = None
|
||||
|
@ -23,7 +23,8 @@ in by the plugins that create them.
|
||||
"""
|
||||
|
||||
import collections
|
||||
from ceilometer.openstack.common import cfg
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
OPTS = [
|
||||
cfg.StrOpt('counter_source',
|
||||
|
@ -19,12 +19,11 @@
|
||||
events.
|
||||
"""
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer import counter
|
||||
from ceilometer import plugin
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
|
||||
|
||||
OPTS = [
|
||||
cfg.StrOpt('glance_control_exchange',
|
||||
default='glance',
|
||||
|
@ -20,9 +20,10 @@
|
||||
|
||||
"""
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer import counter
|
||||
from ceilometer import plugin
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.openstack.common import log as logging
|
||||
|
||||
|
||||
|
@ -15,9 +15,11 @@
|
||||
# under the License.
|
||||
|
||||
from functools import wraps
|
||||
from novaclient.v1_1 import client as nova_client
|
||||
|
||||
from ceilometer.openstack.common import cfg, log
|
||||
from novaclient.v1_1 import client as nova_client
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.openstack.common import log
|
||||
from ceilometer import service # For cfg.CONF.os_*
|
||||
|
||||
LOG = log.getLogger(__name__)
|
||||
|
@ -22,11 +22,11 @@ from __future__ import absolute_import
|
||||
|
||||
import abc
|
||||
|
||||
from oslo.config import cfg
|
||||
from swiftclient import client as swift
|
||||
|
||||
from ceilometer import plugin
|
||||
from ceilometer import counter
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.openstack.common import timeutils
|
||||
from ceilometer.openstack.common import log
|
||||
|
||||
|
@ -20,10 +20,10 @@
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
from oslo.config import cfg
|
||||
from stevedore import dispatch
|
||||
|
||||
from ceilometer import counter
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.openstack.common import context
|
||||
from ceilometer.openstack.common import timeutils
|
||||
from ceilometer import pipeline
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -24,8 +24,7 @@ import traceback
|
||||
import eventlet
|
||||
import eventlet.backdoor
|
||||
import greenlet
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from oslo.config import cfg
|
||||
|
||||
eventlet_backdoor_opts = [
|
||||
cfg.IntOpt('backdoor_port',
|
||||
|
@ -1,130 +0,0 @@
|
||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||
|
||||
# Copyright 2012 OpenStack LLC.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
|
||||
class ParseError(Exception):
|
||||
def __init__(self, message, lineno, line):
|
||||
self.msg = message
|
||||
self.line = line
|
||||
self.lineno = lineno
|
||||
|
||||
def __str__(self):
|
||||
return 'at line %d, %s: %r' % (self.lineno, self.msg, self.line)
|
||||
|
||||
|
||||
class BaseParser(object):
|
||||
lineno = 0
|
||||
parse_exc = ParseError
|
||||
|
||||
def _assignment(self, key, value):
|
||||
self.assignment(key, value)
|
||||
return None, []
|
||||
|
||||
def _get_section(self, line):
|
||||
if line[-1] != ']':
|
||||
return self.error_no_section_end_bracket(line)
|
||||
if len(line) <= 2:
|
||||
return self.error_no_section_name(line)
|
||||
|
||||
return line[1:-1]
|
||||
|
||||
def _split_key_value(self, line):
|
||||
colon = line.find(':')
|
||||
equal = line.find('=')
|
||||
if colon < 0 and equal < 0:
|
||||
return self.error_invalid_assignment(line)
|
||||
|
||||
if colon < 0 or (equal >= 0 and equal < colon):
|
||||
key, value = line[:equal], line[equal + 1:]
|
||||
else:
|
||||
key, value = line[:colon], line[colon + 1:]
|
||||
|
||||
value = value.strip()
|
||||
if ((value and value[0] == value[-1]) and
|
||||
(value[0] == "\"" or value[0] == "'")):
|
||||
value = value[1:-1]
|
||||
return key.strip(), [value]
|
||||
|
||||
def parse(self, lineiter):
|
||||
key = None
|
||||
value = []
|
||||
|
||||
for line in lineiter:
|
||||
self.lineno += 1
|
||||
|
||||
line = line.rstrip()
|
||||
if not line:
|
||||
# Blank line, ends multi-line values
|
||||
if key:
|
||||
key, value = self._assignment(key, value)
|
||||
continue
|
||||
elif line[0] in (' ', '\t'):
|
||||
# Continuation of previous assignment
|
||||
if key is None:
|
||||
self.error_unexpected_continuation(line)
|
||||
else:
|
||||
value.append(line.lstrip())
|
||||
continue
|
||||
|
||||
if key:
|
||||
# Flush previous assignment, if any
|
||||
key, value = self._assignment(key, value)
|
||||
|
||||
if line[0] == '[':
|
||||
# Section start
|
||||
section = self._get_section(line)
|
||||
if section:
|
||||
self.new_section(section)
|
||||
elif line[0] in '#;':
|
||||
self.comment(line[1:].lstrip())
|
||||
else:
|
||||
key, value = self._split_key_value(line)
|
||||
if not key:
|
||||
return self.error_empty_key(line)
|
||||
|
||||
if key:
|
||||
# Flush previous assignment, if any
|
||||
self._assignment(key, value)
|
||||
|
||||
def assignment(self, key, value):
|
||||
"""Called when a full assignment is parsed"""
|
||||
raise NotImplementedError()
|
||||
|
||||
def new_section(self, section):
|
||||
"""Called when a new section is started"""
|
||||
raise NotImplementedError()
|
||||
|
||||
def comment(self, comment):
|
||||
"""Called when a comment is parsed"""
|
||||
pass
|
||||
|
||||
def error_invalid_assignment(self, line):
|
||||
raise self.parse_exc("No ':' or '=' found in assignment",
|
||||
self.lineno, line)
|
||||
|
||||
def error_empty_key(self, line):
|
||||
raise self.parse_exc('Key cannot be empty', self.lineno, line)
|
||||
|
||||
def error_unexpected_continuation(self, line):
|
||||
raise self.parse_exc('Unexpected continuation line',
|
||||
self.lineno, line)
|
||||
|
||||
def error_no_section_end_bracket(self, line):
|
||||
raise self.parse_exc('Invalid section (must end with ])',
|
||||
self.lineno, line)
|
||||
|
||||
def error_no_section_name(self, line):
|
||||
raise self.parse_exc('Empty section name', self.lineno, line)
|
@ -40,7 +40,8 @@ import stat
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.openstack.common.gettextutils import _
|
||||
from ceilometer.openstack.common import jsonutils
|
||||
from ceilometer.openstack.common import local
|
||||
|
@ -15,7 +15,8 @@
|
||||
|
||||
import uuid
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.openstack.common import context
|
||||
from ceilometer.openstack.common.gettextutils import _
|
||||
from ceilometer.openstack.common import importutils
|
||||
|
@ -13,7 +13,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.openstack.common.gettextutils import _
|
||||
from ceilometer.openstack.common import importutils
|
||||
from ceilometer.openstack.common import log as logging
|
||||
|
@ -14,7 +14,8 @@
|
||||
# under the License.
|
||||
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.openstack.common import jsonutils
|
||||
from ceilometer.openstack.common import log as logging
|
||||
|
||||
|
@ -14,7 +14,8 @@
|
||||
# under the License.
|
||||
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.openstack.common import context as req_context
|
||||
from ceilometer.openstack.common.gettextutils import _
|
||||
from ceilometer.openstack.common import log as logging
|
||||
|
@ -15,7 +15,8 @@
|
||||
|
||||
'''messaging based notification driver, with message envelopes'''
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.openstack.common import context as req_context
|
||||
from ceilometer.openstack.common.gettextutils import _
|
||||
from ceilometer.openstack.common import log as logging
|
||||
|
@ -28,7 +28,8 @@ For some wrappers that add message versioning to rpc, see:
|
||||
import inspect
|
||||
import logging
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.openstack.common.gettextutils import _
|
||||
from ceilometer.openstack.common import importutils
|
||||
from ceilometer.openstack.common import local
|
||||
|
@ -21,7 +21,8 @@ import copy
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.openstack.common.gettextutils import _
|
||||
from ceilometer.openstack.common import importutils
|
||||
from ceilometer.openstack.common import jsonutils
|
||||
|
@ -28,8 +28,8 @@ import kombu
|
||||
import kombu.connection
|
||||
import kombu.entity
|
||||
import kombu.messaging
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.openstack.common.gettextutils import _
|
||||
from ceilometer.openstack.common import network_utils
|
||||
from ceilometer.openstack.common.rpc import amqp as rpc_amqp
|
||||
|
@ -22,8 +22,8 @@ import uuid
|
||||
|
||||
import eventlet
|
||||
import greenlet
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.openstack.common.gettextutils import _
|
||||
from ceilometer.openstack.common import importutils
|
||||
from ceilometer.openstack.common import jsonutils
|
||||
|
@ -23,8 +23,8 @@ import uuid
|
||||
|
||||
import eventlet
|
||||
import greenlet
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.openstack.common.gettextutils import _
|
||||
from ceilometer.openstack.common import importutils
|
||||
from ceilometer.openstack.common import jsonutils
|
||||
|
@ -22,7 +22,8 @@ import contextlib
|
||||
import itertools
|
||||
import json
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.openstack.common.gettextutils import _
|
||||
from ceilometer.openstack.common import log as logging
|
||||
|
||||
|
@ -28,8 +28,8 @@ import time
|
||||
|
||||
import eventlet
|
||||
import logging as std_logging
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.openstack.common import eventlet_backdoor
|
||||
from ceilometer.openstack.common.gettextutils import _
|
||||
from ceilometer.openstack.common import importutils
|
||||
|
@ -19,10 +19,10 @@
|
||||
import itertools
|
||||
import os
|
||||
|
||||
from oslo.config import cfg
|
||||
from stevedore import extension
|
||||
import yaml
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.openstack.common import log
|
||||
|
||||
OPTS = [
|
||||
|
@ -19,8 +19,9 @@
|
||||
|
||||
import os
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer import utils
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.openstack.common import policy
|
||||
|
||||
|
||||
|
@ -20,8 +20,9 @@
|
||||
|
||||
import itertools
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.collector import meter as meter_api
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.openstack.common import log
|
||||
from ceilometer.openstack.common import rpc
|
||||
from ceilometer import plugin
|
||||
|
@ -20,7 +20,8 @@
|
||||
import os
|
||||
import socket
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.openstack.common import rpc
|
||||
from ceilometer.openstack.common import context
|
||||
from ceilometer.openstack.common import log
|
||||
|
@ -18,15 +18,15 @@
|
||||
"""Storage backend management
|
||||
"""
|
||||
|
||||
from stevedore import driver
|
||||
from datetime import datetime
|
||||
from urlparse import urlparse
|
||||
|
||||
from oslo.config import cfg
|
||||
from stevedore import driver
|
||||
|
||||
from ceilometer.openstack.common import log
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.openstack.common import timeutils
|
||||
|
||||
from urlparse import urlparse
|
||||
|
||||
LOG = log.getLogger(__name__)
|
||||
|
||||
STORAGE_ENGINE_NAMESPACE = 'ceilometer.storage'
|
||||
|
@ -23,13 +23,13 @@ import os
|
||||
import urllib
|
||||
|
||||
import flask
|
||||
from oslo.config import cfg
|
||||
from pecan import set_config
|
||||
from pecan.testing import load_test_app
|
||||
|
||||
from ceilometer import storage
|
||||
from ceilometer.api.v1 import app as v1_app
|
||||
from ceilometer.api.v1 import blueprint as v1_blueprint
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.tests import db as db_test_base
|
||||
from ceilometer.tests import base
|
||||
|
||||
|
@ -19,11 +19,11 @@
|
||||
events.
|
||||
"""
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer import counter
|
||||
from ceilometer import plugin
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
|
||||
|
||||
OPTS = [
|
||||
cfg.StrOpt('cinder_control_exchange',
|
||||
|
@ -1,3 +1,3 @@
|
||||
[DEFAULT]
|
||||
modules=cfg,iniparser,rpc,importutils,excutils,local,jsonutils,gettextutils,timeutils,notifier,context,log,network_utils,setup,policy,service,threadgroup,eventlet_backdoor,loopingcall,version
|
||||
modules=rpc,importutils,excutils,local,jsonutils,gettextutils,timeutils,notifier,context,log,network_utils,setup,policy,service,threadgroup,eventlet_backdoor,loopingcall,version
|
||||
base=ceilometer
|
||||
|
@ -21,9 +21,10 @@ import os
|
||||
import tempfile
|
||||
import unittest
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.api.v1 import app
|
||||
from ceilometer.api import acl
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer import service
|
||||
|
||||
|
||||
|
@ -22,9 +22,10 @@
|
||||
import datetime
|
||||
import logging
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.collector import meter
|
||||
from ceilometer import counter
|
||||
from ceilometer.openstack.common import cfg
|
||||
|
||||
from ceilometer.tests import api as tests_api
|
||||
|
||||
|
@ -22,9 +22,10 @@
|
||||
import datetime
|
||||
import logging
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.collector import meter
|
||||
from ceilometer import counter
|
||||
from ceilometer.openstack.common import cfg
|
||||
|
||||
from ceilometer.tests import api as tests_api
|
||||
|
||||
|
@ -22,10 +22,11 @@
|
||||
import datetime
|
||||
import logging
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.collector import meter
|
||||
from ceilometer import counter
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.tests import api as tests_api
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -22,9 +22,10 @@
|
||||
import datetime
|
||||
import logging
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.collector import meter
|
||||
from ceilometer import counter
|
||||
from ceilometer.openstack.common import cfg
|
||||
|
||||
from ceilometer.tests import api as tests_api
|
||||
|
||||
|
@ -22,10 +22,11 @@
|
||||
import datetime
|
||||
import logging
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.collector import meter
|
||||
from ceilometer import counter
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.tests import api as tests_api
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -21,10 +21,11 @@
|
||||
|
||||
import datetime
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.collector import meter
|
||||
from ceilometer import counter
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.tests import api as tests_api
|
||||
from ceilometer.tests.db import require_map_reduce
|
||||
|
||||
|
@ -20,10 +20,11 @@
|
||||
|
||||
import datetime
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.collector import meter
|
||||
from ceilometer import counter
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.tests import api as tests_api
|
||||
from ceilometer.tests.db import require_map_reduce
|
||||
|
||||
|
@ -21,10 +21,11 @@
|
||||
|
||||
import datetime
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.collector import meter
|
||||
from ceilometer import counter
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.tests import api as tests_api
|
||||
from ceilometer.tests.db import require_map_reduce
|
||||
|
||||
|
@ -21,10 +21,11 @@
|
||||
|
||||
import datetime
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.collector import meter
|
||||
from ceilometer import counter
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.tests import api as tests_api
|
||||
from ceilometer.tests.db import require_map_reduce
|
||||
|
||||
|
@ -21,9 +21,10 @@ import os
|
||||
import tempfile
|
||||
import unittest
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.api import app
|
||||
from ceilometer.api import acl
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer import service
|
||||
|
||||
|
||||
|
@ -21,9 +21,10 @@
|
||||
import datetime
|
||||
import logging
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.collector import meter
|
||||
from ceilometer import counter
|
||||
from ceilometer.openstack.common import cfg
|
||||
|
||||
from .base import FunctionalTest
|
||||
|
||||
|
@ -21,9 +21,10 @@
|
||||
import datetime
|
||||
import logging
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.collector import meter
|
||||
from ceilometer import counter
|
||||
from ceilometer.openstack.common import cfg
|
||||
|
||||
from .base import FunctionalTest
|
||||
|
||||
|
@ -21,9 +21,10 @@
|
||||
import datetime
|
||||
import logging
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.collector import meter
|
||||
from ceilometer import counter
|
||||
from ceilometer.openstack.common import cfg
|
||||
|
||||
from .base import FunctionalTest
|
||||
|
||||
|
@ -20,10 +20,11 @@
|
||||
|
||||
import datetime
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.collector import meter
|
||||
from ceilometer import counter
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.tests.db import require_map_reduce
|
||||
|
||||
from .base import FunctionalTest
|
||||
|
@ -20,10 +20,11 @@
|
||||
|
||||
import datetime
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.collector import meter
|
||||
from ceilometer import counter
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from .base import FunctionalTest
|
||||
from ceilometer.tests.db import require_map_reduce
|
||||
|
||||
|
@ -20,10 +20,11 @@
|
||||
|
||||
import datetime
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.collector import meter
|
||||
from ceilometer import counter
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from .base import FunctionalTest
|
||||
from ceilometer.tests.db import require_map_reduce
|
||||
|
||||
|
@ -20,10 +20,11 @@
|
||||
|
||||
import datetime
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.collector import meter
|
||||
from ceilometer import counter
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from .base import FunctionalTest
|
||||
from ceilometer.tests.db import require_map_reduce
|
||||
|
||||
|
@ -19,16 +19,16 @@
|
||||
"""
|
||||
|
||||
import datetime
|
||||
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from keystoneclient.v2_0 import client as ksclient
|
||||
from stevedore import extension
|
||||
|
||||
from ceilometer.central import manager
|
||||
from ceilometer import counter
|
||||
from ceilometer.tests import base
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from keystoneclient.v2_0 import client as ksclient
|
||||
|
||||
|
||||
@mock.patch('ceilometer.pipeline.setup_pipeline', mock.MagicMock())
|
||||
def test_load_plugins():
|
||||
|
@ -22,13 +22,12 @@ from datetime import datetime
|
||||
|
||||
from mock import patch
|
||||
from mock import MagicMock
|
||||
|
||||
from oslo.config import cfg
|
||||
from stevedore import extension
|
||||
from stevedore.tests import manager as test_manager
|
||||
|
||||
from ceilometer.collector import meter
|
||||
from ceilometer.collector import service
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.storage import base
|
||||
from ceilometer.tests import base as tests_base
|
||||
from ceilometer.compute import notifications
|
||||
|
@ -19,7 +19,9 @@
|
||||
"""
|
||||
|
||||
import datetime
|
||||
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from stevedore import extension
|
||||
|
||||
from ceilometer import nova_client
|
||||
@ -27,8 +29,6 @@ from ceilometer.compute import manager
|
||||
from ceilometer import counter
|
||||
from ceilometer.tests import base
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
|
||||
|
||||
@mock.patch('ceilometer.pipeline.setup_pipeline', mock.MagicMock())
|
||||
def test_load_plugins():
|
||||
|
@ -18,12 +18,13 @@
|
||||
# under the License.
|
||||
|
||||
import cStringIO as StringIO
|
||||
|
||||
from oslo.config import cfg
|
||||
from webob import Request
|
||||
|
||||
from ceilometer.tests import base
|
||||
from ceilometer.objectstore import swift_middleware
|
||||
from ceilometer import pipeline
|
||||
from ceilometer.openstack.common import cfg
|
||||
|
||||
|
||||
class FakeApp(object):
|
||||
|
@ -20,7 +20,8 @@
|
||||
|
||||
import datetime
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.openstack.common import rpc
|
||||
from ceilometer.tests import base
|
||||
|
||||
|
@ -23,10 +23,11 @@
|
||||
import abc
|
||||
import datetime
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.collector import meter
|
||||
from ceilometer import counter
|
||||
from ceilometer import storage
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.tests import base as test_base
|
||||
|
||||
|
||||
|
@ -20,8 +20,9 @@ import logging
|
||||
import os
|
||||
import sqlalchemy
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from tests.storage import base
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.storage import impl_sqlalchemy
|
||||
from ceilometer.storage.sqlalchemy.models import Project, User
|
||||
from ceilometer.storage.sqlalchemy.models import table_args
|
||||
|
@ -18,9 +18,10 @@
|
||||
"""Tests for ceilometer/storage/
|
||||
"""
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer import storage
|
||||
from ceilometer.storage import base
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.tests import base as test_base
|
||||
|
||||
|
||||
|
@ -20,9 +20,10 @@
|
||||
import os
|
||||
import tempfile
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.tests import base
|
||||
from ceilometer import policy
|
||||
from ceilometer.openstack.common import cfg
|
||||
|
||||
|
||||
class TestPolicy(base.TestCase):
|
||||
|
@ -25,7 +25,8 @@ import socket
|
||||
import sys
|
||||
import textwrap
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.openstack.common import importutils
|
||||
|
||||
|
||||
|
@ -25,10 +25,11 @@ import datetime
|
||||
import logging
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.collector import meter
|
||||
from ceilometer import counter
|
||||
from ceilometer import storage
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.openstack.common import timeutils
|
||||
|
||||
|
||||
|
@ -27,8 +27,8 @@ import cPickle as pickle
|
||||
import sys
|
||||
|
||||
from nova import utils
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer.openstack.common import cfg
|
||||
from ceilometer.openstack.common import rpc
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -21,3 +21,4 @@ requests<1.0
|
||||
extras
|
||||
wsme>=0.5b1
|
||||
pyyaml
|
||||
http://tarballs.openstack.org/oslo-config/oslo-config-2013.1b3.tar.gz#egg=oslo-config
|
||||
|
@ -19,8 +19,9 @@
|
||||
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from ceilometer import storage
|
||||
from ceilometer.openstack.common import cfg
|
||||
|
||||
|
||||
def show_users(db, args):
|
||||
|
12
tox.ini
12
tox.ini
@ -20,12 +20,16 @@ setenv=CEILOMETER_TEST_LIVE=1
|
||||
commands = {toxinidir}/wrap_nosetests.sh --no-path-adjustment --with-coverage --cover-erase --cover-package=ceilometer --cover-inclusive []
|
||||
|
||||
[testenv:pep8]
|
||||
deps = pep8==1.3.3
|
||||
deps = -r{toxinidir}/tools/test-requires
|
||||
-r{toxinidir}/tools/pip-requires
|
||||
pep8==1.3.3
|
||||
commands =
|
||||
pep8 --repeat --ignore=E125 --show-source ceilometer setup.py bin/ceilometer-agent-central bin/ceilometer-agent-compute bin/ceilometer-collector bin/ceilometer-api tests
|
||||
|
||||
[testenv:hacking]
|
||||
deps = pep8==1.3.3
|
||||
deps = -r{toxinidir}/tools/test-requires
|
||||
-r{toxinidir}/tools/pip-requires
|
||||
pep8==1.3.3
|
||||
commands =
|
||||
python tools/hacking.py --doctest
|
||||
python tools/hacking.py --ignore=E12,E711,E721,E712,N403,N404 --show-source \
|
||||
@ -50,5 +54,7 @@ deps = -r{toxinidir}/tools/test-requires-folsom
|
||||
-r{toxinidir}/tools/pip-requires
|
||||
|
||||
[testenv:pyflakes]
|
||||
deps = pyflakes
|
||||
deps = -r{toxinidir}/tools/test-requires
|
||||
-r{toxinidir}/tools/pip-requires
|
||||
pyflakes
|
||||
commands = python tools/flakes.py ceilometer
|
||||
|
Loading…
Reference in New Issue
Block a user