Rename dynamic_ui package and normalize it.
* Move muranodashboard.environments.services package to muranodashboard.dynamic_ui. * Move all code from dynamic_ui/__init__.py to dynamic_ui/services.py thus having normal empty __init__.py for dynamic_ui package (as in other packages). Change-Id: I395ee621578cb417314fe4960d74108deb848023
This commit is contained in:
parent
a873447045
commit
950dd8312d
13
muranodashboard/dynamic_ui/__init__.py
Normal file
13
muranodashboard/dynamic_ui/__init__.py
Normal file
@ -0,0 +1,13 @@
|
||||
# Copyright (c) 2013 Mirantis, Inc.
|
||||
#
|
||||
# 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.
|
@ -14,13 +14,15 @@
|
||||
|
||||
import re
|
||||
import logging
|
||||
import types
|
||||
|
||||
from django import forms
|
||||
from django.core.validators import RegexValidator
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
import muranodashboard.environments.services.fields as fields
|
||||
import muranodashboard.environments.services.helpers as helpers
|
||||
import muranodashboard.dynamic_ui.fields as fields
|
||||
import muranodashboard.dynamic_ui.helpers as helpers
|
||||
import yaql
|
||||
import types
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
@ -19,7 +19,8 @@ import tarfile
|
||||
import logging
|
||||
import shutil
|
||||
import hashlib
|
||||
from ..consts import CHUNK_SIZE, CACHE_DIR, ARCHIVE_PKG_PATH
|
||||
from muranodashboard.environments.consts import CHUNK_SIZE, CACHE_DIR, \
|
||||
ARCHIVE_PKG_PATH
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
@ -12,10 +12,13 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
|
||||
import os
|
||||
import re
|
||||
import time
|
||||
import logging
|
||||
from muranodashboard.dynamic_ui import metadata
|
||||
|
||||
try:
|
||||
from collections import OrderedDict
|
||||
except ImportError: # python2.6
|
||||
@ -24,8 +27,7 @@ import yaml
|
||||
from yaml.scanner import ScannerError
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
import copy
|
||||
from ..consts import CACHE_REFRESH_SECONDS_INTERVAL
|
||||
import metadata
|
||||
from muranodashboard.environments.consts import CACHE_REFRESH_SECONDS_INTERVAL
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
_all_services = OrderedDict()
|
||||
@ -35,7 +37,7 @@ _current_cache_hash = None
|
||||
|
||||
class Service(object):
|
||||
def __init__(self, **kwargs):
|
||||
import muranodashboard.environments.services.forms as services
|
||||
import muranodashboard.dynamic_ui.forms as services
|
||||
for key, value in kwargs.iteritems():
|
||||
if key == 'forms':
|
||||
self.forms = []
|
||||
@ -66,7 +68,7 @@ class Service(object):
|
||||
|
||||
|
||||
def import_service(full_service_name, service_file):
|
||||
from muranodashboard.environments.services.helpers import decamelize
|
||||
from muranodashboard.dynamic_ui.helpers import decamelize
|
||||
try:
|
||||
with open(service_file) as stream:
|
||||
yaml_desc = yaml.load(stream)
|
@ -18,7 +18,7 @@ from django.conf import settings
|
||||
from horizon.exceptions import ServiceCatalogException
|
||||
from openstack_dashboard.api.base import url_for
|
||||
from muranoclient.v1.client import Client
|
||||
from muranodashboard.environments.services import get_service_name
|
||||
from muranodashboard.dynamic_ui.services import get_service_name
|
||||
from muranoclient.common.exceptions import HTTPForbidden, HTTPNotFound
|
||||
from consts import STATUS_ID_READY, STATUS_ID_NEW
|
||||
from .network import get_network_params
|
||||
|
@ -16,8 +16,8 @@ import logging
|
||||
import json
|
||||
from django import forms
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from .services import get_service_choices
|
||||
from .services.fields import get_murano_images
|
||||
from muranodashboard.dynamic_ui.services import get_service_choices
|
||||
from muranodashboard.dynamic_ui.fields import get_murano_images
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@ -21,8 +21,8 @@ from views import DetailServiceView
|
||||
from views import DeploymentsView
|
||||
from views import Wizard, EditEnvironmentView
|
||||
from forms import ChoiceServiceFormFactory
|
||||
from services import get_service_checkers
|
||||
from services import make_forms_getter
|
||||
from muranodashboard.dynamic_ui.services import get_service_checkers
|
||||
from muranodashboard.dynamic_ui.services import make_forms_getter
|
||||
from openstack_dashboard.dashboards.project.instances.views import DetailView
|
||||
|
||||
VIEW_MOD = 'muranodashboard.environments.views'
|
||||
|
@ -16,12 +16,12 @@ import logging
|
||||
import re
|
||||
import copy
|
||||
import json
|
||||
from functools import update_wrapper
|
||||
|
||||
from django.core.urlresolvers import reverse, reverse_lazy
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.contrib.formtools.wizard.views import SessionWizardView
|
||||
from django.http import HttpResponseRedirect
|
||||
|
||||
from horizon import exceptions
|
||||
from horizon import tabs
|
||||
from horizon import tables
|
||||
@ -32,18 +32,16 @@ from tables import EnvironmentsTable
|
||||
from tables import ServicesTable
|
||||
from tables import DeploymentsTable
|
||||
from tables import EnvConfigTable
|
||||
|
||||
from workflows import CreateEnvironment, UpdateEnvironment
|
||||
from tabs import ServicesTabs, DeploymentTabs
|
||||
|
||||
from . import api
|
||||
from muranoclient.common.exceptions import HTTPUnauthorized, \
|
||||
CommunicationError, HTTPInternalServerError, HTTPForbidden, HTTPNotFound
|
||||
from functools import update_wrapper
|
||||
from django.utils.decorators import classonlymethod
|
||||
from services import get_service_descriptions
|
||||
from services import get_service_name
|
||||
from services import get_service_field_descriptions
|
||||
from muranodashboard.dynamic_ui.services import get_service_descriptions
|
||||
from muranodashboard.dynamic_ui.services import get_service_name
|
||||
from muranodashboard.dynamic_ui.services import get_service_field_descriptions
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
@ -19,7 +19,7 @@ from horizon.forms import SelfHandlingForm
|
||||
from horizon import exceptions
|
||||
from horizon import messages
|
||||
from metadataclient.common.exceptions import HTTPException
|
||||
from muranodashboard.environments.services.metadata import metadataclient
|
||||
from muranodashboard.dynamic_ui.metadata import metadataclient
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
@ -21,7 +21,7 @@ from horizon import exceptions
|
||||
from horizon import tables
|
||||
from horizon import messages
|
||||
from metadataclient.common.exceptions import HTTPException
|
||||
from muranodashboard.environments.services.metadata import metadataclient
|
||||
from muranodashboard.dynamic_ui.metadata import metadataclient
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@ -15,10 +15,10 @@ import logging
|
||||
from django.utils.translation import ugettext as _
|
||||
from .tables import DeleteFileFromService, DownloadFile
|
||||
from horizon import tables, workflows, forms
|
||||
from muranodashboard.environments.services.forms import UpdatableFieldsForm
|
||||
from muranodashboard.environments.services.fields import TableField
|
||||
from muranodashboard.environments.services.fields import Column, CheckColumn
|
||||
from muranodashboard.environments.services.fields import RadioColumn
|
||||
from muranodashboard.dynamic_ui.forms import UpdatableFieldsForm
|
||||
from muranodashboard.dynamic_ui.fields import TableField
|
||||
from muranodashboard.dynamic_ui.fields import Column, CheckColumn
|
||||
from muranodashboard.dynamic_ui.fields import RadioColumn
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@ from .utils import define_tables
|
||||
from .utils import STEP_NAMES
|
||||
from .forms import UploadServiceForm, UploadFileForm, UploadFileToService
|
||||
from .workflows import ComposeService
|
||||
from muranodashboard.environments.services.metadata import metadataclient
|
||||
from muranodashboard.dynamic_ui.metadata import metadataclient
|
||||
from metadataclient.common.exceptions import CommunicationError, Unauthorized
|
||||
from metadataclient.common.exceptions import HTTPInternalServerError, NotFound
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -21,7 +21,7 @@ from horizon import exceptions
|
||||
from horizon import forms
|
||||
from horizon import workflows
|
||||
|
||||
from muranodashboard.environments.services.metadata import metadataclient
|
||||
from muranodashboard.dynamic_ui.metadata import metadataclient
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user