Fix: "import" issue for Python 2/3 compatible code

use absolute path imports to compat python3
remove H301 ignore to enable H304 flake8 check

Story: 2003433
Task: 28376

Change-Id: I3a50a0298fe34c60e3c63df23e72dcbb07c585d1
Signed-off-by: Sun Austin <austin.sun@intel.com>
This commit is contained in:
Sun Austin 2018-12-12 23:21:29 +08:00
parent 491c1ed330
commit c521b8c28c
113 changed files with 333 additions and 247 deletions

View File

@ -3,17 +3,30 @@
#
# SPDX-License-Identifier: Apache-2.0
#
# flake8: noqa
#
from common.validator import validate
from common.configobjects import (Network, DEFAULT_CONFIG, REGION_CONFIG,
DEFAULT_NAMES, HP_NAMES, SUBCLOUD_CONFIG,
MGMT_TYPE, INFRA_TYPE, OAM_TYPE,
NETWORK_PREFIX_NAMES, HOST_XML_ATTRIBUTES,
DEFAULT_DOMAIN_NAME)
from common.exceptions import ConfigError, ConfigFail, ValidateFail
from common.utils import is_valid_vlan, is_mtu_valid, \
validate_network_str, validate_address_str, validate_address, \
ip_version_to_string, lag_mode_to_str, \
validate_openstack_password, extract_openstack_password_rules_from_file
from configutilities.common.validator import validate # noqa: F401
from configutilities.common.configobjects import Network # noqa: F401
from configutilities.common.configobjects import DEFAULT_CONFIG # noqa: F401
from configutilities.common.configobjects import REGION_CONFIG # noqa: F401
from configutilities.common.configobjects import DEFAULT_NAMES # noqa: F401
from configutilities.common.configobjects import HP_NAMES # noqa: F401
from configutilities.common.configobjects import SUBCLOUD_CONFIG # noqa: F401
from configutilities.common.configobjects import MGMT_TYPE # noqa: F401
from configutilities.common.configobjects import INFRA_TYPE # noqa: F401
from configutilities.common.configobjects import OAM_TYPE # noqa: F401
from configutilities.common.configobjects import NETWORK_PREFIX_NAMES # noqa: F401
from configutilities.common.configobjects import HOST_XML_ATTRIBUTES # noqa: F401
from configutilities.common.configobjects import DEFAULT_DOMAIN_NAME # noqa: F401
from configutilities.common.exceptions import ConfigError # noqa: F401
from configutilities.common.exceptions import ConfigFail # noqa: F401
from configutilities.common.exceptions import ValidateFail # noqa: F401
from configutilities.common.utils import is_valid_vlan # noqa: F401
from configutilities.common.utils import is_mtu_valid # noqa: F401
from configutilities.common.utils import validate_network_str # noqa: F401
from configutilities.common.utils import validate_address_str # noqa: F401
from configutilities.common.utils import validate_address # noqa: F401
from configutilities.common.utils import ip_version_to_string # noqa: F401
from configutilities.common.utils import lag_mode_to_str # noqa: F401
from configutilities.common.utils import validate_openstack_password # noqa: F401
from configutilities.common.utils import extract_openstack_password_rules_from_file # noqa: F401

View File

@ -6,9 +6,12 @@ SPDX-License-Identifier: Apache-2.0
"""
from netaddr import IPRange
from exceptions import ConfigFail, ValidateFail
from utils import is_mtu_valid, is_valid_vlan, \
validate_network_str, validate_address_str
from configutilities.common.exceptions import ConfigFail
from configutilities.common.exceptions import ValidateFail
from configutilities.common.utils import is_mtu_valid
from configutilities.common.utils import is_valid_vlan
from configutilities.common.utils import validate_network_str
from configutilities.common.utils import validate_address_str
DEFAULT_CONFIG = 0
REGION_CONFIG = 1

View File

@ -6,8 +6,8 @@
import wx
from exceptions import ValidateFail
import wrs_ico
from configutilities.common.exceptions import ValidateFail
from configutilities.common import wrs_ico
TEXT_BOX_SIZE = (150, -1)
TEXT_WIDTH = 450

View File

@ -8,11 +8,11 @@ SPDX-License-Identifier: Apache-2.0
from six.moves import configparser
import re
import six
from netaddr import (IPNetwork,
IPAddress,
AddrFormatError)
from netaddr import IPNetwork
from netaddr import IPAddress
from netaddr import AddrFormatError
from exceptions import ValidateFail
from configutilities.common.exceptions import ValidateFail
EXPECTED_SERVICE_NAME_AND_TYPE = (
{"KEYSTONE_SERVICE_NAME": "keystone",

View File

@ -4,15 +4,26 @@ Copyright (c) 2015-2017 Wind River Systems, Inc.
SPDX-License-Identifier: Apache-2.0
"""
from configobjects import DEFAULT_NAMES, NETWORK_PREFIX_NAMES, OAM_TYPE, \
MGMT_TYPE, Network, REGION_CONFIG, INFRA_TYPE, \
DEFAULT_DOMAIN_NAME, HP_NAMES, SUBCLOUD_CONFIG
from configutilities.common.configobjects import DEFAULT_NAMES
from configutilities.common.configobjects import NETWORK_PREFIX_NAMES
from configutilities.common.configobjects import OAM_TYPE
from configutilities.common.configobjects import MGMT_TYPE
from configutilities.common.configobjects import Network
from configutilities.common.configobjects import REGION_CONFIG
from configutilities.common.configobjects import INFRA_TYPE
from configutilities.common.configobjects import DEFAULT_DOMAIN_NAME
from configutilities.common.configobjects import HP_NAMES
from configutilities.common.configobjects import SUBCLOUD_CONFIG
from netaddr import IPRange
from utils import lag_mode_to_str, validate_network_str, \
check_network_overlap, is_mtu_valid, get_service, \
get_optional, validate_address_str
from exceptions import ConfigFail, ValidateFail
from configutilities.common.utils import lag_mode_to_str
from configutilities.common.utils import validate_network_str
from configutilities.common.utils import check_network_overlap
from configutilities.common.utils import is_mtu_valid
from configutilities.common.utils import get_service
from configutilities.common.utils import get_optional
from configutilities.common.utils import validate_address_str
from configutilities.common.exceptions import ConfigFail
from configutilities.common.exceptions import ValidateFail
# Constants

