Merge "Use oslo-config-2013.1b3"

This commit is contained in:
Jenkins 2013-02-21 08:49:28 +00:00 committed by Gerrit Code Review
commit a3daa3fd99
45 changed files with 91 additions and 1916 deletions

View File

@ -34,10 +34,11 @@ if os.path.exists(os.path.join(possible_topdir, 'heat', '__init__.py')):
gettext.install('heat', unicode=1)
from oslo.config import cfg
from heat.common import config
from heat.common import wsgi
from heat.openstack.common import cfg
from heat.openstack.common import log as logging
LOG = logging.getLogger('heat.api')

View File

@ -36,10 +36,11 @@ if os.path.exists(os.path.join(possible_topdir, 'heat', '__init__.py')):
gettext.install('heat', unicode=1)
from oslo.config import cfg
from heat.common import config
from heat.common import wsgi
from heat.openstack.common import cfg
from heat.openstack.common import log as logging
LOG = logging.getLogger('heat.api.cfn')

View File

@ -36,10 +36,11 @@ if os.path.exists(os.path.join(possible_topdir, 'heat', '__init__.py')):
gettext.install('heat', unicode=1)
from oslo.config import cfg
from heat.common import config
from heat.common import wsgi
from heat.openstack.common import cfg
from heat.openstack.common import log as logging
LOG = logging.getLogger('heat.api.cloudwatch')

View File

@ -38,7 +38,8 @@ if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'heat', '__init__.py')):
gettext.install('heat', unicode=1)
from heat.openstack.common import cfg
from oslo.config import cfg
from heat.openstack.common import log as logging
from heat.openstack.common import service

View File

@ -25,9 +25,9 @@ import os
import sys
from eventlet.green import socket
from oslo.config import cfg
from heat.common import wsgi
from heat.openstack.common import cfg
from heat.openstack.common import rpc
DEFAULT_PORT = 8000

View File

@ -13,10 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from heat.openstack.common import local
from heat.common import exception
from heat.common import wsgi
from heat.openstack.common import cfg
from heat.openstack.common import importutils
from heat.openstack.common import uuidutils
from heat.db import api as db_api

View File

@ -14,11 +14,11 @@
# under the License.
import base64
from Crypto.Cipher import AES
from Crypto import Random
from heat.openstack.common import cfg
from oslo.config import cfg
from heat.openstack.common import log as logging

View File

@ -15,7 +15,8 @@
import eventlet
from keystoneclient.v2_0 import client as kc
from heat.openstack.common import cfg
from oslo.config import cfg
from heat.openstack.common import log as logging
logger = logging.getLogger('heat.common.keystoneclient')

View File

@ -21,8 +21,9 @@
import json
import os.path
from oslo.config import cfg
from heat.common import exception
from heat.openstack.common import cfg
import heat.openstack.common.log as logging
from heat.openstack.common import policy

View File

@ -28,12 +28,13 @@ import os
import signal
import sys
import time
from lxml import etree
import eventlet
import eventlet.greenio
from eventlet.green import socket, ssl
import eventlet.wsgi
from lxml import etree
from oslo.config import cfg
from paste import deploy
import routes
import routes.middleware
@ -41,7 +42,6 @@ import webob.dec
import webob.exc
from heat.common import exception
from heat.openstack.common import cfg
from heat.openstack.common import importutils

View File

