Browse Source

Sort imports alphabetically

This patch also re-organizes imports to import one per line.

Change-Id: Ia958e3a30a48d4308d08d51df243c1272425c316
Fixes: bug 1188529
Fixes: bug 1188537
changes/85/32385/2
Matthias Runge 9 years ago
parent
commit
cea720e793
  1. 5
      horizon/__init__.py
  2. 10
      horizon/base.py
  3. 2
      horizon/browsers/base.py
  4. 5
      horizon/conf/__init__.py
  5. 5
      horizon/exceptions.py
  6. 10
      horizon/forms/__init__.py
  7. 3
      horizon/forms/base.py
  8. 3
      horizon/forms/fields.py
  9. 8
      horizon/middleware.py
  10. 6
      horizon/site_urls.py
  11. 18
      horizon/tables/__init__.py
  12. 7
      horizon/tables/actions.py
  13. 11
      horizon/tables/base.py
  14. 7
      horizon/tabs/__init__.py
  15. 2
      horizon/tabs/base.py
  16. 2
      horizon/tabs/views.py
  17. 2
      horizon/templatetags/branding.py
  18. 2
      horizon/templatetags/horizon.py
  19. 2
      horizon/templatetags/sizeformat.py
  20. 8
      horizon/test/helpers.py
  21. 5
      horizon/test/test_dashboards/cats/kittens/urls.py
  22. 5
      horizon/test/test_dashboards/cats/tigers/urls.py
  23. 5
      horizon/test/test_dashboards/dogs/puppies/urls.py
  24. 2
      horizon/test/tests/tables.py
  25. 3
      horizon/test/tests/tabs.py
  26. 5
      horizon/test/tests/templatetags.py
  27. 2
      horizon/test/tests/workflows.py
  28. 4
      horizon/test/urls.py
  29. 12
      horizon/utils/fields.py
  30. 2
      horizon/utils/secret_key.py
  31. 7
      horizon/workflows/__init__.py
  32. 7
      horizon/workflows/base.py
  33. 2
      horizon/workflows/views.py
  34. 4
      openstack_dashboard/api/__init__.py
  35. 5
      openstack_dashboard/api/cinder.py
  36. 6
      openstack_dashboard/api/nova.py
  37. 5
      openstack_dashboard/api/quantum.py
  38. 5
      openstack_dashboard/api/swift.py
  39. 4
      openstack_dashboard/dashboards/admin/domains/tables.py
  40. 16
      openstack_dashboard/dashboards/admin/domains/tests.py
  41. 7
      openstack_dashboard/dashboards/admin/domains/urls.py
  42. 9
      openstack_dashboard/dashboards/admin/domains/views.py
  43. 2
      openstack_dashboard/dashboards/admin/domains/workflows.py
  44. 1
      openstack_dashboard/dashboards/admin/flavors/extras/forms.py
  45. 2
      openstack_dashboard/dashboards/admin/flavors/extras/tests.py
  46. 7
      openstack_dashboard/dashboards/admin/flavors/extras/urls.py
  47. 4
      openstack_dashboard/dashboards/admin/flavors/extras/views.py
  48. 3
      openstack_dashboard/dashboards/admin/flavors/tests.py
  49. 9
      openstack_dashboard/dashboards/admin/flavors/urls.py
  50. 4
      openstack_dashboard/dashboards/admin/flavors/views.py
  51. 6
      openstack_dashboard/dashboards/admin/groups/tables.py
  52. 19
      openstack_dashboard/dashboards/admin/groups/tests.py
  53. 10
      openstack_dashboard/dashboards/admin/groups/urls.py
  54. 23
      openstack_dashboard/dashboards/admin/groups/views.py
  55. 9
      openstack_dashboard/dashboards/admin/images/tables.py
  56. 4
      openstack_dashboard/dashboards/admin/images/tests.py
  57. 8
      openstack_dashboard/dashboards/admin/images/urls.py
  58. 4
      openstack_dashboard/dashboards/admin/images/views.py
  59. 4
      openstack_dashboard/dashboards/admin/info/tabs.py
  60. 4
      openstack_dashboard/dashboards/admin/info/tests.py
  61. 3
      openstack_dashboard/dashboards/admin/info/urls.py
  62. 45
      openstack_dashboard/dashboards/admin/instances/tables.py
  63. 2
      openstack_dashboard/dashboards/admin/instances/tests.py
  64. 6
      openstack_dashboard/dashboards/admin/instances/urls.py
  65. 8
      openstack_dashboard/dashboards/admin/instances/views.py
  66. 4
      openstack_dashboard/dashboards/admin/networks/ports/tables.py
  67. 3
      openstack_dashboard/dashboards/admin/networks/ports/urls.py
  68. 3
      openstack_dashboard/dashboards/admin/networks/ports/views.py
  69. 3
      openstack_dashboard/dashboards/admin/networks/subnets/urls.py
  70. 3
      openstack_dashboard/dashboards/admin/networks/subnets/views.py
  71. 7
      openstack_dashboard/dashboards/admin/networks/tests.py
  72. 16
      openstack_dashboard/dashboards/admin/networks/urls.py
  73. 10
      openstack_dashboard/dashboards/admin/networks/views.py
  74. 7
      openstack_dashboard/dashboards/admin/overview/tests.py
  75. 3
      openstack_dashboard/dashboards/admin/overview/urls.py
  76. 3
      openstack_dashboard/dashboards/admin/projects/tables.py
  77. 9
      openstack_dashboard/dashboards/admin/projects/tests.py
  78. 11
      openstack_dashboard/dashboards/admin/projects/urls.py
  79. 13
      openstack_dashboard/dashboards/admin/projects/views.py
  80. 15
      openstack_dashboard/dashboards/admin/projects/workflows.py
  81. 5
      openstack_dashboard/dashboards/admin/roles/tests.py
  82. 7
      openstack_dashboard/dashboards/admin/roles/urls.py
  83. 7
      openstack_dashboard/dashboards/admin/roles/views.py
  84. 3
      openstack_dashboard/dashboards/admin/routers/ports/urls.py
  85. 1
      openstack_dashboard/dashboards/admin/routers/ports/views.py
  86. 6
      openstack_dashboard/dashboards/admin/routers/tests.py
  87. 6
      openstack_dashboard/dashboards/admin/routers/urls.py
  88. 5
      openstack_dashboard/dashboards/admin/users/tests.py
  89. 7
      openstack_dashboard/dashboards/admin/users/urls.py
  90. 7
      openstack_dashboard/dashboards/admin/users/views.py
  91. 8
      openstack_dashboard/dashboards/admin/volumes/tables.py
  92. 2
      openstack_dashboard/dashboards/admin/volumes/tests.py
  93. 7
      openstack_dashboard/dashboards/admin/volumes/urls.py
  94. 12
      openstack_dashboard/dashboards/admin/volumes/views.py
  95. 2
      openstack_dashboard/dashboards/project/access_and_security/api_access/tables.py
  96. 2
      openstack_dashboard/dashboards/project/access_and_security/api_access/tests.py
  97. 6
      openstack_dashboard/dashboards/project/access_and_security/api_access/urls.py
  98. 2
      openstack_dashboard/dashboards/project/access_and_security/api_access/views.py
  99. 2
      openstack_dashboard/dashboards/project/access_and_security/floating_ips/tables.py
  100. 3
      openstack_dashboard/dashboards/project/access_and_security/floating_ips/tests.py