View File

@ -9,9 +9,11 @@ from __future__ import print_function
import sys
import os
from six.moves import configparser
from common.validator import validate
from common.configobjects import DEFAULT_CONFIG, REGION_CONFIG
from common.exceptions import ConfigFail, ValidateFail
from configutilities.common.validator import validate
from configutilities.common.configobjects import DEFAULT_CONFIG
from configutilities.common.configobjects import REGION_CONFIG
from configutilities.common.exceptions import ConfigFail
from configutilities.common.exceptions import ValidateFail
def parse_config(config_file):

View File

@ -12,11 +12,20 @@ import wx.wizard as wiz
import wx.lib.dialogs
import wx.lib.scrolledpanel
from common.configobjects import REGION_CONFIG, DEFAULT_CONFIG
from common.exceptions import ValidateFail
from common.guicomponents import Field, TYPES, prepare_fields, on_change, \
debug, set_icons, TEXT_WIDTH, VGAP, HGAP
from common.validator import ConfigValidator, TiS_VERSION
from configutilities.common.configobjects import REGION_CONFIG
from configutilities.common.configobjects import DEFAULT_CONFIG
from configutilities.common.exceptions import ValidateFail
from configutilities.common.guicomponents import Field
from configutilities.common.guicomponents import TYPES
from configutilities.common.guicomponents import prepare_fields
from configutilities.common.guicomponents import on_change
from configutilities.common.guicomponents import debug
from configutilities.common.guicomponents import set_icons
from configutilities.common.guicomponents import TEXT_WIDTH
from configutilities.common.guicomponents import VGAP
from configutilities.common.guicomponents import HGAP
from configutilities.common.validator import ConfigValidator
from configutilities.common.validator import TiS_VERSION
PADDING = 5
CONFIG_TYPE = DEFAULT_CONFIG

View File

@ -7,10 +7,10 @@ SPDX-License-Identifier: Apache-2.0
import wx
from common.guicomponents import set_icons
from common.validator import TiS_VERSION
import configfiletool
import hostfiletool
from configutilities.common.guicomponents import set_icons
from configutilities.common.validator import TiS_VERSION
from configutilities import configfiletool
from configutilities import hostfiletool
TEXT_WIDTH = 560
BTN_SIZE = (200, -1)

View File

@ -11,11 +11,16 @@ import xml.etree.ElementTree as ET
import wx
from common import utils, exceptions
from common.guicomponents import Field, TYPES, prepare_fields, on_change, \
set_icons, handle_sub_show
from common.configobjects import HOST_XML_ATTRIBUTES
from common.validator import TiS_VERSION
from configutilities.common import utils
from configutilities.common import exceptions
from configutilities.common.guicomponents import Field
from configutilities.common.guicomponents import TYPES
from configutilities.common.guicomponents import prepare_fields
from configutilities.common.guicomponents import on_change
from configutilities.common.guicomponents import set_icons
from configutilities.common.guicomponents import handle_sub_show
from configutilities.common.configobjects import HOST_XML_ATTRIBUTES
from configutilities.common.validator import TiS_VERSION
PAGE_SIZE = (200, 200)
WINDOW_SIZE = (570, 700)

View File