@ -25,9 +25,10 @@ Usage:
The underlying driver is loaded . SQLAlchemy is currently the only
supported backend.
'''
from heat.db import utils
from heat.openstack.common import cfg
from oslo.config import cfg
from heat.db import utils
SQL_CONNECTION = 'sqlite://'
SQL_IDLE_TIMEOUT = 3600

View File

@ -12,9 +12,10 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import eventlet
from heat.openstack.common import cfg
import eventlet
from oslo.config import cfg
from heat.openstack.common import importutils
from heat.openstack.common import log as logging

View File

@ -48,7 +48,7 @@ def _initialise():
_register_modules(plugin_loader.load_modules(sys.modules[__name__]))
from heat.openstack.common import cfg
from oslo.config import cfg
plugin_pkg = plugin_loader.create_subpackage(cfg.CONF.plugin_dirs,
'heat.engine')

View File

@ -13,20 +13,20 @@
# License for the specific language governing permissions and limitations
# under the License.
import eventlet
import os
import json
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import json
import os
import pkgutil
from urlparse import urlparse
import eventlet
from oslo.config import cfg
from heat.engine import clients
from heat.engine import resource
from heat.common import exception
from heat.openstack.common import cfg
from heat.openstack.common import log as logging
logger = logging.getLogger(__name__)

View File

@ -13,20 +13,20 @@
# License for the specific language governing permissions and limitations
# under the License.
import eventlet
import time
import urllib
import urlparse
import json
import eventlet
from oslo.config import cfg
from heat.common import exception
from heat.common import identifier
from heat.engine import resource
from heat.openstack.common import log as logging
from heat.openstack.common import cfg
# FIXME : we should remove the common.ec2signer fallback implementation
# when the versions of keystoneclient we support all have the Ec2Signer
# utility class

View File

@ -14,9 +14,11 @@
# under the License.
import functools
import webob
import json
from oslo.config import cfg
import webob
from heat.common import context
from heat.db import api as db_api
from heat.engine import api
@ -29,7 +31,6 @@ from heat.engine import resource
from heat.engine import resources
from heat.engine import watchrule
from heat.openstack.common import cfg
from heat.openstack.common import log as logging
from heat.openstack.common import threadgroup
from heat.openstack.common.gettextutils import _

File diff suppressed because it is too large Load Diff

View File

@ -24,8 +24,7 @@ import traceback
import eventlet
import eventlet.backdoor
import greenlet
from heat.openstack.common import cfg
from oslo.config import cfg
eventlet_backdoor_opts = [
cfg.IntOpt('backdoor_port',

View File

@ -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)

View File

@ -40,7 +40,8 @@ import stat
import sys
import traceback
from heat.openstack.common import cfg
from oslo.config import cfg
from heat.openstack.common.gettextutils import _
from heat.openstack.common import jsonutils
from heat.openstack.common import local

View File

@ -15,7 +15,8 @@
import uuid
from heat.openstack.common import cfg
from oslo.config import cfg
from heat.openstack.common import context
from heat.openstack.common.gettextutils import _
from heat.openstack.common import importutils

View File

@ -13,7 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from heat.openstack.common import cfg
from oslo.config import cfg
from heat.openstack.common.gettextutils import _
from heat.openstack.common import importutils
from heat.openstack.common import log as logging

View File

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from heat.openstack.common import cfg
from heat.openstack.common import jsonutils
from heat.openstack.common import log as logging

View File

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from heat.openstack.common import cfg
from heat.openstack.common import context as req_context
from heat.openstack.common.gettextutils import _
from heat.openstack.common import log as logging

View File

@ -15,7 +15,8 @@
'''messaging based notification driver, with message envelopes'''
from heat.openstack.common import cfg
from oslo.config import cfg
from heat.openstack.common import context as req_context
from heat.openstack.common.gettextutils import _
from heat.openstack.common import log as logging

View File

@ -25,7 +25,8 @@ For some wrappers that add message versioning to rpc, see:
rpc.proxy
"""
from heat.openstack.common import cfg
from oslo.config import cfg
from heat.openstack.common import importutils

View File

@ -21,7 +21,8 @@ import copy
import sys
import traceback
from heat.openstack.common import cfg
from oslo.config import cfg
from heat.openstack.common.gettextutils import _
from heat.openstack.common import importutils
from heat.openstack.common import jsonutils

View File

@ -28,8 +28,8 @@ import kombu
import kombu.connection
import kombu.entity
import kombu.messaging
from oslo.config import cfg
from heat.openstack.common import cfg
from heat.openstack.common.gettextutils import _
from heat.openstack.common import network_utils
from heat.openstack.common.rpc import amqp as rpc_amqp

View File

@ -22,8 +22,8 @@ import uuid
import eventlet
import greenlet
from oslo.config import cfg
from heat.openstack.common import cfg
from heat.openstack.common.gettextutils import _
from heat.openstack.common import importutils
from heat.openstack.common import jsonutils

View File

@ -23,8 +23,8 @@ import uuid
import eventlet
import greenlet
from oslo.config import cfg
from heat.openstack.common import cfg
from heat.openstack.common.gettextutils import _
from heat.openstack.common import importutils
from heat.openstack.common import jsonutils

View File

@ -22,7 +22,8 @@ import contextlib
import itertools
import json
from heat.openstack.common import cfg
from oslo.config import cfg
from heat.openstack.common.gettextutils import _
from heat.openstack.common import log as logging

View File

@ -20,6 +20,7 @@
"""Generic Node base class for all workers that run on hosts."""
import errno
import logging as std_logging
import os
import random
import signal
@ -27,9 +28,8 @@ import sys
import time
import eventlet
import logging as std_logging
from oslo.config import cfg
from heat.openstack.common import cfg
from heat.openstack.common import eventlet_backdoor
from heat.openstack.common.gettextutils import _
from heat.openstack.common import importutils

View File

@ -18,7 +18,8 @@
Client side of the heat engine RPC API.
"""
from heat.openstack.common import cfg
from oslo.config import cfg
from heat.openstack.common import rpc
import heat.openstack.common.rpc.proxy

View File

@ -12,17 +12,17 @@
# License for the specific language governing permissions and limitations
# under the License.
import mox
import json
import os
import unittest
import mox
from nose.plugins.attrib import attr
from oslo.config import cfg
from heat.common import context
from heat.common import identifier
from heat.common import policy
from heat.openstack.common import cfg
from heat.openstack.common import rpc
import heat.openstack.common.rpc.common as rpc_common
from heat.common.wsgi import Request

View File

@ -13,13 +13,14 @@
# under the License.
import os
import mox
import unittest
import mox
from nose.plugins.attrib import attr
from oslo.config import cfg
from heat.common import context
from heat.common import policy
from heat.openstack.common import cfg
from heat.openstack.common import rpc
from heat.common.wsgi import Request
from heat.api.aws import exception

View File

@ -12,17 +12,16 @@
# License for the specific language governing permissions and limitations
# under the License.
import mox
import json
import unittest
from nose.plugins.attrib import attr
import mox
from nose.plugins.attrib import attr
from oslo.config import cfg
import webob.exc
from heat.common import context
from heat.common import identifier
from heat.openstack.common import cfg
from heat.openstack.common import rpc
import heat.openstack.common.rpc.common as rpc_common
from heat.common.wsgi import Request

View File

@ -13,18 +13,18 @@
# License for the specific language governing permissions and limitations
# under the License.
import mox
import json
import unittest
from nose.plugins.attrib import attr
import os.path
import mox
from nose.plugins.attrib import attr
from oslo.config import cfg
import unittest
import heat.api
from heat.common import context
from heat.common import policy
from heat.common import exception
from heat.openstack.common import cfg
@attr(tag=['unit', 'common-policy', 'Enforcer'])

View File

@ -14,10 +14,11 @@
import os
import unittest
import mox
from nose.plugins.attrib import attr
from oslo.config import cfg
from heat.common import context
from heat.common import exception
@ -31,7 +32,6 @@ from heat.engine import service
from heat.engine.resources import instance as instances
from heat.engine import watchrule
from heat.openstack.common import threadgroup
from heat.openstack.common import cfg
tests_dir = os.path.dirname(os.path.realpath(__file__))

View File

@ -19,14 +19,14 @@ Unit Tests for heat.rpc.client
"""
import stubout
from nose.plugins.attrib import attr
from oslo.config import cfg
import stubout
import unittest
from heat.common import context
from heat.common import identifier
from heat.rpc import client as rpc_client
from heat.openstack.common import cfg
from heat.openstack.common import rpc

View File

@ -14,11 +14,11 @@
import os
import mox
import unittest
import mox
from nose.plugins.attrib import attr
from oslo.config import cfg
from heat.common import context
from heat.common import exception
@ -26,7 +26,6 @@ from heat.common import template_format
from heat.engine import parser
from heat.engine.resources import user
from heat.tests import fakes
from heat.openstack.common import cfg
@attr(tag=['unit', 'resource', 'User'])

View File

@ -20,8 +20,10 @@ import datetime
import json
import eventlet
import unittest
from nose.plugins.attrib import attr
from oslo.config import cfg
import unittest
from heat.tests import fakes
from heat.tests.utils import stack_delete_after
@ -31,7 +33,6 @@ from heat.common import identifier
from heat.engine import parser
from heat.engine.resources import wait_condition as wc
from heat.common import context
from heat.openstack.common import cfg
test_template_waitcondition = '''
{

View File

@ -1,7 +1,7 @@
[DEFAULT]
# The list of modules to copy from openstack-common
modules=gettextutils,cfg,local,iniparser,utils,exception,timeutils,importutils,setup,log,jsonutils,notifier,rpc,excutils,service,threadgroup,eventlet_backdoor,loopingcall,network_utils,uuidutils,version,policy
modules=gettextutils,local,utils,exception,timeutils,importutils,setup,log,jsonutils,notifier,rpc,excutils,service,threadgroup,eventlet_backdoor,loopingcall,network_utils,uuidutils,version,policy
# The base module to hold the copy of openstack.common
base=heat

View File

@ -18,6 +18,7 @@ import setuptools
from heat.openstack.common import setup
requires = setup.parse_requirements()
depend_links = setup.parse_dependency_links()
project = 'heat'
@ -34,6 +35,7 @@ setuptools.setup(
packages=setuptools.find_packages(exclude=['bin']),
include_package_data=True,
install_requires=requires,
dependency_links=depend_links,
classifiers=[
'Development Status :: 4 - Beta',
'License :: OSI Approved :: Apache Software License',

View File

@ -30,3 +30,4 @@ python-swiftclient
python-quantumclient
python-cinderclient
PyYAML>=3.1.0
http://tarballs.openstack.org/oslo-config/oslo-config-2013.1b3.tar.gz#egg=oslo-config

View File

@ -8,8 +8,7 @@ deps = -r{toxinidir}/tools/pip-requires
commands = nosetests -a tag='unit'
[testenv:pep8]
deps = pep8==1.3.4
commands = pep8 --repeat --show-source heat setup.py
commands = pep8 --repeat --show-source --exclude openstack heat setup.py
[testenv:venv]
commands = {posargs}