Move to the new oslo_config and oslo_log modules

Since a couple of releases ago, the old oslo.config is now
oslo_config, the same thing happening to oslo.log as well.
This patch also removes the vendorized openstack package,
since it's redundant now that oslo_log is out of the
incubator.

Change-Id: Iae1318aa0d2a9aab2d4f6af7d11ed1dfda51e733
This commit is contained in:
Claudiu Popa
2015-08-11 15:02:23 +03:00
parent bccc7d5215
commit fccf0e6f00
128 changed files with 175 additions and 9898 deletions

View File

@@ -14,14 +14,15 @@
import abc
from oslo.config import cfg
from oslo_config import cfg
from oslo_log import log as oslo_logging
import six
from cloudbaseinit.openstack.common import log as logging
from cloudbaseinit.osutils import factory as osutils_factory
from cloudbaseinit.plugins.common import base
from cloudbaseinit.plugins.common import constants
opts = [
cfg.StrOpt('username', default='Admin', help='User to be added to the '
'system or updated if already existing'),
@@ -33,7 +34,7 @@ opts = [
CONF = cfg.CONF
CONF.register_opts(opts)
LOG = logging.getLogger(__name__)
LOG = oslo_logging.getLogger(__name__)
@six.add_metaclass(abc.ABCMeta)

View File

@@ -19,12 +19,13 @@ import re
import tempfile
import uuid
from cloudbaseinit.openstack.common import log as logging
from oslo_log import log as oslo_logging
from cloudbaseinit.osutils import factory as osutils_factory
from cloudbaseinit.plugins.common import base
LOG = logging.getLogger(__name__)
LOG = oslo_logging.getLogger(__name__)
# used with ec2 config files (xmls)
SCRIPT_TAG = 1

View File

@@ -12,11 +12,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from oslo_config import cfg
from oslo_log import log as oslo_logging
from cloudbaseinit.openstack.common import log as logging
from cloudbaseinit.utils import classloader
opts = [
cfg.ListOpt(
'plugins',
@@ -45,7 +46,7 @@ opts = [
CONF = cfg.CONF
CONF.register_opts(opts)
LOG = logging.getLogger(__name__)
LOG = oslo_logging.getLogger(__name__)
# Some plugins were moved to plugins.common, in order to
# better reflect the fact that they are not platform specific.

View File

@@ -14,10 +14,12 @@
import os
from cloudbaseinit.openstack.common import log as logging
from oslo_log import log as oslo_logging
from cloudbaseinit.plugins.common import execcmd
LOG = logging.getLogger(__name__)
LOG = oslo_logging.getLogger(__name__)
FORMATS = {
"cmd": execcmd.Shell,

View File

@@ -14,7 +14,7 @@
import os
from oslo.config import cfg
from oslo_config import cfg
from cloudbaseinit.plugins.common import base
from cloudbaseinit.plugins.common import execcmd

View File

@@ -14,13 +14,14 @@
import struct
from oslo.config import cfg
from oslo_config import cfg
from oslo_log import log as oslo_logging
from cloudbaseinit.openstack.common import log as logging
from cloudbaseinit.osutils import factory as osutils_factory
from cloudbaseinit.plugins.common import base
from cloudbaseinit.utils import dhcp
opts = [
cfg.BoolOpt('mtu_use_dhcp_config', default=True,
help='Configures the network interfaces MTU based on the '
@@ -30,7 +31,7 @@ opts = [
CONF = cfg.CONF
CONF.register_opts(opts)
LOG = logging.getLogger(__name__)
LOG = oslo_logging.getLogger(__name__)
class MTUPlugin(base.BasePlugin):

View File

@@ -15,15 +15,16 @@
import re
from oslo_log import log as oslo_logging
from cloudbaseinit import exception
from cloudbaseinit.metadata.services import base as service_base
from cloudbaseinit.openstack.common import log as logging
from cloudbaseinit.osutils import factory as osutils_factory
from cloudbaseinit.plugins.common import base as plugin_base
from cloudbaseinit.utils import network
LOG = logging.getLogger(__name__)
LOG = oslo_logging.getLogger(__name__)
# Mandatory network details are marked with True. And
# if the key is a tuple, then at least one field must exists.

View File

@@ -14,9 +14,9 @@
import socket
from oslo.config import cfg
from oslo_config import cfg
from oslo_log import log as oslo_logging
from cloudbaseinit.openstack.common import log as logging
from cloudbaseinit.osutils import factory as osutils_factory
from cloudbaseinit.plugins.common import base
from cloudbaseinit.utils import dhcp
@@ -30,7 +30,7 @@ opts = [
CONF = cfg.CONF
CONF.register_opts(opts)
LOG = logging.getLogger(__name__)
LOG = oslo_logging.getLogger(__name__)
class NTPClientPlugin(base.BasePlugin):

View File

@@ -15,9 +15,9 @@
import platform
import re
from oslo.config import cfg
from oslo_config import cfg
from oslo_log import log as oslo_logging
from cloudbaseinit.openstack.common import log as logging
from cloudbaseinit.osutils import factory as osutils_factory
from cloudbaseinit.plugins.common import base
@@ -30,7 +30,7 @@ opts = [
CONF = cfg.CONF
CONF.register_opts(opts)
LOG = logging.getLogger(__name__)
LOG = oslo_logging.getLogger(__name__)
NETBIOS_HOST_NAME_MAX_LEN = 15

View File

@@ -14,9 +14,9 @@
import base64
from oslo.config import cfg
from oslo_config import cfg
from oslo_log import log as oslo_logging
from cloudbaseinit.openstack.common import log as logging
from cloudbaseinit.osutils import factory as osutils_factory
from cloudbaseinit.plugins.common import base
from cloudbaseinit.plugins.common import constants
@@ -33,7 +33,7 @@ CONF = cfg.CONF
CONF.register_opts(opts)
CONF.import_opt('username', 'cloudbaseinit.plugins.common.createuser')
LOG = logging.getLogger(__name__)
LOG = oslo_logging.getLogger(__name__)
class SetUserPasswordPlugin(base.BasePlugin):

View File

@@ -14,16 +14,17 @@
import os
from oslo.config import cfg
from oslo_config import cfg
from oslo_log import log as oslo_logging
from cloudbaseinit import exception
from cloudbaseinit.openstack.common import log as logging
from cloudbaseinit.osutils import factory as osutils_factory
from cloudbaseinit.plugins.common import base
CONF = cfg.CONF
CONF.import_opt('username', 'cloudbaseinit.plugins.common.createuser')
LOG = logging.getLogger(__name__)
LOG = oslo_logging.getLogger(__name__)
class SetUserSSHPublicKeysPlugin(base.BasePlugin):

View File

@@ -16,8 +16,9 @@ import email
import gzip
import io
from oslo_log import log as oslo_logging
from cloudbaseinit.metadata.services import base as metadata_services_base
from cloudbaseinit.openstack.common import log as logging
from cloudbaseinit.plugins.common import base
from cloudbaseinit.plugins.common import execcmd
from cloudbaseinit.plugins.common.userdataplugins import factory
@@ -26,7 +27,7 @@ from cloudbaseinit.utils import encoding
from cloudbaseinit.utils import x509constants
LOG = logging.getLogger(__name__)
LOG = oslo_logging.getLogger(__name__)
class UserDataPlugin(base.BasePlugin):

View File

@@ -1,13 +0,0 @@
# Copyright 2014 Cloudbase Solutions Srl
#
# 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.

View File

@@ -12,10 +12,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from cloudbaseinit.openstack.common import log as logging
from oslo_log import log as oslo_logging
from cloudbaseinit.plugins.common.userdataplugins import base
LOG = logging.getLogger(__name__)
LOG = oslo_logging.getLogger(__name__)
class CloudBootHookPlugin(base.BaseUserDataPlugin):

View File

@@ -13,17 +13,17 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from oslo_config import cfg
from oslo_log import log as oslo_logging
import yaml
from cloudbaseinit.openstack.common import log as logging
from cloudbaseinit.plugins.common.userdataplugins import base
from cloudbaseinit.plugins.common.userdataplugins.cloudconfigplugins import (
factory
)
LOG = logging.getLogger(__name__)
LOG = oslo_logging.getLogger(__name__)
OPTS = [
cfg.ListOpt(
'cloud_config_plugins',

View File

@@ -1,13 +0,0 @@
# Copyright 2015 Cloudbase Solutions Srl
#
# 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.

View File

@@ -12,14 +12,15 @@
# License for the specific language governing permissions and limitations
# under the License.
from cloudbaseinit.openstack.common import log as logging
from oslo_log import log as oslo_logging
from cloudbaseinit.osutils import factory
from cloudbaseinit.plugins.common.userdataplugins.cloudconfigplugins import (
base
)
LOG = logging.getLogger(__name__)
LOG = oslo_logging.getLogger(__name__)
class SetTimezonePlugin(base.BaseCloudConfigPlugin):

View File

@@ -17,10 +17,10 @@ import gzip
import io
import os
from oslo_log import log as oslo_logging
import six
from cloudbaseinit import exception
from cloudbaseinit.openstack.common import log as logging
from cloudbaseinit.plugins.common.userdataplugins.cloudconfigplugins import (
base
)
@@ -29,7 +29,7 @@ from cloudbaseinit.plugins.common.userdataplugins.cloudconfigplugins import (
DEFAULT_PERMISSIONS = 0o644
BASE64_MIME = 'application/base64'
GZIP_MIME = 'application/x-gzip'
LOG = logging.getLogger(__name__)
LOG = oslo_logging.getLogger(__name__)
def _decode_steps(encoding):

View File

@@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from oslo_config import cfg
from cloudbaseinit.utils import classloader

View File

@@ -15,13 +15,13 @@
import os
from oslo.config import cfg
from oslo_config import cfg
from cloudbaseinit.openstack.common import log as logging
from cloudbaseinit.plugins.common.userdataplugins import base
from cloudbaseinit.plugins.common import userdatautils
from cloudbaseinit.utils import encoding
opts = [
cfg.StrOpt('heat_config_dir', default='C:\\cfn', help='The directory '
'where the Heat configuration files must be saved'),
@@ -30,8 +30,6 @@ opts = [
CONF = cfg.CONF
CONF.register_opts(opts)
LOG = logging.getLogger(__name__)
class HeatPlugin(base.BaseUserDataPlugin):
_heat_user_data_filename = "cfn-userdata"

View File

@@ -16,12 +16,9 @@
import os
import tempfile
from cloudbaseinit.openstack.common import log as logging
from cloudbaseinit.plugins.common.userdataplugins import base
from cloudbaseinit.utils import classloader
LOG = logging.getLogger(__name__)
class PartHandlerPlugin(base.BaseUserDataPlugin):

View File

@@ -16,12 +16,14 @@
import os
import tempfile
from cloudbaseinit.openstack.common import log as logging
from oslo_log import log as oslo_logging
from cloudbaseinit.plugins.common import fileexecutils
from cloudbaseinit.plugins.common.userdataplugins import base
from cloudbaseinit.utils import encoding
LOG = logging.getLogger(__name__)
LOG = oslo_logging.getLogger(__name__)
class ShellScriptPlugin(base.BaseUserDataPlugin):

View File

@@ -16,11 +16,12 @@
import functools
import re
from cloudbaseinit.openstack.common import log as logging
from oslo_log import log as oslo_logging
from cloudbaseinit.plugins.common import execcmd
LOG = logging.getLogger(__name__)
LOG = oslo_logging.getLogger(__name__)
# Avoid 80+ length by using a local variable, which
# is deleted afterwards.

View File

@@ -12,10 +12,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from cloudbaseinit.openstack.common import log as logging
from oslo_log import log as oslo_logging
from cloudbaseinit.plugins.common import createuser
LOG = logging.getLogger(__name__)
LOG = oslo_logging.getLogger(__name__)
class CreateUserPlugin(createuser.BaseCreateUserPlugin):

View File

@@ -15,9 +15,9 @@
import ctypes
import re
from oslo.config import cfg
from oslo_config import cfg
from oslo_log import log as oslo_logging
from cloudbaseinit.openstack.common import log as logging
from cloudbaseinit.plugins.common import base
from cloudbaseinit.utils.windows import vds
@@ -38,7 +38,7 @@ opts = [
CONF = cfg.CONF
CONF.register_opts(opts)
LOG = logging.getLogger(__name__)
LOG = oslo_logging.getLogger(__name__)
class ExtendVolumesPlugin(base.BasePlugin):

View File

@@ -14,13 +14,14 @@
import os
from oslo.config import cfg
from oslo_config import cfg
from oslo_log import log as oslo_logging
from cloudbaseinit import exception
from cloudbaseinit.openstack.common import log as logging
from cloudbaseinit.osutils import factory as osutils_factory
from cloudbaseinit.plugins.common import base
opts = [
cfg.BoolOpt('activate_windows', default=False,
help='Activates Windows automatically'),
@@ -29,7 +30,7 @@ opts = [
CONF = cfg.CONF
CONF.register_opts(opts)
LOG = logging.getLogger(__name__)
LOG = oslo_logging.getLogger(__name__)
class WindowsLicensingPlugin(base.BasePlugin):

View File

@@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from oslo_config import cfg
from cloudbaseinit.osutils import factory
from cloudbaseinit.plugins.common import setuserpassword

View File

@@ -12,10 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from oslo_config import cfg
from oslo_log import log as oslo_logging
from cloudbaseinit import exception
from cloudbaseinit.openstack.common import log as logging
from cloudbaseinit.osutils import factory as osutils_factory
from cloudbaseinit.plugins.common import base
from cloudbaseinit.plugins.common import constants
@@ -26,7 +26,7 @@ from cloudbaseinit.utils.windows import x509
CONF = cfg.CONF
CONF.import_opt('username', 'cloudbaseinit.plugins.common.createuser')
LOG = logging.getLogger(__name__)
LOG = oslo_logging.getLogger(__name__)
class ConfigWinRMCertificateAuthPlugin(base.BasePlugin):

View File

@@ -12,9 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from oslo_config import cfg
from oslo_log import log as oslo_logging
from cloudbaseinit.openstack.common import log as logging
from cloudbaseinit.osutils import factory as osutils_factory
from cloudbaseinit.plugins.common import base
from cloudbaseinit.utils.windows import security
@@ -31,7 +31,7 @@ opts = [
CONF = cfg.CONF
CONF.register_opts(opts)
LOG = logging.getLogger(__name__)
LOG = oslo_logging.getLogger(__name__)
class ConfigWinRMListenerPlugin(base.BasePlugin):