5
horizon/__init__.py

@ -26,7 +26,10 @@ methods like :func:`~horizon.register` and :func:`~horizon.unregister`.
# should that fail.
Horizon = None
try:
from horizon.base import Horizon, Dashboard, Panel, PanelGroup
from horizon.base import Dashboard
from horizon.base import Horizon
from horizon.base import Panel
from horizon.base import PanelGroup
except ImportError:
import warnings

10
horizon/base.py

@ -29,7 +29,9 @@ import logging
import os
from django.conf import settings
from django.conf.urls.defaults import patterns, url, include
from django.conf.urls.defaults import include
from django.conf.urls.defaults import patterns
from django.conf.urls.defaults import url
from django.core.exceptions import ImproperlyConfigured
from django.core.urlresolvers import reverse
from django.utils.datastructures import SortedDict
@ -38,9 +40,11 @@ from django.utils.importlib import import_module
from django.utils.module_loading import module_has_submodule
from django.utils.translation import ugettext_lazy as _
from horizon import loaders
from horizon import conf
from horizon.decorators import require_auth, require_perms, _current_component
from horizon.decorators import _current_component
from horizon.decorators import require_auth
from horizon.decorators import require_perms
from horizon import loaders
LOG = logging.getLogger(__name__)

2
horizon/browsers/base.py

@ -17,9 +17,9 @@
from django import template
from django.utils.translation import ugettext_lazy as _
from horizon.browsers.breadcrumb import Breadcrumb
from horizon.tables import DataTable
from horizon.utils import html
from .breadcrumb import Breadcrumb
class ResourceBrowser(html.HTMLElement):

5
horizon/conf/__init__.py

@ -1,12 +1,13 @@
import copy
from django.utils.functional import LazyObject, empty
from django.utils.functional import empty
from django.utils.functional import LazyObject
class LazySettings(LazyObject):
def _setup(self, name=None):
from django.conf import settings
from .default import HORIZON_CONFIG as DEFAULT_CONFIG
from horizon.conf.default import HORIZON_CONFIG as DEFAULT_CONFIG
HORIZON_CONFIG = copy.copy(DEFAULT_CONFIG)
HORIZON_CONFIG.update(settings.HORIZON_CONFIG)

5
horizon/exceptions.py

@ -26,10 +26,11 @@ from django.contrib.auth import logout
from django.http import HttpRequest
from django.utils import termcolors
from django.utils.translation import ugettext_lazy as _
from django.views.debug import SafeExceptionReporterFilter, CLEANSED_SUBSTITUTE
from django.views.debug import CLEANSED_SUBSTITUTE
from django.views.debug import SafeExceptionReporterFilter
from horizon import messages
from horizon.conf import HORIZON_CONFIG
from horizon import messages
LOG = logging.getLogger(__name__)
PALETTE = termcolors.PALETTES[termcolors.DEFAULT_PALETTE]

10
horizon/forms/__init__.py

@ -19,9 +19,13 @@ from django.forms import *
from django.forms import widgets
# Convenience imports for public API components.
from .base import SelfHandlingMixin, SelfHandlingForm, DateForm
from .views import ModalFormView, ModalFormMixin
from .fields import DynamicTypedChoiceField, DynamicChoiceField
from horizon.forms.base import DateForm
from horizon.forms.base import SelfHandlingForm
from horizon.forms.base import SelfHandlingMixin
from horizon.forms.fields import DynamicChoiceField
from horizon.forms.fields import DynamicTypedChoiceField
from horizon.forms.views import ModalFormMixin
from horizon.forms.views import ModalFormView
assert widgets
assert SelfHandlingMixin

