Use from/import style in module report
Files in module report are using 'import openstack.common.*', not 'from openstack.common import'. Though these two ways work well. But the first one let update.py can't replace with base_name, see https://github.com/openstack/oslo-incubator/blob/master/update.py#L163 Considering other modules are using oslo-incubator code in the second way, to keep consistency, we'd better follow the last one. Closes-Bug: #1304774 Change-Id: Ife98dc96b012d6aa7b5bd10d09a733506072fa1c
This commit is contained in:
parent
5016ac15e2
commit
145aad08a8
|
@ -21,7 +21,7 @@ generators for generating the model in
|
|||
|
||||
from oslo.config import cfg
|
||||
|
||||
import openstack.common.report.models.conf as cm
|
||||
from openstack.common.report.models import conf as cm
|
||||
|
||||
|
||||
class ConfigReportGenerator(object):
|
||||
|
|
|
@ -23,10 +23,10 @@ import sys
|
|||
|
||||
import greenlet
|
||||
|
||||
import openstack.common.report.models.threading as tm
|
||||
from openstack.common.report.models import threading as tm
|
||||
from openstack.common.report.models import with_default_views as mwdv
|
||||
import openstack.common.report.utils as rutils
|
||||
import openstack.common.report.views.text.generic as text_views
|
||||
from openstack.common.report import utils as rutils
|
||||
from openstack.common.report.views.text import generic as text_views
|
||||
|
||||
|
||||
class ThreadReportGenerator(object):
|
||||
|
|
|
@ -20,7 +20,7 @@ generators for generating the model in
|
|||
:mod:`openstack.common.report.models.version`.
|
||||
"""
|
||||
|
||||
import openstack.common.report.models.version as vm
|
||||
from openstack.common.report.models import version as vm
|
||||
|
||||
|
||||
class PackageReportGenerator(object):
|
||||
|
|
|
@ -18,8 +18,8 @@ This module defines a class representing the data
|
|||
model for :mod:`oslo.config` configuration options
|
||||
"""
|
||||
|
||||
import openstack.common.report.models.with_default_views as mwdv
|
||||
import openstack.common.report.views.text.generic as generic_text_views
|
||||
from openstack.common.report.models import with_default_views as mwdv
|
||||
from openstack.common.report.views.text import generic as generic_text_views
|
||||
|
||||
|
||||
class ConfigModel(mwdv.ModelWithDefaultViews):
|
||||
|
|
|
@ -20,8 +20,8 @@ thread, and stack trace data models
|
|||
|
||||
import traceback
|
||||
|
||||
import openstack.common.report.models.with_default_views as mwdv
|
||||
import openstack.common.report.views.text.threading as text_views
|
||||
from openstack.common.report.models import with_default_views as mwdv
|
||||
from openstack.common.report.views.text import threading as text_views
|
||||
|
||||
|
||||
class StackTraceModel(mwdv.ModelWithDefaultViews):
|
||||
|
|
|
@ -18,8 +18,8 @@ This module defines a class representing the data
|
|||
model for OpenStack package and version information
|
||||
"""
|
||||
|
||||
import openstack.common.report.models.with_default_views as mwdv
|
||||
import openstack.common.report.views.text.generic as generic_text_views
|
||||
from openstack.common.report.models import with_default_views as mwdv
|
||||
from openstack.common.report.views.text import generic as generic_text_views
|
||||
|
||||
|
||||
class PackageModel(mwdv.ModelWithDefaultViews):
|
||||
|
|
|
@ -14,10 +14,10 @@
|
|||
|
||||
import copy
|
||||
|
||||
import openstack.common.report.models.base as base_model
|
||||
import openstack.common.report.views.json.generic as jsonviews
|
||||
import openstack.common.report.views.text.generic as textviews
|
||||
import openstack.common.report.views.xml.generic as xmlviews
|
||||
from openstack.common.report.models import base as base_model
|
||||
from openstack.common.report.views.json import generic as jsonviews
|
||||
from openstack.common.report.views.text import generic as textviews
|
||||
from openstack.common.report.views.xml import generic as xmlviews
|
||||
|
||||
|
||||
class ModelWithDefaultViews(base_model.ReportModel):
|
||||
|
|
|
@ -19,7 +19,7 @@ reports and report sections. All reports take the
|
|||
form of a report class containing various report sections.
|
||||
"""
|
||||
|
||||
import openstack.common.report.views.text.header as header_views
|
||||
from openstack.common.report.views.text import header as header_views
|
||||
|
||||
|
||||
class BasicReport(object):
|
||||
|
|
|
@ -26,7 +26,7 @@ such strings specially)
|
|||
import copy
|
||||
|
||||
from openstack.common import jsonutils as json
|
||||
import openstack.common.report.utils as utils
|
||||
from openstack.common.report import utils as utils
|
||||
|
||||
|
||||
class BasicKeyValueView(object):
|
||||
|
|
|
@ -19,7 +19,7 @@ visualizing threads, green threads, and stack traces
|
|||
in human-readable form.
|
||||
"""
|
||||
|
||||
import openstack.common.report.views.jinja_view as jv
|
||||
from openstack.common.report.views import jinja_view as jv
|
||||
|
||||
|
||||
class StackTraceView(jv.JinjaView):
|
||||
|
|
|
@ -29,7 +29,7 @@ import xml.etree.ElementTree as ET
|
|||
|
||||
import six
|
||||
|
||||
import openstack.common.report.utils as utils
|
||||
from openstack.common.report import utils as utils
|
||||
|
||||
|
||||
class KeyValueView(object):
|
||||
|
|
Loading…
Reference in New Issue