From 46954dfc12f0a6276d65198201e9d085d4105f7c Mon Sep 17 00:00:00 2001 From: Sridhar Ramaswamy Date: Tue, 9 Jun 2015 20:54:48 -0700 Subject: [PATCH] Tacker Horizon: ImportError: No module named openstack_dashboard.dashboards Fix up imports in new stackforge tacker-horizon repo to use tacker_horizon module Closes Bug: #1463648 Change-Id: I578b64727eb51e4511851207dc03760a5b95ab03 --- .../openstack_dashboard/__init__.py | 0 .../openstack_dashboard/api/__init__.py | 33 +++++++++++++++++++ .../dashboards/__init__.py | 0 .../dashboards/nfv/vnfcatalog/forms.py | 2 +- .../dashboards/nfv/vnfcatalog/panel.py | 2 +- .../dashboards/nfv/vnfcatalog/tabs.py | 4 +-- .../dashboards/nfv/vnfcatalog/urls.py | 4 +-- .../dashboards/nfv/vnfcatalog/views.py | 4 +-- .../dashboards/nfv/vnfmanager/forms.py | 6 ++-- .../dashboards/nfv/vnfmanager/panel.py | 2 +- .../dashboards/nfv/vnfmanager/tables.py | 2 +- .../dashboards/nfv/vnfmanager/tabs.py | 8 ++--- .../dashboards/nfv/vnfmanager/urls.py | 4 +-- .../dashboards/nfv/vnfmanager/views.py | 6 ++-- 14 files changed, 55 insertions(+), 22 deletions(-) create mode 100644 tacker_horizon/openstack_dashboard/__init__.py create mode 100644 tacker_horizon/openstack_dashboard/api/__init__.py create mode 100644 tacker_horizon/openstack_dashboard/dashboards/__init__.py diff --git a/tacker_horizon/openstack_dashboard/__init__.py b/tacker_horizon/openstack_dashboard/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tacker_horizon/openstack_dashboard/api/__init__.py b/tacker_horizon/openstack_dashboard/api/__init__.py new file mode 100644 index 0000000..7aaf12f --- /dev/null +++ b/tacker_horizon/openstack_dashboard/api/__init__.py @@ -0,0 +1,33 @@ +# Copyright 2015 Brocade Communications System, 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. +""" +Methods and interface objects used to interact with external APIs. + +API method calls return objects that are in many cases objects with +attributes that are direct maps to the data returned from the API http call. +Unfortunately, these objects are also often constructed dynamically, making +it difficult to know what data is available from the API object. Because of +this, all API calls should wrap their returned object in one defined here, +using only explicitly defined attributes and/or methods. + +In other words, Horizon developers not working on openstack_dashboard.api +shouldn't need to understand the finer details of APIs for +Keystone/Nova/Glance/Swift et. al. +""" +from tacker_horizon.openstack_dashboard.api import tacker + + +__all__ = [ + "tacker", +] diff --git a/tacker_horizon/openstack_dashboard/dashboards/__init__.py b/tacker_horizon/openstack_dashboard/dashboards/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/forms.py b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/forms.py index 7d5f94e..9d6f210 100644 --- a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/forms.py +++ b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/forms.py @@ -21,7 +21,7 @@ from horizon import exceptions from horizon import forms from horizon import messages -from openstack_dashboard import api +from tacker_horizon.openstack_dashboard import api import yaml diff --git a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/panel.py b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/panel.py index 9f60fa2..1b4e125 100644 --- a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/panel.py +++ b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/panel.py @@ -16,7 +16,7 @@ from django.utils.translation import ugettext_lazy as _ import horizon -from openstack_dashboard.dashboards.nfv import dashboard +from tacker_horizon.openstack_dashboard.dashboards.nfv import dashboard class Vnfcatalog(horizon.Panel): name = _("VNF Catalog") diff --git a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/tabs.py b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/tabs.py index 0dafb68..a455394 100644 --- a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/tabs.py +++ b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/tabs.py @@ -20,8 +20,8 @@ import uuid from horizon import exceptions from horizon import tabs -from openstack_dashboard import api -from openstack_dashboard.dashboards.nfv.vnfcatalog import tables +from tacker_horizon.openstack_dashboard import api +from tacker_horizon.openstack_dashboard.dashboards.nfv.vnfcatalog import tables class VNFCatalogItem(object): diff --git a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/urls.py b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/urls.py index bdd1bdd..a02a125 100644 --- a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/urls.py +++ b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/urls.py @@ -16,11 +16,11 @@ from django.conf.urls import patterns from django.conf.urls import url -from openstack_dashboard.dashboards.nfv.vnfcatalog import views +from tacker_horizon.openstack_dashboard.dashboards.nfv.vnfcatalog import views urlpatterns = patterns( - 'openstack_dashboard.dashboards.nfv.vnfcatalog.views', + 'tacker_horizon.openstack_dashboard.dashboards.nfv.vnfcatalog.views', url(r'^$', views.IndexView.as_view(), name='index'), url(r'^onboardvnf', views.OnBoardVNFView.as_view(), name='onboardvnf'), ) diff --git a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/views.py b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/views.py index 9aa70eb..e34bb91 100644 --- a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/views.py +++ b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/views.py @@ -25,10 +25,10 @@ from horizon.utils import memoized from openstack_dashboard import api -from openstack_dashboard.dashboards.nfv.vnfcatalog \ +from tacker_horizon.openstack_dashboard.dashboards.nfv.vnfcatalog \ import tabs as nfv_tabs -from openstack_dashboard.dashboards.nfv.vnfcatalog \ +from tacker_horizon.openstack_dashboard.dashboards.nfv.vnfcatalog \ import forms as project_forms class IndexView(tabs.TabbedTableView): diff --git a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/forms.py b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/forms.py index 68e576d..94a673c 100644 --- a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/forms.py +++ b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/forms.py @@ -19,9 +19,9 @@ from horizon import exceptions from horizon import forms from horizon import messages -from openstack_dashboard import api -from openstack_dashboard.dashboards.nfv.vnfmanager.tables import VNFManagerItem -from openstack_dashboard.dashboards.nfv.vnfmanager.tables import VNFManagerItemList +from tacker_horizon.openstack_dashboard import api +from tacker_horizon.openstack_dashboard.dashboards.nfv.vnfmanager.tables import VNFManagerItem +from tacker_horizon.openstack_dashboard.dashboards.nfv.vnfmanager.tables import VNFManagerItemList class AddService(forms.SelfHandlingForm): diff --git a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/panel.py b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/panel.py index 25cb50d..918de03 100644 --- a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/panel.py +++ b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/panel.py @@ -16,7 +16,7 @@ from django.utils.translation import ugettext_lazy as _ import horizon -from openstack_dashboard.dashboards.nfv import dashboard +from tacker_horizon.openstack_dashboard.dashboards.nfv import dashboard class Vnfmanager(horizon.Panel): name = _("VNF Manager") diff --git a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/tables.py b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/tables.py index 7d23d41..92a4d10 100644 --- a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/tables.py +++ b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/tables.py @@ -21,7 +21,7 @@ from django.utils.translation import ungettext_lazy from horizon import messages from horizon import tables -from openstack_dashboard import api +from tacker_horizon.openstack_dashboard import api from openstack_dashboard import policy class VNFManagerItem(object): diff --git a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/tabs.py b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/tabs.py index 6478007..285698e 100644 --- a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/tabs.py +++ b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/tabs.py @@ -17,10 +17,10 @@ from django.utils.translation import ugettext_lazy as _ from horizon import exceptions from horizon import tabs -from openstack_dashboard.dashboards.nfv.vnfmanager import tables -from openstack_dashboard import api -from openstack_dashboard.dashboards.nfv.vnfmanager.tables import VNFManagerItem -from openstack_dashboard.dashboards.nfv.vnfmanager.tables import VNFManagerItemList +from tacker_horizon.openstack_dashboard.dashboards.nfv.vnfmanager import tables +from tacker_horizon.openstack_dashboard import api +from tacker_horizon.openstack_dashboard.dashboards.nfv.vnfmanager.tables import VNFManagerItem +from tacker_horizon.openstack_dashboard.dashboards.nfv.vnfmanager.tables import VNFManagerItemList class VNFManagerTab(tabs.TableTab): diff --git a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/urls.py b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/urls.py index a401fd5..e0c4ff8 100644 --- a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/urls.py +++ b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/urls.py @@ -16,11 +16,11 @@ from django.conf.urls import patterns from django.conf.urls import url -from openstack_dashboard.dashboards.nfv.vnfmanager import views +from tacker_horizon.openstack_dashboard.dashboards.nfv.vnfmanager import views urlpatterns = patterns( - 'openstack_dashboard.dashboards.nfv.vnfmanager.views', + 'tacker_horizon.openstack_dashboard.dashboards.nfv.vnfmanager.views', url(r'^$', views.IndexView.as_view(), name='index'), url(r'^addservice$', views.AddServiceView.as_view(), name='addservice'), ) diff --git a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/views.py b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/views.py index 556a16c..08c1855 100644 --- a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/views.py +++ b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/views.py @@ -23,12 +23,12 @@ from horizon import forms from horizon.utils import memoized -from openstack_dashboard import api +from tacker_horizon.openstack_dashboard import api -from openstack_dashboard.dashboards.nfv.vnfmanager \ +from tacker_horizon.openstack_dashboard.dashboards.nfv.vnfmanager \ import forms as project_forms -from openstack_dashboard.dashboards.nfv.vnfmanager \ +from tacker_horizon.openstack_dashboard.dashboards.nfv.vnfmanager \ import tabs as nfv_tabs