Import reorg and cleanup
The imports order should follow the simple rule of groups. There are usually 3 groups in most cases. However this repository is a plugin so imports from the base system (Horizon) should be moved to a separate group. So imports should go into the following groups: 1) Imports from Python standard modules 2) Imports from dependencies previded in requirements 3) Imports from Horizon 4) Imports within current project Change-Id: Ie028a4aa6897a3400872a45b94b073b2819ee4ac
This commit is contained in:
parent
7b6e93b43e
commit
09eafa0f6f
|
@ -19,16 +19,13 @@
|
|||
# under the License.
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import logging
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
from manilaclient.v1 import client as manila_client
|
||||
|
||||
from horizon import exceptions
|
||||
from horizon.utils.memoized import memoized # noqa
|
||||
|
||||
from openstack_dashboard.api import base
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
|
@ -14,15 +14,13 @@
|
|||
import logging
|
||||
|
||||
from django.conf import settings
|
||||
from saharaclient.api.base import APIException
|
||||
from saharaclient import client as api_client
|
||||
|
||||
from horizon import exceptions
|
||||
from horizon.utils.memoized import memoized # noqa
|
||||
from openstack_dashboard.api import base
|
||||
|
||||
from saharaclient.api.base import APIException
|
||||
from saharaclient import client as api_client
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
# "type" of Sahara service registered in keystone
|
||||
|
|
|
@ -17,8 +17,8 @@ from django.utils.translation import ugettext_lazy as _
|
|||
|
||||
from horizon import exceptions
|
||||
from horizon import tabs
|
||||
|
||||
from openstack_dashboard.api import nova
|
||||
|
||||
from sahara_dashboard.api import sahara as saharaclient
|
||||
from sahara_dashboard.content. \
|
||||
data_processing.utils import workflow_helpers as helpers
|
||||
|
|
|
@ -15,7 +15,6 @@ import copy
|
|||
|
||||
from django.core.urlresolvers import reverse
|
||||
from django import http
|
||||
|
||||
from mox3.mox import IsA # noqa
|
||||
from oslo_serialization import jsonutils
|
||||
import six
|
||||
|
|
|
@ -24,7 +24,6 @@ from horizon import workflows
|
|||
|
||||
from sahara_dashboard.api import manila as manilaclient
|
||||
from sahara_dashboard.api import sahara as saharaclient
|
||||
|
||||
from sahara_dashboard.content.data_processing.utils import helpers as helpers
|
||||
from sahara_dashboard.content.data_processing. \
|
||||
utils import anti_affinity as aa
|
||||
|
|
|
@ -15,6 +15,7 @@ from django.http import Http404 # noqa
|
|||
from django.template.loader import render_to_string
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import ungettext_lazy
|
||||
from saharaclient.api import base as api_base
|
||||
|
||||
from horizon import messages
|
||||
from horizon import tables
|
||||
|
@ -24,8 +25,6 @@ from sahara_dashboard.api import sahara as saharaclient
|
|||
from sahara_dashboard.content.data_processing.utils \
|
||||
import acl as acl_utils
|
||||
|
||||
from saharaclient.api import base as api_base
|
||||
|
||||
|
||||
class ClustersFilterAction(tables.FilterAction):
|
||||
filter_type = "server"
|
||||
|
|
|
@ -14,10 +14,15 @@
|
|||
import logging
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from sahara_dashboard.api import sahara as saharaclient
|
||||
|
||||
from horizon import exceptions
|
||||
from horizon import tables
|
||||
from horizon import tabs
|
||||
from openstack_dashboard.api import glance
|
||||
from openstack_dashboard.api import network
|
||||
from openstack_dashboard.api import neutron
|
||||
from openstack_dashboard.api import nova
|
||||
|
||||
from sahara_dashboard.content.data_processing.clusters.clusters \
|
||||
import tables as cluster_tables
|
||||
|
@ -26,13 +31,6 @@ from sahara_dashboard.content.data_processing \
|
|||
from sahara_dashboard.content.data_processing.utils \
|
||||
import workflow_helpers as helpers
|
||||
|
||||
from openstack_dashboard.api import glance
|
||||
from openstack_dashboard.api import network
|
||||
from openstack_dashboard.api import neutron
|
||||
from openstack_dashboard.api import nova
|
||||
|
||||
from sahara_dashboard.api import sahara as saharaclient
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
|
|
@ -12,13 +12,11 @@
|
|||
|
||||
from django.core.urlresolvers import reverse
|
||||
from django import http
|
||||
|
||||
from mox3.mox import IsA # noqa
|
||||
from oslo_serialization import jsonutils
|
||||
|
||||
from sahara_dashboard.test import helpers as test
|
||||
|
||||
from sahara_dashboard import api
|
||||
from sahara_dashboard.test import helpers as test
|
||||
|
||||
|
||||
INDEX_URL = reverse('horizon:project:data_processing.clusters:clusters-tab')
|
||||
|
|
|
@ -18,6 +18,7 @@ from django.http import HttpResponse
|
|||
from django.utils.translation import ugettext as _
|
||||
from django.views.generic import base as django_base
|
||||
from oslo_utils import timeutils
|
||||
from saharaclient.api.base import APIException
|
||||
|
||||
from horizon import exceptions
|
||||
from horizon import tables
|
||||
|
@ -26,7 +27,6 @@ from horizon.utils import memoized
|
|||
from horizon import workflows
|
||||
|
||||
from sahara_dashboard.api import sahara as saharaclient
|
||||
|
||||
import sahara_dashboard.content.data_processing.clusters.clusters. \
|
||||
tables as c_tables
|
||||
import sahara_dashboard.content.data_processing.clusters.clusters. \
|
||||
|
@ -38,7 +38,6 @@ import sahara_dashboard.content.data_processing.clusters.clusters. \
|
|||
import sahara_dashboard.content.data_processing.clusters.clusters. \
|
||||
workflows.update as update_flow
|
||||
import sahara_dashboard.content.data_processing.utils.helpers as helpers
|
||||
from saharaclient.api.base import APIException
|
||||
|
||||
|
||||
class ClustersView(tables.DataTableView):
|
||||
|
|
|
@ -15,6 +15,9 @@ from horizon import exceptions
|
|||
from horizon import forms
|
||||
from horizon import workflows
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from saharaclient.api import base as api_base
|
||||
|
||||
from openstack_dashboard.api import nova
|
||||
|
||||
from sahara_dashboard.content.data_processing.utils \
|
||||
|
@ -22,15 +25,10 @@ from sahara_dashboard.content.data_processing.utils \
|
|||
from sahara_dashboard.content.data_processing.utils import neutron_support
|
||||
import sahara_dashboard.content.data_processing.utils. \
|
||||
workflow_helpers as whelpers
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from sahara_dashboard.api import sahara as saharaclient
|
||||
import sahara_dashboard.content.data_processing.clusters. \
|
||||
cluster_templates.workflows.create as t_flows
|
||||
|
||||
from saharaclient.api import base as api_base
|
||||
|
||||
|
||||
KEYPAIR_IMPORT_URL = "horizon:project:access_and_security:keypairs:import"
|
||||
BASE_IMAGE_URL = "horizon:project:data_processing.clusters:register"
|
||||
|
|
|
@ -15,6 +15,7 @@ import base64
|
|||
import json
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from saharaclient.api import base as api_base
|
||||
|
||||
from horizon import exceptions
|
||||
|
||||
|
@ -25,8 +26,6 @@ import sahara_dashboard.content.data_processing.clusters. \
|
|||
clusters.workflows.create as cl_create_flow
|
||||
from sahara_dashboard.content.data_processing.utils import workflow_helpers
|
||||
|
||||
from saharaclient.api import base as api_base
|
||||
|
||||
|
||||
class NodeGroupsStep(clt_create_flow.ConfigureNodegroups):
|
||||
pass
|
||||
|
|
|
@ -14,16 +14,14 @@
|
|||
import logging
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from saharaclient.api import base as api_base
|
||||
|
||||
from horizon import exceptions
|
||||
from horizon import forms
|
||||
from horizon import workflows
|
||||
|
||||
from saharaclient.api import base as api_base
|
||||
|
||||
from sahara_dashboard.api import manila as manilaclient
|
||||
from sahara_dashboard.api import sahara as saharaclient
|
||||
|
||||
import sahara_dashboard.content.data_processing. \
|
||||
utils.workflow_helpers as whelpers
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ from horizon import exceptions
|
|||
from horizon import forms
|
||||
from horizon import messages
|
||||
from openstack_dashboard.api import glance
|
||||
|
||||
from sahara_dashboard.api import sahara as saharaclient
|
||||
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ from horizon import exceptions
|
|||
from horizon import tabs
|
||||
|
||||
from sahara_dashboard.api import sahara as saharaclient
|
||||
|
||||
from sahara_dashboard.content.data_processing.clusters.image_registry \
|
||||
import tables as image_registry_tables
|
||||
|
||||
|
|
|
@ -12,13 +12,12 @@
|
|||
|
||||
from django.core.urlresolvers import reverse
|
||||
from django import http
|
||||
|
||||
from mox3.mox import IsA # noqa
|
||||
|
||||
from openstack_dashboard import api as dash_api
|
||||
from sahara_dashboard.test import helpers as test
|
||||
|
||||
from sahara_dashboard import api
|
||||
from sahara_dashboard.test import helpers as test
|
||||
|
||||
INDEX_URL = reverse(
|
||||
'horizon:project:data_processing.clusters:image-registry-tab')
|
||||
|
|
|
@ -17,11 +17,10 @@ from django.utils.translation import ugettext_lazy as _
|
|||
|
||||
from horizon import exceptions
|
||||
from horizon import tabs
|
||||
|
||||
from openstack_dashboard.api import network
|
||||
from openstack_dashboard.api import nova
|
||||
from sahara_dashboard.api import sahara as saharaclient
|
||||
|
||||
from sahara_dashboard.api import sahara as saharaclient
|
||||
from sahara_dashboard.content.data_processing \
|
||||
import tabs as sahara_tabs
|
||||
from sahara_dashboard.content. \
|
||||
|
|
|
@ -12,12 +12,12 @@
|
|||
|
||||
from django.core.urlresolvers import reverse
|
||||
from django import http
|
||||
|
||||
from mox3.mox import IgnoreArg # noqa
|
||||
from mox3.mox import IsA # noqa
|
||||
import six
|
||||
|
||||
from openstack_dashboard import api as dash_api
|
||||
|
||||
from sahara_dashboard import api
|
||||
from sahara_dashboard.content.data_processing.utils \
|
||||
import workflow_helpers
|
||||
|
|
|
@ -21,7 +21,6 @@ from horizon.utils import memoized
|
|||
from horizon import workflows
|
||||
|
||||
from sahara_dashboard.api import sahara as saharaclient
|
||||
|
||||
import sahara_dashboard.content.data_processing.clusters. \
|
||||
nodegroup_templates.tables as _tables
|
||||
import sahara_dashboard.content.data_processing.clusters. \
|
||||
|
|
|
@ -16,7 +16,6 @@ from django.utils.translation import ugettext_lazy as _
|
|||
from horizon import exceptions
|
||||
|
||||
from sahara_dashboard.api import sahara as saharaclient
|
||||
|
||||
import sahara_dashboard.content.data_processing.clusters. \
|
||||
nodegroup_templates.workflows.create as create_flow
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@ from django.utils import encoding
|
|||
from django.utils import html
|
||||
from django.utils import safestring
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from saharaclient.api import base as api_base
|
||||
|
||||
from horizon import exceptions
|
||||
|
@ -26,7 +25,6 @@ from horizon import forms
|
|||
from horizon import workflows
|
||||
from openstack_dashboard.api import cinder
|
||||
from openstack_dashboard.api import network
|
||||
|
||||
from openstack_dashboard.dashboards.project.instances \
|
||||
import utils as nova_utils
|
||||
from openstack_dashboard.dashboards.project.volumes \
|
||||
|
|
|
@ -18,7 +18,6 @@ from horizon import exceptions
|
|||
from horizon import forms
|
||||
|
||||
from sahara_dashboard.api import sahara as saharaclient
|
||||
|
||||
import sahara_dashboard.content.data_processing.clusters. \
|
||||
nodegroup_templates.workflows.create as create_flow
|
||||
import sahara_dashboard.content.data_processing.clusters. \
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.dashboards.project import dashboard
|
||||
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
# limitations under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from horizon import tabs
|
||||
|
||||
from sahara_dashboard.content.data_processing.clusters.cluster_templates \
|
||||
|
|
|
@ -17,6 +17,7 @@ from django.utils.translation import ugettext_lazy as _
|
|||
|
||||
from horizon import exceptions
|
||||
from horizon import tabs
|
||||
|
||||
from sahara_dashboard.api import sahara as saharaclient
|
||||
from sahara_dashboard.content.data_processing.jobs.data_plugins \
|
||||
import tables as plugin_tables
|
||||
|
|
|
@ -12,12 +12,11 @@
|
|||
|
||||
from django.core.urlresolvers import reverse
|
||||
from django import http
|
||||
|
||||
from mox3.mox import IsA # noqa
|
||||
from sahara_dashboard.test import helpers as test
|
||||
import six
|
||||
|
||||
from sahara_dashboard import api
|
||||
from sahara_dashboard.test import helpers as test
|
||||
|
||||
|
||||
INDEX_URL = reverse(
|
||||
|
|
|
@ -12,12 +12,11 @@
|
|||
|
||||
from django.core.urlresolvers import reverse
|
||||
from django import http
|
||||
|
||||
from mox3.mox import IsA # noqa
|
||||
from sahara_dashboard.test import helpers as test
|
||||
import six
|
||||
|
||||
from sahara_dashboard import api
|
||||
from sahara_dashboard.test import helpers as test
|
||||
|
||||
INDEX_URL = reverse('horizon:project:data_processing.jobs:index')
|
||||
DETAILS_URL = reverse(
|
||||
|
|
|
@ -21,7 +21,6 @@ from horizon.utils import memoized
|
|||
from horizon import workflows
|
||||
|
||||
from sahara_dashboard.api import sahara as saharaclient
|
||||
|
||||
import sahara_dashboard.content.data_processing.jobs. \
|
||||
data_sources.tables as ds_tables
|
||||
import sahara_dashboard.content.data_processing.jobs. \
|
||||
|
|
|
@ -19,7 +19,6 @@ from horizon import workflows
|
|||
|
||||
from sahara_dashboard.api import manila as manilaclient
|
||||
from sahara_dashboard.api import sahara as saharaclient
|
||||
|
||||
from sahara_dashboard.content.data_processing.utils \
|
||||
import acl as acl_utils
|
||||
from sahara_dashboard.content.data_processing \
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import six
|
||||
import uuid
|
||||
|
||||
from django.forms import widgets
|
||||
|
@ -20,6 +19,8 @@ from django.template import defaultfilters
|
|||
from django.utils.encoding import force_text
|
||||
from django.utils.safestring import mark_safe
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
import six
|
||||
|
||||
from horizon import exceptions
|
||||
from horizon import forms
|
||||
from horizon import messages
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import ungettext_lazy
|
||||
from saharaclient.api import base as api_base
|
||||
|
||||
from horizon import tables
|
||||
|
||||
|
@ -20,8 +21,6 @@ from sahara_dashboard.api import sahara as saharaclient
|
|||
from sahara_dashboard.content.data_processing.utils \
|
||||
import acl as acl_utils
|
||||
|
||||
from saharaclient.api import base as api_base
|
||||
|
||||
|
||||
class CreateJobBinary(tables.LinkAction):
|
||||
name = "create"
|
||||
|
|
|
@ -12,12 +12,11 @@
|
|||
|
||||
from django.core.urlresolvers import reverse
|
||||
from django import http
|
||||
|
||||
from mox3.mox import IsA # noqa
|
||||
from sahara_dashboard.test import helpers as test
|
||||
import six
|
||||
|
||||
from sahara_dashboard import api
|
||||
from sahara_dashboard.test import helpers as test
|
||||
|
||||
|
||||
INDEX_URL = reverse('horizon:project:data_processing.jobs:index')
|
||||
|
|
|
@ -24,7 +24,6 @@ from horizon import tabs
|
|||
from horizon.utils import memoized
|
||||
|
||||
from sahara_dashboard.api import sahara as saharaclient
|
||||
|
||||
from sahara_dashboard.content.data_processing.utils \
|
||||
import helpers
|
||||
from sahara_dashboard.content.data_processing.jobs. \
|
||||
|
|
|
@ -12,12 +12,11 @@
|
|||
|
||||
from django.core.urlresolvers import reverse
|
||||
from django import http
|
||||
|
||||
from mox3.mox import IsA # noqa
|
||||
from sahara_dashboard.test import helpers as test
|
||||
import six
|
||||
|
||||
from sahara_dashboard import api
|
||||
from sahara_dashboard.test import helpers as test
|
||||
|
||||
|
||||
INDEX_URL = reverse('horizon:project:data_processing.jobs:index')
|
||||
|
|
|
@ -23,7 +23,6 @@ from horizon.utils import memoized
|
|||
from horizon import workflows
|
||||
|
||||
from sahara_dashboard.api import sahara as saharaclient
|
||||
|
||||
import sahara_dashboard.content.data_processing.jobs.job_templates.tables \
|
||||
as jt_tables
|
||||
import sahara_dashboard.content.data_processing.jobs.job_templates.tabs \
|
||||
|
|
|
@ -17,7 +17,6 @@ from django.utils import http
|
|||
from django.utils.translation import pgettext_lazy
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import ungettext_lazy
|
||||
|
||||
from saharaclient.api import base as api_base
|
||||
|
||||
from horizon import messages
|
||||
|
|
|
@ -12,12 +12,11 @@
|
|||
|
||||
from django.core.urlresolvers import reverse
|
||||
from django import http
|
||||
|
||||
from mox3.mox import IsA # noqa
|
||||
from sahara_dashboard.test import helpers as test
|
||||
import six
|
||||
|
||||
from sahara_dashboard import api
|
||||
from sahara_dashboard.test import helpers as test
|
||||
|
||||
|
||||
INDEX_URL = reverse('horizon:project:data_processing.jobs:index')
|
||||
|
|
|
@ -19,7 +19,6 @@ from horizon import tabs
|
|||
from horizon.utils import memoized
|
||||
|
||||
from sahara_dashboard.api import sahara as saharaclient
|
||||
|
||||
from sahara_dashboard.content.data_processing.jobs.jobs \
|
||||
import tables as je_tables
|
||||
import sahara_dashboard.content.data_processing \
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.dashboards.project import dashboard
|
||||
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
from django.conf.urls import patterns
|
||||
from django.conf.urls import url
|
||||
|
||||
|
@ -30,6 +29,7 @@ import sahara_dashboard.content.data_processing. \
|
|||
import sahara_dashboard.content.data_processing. \
|
||||
jobs.jobs.views as jobs_views
|
||||
|
||||
|
||||
urlpatterns = patterns('',
|
||||
url(r'^$', views.IndexView.as_view(),
|
||||
name='index'),
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
# under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from horizon import tabs
|
||||
|
||||
from sahara_dashboard.content.data_processing.jobs.data_plugins \
|
||||
|
|
|
@ -17,7 +17,6 @@ import six
|
|||
|
||||
import sahara_dashboard.content.data_processing. \
|
||||
utils.workflow_helpers as work_helpers
|
||||
|
||||
from sahara_dashboard.api import sahara as saharaclient
|
||||
|
||||
|
||||
|
|
|
@ -10,17 +10,16 @@
|
|||
# implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import logging
|
||||
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.utils import safestring
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import six
|
||||
|
||||
from horizon import forms
|
||||
from horizon import workflows
|
||||
|
||||
from openstack_dashboard.api import network
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
|
@ -12,8 +12,6 @@
|
|||
|
||||
import copy
|
||||
|
||||
from openstack_dashboard.test.test_data import utils
|
||||
|
||||
from saharaclient.api import cluster_templates
|
||||
from saharaclient.api import clusters
|
||||
from saharaclient.api import data_sources
|
||||
|
@ -24,6 +22,8 @@ from saharaclient.api import jobs
|
|||
from saharaclient.api import node_group_templates
|
||||
from saharaclient.api import plugins
|
||||
|
||||
from openstack_dashboard.test.test_data import utils
|
||||
|
||||
|
||||
def data(TEST):
|
||||
TEST.plugins = utils.TestDataContainer()
|
||||
|
|
Loading…
Reference in New Issue