3
horizon/forms/base.py

@ -20,7 +20,8 @@
from django import forms
from django.forms.forms import NON_FIELD_ERRORS
from django.utils import dates, timezone
from django.utils import dates
from django.utils import timezone
class SelfHandlingMixin(object):

3
horizon/forms/fields.py

@ -15,7 +15,8 @@
# under the License.
from django.core import urlresolvers
from django.forms import fields, widgets
from django.forms import fields
from django.forms import widgets
class DynamicSelectWidget(widgets.Select):

8
horizon/middleware.py

@ -24,14 +24,14 @@ Middleware provided and used by Horizon.
import json
import logging
from django import http
from django import shortcuts
from django.conf import settings
from django.contrib import messages as django_messages
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.contrib.auth.views import redirect_to_login
from django.utils import timezone
from django.contrib import messages as django_messages
from django import http
from django import shortcuts
from django.utils.encoding import iri_to_uri
from django.utils import timezone
from horizon import exceptions

6
horizon/site_urls.py

@ -18,9 +18,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.views.generic import TemplateView
from django.conf.urls.defaults import patterns, url, include
from django.conf import settings
from django.conf.urls.defaults import include
from django.conf.urls.defaults import patterns
from django.conf.urls.defaults import url
from django.views.generic import TemplateView
urlpatterns = patterns('horizon.views',

18
horizon/tables/__init__.py

@ -15,11 +15,19 @@
# under the License.
# Convenience imports for public API components.
from .actions import (Action, BatchAction, DeleteAction,
LinkAction, FilterAction, FixedFilterAction)
from .base import DataTable, Column, Row
from .views import DataTableView, MultiTableView, MultiTableMixin, \
MixedDataTableView
from horizon.tables.actions import Action
from horizon.tables.actions import BatchAction
from horizon.tables.actions import DeleteAction
from horizon.tables.actions import FilterAction
from horizon.tables.actions import FixedFilterAction
from horizon.tables.actions import LinkAction
from horizon.tables.base import Column
from horizon.tables.base import DataTable
from horizon.tables.base import Row
from horizon.tables.views import DataTableView
from horizon.tables.views import MixedDataTableView
from horizon.tables.views import MultiTableMixin
from horizon.tables.views import MultiTableView
assert Action
assert BatchAction

7
horizon/tables/actions.py

@ -14,19 +14,20 @@
# License for the specific language governing permissions and limitations
# under the License.
from collections import defaultdict
import logging
import new
from collections import defaultdict
from django import shortcuts
from django.conf import settings
from django.core import urlresolvers
from django import shortcuts
from django.utils.functional import Promise
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions
from horizon import messages
from horizon.utils import html, functions
from horizon.utils import functions
from horizon.utils import html
LOG = logging.getLogger(__name__)

11
horizon/tables/base.py

@ -20,26 +20,27 @@ import logging
from operator import attrgetter
import sys
from django.conf import settings
from django.core import urlresolvers
from django import forms
from django.http import HttpResponse
from django import template
from django.conf import settings
from django.core import urlresolvers
from django.template.defaultfilters import truncatechars
from django.template.loader import render_to_string
from django.utils import http
from django.utils.datastructures import SortedDict
from django.utils.html import escape
from django.utils import http
from django.utils.http import urlencode
from django.utils.translation import ugettext_lazy as _
from django.utils.safestring import mark_safe
from django.utils import termcolors
from django.utils.translation import ugettext_lazy as _
from horizon import conf
from horizon import exceptions
from horizon import messages
from horizon.tables.actions import FilterAction
from horizon.tables.actions import LinkAction
from horizon.utils import html
from .actions import FilterAction, LinkAction
LOG = logging.getLogger(__name__)

7
horizon/tabs/__init__.py

@ -14,8 +14,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from .base import TabGroup, Tab, TableTab
from .views import TabView, TabbedTableView
from horizon.tabs.base import Tab
from horizon.tabs.base import TabGroup
from horizon.tabs.base import TableTab
from horizon.tabs.views import TabbedTableView
from horizon.tabs.views import TabView
assert TabGroup
assert Tab

2
horizon/tabs/base.py

@ -16,8 +16,8 @@
import sys
from django.template import TemplateSyntaxError
from django.template.loader import render_to_string
from django.template import TemplateSyntaxError
from django.utils.datastructures import SortedDict
from horizon import exceptions

2
horizon/tabs/views.py

@ -3,7 +3,7 @@ from django.views import generic
from horizon import exceptions
from horizon import tables
from .base import TableTab
from horizon.tabs.base import TableTab
class TabView(generic.TemplateView):

2
horizon/templatetags/branding.py

@ -22,8 +22,8 @@
Template tags for customizing Horizon.
"""
from django import template
from django.conf import settings
from django import template
from django.utils.translation import ugettext_lazy as _

2
horizon/templatetags/horizon.py

@ -17,8 +17,8 @@
from __future__ import absolute_import
from django import template
from django.utils.encoding import force_unicode
from django.utils.datastructures import SortedDict
from django.utils.encoding import force_unicode
from django.utils.translation import ugettext_lazy as _
from horizon.base import Horizon

2
horizon/templatetags/sizeformat.py

@ -23,8 +23,8 @@ Template tags for displaying sizes
"""
from django import template
from django.utils import translation
from django.utils import formats
from django.utils import translation
register = template.Library()

8
horizon/test/helpers.py

@ -21,14 +21,14 @@
import os
import socket
from django import http
from django import test as django_test
from django.contrib.auth.middleware import AuthenticationMiddleware
from django.contrib.auth.models import Permission
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from django.contrib.messages.storage import default_storage
from django.contrib.auth.middleware import AuthenticationMiddleware
from django.contrib.auth.models import User
from django.core.handlers import wsgi
from django import http
from django import test as django_test
from django.test.client import RequestFactory
from django.utils import unittest

5
horizon/test/test_dashboards/cats/kittens/urls.py

@ -1,6 +1,7 @@
from django.conf.urls.defaults import patterns, url
from django.conf.urls.defaults import patterns
from django.conf.urls.defaults import url
from .views import IndexView
from horizon.test.test_dashboards.cats.kittens.views import IndexView
urlpatterns = patterns('',
url(r'^$', IndexView.as_view(), name='index'),

5
horizon/test/test_dashboards/cats/tigers/urls.py

@ -1,6 +1,7 @@
from django.conf.urls.defaults import patterns, url
from django.conf.urls.defaults import patterns
from django.conf.urls.defaults import url
from .views import IndexView
from horizon.test.test_dashboards.cats.tigers.views import IndexView
urlpatterns = patterns('',
url(r'^$', IndexView.as_view(), name='index'),

5
horizon/test/test_dashboards/dogs/puppies/urls.py

@ -1,6 +1,7 @@
from django.conf.urls.defaults import patterns, url
from django.conf.urls.defaults import patterns
from django.conf.urls.defaults import url
from .views import IndexView
from horizon.test.test_dashboards.dogs.puppies.views import IndexView
urlpatterns = patterns('',
url(r'^$', IndexView.as_view(), name='index'),

2
horizon/test/tests/tables.py

@ -14,9 +14,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse
from django import http
from django import shortcuts
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
from mox import IsA

3
horizon/test/tests/tabs.py

@ -23,7 +23,8 @@ from horizon import exceptions
from horizon import tabs as horizon_tabs
from horizon.test import helpers as test
from .tables import MyTable, TEST_DATA
from horizon.test.tests.tables import MyTable
from horizon.test.tests.tables import TEST_DATA
class BaseTestTab(horizon_tabs.Tab):

5
horizon/test/tests/templatetags.py

@ -20,9 +20,10 @@
import re
from django.utils.text import normalize_newlines
from django.template import Context, Template
from django.conf import settings
from django.template import Context
from django.template import Template
from django.utils.text import normalize_newlines
from horizon.test import helpers as test

2
horizon/test/tests/workflows.py

@ -19,8 +19,8 @@ from django import http
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions
from horizon import workflows
from horizon.test import helpers as test
from horizon import workflows
PROJECT_ID = "a23lkjre389fwenj"

4
horizon/test/urls.py

@ -22,7 +22,9 @@
URL patterns for testing Horizon views.
"""
from django.conf.urls.defaults import patterns, url, include
from django.conf.urls.defaults import include
from django.conf.urls.defaults import patterns
from django.conf.urls.defaults import url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic import TemplateView

12
horizon/utils/fields.py

@ -1,11 +1,13 @@
import re
import netaddr
from django.core.exceptions import ValidationError
from django.forms import forms, widgets
from django.utils.translation import ugettext_lazy as _
from django.forms import forms
from django.forms import widgets
from django.utils.encoding import force_unicode
from django.utils.html import escape, conditional_escape
from django.utils.functional import Promise
from django.utils.html import conditional_escape
from django.utils.html import escape
from django.utils.translation import ugettext_lazy as _
import netaddr
import re
ip_allowed_symbols_re = re.compile(r'^[a-fA-F0-9:/\.]+$')
IPv4 = 1

2
horizon/utils/secret_key.py

@ -18,9 +18,9 @@
from __future__ import with_statement # Python 2.5 compliance
import lockfile
import os
import random
import string
import os
class FilePermissionError(Exception):

7
horizon/workflows/__init__.py

@ -1,5 +1,8 @@
from .base import Workflow, Step, Action, UpdateMembersStep
from .views import WorkflowView
from horizon.workflows.base import Action
from horizon.workflows.base import Step
from horizon.workflows.base import UpdateMembersStep
from horizon.workflows.base import Workflow
from horizon.workflows.views import WorkflowView
assert Action
assert Step

7
horizon/workflows/base.py

@ -18,15 +18,16 @@ import copy
import inspect
import logging
from django.core import urlresolvers
from django import forms
from django.forms.forms import NON_FIELD_ERRORS
from django import template
from django.core import urlresolvers
from django.template.defaultfilters import linebreaks
from django.template.defaultfilters import safe
from django.template.defaultfilters import slugify
from django.utils.encoding import force_unicode
from django.utils.importlib import import_module
from django.utils.translation import ugettext_lazy as _
from django.template.defaultfilters import linebreaks, safe
from django.forms.forms import NON_FIELD_ERRORS
from horizon import base
from horizon import exceptions

2
horizon/workflows/views.py

@ -22,8 +22,8 @@ from django import shortcuts
from django.views import generic
from horizon import exceptions
from horizon import messages
from horizon.forms.views import ADD_TO_FIELD_HEADER
from horizon import messages
class WorkflowView(generic.TemplateView):

4
openstack_dashboard/api/__init__.py

@ -35,13 +35,13 @@ Keystone/Nova/Glance/Swift et. al.
"""
from openstack_dashboard.api import base
from openstack_dashboard.api import cinder
from openstack_dashboard.api import heat
from openstack_dashboard.api import glance
from openstack_dashboard.api import heat
from openstack_dashboard.api import keystone
from openstack_dashboard.api import lbaas
from openstack_dashboard.api import network
from openstack_dashboard.api import nova
from openstack_dashboard.api import quantum
from openstack_dashboard.api import lbaas
from openstack_dashboard.api import swift
assert base

5
openstack_dashboard/api/cinder.py

@ -29,10 +29,11 @@ from django.utils.translation import ugettext_lazy as _
from cinderclient.v1 import client as cinder_client
from horizon import exceptions
from openstack_dashboard.api.base import QuotaSet
from openstack_dashboard.api.base import url_for
from openstack_dashboard.api import nova
from openstack_dashboard.api.base import QuotaSet
from horizon import exceptions
LOG = logging.getLogger(__name__)

6
openstack_dashboard/api/nova.py

@ -35,8 +35,10 @@ from novaclient.v1_1.servers import REBOOT_HARD
from horizon.conf import HORIZON_CONFIG
from horizon.utils.memoized import memoized
from openstack_dashboard.api.base import (APIResourceWrapper, QuotaSet,
APIDictWrapper, url_for)
from openstack_dashboard.api.base import APIDictWrapper
from openstack_dashboard.api.base import APIResourceWrapper
from openstack_dashboard.api.base import QuotaSet
from openstack_dashboard.api.base import url_for
from openstack_dashboard.api import network

5
openstack_dashboard/api/quantum.py

@ -24,13 +24,14 @@ from __future__ import absolute_import
import logging
from django.conf import settings
from quantumclient.v2_0 import client as quantum_client
from django.utils.datastructures import SortedDict
from openstack_dashboard.api.base import APIDictWrapper, url_for
from openstack_dashboard.api.base import APIDictWrapper
from openstack_dashboard.api.base import url_for
from openstack_dashboard.api import network
from openstack_dashboard.api import nova
from quantumclient.v2_0 import client as quantum_client
LOG = logging.getLogger(__name__)

5
openstack_dashboard/api/swift.py

@ -23,12 +23,13 @@ import logging
import swiftclient
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions
from horizon import messages
from django.utils.translation import ugettext_lazy as _
from openstack_dashboard.api.base import url_for, APIDictWrapper
from openstack_dashboard.api.base import APIDictWrapper
from openstack_dashboard.api.base import url_for
LOG = logging.getLogger(__name__)

4
openstack_dashboard/dashboards/admin/domains/tables.py

@ -25,8 +25,8 @@ from horizon import tables
from openstack_dashboard import api
from .constants import DOMAINS_CREATE_URL, \
DOMAINS_UPDATE_URL
from .constants import DOMAINS_CREATE_URL
from .constants import DOMAINS_UPDATE_URL
LOG = logging.getLogger(__name__)

16
openstack_dashboard/dashboards/admin/domains/tests.py

@ -15,21 +15,23 @@
# under the License.
from django import http
from django.core.urlresolvers import reverse
from django import http
from mox import IgnoreArg, IsA
from mox import IgnoreArg
from mox import IsA
from horizon.workflows.views import WorkflowView
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test
from .constants import DOMAINS_INDEX_VIEW_TEMPLATE, \
DOMAINS_INDEX_URL as index_url, \
DOMAINS_CREATE_URL as create_url, \
DOMAINS_UPDATE_URL as update_url
from .workflows import CreateDomain, UpdateDomain
from .constants import DOMAINS_CREATE_URL as create_url
from .constants import DOMAINS_INDEX_URL as index_url
from .constants import DOMAINS_INDEX_VIEW_TEMPLATE
from .constants import DOMAINS_UPDATE_URL as update_url
from .workflows import CreateDomain
from .workflows import UpdateDomain
DOMAINS_INDEX_URL = reverse(index_url)

7
openstack_dashboard/dashboards/admin/domains/urls.py

@ -14,9 +14,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls.defaults import patterns, url
from django.conf.urls.defaults import patterns
from django.conf.urls.defaults import url
from .views import IndexView, CreateDomainView, UpdateDomainView
from .views import CreateDomainView
from .views import IndexView
from .views import UpdateDomainView
urlpatterns = patterns('',

9
openstack_dashboard/dashboards/admin/domains/views.py

@ -22,10 +22,13 @@ from horizon import tables
from horizon import workflows
from openstack_dashboard import api
from .constants import DOMAIN_INFO_FIELDS, DOMAINS_INDEX_URL, \
DOMAINS_INDEX_VIEW_TEMPLATE
from .constants import DOMAIN_INFO_FIELDS
from .constants import DOMAINS_INDEX_URL
from .constants import DOMAINS_INDEX_VIEW_TEMPLATE
from .tables import DomainsTable
from .workflows import CreateDomain, UpdateDomain
from .workflows import CreateDomain
from .workflows import UpdateDomain
class IndexView(tables.DataTableView):

2
openstack_dashboard/dashboards/admin/domains/workflows.py

@ -19,8 +19,8 @@ import logging
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions
from horizon import workflows
from horizon import forms
from horizon import workflows
from openstack_dashboard import api

1
openstack_dashboard/dashboards/admin/flavors/extras/forms.py

@ -23,6 +23,7 @@ import logging
from django.utils.translation import ugettext_lazy as _
from openstack_dashboard import api
from horizon import exceptions
from horizon import forms
from horizon import messages

2
openstack_dashboard/dashboards/admin/flavors/extras/tests.py

@ -1,5 +1,5 @@
from django import http
from django.core.urlresolvers import reverse
from django import http
from mox import IsA

7
openstack_dashboard/dashboards/admin/flavors/extras/urls.py

@ -18,9 +18,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls.defaults import patterns, url
from django.conf.urls.defaults import patterns
from django.conf.urls.defaults import url
from .views import IndexView, EditView, CreateView
from .views import CreateView
from .views import EditView
from .views import IndexView
urlpatterns = patterns('',
url(r'^$', IndexView.as_view(), name='index'),

4
openstack_dashboard/dashboards/admin/flavors/extras/views.py

@ -27,8 +27,10 @@ from horizon import forms
from horizon import tables
from openstack_dashboard import api
from .forms import CreateExtraSpec
from .forms import EditExtraSpec
from .tables import ExtraSpecsTable
from .forms import CreateExtraSpec, EditExtraSpec
LOG = logging.getLogger(__name__)

3
openstack_dashboard/dashboards/admin/flavors/tests.py

@ -1,9 +1,10 @@
from django import http
from django.core.urlresolvers import reverse
from django import http
from mox import IsA
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test
from novaclient.v1_1 import flavors

9
openstack_dashboard/dashboards/admin/flavors/urls.py

@ -18,9 +18,14 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls.defaults import patterns, url, include
from .views import IndexView, CreateView, EditView
from django.conf.urls.defaults import include
from django.conf.urls.defaults import patterns
from django.conf.urls.defaults import url
from .extras import urls as extras_urls
from .views import CreateView
from .views import EditView
from .views import IndexView
urlpatterns = patterns('openstack_dashboard.dashboards.admin.flavors.views',
url(r'^$', IndexView.as_view(), name='index'),

4
openstack_dashboard/dashboards/admin/flavors/views.py

@ -28,7 +28,9 @@ from horizon import forms
from horizon import tables
from openstack_dashboard import api
from .forms import CreateFlavor, EditFlavor
from .forms import CreateFlavor
from .forms import EditFlavor
from .tables import FlavorsTable

6
openstack_dashboard/dashboards/admin/groups/tables.py

@ -24,8 +24,10 @@ from horizon import tables
from openstack_dashboard import api
from .constants import GROUPS_CREATE_URL, GROUPS_UPDATE_URL, \
GROUPS_MANAGE_URL, GROUPS_ADD_MEMBER_URL
from .constants import GROUPS_ADD_MEMBER_URL
from .constants import GROUPS_CREATE_URL
from .constants import GROUPS_MANAGE_URL
from .constants import GROUPS_UPDATE_URL
LOG = logging.getLogger(__name__)

19
openstack_dashboard/dashboards/admin/groups/tests.py

@ -14,21 +14,22 @@
# License for the specific language governing permissions and limitations
# under the License.
from django import http
from django.core.urlresolvers import reverse
from django import http
from mox import IgnoreArg, IsA
from mox import IgnoreArg
from mox import IsA
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test
from .constants import GROUPS_INDEX_VIEW_TEMPLATE, \
GROUPS_MANAGE_VIEW_TEMPLATE, \
GROUPS_INDEX_URL as index_url, \
GROUPS_CREATE_URL as create_url, \
GROUPS_UPDATE_URL as update_url, \
GROUPS_MANAGE_URL as manage_url, \
GROUPS_ADD_MEMBER_URL as add_member_url
from .constants import GROUPS_ADD_MEMBER_URL as add_member_url
from .constants import GROUPS_CREATE_URL as create_url
from .constants import GROUPS_INDEX_URL as index_url
from .constants import GROUPS_INDEX_VIEW_TEMPLATE
from .constants import GROUPS_MANAGE_URL as manage_url
from .constants import GROUPS_MANAGE_VIEW_TEMPLATE
from .constants import GROUPS_UPDATE_URL as update_url
GROUPS_INDEX_URL = reverse(index_url)

10
openstack_dashboard/dashboards/admin/groups/urls.py

@ -14,10 +14,14 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls.defaults import patterns, url
from django.conf.urls.defaults import patterns
from django.conf.urls.defaults import url
from .views import IndexView, CreateView, UpdateView, \
ManageMembersView, NonMembersView
from .views import CreateView
from .views import IndexView
from .views import ManageMembersView
from .views import NonMembersView
from .views import UpdateView
urlpatterns = patterns('',

23
openstack_dashboard/dashboards/admin/groups/views.py

@ -14,7 +14,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.core.urlresolvers import reverse, reverse_lazy
from django.core.urlresolvers import reverse
from django.core.urlresolvers import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions
@ -22,13 +23,19 @@ from horizon import forms
from horizon import tables
from openstack_dashboard import api
from .constants import GROUPS_INDEX_URL, GROUPS_INDEX_VIEW_TEMPLATE, \
GROUPS_CREATE_VIEW_TEMPLATE, GROUPS_UPDATE_VIEW_TEMPLATE, \
GROUPS_MANAGE_VIEW_TEMPLATE, GROUPS_ADD_MEMBER_VIEW_TEMPLATE, \
GROUPS_ADD_MEMBER_AJAX_VIEW_TEMPLATE
from .forms import CreateGroupForm, UpdateGroupForm
from .tables import GroupsTable, GroupMembersTable, \
GroupNonMembersTable
from .constants import GROUPS_ADD_MEMBER_AJAX_VIEW_TEMPLATE
from .constants import GROUPS_ADD_MEMBER_VIEW_TEMPLATE
from .constants import GROUPS_CREATE_VIEW_TEMPLATE
from .constants import GROUPS_INDEX_URL
from .constants import GROUPS_INDEX_VIEW_TEMPLATE
from .constants import GROUPS_MANAGE_VIEW_TEMPLATE
from .constants import GROUPS_UPDATE_VIEW_TEMPLATE
from .forms import CreateGroupForm
from .forms import UpdateGroupForm
from .tables import GroupMembersTable
from .tables import GroupNonMembersTable
from .tables import GroupsTable
class IndexView(tables.DataTableView):

9
openstack_dashboard/dashboards/admin/images/tables.py

@ -19,8 +19,13 @@ from django.utils.translation import ugettext_lazy as _
from horizon import tables
from openstack_dashboard.dashboards.project.images_and_snapshots \
.images.tables import (ImagesTable, CreateImage, EditImage,
DeleteImage)
.images.tables import CreateImage
from openstack_dashboard.dashboards.project.images_and_snapshots \
.images.tables import DeleteImage
from openstack_dashboard.dashboards.project.images_and_snapshots \
.images.tables import EditImage
from openstack_dashboard.dashboards.project.images_and_snapshots \
.images.tables import ImagesTable
class AdminCreateImage(CreateImage):

4
openstack_dashboard/dashboards/admin/images/tests.py

@ -14,14 +14,16 @@
# License for the specific language governing permissions and limitations
# under the License.
from django import http
from django.conf import settings
from django.core.urlresolvers import reverse
from django import http
from django.test.utils import override_settings
from mox import IsA
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test
from .tables import AdminImagesTable

8
openstack_dashboard/dashboards/admin/images/urls.py

@ -18,9 +18,13 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls.defaults import patterns, url
from django.conf.urls.defaults import patterns
from django.conf.urls.defaults import url
from .views import IndexView, CreateView, UpdateView, DetailView
from .views import CreateView
from .views import DetailView
from .views import IndexView
from .views import UpdateView
urlpatterns = patterns('openstack_dashboard.dashboards.admin.images.views',

4
openstack_dashboard/dashboards/admin/images/views.py

@ -29,8 +29,10 @@ from horizon import tables
from openstack_dashboard import api
from openstack_dashboard.dashboards.project \
.images_and_snapshots.images import views
from .forms import AdminCreateImageForm
from .forms import AdminUpdateImageForm
from .tables import AdminImagesTable
from .forms import AdminCreateImageForm, AdminUpdateImageForm
LOG = logging.getLogger(__name__)

4
openstack_dashboard/dashboards/admin/info/tabs.py

@ -21,7 +21,9 @@ from horizon import tabs
from openstack_dashboard.api import keystone
from openstack_dashboard.usage import quotas
from .tables import QuotasTable, ServicesTable
from .tables import QuotasTable
from .tables import ServicesTable
class DefaultQuotasTab(tabs.TableTab):

4
openstack_dashboard/dashboards/admin/info/tests.py

@ -14,12 +14,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from django import http
from django.core.urlresolvers import reverse
from django import http
from mox import IsA
from openstack_dashboard.test import helpers as test
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test
INDEX_URL = reverse('horizon:admin:info:index')

3
openstack_dashboard/dashboards/admin/info/urls.py

@ -18,7 +18,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls.defaults import patterns, url
from django.conf.urls.defaults import patterns
from django.conf.urls.defaults import url
from .views import IndexView

45
openstack_dashboard/dashboards/admin/instances/tables.py

@ -24,13 +24,44 @@ from horizon import tables
from horizon.utils.filters import replace_underscores
from openstack_dashboard import api
from openstack_dashboard.dashboards.project.instances.tables import (
TerminateInstance, EditInstance, ConsoleLink, LogLink, CreateSnapshot,
TogglePause, ToggleSuspend, RebootInstance, SoftRebootInstance,
ConfirmResize, RevertResize, get_size, UpdateRow, get_ips,
get_power_state, is_deleting, ACTIVE_STATES, STATUS_DISPLAY_CHOICES,
TASK_DISPLAY_CHOICES)
from openstack_dashboard.dashboards.project.instances.tables import \
ACTIVE_STATES
from openstack_dashboard.dashboards.project.instances.tables import \
ConfirmResize
from openstack_dashboard.dashboards.project.instances.tables import \
ConsoleLink
from openstack_dashboard.dashboards.project.instances.tables import \
CreateSnapshot
from openstack_dashboard.dashboards.project.instances.tables import \
EditInstance
from openstack_dashboard.dashboards.project.instances.tables import \
get_ips
from openstack_dashboard.dashboards.project.instances.tables import \
get_power_state
from openstack_dashboard.dashboards.project.instances.tables import \
get_size
from openstack_dashboard.dashboards.project.instances.tables import \
is_deleting
from openstack_dashboard.dashboards.project.instances.tables import \
LogLink
from openstack_dashboard.dashboards.project.instances.tables import \
RebootInstance
from openstack_dashboard.dashboards.project.instances.tables import \
RevertResize
from openstack_dashboard.dashboards.project.instances.tables import \
SoftRebootInstance
from openstack_dashboard.dashboards.project.instances.tables import \
STATUS_DISPLAY_CHOICES
from openstack_dashboard.dashboards.project.instances.tables import \
TASK_DISPLAY_CHOICES
from openstack_dashboard.dashboards.project.instances.tables import \
TerminateInstance
from openstack_dashboard.dashboards.project.instances.tables import \
TogglePause
from openstack_dashboard.dashboards.project.instances.tables import \
ToggleSuspend
from openstack_dashboard.dashboards.project.instances.tables import \
UpdateRow
LOG = logging.getLogger(__name__)

2
openstack_dashboard/dashboards/admin/instances/tests.py

@ -16,8 +16,8 @@
import uuid
from django import http
from django.core.urlresolvers import reverse
from django import http
from django.utils.datastructures import SortedDict
from mox import IsA

6
openstack_dashboard/dashboards/admin/instances/urls.py

@ -18,11 +18,13 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls.defaults import url, patterns
from django.conf.urls.defaults import patterns
from django.conf.urls.defaults import url
from .views import AdminIndexView, AdminUpdateView
from openstack_dashboard.dashboards.project.instances.views import \
DetailView
from .views import AdminIndexView
from .views import AdminUpdateView
INSTANCES = r'^(?P<instance_id>[^/]+)/%s$'

8
openstack_dashboard/dashboards/admin/instances/views.py

@ -31,7 +31,13 @@ from openstack_dashboard import api
from openstack_dashboard.dashboards.admin.instances.tables import \
AdminInstancesTable
from openstack_dashboard.dashboards.project.instances.views import \
console as p_console, vnc as p_vnc, spice as p_spice, UpdateView
console as p_console
from openstack_dashboard.dashboards.project.instances.views import \
spice as p_spice
from openstack_dashboard.dashboards.project.instances.views import \
UpdateView
from openstack_dashboard.dashboards.project.instances.views import \
vnc as p_vnc
from openstack_dashboard.dashboards.project.instances.workflows.\
update_instance import AdminUpdateInstance

4
openstack_dashboard/dashboards/admin/networks/ports/tables.py

@ -24,7 +24,9 @@ from horizon import tables
from openstack_dashboard import api
from openstack_dashboard.dashboards.project.networks.ports.tables import \
get_fixed_ips, get_attached
get_attached
from openstack_dashboard.dashboards.project.networks.ports.tables import \
get_fixed_ips
LOG = logging.getLogger(__name__)

3
openstack_dashboard/dashboards/admin/networks/ports/urls.py

@ -14,7 +14,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls.defaults import patterns, url
from django.conf.urls.defaults import patterns
from django.conf.urls.defaults import url
from openstack_dashboard.dashboards.project.networks.ports.views import \
DetailView

3
openstack_dashboard/dashboards/admin/networks/ports/views.py

@ -26,7 +26,8 @@ from openstack_dashboard import api
from openstack_dashboard.dashboards.project.networks.ports \
import views as project_views
from .forms import CreatePort, UpdatePort
from .forms import CreatePort
from .forms import UpdatePort
LOG = logging.getLogger(__name__)

3
openstack_dashboard/dashboards/admin/networks/subnets/urls.py

@ -14,7 +14,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls.defaults import patterns, url
from django.conf.urls.defaults import patterns
from django.conf.urls.defaults import url
from openstack_dashboard.dashboards.project.networks.subnets.views import \
DetailView

3
openstack_dashboard/dashboards/admin/networks/subnets/views.py

@ -19,7 +19,8 @@ import logging
from openstack_dashboard.dashboards.project.networks.subnets \
import views as project_views
from .workflows import CreateSubnet, UpdateSubnet
from .workflows import CreateSubnet
from .workflows import UpdateSubnet
LOG = logging.getLogger(__name__)

7
openstack_dashboard/dashboards/admin/networks/tests.py

@ -14,16 +14,17 @@
# License for the specific language governing permissions and limitations
# under the License.
from django import http
from django.core.urlresolvers import reverse
from django import http
from horizon.workflows.views import WorkflowView
from mox import IsA
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test
from openstack_dashboard.dashboards.project.networks.tests \
import form_data_subnet
from horizon.workflows.views import WorkflowView
from openstack_dashboard.test import helpers as test
INDEX_URL = reverse('horizon:admin:networks:index')

16
openstack_dashboard/dashboards/admin/networks/urls.py

@ -14,16 +14,22 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls.defaults import patterns, url, include
from .views import IndexView, CreateView, DetailView, UpdateView
from django.conf.urls.defaults import include
from django.conf.urls.defaults import patterns
from django.conf.urls.defaults import url
from .views import CreateView
from .views import DetailView
from .views import IndexView
from .views import UpdateView
from .subnets import urls as subnet_urls
from .subnets.views import CreateView as AddSubnetView
from .subnets.views import UpdateView as EditSubnetView
from .ports.views import CreateView as AddPortView
from .ports.views import UpdateView as EditPortView
from .subnets import urls as subnet_urls
from .ports import urls as port_urls
from .ports.views import CreateView as AddPortView
from .ports.views import UpdateView as EditPortView
NETWORKS = r'^(?P<network_id>[^/]+)/%s$'

10
openstack_dashboard/dashboards/admin/networks/views.py

@ -17,8 +17,8 @@
import logging
from django.core.urlresolvers import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from django.utils.datastructures import SortedDict
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions
from horizon import forms
@ -26,10 +26,12 @@ from horizon import tables
from openstack_dashboard import api
from openstack_dashboard.dashboards.project.networks import views