@ -5,7 +5,8 @@ SPDX-License-Identifier: Apache-2.0
"""
from setuptools import setup, find_packages
from setuptools import setup
from setuptools import find_packages
setup(
name='wrs-configutility',

View File

@ -5,7 +5,8 @@ SPDX-License-Identifier: Apache-2.0
"""
from setuptools import setup, find_packages
from setuptools import setup
from setuptools import find_packages
setup(
name='configutilities',

View File

@ -24,12 +24,11 @@ commands = flake8 {posargs}
# H series are hacking
# H102: Apache 2.0 license header not found
# H104: File contains nothing but comments
# H301: one import per line
# H306: imports not in alphabetical order
# H401: docstring should not start with a space
# H403: multi line docstrings should end on a new line
# H404: multi line docstring should start without a leading new line
# H405: multi line docstring summary not separated with an empty line
[flake8]
ignore = H102,H104,H301,H306,H401,H403,H404,H405
exclude = dist
ignore = H102,H104,H306,H401,H403,H404,H405
exclude = dist,build

View File

@ -26,14 +26,16 @@ from fm_api import constants as fm_constants
from fm_api import fm_api
from sysinv.common import constants as sysinv_constants
from common import log
from common import constants
from common.exceptions import BackupFail, RestoreFail
from common.exceptions import KeystoneFail, SysInvFail
import openstack
from controllerconfig.common import log
from controllerconfig.common import constants
from controllerconfig.common.exceptions import BackupFail
from controllerconfig.common.exceptions import RestoreFail
from controllerconfig.common.exceptions import KeystoneFail
from controllerconfig.common.exceptions import SysInvFail
from controllerconfig import openstack
import tsconfig.tsconfig as tsconfig
import utils
import sysinv_api as sysinv
from controllerconfig import utils
from controllerconfig import sysinv_api as sysinv
from six.moves import input
LOG = log.get_logger(__name__)

View File

@ -20,14 +20,15 @@ import tempfile
import fileinput
import subprocess
from common import constants
from controllerconfig.common import constants
from sysinv.common import constants as si_const
import sysinv_api
from controllerconfig import sysinv_api
import tsconfig.tsconfig as tsconfig
from common import log
from common.exceptions import CloneFail, BackupFail
import utils
import backup_restore
from controllerconfig.common import log
from controllerconfig.common.exceptions import CloneFail
from controllerconfig.common.exceptions import BackupFail
from controllerconfig import utils
from controllerconfig import backup_restore
DEBUG = False
LOG = log.get_logger(__name__)

View File

@ -8,7 +8,7 @@
DC Manager Interactions
"""
import log
from controllerconfig.common import log
from Crypto.Hash import MD5
from configutilities.common import crypt

View File

@ -11,8 +11,8 @@ OpenStack Keystone Interactions
import datetime
import iso8601
from exceptions import KeystoneFail
import log
from controllerconfig.common.exceptions import KeystoneFail
from controllerconfig.common import log
LOG = log.get_logger(__name__)

View File

@ -8,10 +8,10 @@ import httplib
import json
import urllib2
from exceptions import KeystoneFail
import dcmanager
import keystone
import log
from controllerconfig.common.exceptions import KeystoneFail
from controllerconfig.common import dcmanager
from controllerconfig.common import keystone
from controllerconfig.common import log
LOG = log.get_logger(__name__)

View File

@ -20,27 +20,33 @@ import textwrap
import time
import pyudev
from configutilities import ConfigFail, ValidateFail
from configutilities import is_valid_vlan, is_mtu_valid, \
validate_network_str, validate_address_str, validate_address, \
ip_version_to_string, validate_openstack_password
from configutilities import ConfigFail
from configutilities import ValidateFail
from configutilities import is_valid_vlan
from configutilities import is_mtu_valid
from configutilities import validate_network_str
from configutilities import validate_address_str
from configutilities import validate_address
from configutilities import ip_version_to_string
from configutilities import validate_openstack_password
from configutilities import DEFAULT_DOMAIN_NAME
from netaddr import (IPNetwork,
IPAddress,
IPRange,
AddrFormatError)
from netaddr import IPNetwork
from netaddr import IPAddress
from netaddr import IPRange
from netaddr import AddrFormatError
from sysinv.common import constants as sysinv_constants
from tsconfig.tsconfig import SW_VERSION
import openstack
import sysinv_api as sysinv
import utils
import progress
from controllerconfig import openstack
from controllerconfig import sysinv_api as sysinv
from controllerconfig import utils
from controllerconfig import progress
from common import constants
from common import log
from common.exceptions import KeystoneFail, SysInvFail
from common.exceptions import UserQuit
from controllerconfig.common import constants
from controllerconfig.common import log
from controllerconfig.common.exceptions import KeystoneFail
from controllerconfig.common.exceptions import SysInvFail
from controllerconfig.common.exceptions import UserQuit
from six.moves import input
LOG = log.get_logger(__name__)

View File

@ -12,10 +12,10 @@ import os
import time
import subprocess
from common import log
from common.exceptions import SysInvFail
from common.rest_api_utils import get_token
import sysinv_api as sysinv
from controllerconfig.common import log
from controllerconfig.common.exceptions import SysInvFail
from controllerconfig.common.rest_api_utils import get_token
from controllerconfig import sysinv_api as sysinv
LOG = log.get_logger(__name__)

View File

@ -1,6 +1,6 @@
import sys
from common import log
from controllerconfig.common import log
LOG = log.get_logger(__name__)

View File

@ -12,20 +12,22 @@ import subprocess
import sys
import textwrap
import time
import utils
from controllerconfig import utils
import uuid
from common import constants
from common import log
from common import rest_api_utils as rutils
from common.exceptions import KeystoneFail
from controllerconfig.common import constants
from controllerconfig.common import log
from controllerconfig.common import rest_api_utils as rutils
from controllerconfig.common.exceptions import KeystoneFail
from configutilities.common import utils as cutils
from configutilities.common.configobjects import REGION_CONFIG, SUBCLOUD_CONFIG
from configutilities.common.configobjects import REGION_CONFIG
from configutilities.common.configobjects import SUBCLOUD_CONFIG
from configutilities import ConfigFail
from configassistant import ConfigAssistant
from controllerconfig.configassistant import ConfigAssistant
from netaddr import IPAddress
from systemconfig import parse_system_config, configure_management_interface, \
create_cgcs_config_file
from controllerconfig.systemconfig import parse_system_config
from controllerconfig.systemconfig import configure_management_interface
from controllerconfig.systemconfig import create_cgcs_config_file
from configutilities import DEFAULT_DOMAIN_NAME
# Temporary file for building cgcs_config

View File

@ -12,8 +12,8 @@ import json
import openstack
import urllib2
from common import log
from common.exceptions import KeystoneFail
from controllerconfig.common import log
from controllerconfig.common.exceptions import KeystoneFail
LOG = log.get_logger(__name__)

View File

@ -12,17 +12,26 @@ import readline
import sys
import textwrap
from common import constants
from common import log
from common.exceptions import (BackupFail, RestoreFail, UserQuit, CloneFail)
from configutilities import lag_mode_to_str, Network, validate
from controllerconfig.common import constants
from controllerconfig.common import log
from controllerconfig.common.exceptions import BackupFail
from controllerconfig.common.exceptions import RestoreFail
from controllerconfig.common.exceptions import UserQuit
from controllerconfig.common.exceptions import CloneFail
from configutilities import lag_mode_to_str
from configutilities import Network
from configutilities import validate
from configutilities import ConfigFail
from configutilities import DEFAULT_CONFIG, REGION_CONFIG, SUBCLOUD_CONFIG
from configutilities import MGMT_TYPE, HP_NAMES, DEFAULT_NAMES
from configassistant import ConfigAssistant
import backup_restore
import utils
import clone
from configutilities import DEFAULT_CONFIG
from configutilities import REGION_CONFIG
from configutilities import SUBCLOUD_CONFIG
from configutilities import MGMT_TYPE
from configutilities import HP_NAMES
from configutilities import DEFAULT_NAMES
from controllerconfig.configassistant import ConfigAssistant
from controllerconfig import backup_restore
from controllerconfig import utils
from controllerconfig import clone
# Temporary file for building cgcs_config
TEMP_CGCS_CONFIG_FILE = "/tmp/cgcs_config"

View File

@ -18,9 +18,10 @@ import shutil
import sys
import configutilities.common.exceptions as exceptions
from configutilities import validate, REGION_CONFIG
from configutilities import REGION_CONFIG
from configutilities import validate
import controllerconfig.common.keystone as keystone
import test_answerfile
from controllerconfig.tests import test_answerfile
sys.modules['fm_core'] = mock.Mock()

View File

@ -12,7 +12,8 @@ import pytest
import sys
import configutilities.common.exceptions as exceptions
from configutilities import validate, DEFAULT_CONFIG
from configutilities import validate
from configutilities import DEFAULT_CONFIG
sys.modules['fm_core'] = mock.Mock()

View File

@ -30,21 +30,25 @@ from sysinv.common import constants as sysinv_constants
# WARNING: The controller-1 upgrade is done before any puppet manifests
# have been applied, so only the static entries from tsconfig can be used
# (the platform.conf file will not have been updated with dynamic values).
from tsconfig.tsconfig import (SW_VERSION, PLATFORM_PATH, KEYRING_PATH,
PLATFORM_CONF_FILE, PLATFORM_CONF_PATH,
CGCS_PATH, CONFIG_PATH, CONTROLLER_UPGRADE_FLAG,
CONTROLLER_UPGRADE_COMPLETE_FLAG,
CONTROLLER_UPGRADE_FAIL_FLAG,
CONTROLLER_UPGRADE_STARTED_FLAG,
RESTORE_IN_PROGRESS_FLAG)
from tsconfig.tsconfig import SW_VERSION
from tsconfig.tsconfig import PLATFORM_PATH
from tsconfig.tsconfig import KEYRING_PATH
from tsconfig.tsconfig import PLATFORM_CONF_FILE
from tsconfig.tsconfig import PLATFORM_CONF_PATH
from tsconfig.tsconfig import CGCS_PATH
from tsconfig.tsconfig import CONFIG_PATH
from tsconfig.tsconfig import CONTROLLER_UPGRADE_FLAG
from tsconfig.tsconfig import CONTROLLER_UPGRADE_COMPLETE_FLAG
from tsconfig.tsconfig import CONTROLLER_UPGRADE_FAIL_FLAG
from tsconfig.tsconfig import CONTROLLER_UPGRADE_STARTED_FLAG
from tsconfig.tsconfig import RESTORE_IN_PROGRESS_FLAG
from controllerconfig.common import constants
from controllerconfig.common import log
from controllerconfig import utils as cutils
from controllerconfig import backup_restore
import utils
from controllerconfig.upgrades import utils
LOG = log.get_logger(__name__)

View File

@ -19,7 +19,7 @@ from controllerconfig import backup_restore
from controllerconfig.common import log
from controllerconfig.common import constants
from sysinv.common import constants as sysinv_constants
import utils
from controllerconfig.upgrades import utils
LOG = log.get_logger(__name__)

View File

@ -18,11 +18,13 @@ import yaml
# WARNING: The controller-1 upgrade is done before any puppet manifests
# have been applied, so only the static entries from tsconfig can be used.
# (the platform.conf file will not have been updated with dynamic values).
from tsconfig.tsconfig import SW_VERSION, PLATFORM_PATH
from tsconfig.tsconfig import SW_VERSION
from tsconfig.tsconfig import PLATFORM_PATH
from configutilities import DEFAULT_DOMAIN_NAME
from controllerconfig import utils as cutils
from controllerconfig.common import log, constants
from controllerconfig.common import log
from controllerconfig.common import constants
from sysinv.common import constants as sysinv_constants

View File

@ -24,8 +24,8 @@ from tsconfig import tsconfig
from configutilities.common.utils import is_valid_mac
from sysinv.common import constants as sysinv_constants
from common import constants
from common import log
from controllerconfig.common import constants
from controllerconfig.common import log
LOOPBACK_IFNAME = 'lo'

View File

@ -3,7 +3,8 @@
#
# SPDX-License-Identifier: Apache-2.0
#
from setuptools import setup, find_packages
from setuptools import setup
from setuptools import find_packages
setup(
name='controllerconfig',

View File

@ -39,13 +39,12 @@ commands = flake8 {posargs}
# H102: Apache 2.0 license header not found
# H104: File contains nothing but comments
# H238: old style class declaration, use new style (inherit from `object`)
# H301: one import per line
# H306: imports not in alphabetical order
# H401: docstring should not start with a space
# H403: multi line docstrings should end on a new line
# H404: multi line docstring should start without a leading new line
# H405: multi line docstring summary not separated with an empty line
ignore = H101,H102,H104,H238,H301,H306,H401,H403,H404,H405
ignore = H101,H102,H104,H238,H306,H401,H403,H404,H405
exclude = build
[testenv:py27]

View File

@ -13,7 +13,8 @@
import os
from os import listdir
from os.path import isfile, join
from os.path import isfile
from os.path import join
import re
import subprocess

View File

@ -27,7 +27,8 @@ import wsme
import wsmeext.pecan as wsme_pecan
from cryptography import x509
from cryptography.hazmat.backends import default_backend
from pecan import expose, rest
from pecan import expose
from pecan import rest
from sysinv import objects
from sysinv.api.controllers.v1 import base
from sysinv.api.controllers.v1 import collection

View File

@ -41,7 +41,8 @@ from sysinv import objects
from sysinv.openstack.common.gettextutils import _
from sysinv.openstack.common import log
from netaddr import IPAddress, AddrFormatError
from netaddr import IPAddress
from netaddr import AddrFormatError
LOG = log.getLogger(__name__)

View File

@ -45,7 +45,8 @@ from wsme import types as wtypes
from configutilities import HOST_XML_ATTRIBUTES
from fm_api import constants as fm_constants
from fm_api import fm_api
from pecan import expose, rest
from pecan import expose
from pecan import rest
from sysinv import objects
from sysinv.api.controllers.v1 import ethernet_port

View File

@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0
#
import json
from rest_api import rest_api_request
from sysinv.api.controllers.v1.rest_api import rest_api_request
from sysinv.openstack.common import log
LOG = log.getLogger(__name__)

View File

@ -5,7 +5,7 @@
#
import time
import json
from rest_api import rest_api_request
from sysinv.api.controllers.v1.rest_api import rest_api_request
from sysinv.common import exception as si_exception
from sysinv.openstack.common import log
LOG = log.getLogger(__name__)

View File

@ -30,7 +30,9 @@ import wsme
from wsme import types as wtypes
import wsmeext.pecan as wsme_pecan
from netaddr import IPNetwork, IPAddress, AddrFormatError
from netaddr import IPNetwork
from netaddr import IPAddress
from netaddr import AddrFormatError
from sysinv.api.controllers.v1 import base
from sysinv.api.controllers.v1 import collection

View File

@ -28,7 +28,10 @@ import wsme
from wsme import types as wtypes
import wsmeext.pecan as wsme_pecan
from netaddr import IPNetwork, IPAddress, IPRange, AddrFormatError
from netaddr import IPNetwork
from netaddr import IPAddress
from netaddr import IPRange
from netaddr import AddrFormatError
from sysinv.api.controllers.v1 import base
from sysinv.api.controllers.v1 import collection

View File

@ -41,7 +41,8 @@ from sysinv import objects
from sysinv.openstack.common.gettextutils import _
from sysinv.openstack.common import log
from netaddr import IPAddress, AddrFormatError
from netaddr import IPAddress
from netaddr import AddrFormatError
LOG = log.getLogger(__name__)

View File

@ -3,7 +3,8 @@
#
# SPDX-License-Identifier: Apache-2.0
#
from rest_api import rest_api_request, get_token
from sysinv.api.controllers.v1.rest_api import rest_api_request
from sysinv.api.controllers.v1.rest_api import get_token
from sysinv.openstack.common import log
LOG = log.getLogger(__name__)

View File

@ -42,7 +42,8 @@ from sysinv import objects
from sysinv.openstack.common.gettextutils import _
from sysinv.openstack.common import log
from netaddr import IPAddress, AddrFormatError
from netaddr import IPAddress
from netaddr import AddrFormatError
LOG = log.getLogger(__name__)

View File

@ -6,8 +6,8 @@
import json
import pecan
import socket
from rest_api import get_token
from rest_api import rest_api_request
from sysinv.api.controllers.v1.rest_api import get_token
from sysinv.api.controllers.v1.rest_api import rest_api_request
from sysinv.openstack.common import log
LOG = log.getLogger(__name__)

View File

@ -36,6 +36,7 @@ import wsmeext.pecan as wsme_pecan
from sysinv.api.controllers.v1 import base
from sysinv.api.controllers.v1 import collection
from sysinv.api.controllers.v1 import controller_fs as controller_fs_api
from sysinv.api.controllers.v1 import link
from sysinv.api.controllers.v1 import types
from sysinv.api.controllers.v1 import utils
@ -50,7 +51,6 @@ from sysinv.openstack.common import log
from sysinv.openstack.common import uuidutils
from sysinv.openstack.common.gettextutils import _
import controller_fs as controller_fs_api
LOG = log.getLogger(__name__)

View File

@ -35,6 +35,7 @@ import wsmeext.pecan as wsme_pecan
from sysinv.api.controllers.v1 import base
from sysinv.api.controllers.v1 import collection
from sysinv.api.controllers.v1 import controller_fs as controller_fs_api
from sysinv.api.controllers.v1 import link
from sysinv.api.controllers.v1 import types
from sysinv.api.controllers.v1 import utils
@ -48,7 +49,6 @@ from sysinv.openstack.common import log
from sysinv.openstack.common import uuidutils
from sysinv.openstack.common.gettextutils import _
import controller_fs as controller_fs_api
LOG = log.getLogger(__name__)

View File

@ -8,7 +8,8 @@
# coding=utf-8
#
import pecan
from pecan import rest, expose
from pecan import rest
from pecan import expose
import os
import six
import socket

View File

@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0
#
import json
from rest_api import rest_api_request
from sysinv.api.controllers.v1.rest_api import rest_api_request
from sysinv.common import constants
from sysinv.openstack.common import log

View File

@ -9,7 +9,7 @@ Cluster Services
"""
import sys
import cluster_xml as xml
from sysinv.cluster import cluster_xml as xml
import logging
from lxml import etree

View File

@ -10,8 +10,8 @@ Cluster Services API
import json
import pacemaker as crm
import cluster_services as cluster
from sysinv.cluster import pacemaker as crm
from sysinv.cluster import cluster_services as cluster
import logging
LOG = logging.getLogger(__name__)

View File

@ -16,7 +16,8 @@ import os
import uuid
import copy
import tsconfig.tsconfig as tsc
from requests.exceptions import RequestException, ReadTimeout
from requests.exceptions import RequestException
from requests.exceptions import ReadTimeout
from cephclient import wrapper as ceph
from fm_api import fm_api

View File

@ -55,7 +55,8 @@ from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives.asymmetric import rsa
from fm_api import constants as fm_constants
from fm_api import fm_api
from netaddr import IPAddress, IPNetwork
from netaddr import IPAddress
from netaddr import IPNetwork
from oslo_config import cfg
from platform_util.license import license
from sqlalchemy.orm import exc

View File

@ -7,8 +7,8 @@
from sysinv.common import constants
from sysinv.common import exception
from sysinv.openstack.common import log as logging
from . import common
from . import openstack
from sysinv.helm import common
from sysinv.helm import openstack
LOG = logging.getLogger(__name__)

View File

@ -6,8 +6,8 @@
from sysinv.common import constants
from sysinv.common import exception
from . import common
from . import openstack
from sysinv.helm import common
from sysinv.helm import openstack
class BarbicanHelm(openstack.OpenstackBaseHelm):

View File

@ -15,8 +15,8 @@ from sysinv.common.storage_backend_conf import StorageBackendConfig
from sysinv.openstack.common import log as logging
from . import common
from . import quoted_str
from sysinv.helm import common
from sysinv.helm import quoted_str
LOG = logging.getLogger('object')

View File

@ -8,8 +8,8 @@ from sysinv.common import constants
from sysinv.common import exception
from sysinv.common import utils
from sysinv.openstack.common import log as logging
from . import common
from . import openstack
from sysinv.helm import common
from sysinv.helm import openstack
LOG = logging.getLogger(__name__)

View File

@ -9,8 +9,8 @@ from sysinv.common import exception
from sysinv.common.storage_backend_conf import StorageBackendConfig
from sysinv.openstack.common import log as logging
from . import common
from . import openstack
from sysinv.helm import common
from sysinv.helm import openstack
LOG = logging.getLogger(__name__)

View File

@ -8,8 +8,8 @@ from sysinv.common import constants
from sysinv.common import exception
from sysinv.openstack.common import log as logging
from . import common
from . import openstack
from sysinv.helm import common
from sysinv.helm import openstack
LOG = logging.getLogger(__name__)

View File

@ -7,8 +7,8 @@
from sysinv.common import constants
from sysinv.common import exception
from sysinv.openstack.common import log as logging
from . import common
from . import openstack
from sysinv.helm import common
from sysinv.helm import openstack
LOG = logging.getLogger(__name__)

View File

@ -7,8 +7,8 @@
from sysinv.common import constants
from sysinv.common import exception
from sysinv.openstack.common import log as logging
from . import common
from . import openstack
from sysinv.helm import common
from sysinv.helm import openstack
LOG = logging.getLogger(__name__)

View File

@ -19,7 +19,7 @@ from stevedore import extension
from sysinv.common import constants
from sysinv.common import exception
from sysinv.openstack.common import log as logging
from . import common
from sysinv.helm import common
LOG = logging.getLogger(__name__)

View File

@ -7,8 +7,8 @@
from sysinv.common import constants
from sysinv.common import exception
from sysinv.openstack.common import log as logging
from . import common
from . import openstack
from sysinv.helm import common
from sysinv.helm import openstack
LOG = logging.getLogger(__name__)

View File

@ -7,8 +7,8 @@
from sysinv.common import constants
from sysinv.common import exception
from sysinv.openstack.common import log as logging
from . import common
from . import base
from sysinv.helm import common
from sysinv.helm import base
LOG = logging.getLogger(__name__)

View File

@ -7,8 +7,8 @@
from sysinv.common import constants
from sysinv.common import exception
from . import common
from . import openstack
from sysinv.helm import common
from sysinv.helm import openstack
class IronicHelm(openstack.OpenstackBaseHelm):

View File

@ -10,8 +10,8 @@ import os
from sysinv.common import constants
from sysinv.common import exception
from sysinv.openstack.common import log as logging
from . import common
from . import openstack
from sysinv.helm import common
from sysinv.helm import openstack
LOG = logging.getLogger(__name__)

View File

@ -7,8 +7,8 @@
from sysinv.common import constants
from sysinv.common import exception
from sysinv.openstack.common import log as logging
from . import common
from . import openstack
from sysinv.helm import common
from sysinv.helm import openstack
LOG = logging.getLogger(__name__)

View File

@ -7,8 +7,8 @@
from sysinv.common import constants
from sysinv.common import exception
from . import common
from . import openstack
from sysinv.helm import common
from sysinv.helm import openstack
class MagnumHelm(openstack.OpenstackBaseHelm):

View File

@ -7,8 +7,8 @@
from sysinv.common import constants
from sysinv.common import exception
from sysinv.openstack.common import log as logging
from . import common
from . import openstack
from sysinv.helm import common
from sysinv.helm import openstack
LOG = logging.getLogger(__name__)

View File

@ -7,8 +7,8 @@
from sysinv.common import constants
from sysinv.common import exception
from sysinv.openstack.common import log as logging
from . import common
from . import base
from sysinv.helm import common
from sysinv.helm import base
LOG = logging.getLogger(__name__)

View File

@ -8,8 +8,8 @@ from sysinv.common import constants
from sysinv.common import exception
from sysinv.common import utils
from sysinv.openstack.common import log as logging
from . import common
from . import openstack
from sysinv.helm import common
from sysinv.helm import openstack
from sqlalchemy.orm.exc import NoResultFound

View File

@ -11,8 +11,8 @@ from sysinv.common import constants
from sysinv.common import exception
from sysinv.common import utils
from sysinv.openstack.common import log as logging
from . import common
from . import openstack
from sysinv.helm import common
from sysinv.helm import openstack
LOG = logging.getLogger(__name__)

View File

@ -7,8 +7,8 @@
from sysinv.common import constants
from sysinv.common import exception
from sysinv.openstack.common import log as logging
from . import common
from . import openstack
from sysinv.helm import common
from sysinv.helm import openstack
LOG = logging.getLogger(__name__)

View File

@ -7,8 +7,8 @@
import keyring
import subprocess
from . import base
from . import common
from sysinv.helm import base
from sysinv.helm import common
from oslo_log import log
from sysinv.common import constants

View File

@ -7,8 +7,8 @@
from sysinv.common import constants
from sysinv.common import exception
from sysinv.openstack.common import log as logging
from . import common
from . import openstack
from sysinv.helm import common
from sysinv.helm import openstack
LOG = logging.getLogger(__name__)

View File

@ -7,8 +7,8 @@
from sysinv.common import constants
from sysinv.common import exception
from sysinv.openstack.common import log as logging
from . import common
from . import openstack
from sysinv.helm import common
from sysinv.helm import openstack
LOG = logging.getLogger(__name__)

View File

@ -7,8 +7,8 @@
from sysinv.common import constants
from sysinv.common import exception
from sysinv.openstack.common import log as logging
from . import common
from . import openstack
from sysinv.helm import common
from sysinv.helm import openstack
LOG = logging.getLogger(__name__)

View File

@ -9,8 +9,8 @@ from sysinv.common import exception
from sysinv.common.storage_backend_conf import K8RbdProvisioner
from sysinv.openstack.common import log as logging
from . import base
from . import common
from sysinv.helm import base
from sysinv.helm import common
LOG = logging.getLogger(__name__)

View File

@ -6,7 +6,7 @@
from sysinv.common import constants
from . import openstack
from sysinv.puppet import openstack
class AodhPuppet(openstack.OpenstackBasePuppet):

View File

@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0
#
from . import openstack
from sysinv.puppet import openstack
class BarbicanPuppet(openstack.OpenstackBasePuppet):

View File

@ -14,7 +14,7 @@ from sysinv.common import constants
from sysinv.common import utils
from sysinv.common import exception
from . import quoted_str
from sysinv.puppet import quoted_str
@six.add_metaclass(abc.ABCMeta)

View File

@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0
#
from . import openstack
from sysinv.puppet import openstack
class CeilometerPuppet(openstack.OpenstackBasePuppet):

View File

@ -11,7 +11,7 @@ from sysinv.api.controllers.v1 import utils
from sysinv.common import constants
from sysinv.common.storage_backend_conf import StorageBackendConfig
from . import openstack
from sysinv.puppet import openstack
# NOTE: based on openstack service for providing swift object storage services

View File

@ -10,7 +10,7 @@ from sysinv.common import exception
from sysinv.common import utils
from sysinv.openstack.common import log as logging
from . import openstack
from sysinv.puppet import openstack
LOG = logging.getLogger(__name__)

View File

@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0
#
from . import openstack
from sysinv.puppet import openstack
from sysinv.common import constants

View File

@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0
#
from . import openstack
from sysinv.puppet import openstack
from sysinv.common import constants

View File

@ -7,7 +7,7 @@
import collections
from sysinv.common import constants
from . import base
from sysinv.puppet import base
class DevicePuppet(base.BasePuppet):

View File

@ -5,7 +5,7 @@
#
from . import openstack
from sysinv.puppet import openstack
class FmPuppet(openstack.OpenstackBasePuppet):

View File

@ -11,7 +11,7 @@ from urlparse import urlparse
from sysinv.common import constants
from sysinv.common import exception
from sysinv.openstack.common import log as logging
from . import openstack
from sysinv.puppet import openstack
LOG = logging.getLogger(__name__)

View File

@ -6,7 +6,7 @@
from sysinv.common import constants
from . import openstack
from sysinv.puppet import openstack
class GnocchiPuppet(openstack.OpenstackBasePuppet):

View File

@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0
#
from . import openstack
from sysinv.puppet import openstack
from sysinv.common import constants

View File

@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0
#
from . import openstack
from sysinv.puppet import openstack
from sysinv.common import exception

View File

@ -17,7 +17,7 @@ from sysinv.common import utils
from sysinv.conductor import openstack
from sysinv.openstack.common import log
from . import base
from sysinv.puppet import base
LOG = log.getLogger(__name__)

View File

@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0
#
from . import openstack
from sysinv.puppet import openstack
from sysinv.common import constants

View File

@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0
#
from . import openstack
from sysinv.puppet import openstack
class IronicPuppet(openstack.OpenstackBasePuppet):

View File

@ -12,7 +12,7 @@ from sysinv.common import constants
from tsconfig import tsconfig
from urlparse import urlparse
from . import openstack
from sysinv.puppet import openstack
OPENSTACK_PASSWORD_RULES_FILE = '/etc/keystone/password-rules.conf'

View File

@ -11,7 +11,7 @@ from sysinv.common import constants
from sysinv.common import exception
from sysinv.openstack.common import log as logging
from . import base
from sysinv.puppet import base
LOG = logging.getLogger(__name__)

View File

@ -8,7 +8,7 @@ from passlib.hash import ldap_salted_sha1 as hash
from sysinv.common import constants
from . import base
from sysinv.puppet import base
class LdapPuppet(base.BasePuppet):

View File

@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0
#
from . import openstack
from sysinv.puppet import openstack
class MagnumPuppet(openstack.OpenstackBasePuppet):

View File

@ -6,7 +6,7 @@
from tsconfig.tsconfig import KEYRING_PATH
from sysinv.common import constants
from . import openstack
from sysinv.puppet import openstack
class MtcePuppet(openstack.OpenstackBasePuppet):

View File

@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0
#
from . import openstack
from sysinv.puppet import openstack
class MuranoPuppet(openstack.OpenstackBasePuppet):

View File

@ -9,8 +9,8 @@ import netaddr
from sysinv.common import constants
from sysinv.common import exception
from . import base
from . import interface
from sysinv.puppet import base
from sysinv.puppet import interface
class NetworkingPuppet(base.BasePuppet):

Some files were not shown because too many files have changed in this diff Show More