Fix E128 errors in remaining openstack_dashboard/
E128 continuation line under-indented for visual indent Closes-Bug: #1375929 Change-Id: I2a72313d359bdfe2e2667eba5d3bf9744ec8f60a
This commit is contained in:
parent
2a9349bd67
commit
832a741c88
openstack_dashboard
api
dashboards
identity
router/nexus1000v
settings
test
urls.py@ -233,8 +233,10 @@ class ResourceAggregate(Resource):
|
||||
self.resource_id = resource_id
|
||||
|
||||
self._query = make_query(tenant_id=tenant_id, user_id=user_id,
|
||||
resource_id=resource_id, tenant_ids=tenant_ids,
|
||||
user_ids=user_ids, resource_ids=resource_ids)
|
||||
resource_id=resource_id,
|
||||
tenant_ids=tenant_ids,
|
||||
user_ids=user_ids,
|
||||
resource_ids=resource_ids)
|
||||
|
||||
@property
|
||||
def id(self):
|
||||
@ -356,7 +358,8 @@ class ThreadedUpdateResourceWithStatistics(threading.Thread):
|
||||
|
||||
def run(self):
|
||||
# Run the job
|
||||
self.resource_usage.update_with_statistics(self.resource,
|
||||
self.resource_usage.update_with_statistics(
|
||||
self.resource,
|
||||
meter_names=self.meter_names, period=self.period,
|
||||
stats_attr=self.stats_attr, additional_query=self.additional_query)
|
||||
|
||||
@ -512,7 +515,8 @@ class CeilometerUsage(object):
|
||||
with_users_and_tenants=with_users_and_tenants)
|
||||
else:
|
||||
# Will load only resources without statistical data.
|
||||
resources = self.resources(query, filter_func=filter_func,
|
||||
resources = self.resources(
|
||||
query, filter_func=filter_func,
|
||||
with_users_and_tenants=with_users_and_tenants)
|
||||
|
||||
return [used_cls(resource) for resource in resources]
|
||||
@ -610,7 +614,8 @@ class CeilometerUsage(object):
|
||||
ceilometer_usage_object = self
|
||||
else:
|
||||
ceilometer_usage_object = None
|
||||
resources = resource_list(self._request,
|
||||
resources = resource_list(
|
||||
self._request,
|
||||
query=query, ceilometer_usage_object=ceilometer_usage_object)
|
||||
if filter_func:
|
||||
resources = [resource for resource in resources if
|
||||
@ -645,10 +650,12 @@ class CeilometerUsage(object):
|
||||
be added to each resource object.
|
||||
"""
|
||||
|
||||
resources = self.resources(query, filter_func=filter_func,
|
||||
resources = self.resources(
|
||||
query, filter_func=filter_func,
|
||||
with_users_and_tenants=with_users_and_tenants)
|
||||
|
||||
ThreadedUpdateResourceWithStatistics.process_list(self, resources,
|
||||
ThreadedUpdateResourceWithStatistics.process_list(
|
||||
self, resources,
|
||||
meter_names=meter_names, period=period, stats_attr=stats_attr,
|
||||
additional_query=additional_query)
|
||||
|
||||
@ -672,7 +679,8 @@ class CeilometerUsage(object):
|
||||
return resource_aggregates
|
||||
|
||||
def resource_aggregates_with_statistics(self, queries=None,
|
||||
meter_names=None, period=None, filter_func=None, stats_attr=None,
|
||||
meter_names=None, period=None,
|
||||
filter_func=None, stats_attr=None,
|
||||
additional_query=None):
|
||||
"""Obtaining resource aggregates with statistics data inside.
|
||||
|
||||
@ -695,7 +703,8 @@ class CeilometerUsage(object):
|
||||
"""
|
||||
resource_aggregates = self.resource_aggregates(queries)
|
||||
|
||||
ThreadedUpdateResourceWithStatistics.process_list(self,
|
||||
ThreadedUpdateResourceWithStatistics.process_list(
|
||||
self,
|
||||
resource_aggregates, meter_names=meter_names, period=period,
|
||||
stats_attr=stats_attr, additional_query=additional_query)
|
||||
|
||||
@ -748,14 +757,16 @@ class Meters(object):
|
||||
|
||||
# Storing the meters info of all services together.
|
||||
all_services_meters = (self._nova_meters_info,
|
||||
self._neutron_meters_info, self._glance_meters_info,
|
||||
self._cinder_meters_info, self._swift_meters_info,
|
||||
self._neutron_meters_info,
|
||||
self._glance_meters_info,
|
||||
self._cinder_meters_info,
|
||||
self._swift_meters_info,
|
||||
self._kwapi_meters_info)
|
||||
self._all_meters_info = {}
|
||||
for service_meters in all_services_meters:
|
||||
self._all_meters_info.update(dict([(meter_name, meter_info)
|
||||
for meter_name,
|
||||
meter_info in service_meters.items()]))
|
||||
for meter_name, meter_info
|
||||
in service_meters.items()]))
|
||||
|
||||
# Here will be the cached Meter objects, that will be reused for
|
||||
# repeated listing.
|
||||
|
@ -157,8 +157,9 @@ def keystoneclient(request, admin=False):
|
||||
# Admin vs. non-admin clients are cached separately for token matching.
|
||||
cache_attr = "_keystoneclient_admin" if admin \
|
||||
else backend.KEYSTONE_CLIENT_ATTR
|
||||
if hasattr(request, cache_attr) and (not user.token.id
|
||||
or getattr(request, cache_attr).auth_token == user.token.id):
|
||||
if (hasattr(request, cache_attr) and
|
||||
(not user.token.id or
|
||||
getattr(request, cache_attr).auth_token == user.token.id)):
|
||||
LOG.debug("Using cached client for token: %s" % user.token.id)
|
||||
conn = getattr(request, cache_attr)
|
||||
else:
|
||||
@ -321,8 +322,8 @@ def user_update(request, user, **data):
|
||||
error = None
|
||||
|
||||
if not keystone_can_edit_user():
|
||||
raise keystone_exceptions.ClientException(405, _("Identity service "
|
||||
"does not allow editing user data."))
|
||||
raise keystone_exceptions.ClientException(
|
||||
405, _("Identity service does not allow editing user data."))
|
||||
|
||||
# The v2 API updates user model, password and default project separately
|
||||
if VERSIONS.active < 3:
|
||||
|
@ -434,8 +434,8 @@ def novaclient(request):
|
||||
|
||||
|
||||
def server_vnc_console(request, instance_id, console_type='novnc'):
|
||||
return VNCConsole(novaclient(request).servers.get_vnc_console(instance_id,
|
||||
console_type)['console'])
|
||||
return VNCConsole(novaclient(request).servers.get_vnc_console(
|
||||
instance_id, console_type)['console'])
|
||||
|
||||
|
||||
def server_spice_console(request, instance_id, console_type='spice-html5'):
|
||||
|
@ -27,10 +27,12 @@ LOG = logging.getLogger(__name__)
|
||||
# "type" of Sahara service registered in keystone
|
||||
SAHARA_SERVICE = 'data_processing'
|
||||
|
||||
SAHARA_AUTO_IP_ALLOCATION_ENABLED = getattr(settings,
|
||||
SAHARA_AUTO_IP_ALLOCATION_ENABLED = getattr(
|
||||
settings,
|
||||
'SAHARA_AUTO_IP_ALLOCATION_ENABLED',
|
||||
False)
|
||||
VERSIONS = base.APIVersionManager(SAHARA_SERVICE,
|
||||
VERSIONS = base.APIVersionManager(
|
||||
SAHARA_SERVICE,
|
||||
preferred_version=getattr(settings,
|
||||
'OPENSTACK_API_VERSIONS',
|
||||
{}).get(SAHARA_SERVICE, 1.1))
|
||||
|
@ -256,7 +256,8 @@ def _ipsecpolicy_get(request, ipsecpolicy_id, expand_conns=False):
|
||||
if expand_conns:
|
||||
ipsecsiteconns = _ipsecsiteconnection_list(request)
|
||||
ipsecpolicy['ipsecsiteconns'] = [c for c in ipsecsiteconns
|
||||
if c.ipsecpolicy_id == ipsecpolicy['id']]
|
||||
if (c.ipsecpolicy_id ==
|
||||
ipsecpolicy['id'])]
|
||||
return IPSecPolicy(ipsecpolicy)
|
||||
|
||||
|
||||
|
@ -250,7 +250,8 @@ class UpdateDomainWorkflowTests(test.BaseAdminViewTests):
|
||||
self.assertEqual(step.action.initial['name'], domain.name)
|
||||
self.assertEqual(step.action.initial['description'],
|
||||
domain.description)
|
||||
self.assertQuerysetEqual(workflow.steps,
|
||||
self.assertQuerysetEqual(
|
||||
workflow.steps,
|
||||
['<UpdateDomainInfo: update_domain>',
|
||||
'<UpdateDomainUsers: update_user_members>',
|
||||
'<UpdateDomainGroups: update_group_members>'])
|
||||
|
@ -18,7 +18,8 @@ from django.conf.urls import url
|
||||
from openstack_dashboard.dashboards.identity.domains import views
|
||||
|
||||
|
||||
urlpatterns = patterns('',
|
||||
urlpatterns = patterns(
|
||||
'',
|
||||
url(r'^$', views.IndexView.as_view(), name='index'),
|
||||
url(r'^create$', views.CreateDomainView.as_view(), name='create'),
|
||||
url(r'^(?P<domain_id>[^/]+)/update/$',
|
||||
|
@ -18,7 +18,8 @@ from django.conf.urls import url
|
||||
from openstack_dashboard.dashboards.identity.groups import views
|
||||
|
||||
|
||||
urlpatterns = patterns('',
|
||||
urlpatterns = patterns(
|
||||
'',
|
||||
url(r'^$', views.IndexView.as_view(), name='index'),
|
||||
url(r'^create$', views.CreateView.as_view(), name='create'),
|
||||
url(r'^(?P<group_id>[^/]+)/update/$',
|
||||
|
@ -212,7 +212,8 @@ class CreateProjectWorkflowTests(test.BaseAdminViewTests):
|
||||
self.assertEqual(step.action.initial['ram'], quota.get('ram').limit)
|
||||
self.assertEqual(step.action.initial['injected_files'],
|
||||
quota.get('injected_files').limit)
|
||||
self.assertQuerysetEqual(workflow.steps,
|
||||
self.assertQuerysetEqual(
|
||||
workflow.steps,
|
||||
['<CreateProjectInfo: createprojectinfoaction>',
|
||||
'<UpdateProjectMembers: update_members>',
|
||||
'<UpdateProjectGroups: update_group_members>',
|
||||
@ -905,7 +906,8 @@ class UpdateProjectWorkflowTests(test.BaseAdminViewTests):
|
||||
self.assertEqual(step.action.initial['name'], project.name)
|
||||
self.assertEqual(step.action.initial['description'],
|
||||
project.description)
|
||||
self.assertQuerysetEqual(workflow.steps,
|
||||
self.assertQuerysetEqual(
|
||||
workflow.steps,
|
||||
['<UpdateProjectInfo: update_info>',
|
||||
'<UpdateProjectMembers: update_members>',
|
||||
'<UpdateProjectGroups: update_group_members>',
|
||||
@ -1874,7 +1876,8 @@ class SeleniumTests(test.SeleniumAdminTestCase):
|
||||
|
||||
self.mox.ReplayAll()
|
||||
|
||||
self.selenium.get("%s%s" % (self.live_server_url,
|
||||
self.selenium.get("%s%s" %
|
||||
(self.live_server_url,
|
||||
reverse('horizon:identity:projects:create')))
|
||||
|
||||
members = self.selenium.find_element_by_css_selector(member_css_class)
|
||||
|
@ -22,7 +22,8 @@ from django.conf.urls import url
|
||||
from openstack_dashboard.dashboards.identity.projects import views
|
||||
|
||||
|
||||
urlpatterns = patterns('',
|
||||
urlpatterns = patterns(
|
||||
'',
|
||||
url(r'^$', views.IndexView.as_view(), name='index'),
|
||||
url(r'^create$', views.CreateProjectView.as_view(), name='create'),
|
||||
url(r'^(?P<tenant_id>[^/]+)/update/$',
|
||||
|
@ -194,8 +194,8 @@ class UpdateProjectView(workflows.WorkflowView):
|
||||
tenant_id=project_id)
|
||||
if api.base.is_service_enabled(self.request, 'network') and \
|
||||
api.neutron.is_quotas_extension_supported(self.request):
|
||||
quota_data += api.neutron.tenant_quota_get(self.request,
|
||||
tenant_id=project_id)
|
||||
quota_data += api.neutron.tenant_quota_get(
|
||||
self.request, tenant_id=project_id)
|
||||
for field in quotas.QUOTA_FIELDS:
|
||||
initial[field] = quota_data.get(field).limit
|
||||
except Exception:
|
||||
|
@ -17,7 +17,8 @@ from django.conf.urls import url
|
||||
|
||||
from openstack_dashboard.dashboards.identity.roles import views
|
||||
|
||||
urlpatterns = patterns('openstack_dashboard.dashboards.identity.roles.views',
|
||||
urlpatterns = patterns(
|
||||
'openstack_dashboard.dashboards.identity.roles.views',
|
||||
url(r'^$', views.IndexView.as_view(), name='index'),
|
||||
url(r'^(?P<role_id>[^/]+)/update/$',
|
||||
views.UpdateView.as_view(), name='update'),
|
||||
|
@ -21,7 +21,8 @@ from django.conf.urls import url
|
||||
|
||||
from openstack_dashboard.dashboards.identity.users import views
|
||||
|
||||
urlpatterns = patterns('openstack_dashboard.dashboards.identity.users.views',
|
||||
urlpatterns = patterns(
|
||||
'openstack_dashboard.dashboards.identity.users.views',
|
||||
url(r'^$', views.IndexView.as_view(), name='index'),
|
||||
url(r'^(?P<user_id>[^/]+)/update/$',
|
||||
views.UpdateView.as_view(), name='update'),
|
||||
|
@ -71,7 +71,8 @@ class CreateNetworkProfile(forms.SelfHandlingForm):
|
||||
widget=forms.Select
|
||||
(attrs={'class': 'switched',
|
||||
'data-switch-on': 'segtype',
|
||||
'data-segtype-trunk': _("Sub Type")}))
|
||||
'data-segtype-trunk':
|
||||
_("Sub Type")}))
|
||||
segment_range = forms.CharField(max_length=255,
|
||||
label=_("Segment Range"),
|
||||
required=False,
|
||||
|
@ -16,7 +16,8 @@ from django.conf.urls import url
|
||||
from openstack_dashboard.dashboards.router.nexus1000v import views
|
||||
|
||||
|
||||
urlpatterns = patterns('',
|
||||
urlpatterns = patterns(
|
||||
'',
|
||||
url(r'^$', views.IndexView.as_view(), name='index'),
|
||||
# Network Profile
|
||||
url(r'^network_profile/create$', views.CreateNetworkProfileView.as_view(),
|
||||
|
@ -28,14 +28,17 @@ from openstack_dashboard import api
|
||||
|
||||
|
||||
class PasswordForm(forms.SelfHandlingForm):
|
||||
current_password = forms.CharField(label=_("Current password"),
|
||||
current_password = forms.CharField(
|
||||
label=_("Current password"),
|
||||
widget=forms.PasswordInput(render_value=False))
|
||||
new_password = forms.RegexField(label=_("New password"),
|
||||
new_password = forms.RegexField(
|
||||
label=_("New password"),
|
||||
widget=forms.PasswordInput(render_value=False),
|
||||
regex=validators.password_validator(),
|
||||
error_messages={'invalid':
|
||||
validators.password_validator_msg()})
|
||||
confirm_password = forms.CharField(label=_("Confirm new password"),
|
||||
confirm_password = forms.CharField(
|
||||
label=_("Confirm new password"),
|
||||
widget=forms.PasswordInput(render_value=False))
|
||||
no_autocomplete = True
|
||||
|
||||
|
@ -18,5 +18,6 @@ from django.conf.urls import url
|
||||
from openstack_dashboard.dashboards.settings.password import views
|
||||
|
||||
|
||||
urlpatterns = patterns('',
|
||||
urlpatterns = patterns(
|
||||
'',
|
||||
url(r'^$', views.PasswordView.as_view(), name='index'))
|
||||
|
@ -87,8 +87,8 @@ class UserSettingsForm(forms.SelfHandlingForm):
|
||||
elif tz == "GMT":
|
||||
tz_name = _("GMT")
|
||||
else:
|
||||
tz_label = babel.dates.get_timezone_location(tz,
|
||||
locale=babel_locale)
|
||||
tz_label = babel.dates.get_timezone_location(
|
||||
tz, locale=babel_locale)
|
||||
# Translators: UTC offset and timezone label
|
||||
tz_name = _("%(offset)s: %(label)s") % {"offset": utc_offset,
|
||||
"label": tz_label}
|
||||
|
@ -18,5 +18,6 @@ from django.conf.urls import url
|
||||
from openstack_dashboard.dashboards.settings.user import views
|
||||
|
||||
|
||||
urlpatterns = patterns('',
|
||||
urlpatterns = patterns(
|
||||
'',
|
||||
url(r'^$', views.UserSettingsView.as_view(), name='index'))
|
||||
|
@ -190,11 +190,13 @@ STATICFILES_DIRS = [
|
||||
|
||||
if xstatic.main.XStatic(xstatic.pkg.jquery_ui).version.startswith('1.10.'):
|
||||
# The 1.10.x versions already contain the 'ui' directory.
|
||||
STATICFILES_DIRS.append(('horizon/lib/jquery-ui',
|
||||
STATICFILES_DIRS.append(
|
||||
('horizon/lib/jquery-ui',
|
||||
xstatic.main.XStatic(xstatic.pkg.jquery_ui).base_dir))
|
||||
else:
|
||||
# Newer versions dropped the directory, add it to keep the path the same.
|
||||
STATICFILES_DIRS.append(('horizon/lib/jquery-ui/ui',
|
||||
STATICFILES_DIRS.append(
|
||||
('horizon/lib/jquery-ui/ui',
|
||||
xstatic.main.XStatic(xstatic.pkg.jquery_ui).base_dir))
|
||||
|
||||
COMPRESS_PRECOMPILERS = (
|
||||
|
@ -61,7 +61,8 @@ class APIResourceWrapperTests(test.TestCase):
|
||||
|
||||
def test_get_invalid_attribute(self):
|
||||
resource = APIResource.get_instance()
|
||||
self.assertNotIn('missing', resource._attrs,
|
||||
self.assertNotIn(
|
||||
'missing', resource._attrs,
|
||||
msg="Test assumption broken. Find new missing attribute")
|
||||
with self.assertRaises(AttributeError):
|
||||
resource.missing
|
||||
@ -89,7 +90,8 @@ class APIDictWrapperTests(test.TestCase):
|
||||
|
||||
def test_get_invalid_item(self):
|
||||
resource = APIDict.get_instance()
|
||||
self.assertNotIn('missing', resource._attrs,
|
||||
self.assertNotIn(
|
||||
'missing', resource._attrs,
|
||||
msg="Test assumption broken. Find new missing attribute")
|
||||
with self.assertRaises(AttributeError):
|
||||
resource.missing
|
||||
|
@ -2,6 +2,7 @@ from django.conf.urls import patterns
|
||||
|
||||
from openstack_dashboard.urls import urlpatterns # noqa
|
||||
|
||||
urlpatterns += patterns('',
|
||||
urlpatterns += patterns(
|
||||
'',
|
||||
(r'^500/$', 'django.views.defaults.server_error')
|
||||
)
|
||||
|
@ -67,7 +67,8 @@ def data(TEST):
|
||||
TEST.cinder_services.add(service_2)
|
||||
|
||||
# Volumes - Cinder v1
|
||||
volume = volumes.Volume(volumes.VolumeManager(None),
|
||||
volume = volumes.Volume(
|
||||
volumes.VolumeManager(None),
|
||||
{'id': "11023e92-8008-4c8b-8059-7f2293ff3887",
|
||||
'status': 'available',
|
||||
'size': 40,
|
||||
@ -76,17 +77,19 @@ def data(TEST):
|
||||
'created_at': '2014-01-27 10:30:00',
|
||||
'volume_type': None,
|
||||
'attachments': []})
|
||||
nameless_volume = volumes.Volume(volumes.VolumeManager(None),
|
||||
dict(id="4b069dd0-6eaa-4272-8abc-5448a68f1cce",
|
||||
status='available',
|
||||
size=10,
|
||||
display_name='',
|
||||
display_description='',
|
||||
device="/dev/hda",
|
||||
created_at='2010-11-21 18:34:25',
|
||||
volume_type='vol_type_1',
|
||||
attachments=[]))
|
||||
other_volume = volumes.Volume(volumes.VolumeManager(None),
|
||||
nameless_volume = volumes.Volume(
|
||||
volumes.VolumeManager(None),
|
||||
{"id": "4b069dd0-6eaa-4272-8abc-5448a68f1cce",
|
||||
"status": 'available',
|
||||
"size": 10,
|
||||
"display_name": '',
|
||||
"display_description": '',
|
||||
"device": "/dev/hda",
|
||||
"created_at": '2010-11-21 18:34:25',
|
||||
"volume_type": 'vol_type_1',
|
||||
"attachments": []})
|
||||
other_volume = volumes.Volume(
|
||||
volumes.VolumeManager(None),
|
||||
{'id': "21023e92-8008-1234-8059-7f2293ff3889",
|
||||
'status': 'in-use',
|
||||
'size': 10,
|
||||
@ -96,7 +99,8 @@ def data(TEST):
|
||||
'volume_type': None,
|
||||
'attachments': [{"id": "1", "server_id": '1',
|
||||
"device": "/dev/hda"}]})
|
||||
volume_with_type = volumes.Volume(volumes.VolumeManager(None),
|
||||
volume_with_type = volumes.Volume(
|
||||
volumes.VolumeManager(None),
|
||||
{'id': "7dcb47fd-07d9-42c2-9647-be5eab799ebe",
|
||||
'name': 'my_volume2',
|
||||
'status': 'in-use',
|
||||
@ -127,7 +131,8 @@ def data(TEST):
|
||||
TEST.cinder_volume_types.add(vol_type1, vol_type2)
|
||||
|
||||
# Volumes - Cinder v2
|
||||
volume_v2 = volumes_v2.Volume(volumes_v2.VolumeManager(None),
|
||||
volume_v2 = volumes_v2.Volume(
|
||||
volumes_v2.VolumeManager(None),
|
||||
{'id': "31023e92-8008-4c8b-8059-7f2293ff1234",
|
||||
'name': 'v2_volume',
|
||||
'description': "v2 Volume Description",
|
||||
@ -141,14 +146,16 @@ def data(TEST):
|
||||
|
||||
TEST.cinder_volumes.add(api.cinder.Volume(volume_v2))
|
||||
|
||||
snapshot = vol_snaps.Snapshot(vol_snaps.SnapshotManager(None),
|
||||
snapshot = vol_snaps.Snapshot(
|
||||
vol_snaps.SnapshotManager(None),
|
||||
{'id': '5f3d1c33-7d00-4511-99df-a2def31f3b5d',
|
||||
'display_name': 'test snapshot',
|
||||
'display_description': 'volume snapshot',
|
||||
'size': 40,
|
||||
'status': 'available',
|
||||
'volume_id': '11023e92-8008-4c8b-8059-7f2293ff3887'})
|
||||
snapshot2 = vol_snaps_v2.Snapshot(vol_snaps_v2.SnapshotManager(None),
|
||||
snapshot2 = vol_snaps_v2.Snapshot(
|
||||
vol_snaps_v2.SnapshotManager(None),
|
||||
{'id': 'c9d0881a-4c0b-4158-a212-ad27e11c2b0f',
|
||||
'name': '',
|
||||
'description': 'v2 volume snapshot description',
|
||||
@ -163,8 +170,8 @@ def data(TEST):
|
||||
TEST.cinder_volume_snapshots.add(api.cinder.VolumeSnapshot(snapshot2))
|
||||
TEST.cinder_volume_snapshots.first()._volume = volume
|
||||
|
||||
volume_backup1 = vol_backups.VolumeBackup(vol_backups.
|
||||
VolumeBackupManager(None),
|
||||
volume_backup1 = vol_backups.VolumeBackup(
|
||||
vol_backups.VolumeBackupManager(None),
|
||||
{'id': 'a374cbb8-3f99-4c3f-a2ef-3edbec842e31',
|
||||
'name': 'backup1',
|
||||
'description': 'volume backup 1',
|
||||
@ -173,8 +180,8 @@ def data(TEST):
|
||||
'container_name': 'volumebackups',
|
||||
'volume_id': '11023e92-8008-4c8b-8059-7f2293ff3887'})
|
||||
|
||||
volume_backup2 = vol_backups.VolumeBackup(vol_backups.
|
||||
VolumeBackupManager(None),
|
||||
volume_backup2 = vol_backups.VolumeBackup(
|
||||
vol_backups.VolumeBackupManager(None),
|
||||
{'id': 'c321cbb8-3f99-4c3f-a2ef-3edbec842e52',
|
||||
'name': 'backup2',
|
||||
'description': 'volume backup 2',
|
||||
@ -229,12 +236,14 @@ def data(TEST):
|
||||
TEST.cinder_limits = limits
|
||||
|
||||
# QOS Specs
|
||||
qos_spec1 = qos_specs.QoSSpecs(qos_specs.QoSSpecsManager(None),
|
||||
qos_spec1 = qos_specs.QoSSpecs(
|
||||
qos_specs.QoSSpecsManager(None),
|
||||
{"id": "418db45d-6992-4674-b226-80aacad2073c",
|
||||
"name": "high_iops",
|
||||
"consumer": "back-end",
|
||||
"specs": {"minIOPS": "1000", "maxIOPS": '100000'}})
|
||||
qos_spec2 = qos_specs.QoSSpecs(qos_specs.QoSSpecsManager(None),
|
||||
qos_spec2 = qos_specs.QoSSpecs(
|
||||
qos_specs.QoSSpecsManager(None),
|
||||
{"id": "6ed7035f-992e-4075-8ed6-6eff19b3192d",
|
||||
"name": "high_bws",
|
||||
"consumer": "back-end",
|
||||
|
@ -116,7 +116,6 @@ def data(TEST):
|
||||
'segment_range': '3000-3100',
|
||||
'id':
|
||||
'00000000-1111-1111-1111-000000000000',
|
||||
# 'project': network_dict['tenant_id'],
|
||||
'project': TEST.networks.get(name="net1")['tenant_id'],
|
||||
# vlan profiles have no sub_type or multicast_ip_range
|
||||
'multicast_ip_range': None,
|
||||
@ -820,7 +819,8 @@ def data(TEST):
|
||||
'peer_address':
|
||||
'2607:f0d0:4545:3:200:f8ff:fe21:67cf',
|
||||
'peer_cidrs': ['20.1.0.0/24', '21.1.0.0/24'],
|
||||
'peer_id': '2607:f0d0:4545:3:200:f8ff:fe21:67cf',
|
||||
'peer_id':
|
||||
'2607:f0d0:4545:3:200:f8ff:fe21:67cf',
|
||||
'psk': 'secret',
|
||||
'vpnservice_id': vpnservice_dict['id'],
|
||||
'admin_state_up': True,
|
||||
|
@ -190,48 +190,52 @@ def data(TEST):
|
||||
TEST.api_floating_ips_uuid = utils.TestDataContainer()
|
||||
|
||||
# Volumes
|
||||
volume = volumes.Volume(volumes.VolumeManager(None),
|
||||
dict(id="41023e92-8008-4c8b-8059-7f2293ff3775",
|
||||
name='test_volume',
|
||||
status='available',
|
||||
size=40,
|
||||
display_name='Volume name',
|
||||
created_at='2012-04-01 10:30:00',
|
||||
volume_type=None,
|
||||
attachments=[]))
|
||||
nameless_volume = volumes.Volume(volumes.VolumeManager(None),
|
||||
dict(id="3b189ac8-9166-ac7f-90c9-16c8bf9e01ac",
|
||||
name='',
|
||||
status='in-use',
|
||||
size=10,
|
||||
display_name='',
|
||||
display_description='',
|
||||
device="/dev/hda",
|
||||
created_at='2010-11-21 18:34:25',
|
||||
volume_type='vol_type_1',
|
||||
attachments=[{"id": "1", "server_id": '1',
|
||||
"device": "/dev/hda"}]))
|
||||
attached_volume = volumes.Volume(volumes.VolumeManager(None),
|
||||
dict(id="8cba67c1-2741-6c79-5ab6-9c2bf8c96ab0",
|
||||
name='my_volume',
|
||||
status='in-use',
|
||||
size=30,
|
||||
display_name='My Volume',
|
||||
display_description='',
|
||||
device="/dev/hdk",
|
||||
created_at='2011-05-01 11:54:33',
|
||||
volume_type='vol_type_2',
|
||||
attachments=[{"id": "2", "server_id": '1',
|
||||
"device": "/dev/hdk"}]))
|
||||
non_bootable_volume = volumes.Volume(volumes.VolumeManager(None),
|
||||
dict(id="41023e92-8008-4c8b-8059-7f2293ff3771",
|
||||
name='non_bootable_volume',
|
||||
status='available',
|
||||
size=40,
|
||||
display_name='Non Bootable Volume',
|
||||
created_at='2012-04-01 10:30:00',
|
||||
volume_type=None,
|
||||
attachments=[]))
|
||||
volume = volumes.Volume(
|
||||
volumes.VolumeManager(None),
|
||||
{"id": "41023e92-8008-4c8b-8059-7f2293ff3775",
|
||||
"name": 'test_volume',
|
||||
"status": 'available',
|
||||
"size": 40,
|
||||
"display_name": 'Volume name',
|
||||
"created_at": '2012-04-01 10:30:00',
|
||||
"volume_type": None,
|
||||
"attachments": []})
|
||||
nameless_volume = volumes.Volume(
|
||||
volumes.VolumeManager(None),
|
||||
{"id": "3b189ac8-9166-ac7f-90c9-16c8bf9e01ac",
|
||||
"name": '',
|
||||
"status": 'in-use',
|
||||
"size": 10,
|
||||
"display_name": '',
|
||||
"display_description": '',
|
||||
"device": "/dev/hda",
|
||||
"created_at": '2010-11-21 18:34:25',
|
||||
"volume_type": 'vol_type_1',
|
||||
"attachments": [{"id": "1", "server_id": '1',
|
||||
"device": "/dev/hda"}]})
|
||||
attached_volume = volumes.Volume(
|
||||
volumes.VolumeManager(None),
|
||||
{"id": "8cba67c1-2741-6c79-5ab6-9c2bf8c96ab0",
|
||||
"name": 'my_volume',
|
||||
"status": 'in-use',
|
||||
"size": 30,
|
||||
"display_name": 'My Volume',
|
||||
"display_description": '',
|
||||
"device": "/dev/hdk",
|
||||
"created_at": '2011-05-01 11:54:33',
|
||||
"volume_type": 'vol_type_2',
|
||||
"attachments": [{"id": "2", "server_id": '1',
|
||||
"device": "/dev/hdk"}]})
|
||||
non_bootable_volume = volumes.Volume(
|
||||
volumes.VolumeManager(None),
|
||||
{"id": "41023e92-8008-4c8b-8059-7f2293ff3771",
|
||||
"name": 'non_bootable_volume',
|
||||
"status": 'available',
|
||||
"size": 40,
|
||||
"display_name": 'Non Bootable Volume',
|
||||
"created_at": '2012-04-01 10:30:00',
|
||||
"volume_type": None,
|
||||
"attachments": []})
|
||||
|
||||
volume.bootable = 'true'
|
||||
nameless_volume.bootable = 'true'
|
||||
@ -297,10 +301,12 @@ def data(TEST):
|
||||
TEST.flavors.add(flavor_1, flavor_2, flavor_3, flavor_4)
|
||||
|
||||
flavor_access_manager = flavor_access.FlavorAccessManager(None)
|
||||
flavor_access_1 = flavor_access.FlavorAccess(flavor_access_manager,
|
||||
flavor_access_1 = flavor_access.FlavorAccess(
|
||||
flavor_access_manager,
|
||||
{"tenant_id": "1",
|
||||
"flavor_id": "dddddddd-dddd-dddd-dddd-dddddddddddd"})
|
||||
flavor_access_2 = flavor_access.FlavorAccess(flavor_access_manager,
|
||||
flavor_access_2 = flavor_access.FlavorAccess(
|
||||
flavor_access_manager,
|
||||
{"tenant_id": "2",
|
||||
"flavor_id": "dddddddd-dddd-dddd-dddd-dddddddddddd"})
|
||||
TEST.flavor_access.add(flavor_access_1, flavor_access_2)
|
||||
@ -547,14 +553,16 @@ def data(TEST):
|
||||
json.loads(USAGE_DATA % usage_2_vals))
|
||||
TEST.usages.add(usage_obj_2)
|
||||
|
||||
volume_snapshot = vol_snaps.Snapshot(vol_snaps.SnapshotManager(None),
|
||||
volume_snapshot = vol_snaps.Snapshot(
|
||||
vol_snaps.SnapshotManager(None),
|
||||
{'id': '40f3fabf-3613-4f5e-90e5-6c9a08333fc3',
|
||||
'display_name': 'test snapshot',
|
||||
'display_description': 'vol snap!',
|
||||
'size': 40,
|
||||
'status': 'available',
|
||||
'volume_id': '41023e92-8008-4c8b-8059-7f2293ff3775'})
|
||||
volume_snapshot2 = vol_snaps.Snapshot(vol_snaps.SnapshotManager(None),
|
||||
volume_snapshot2 = vol_snaps.Snapshot(
|
||||
vol_snaps.SnapshotManager(None),
|
||||
{'id': 'a374cbb8-3f99-4c3f-a2ef-3edbec842e31',
|
||||
'display_name': '',
|
||||
'display_description': 'vol snap 2!',
|
||||
|
@ -15,6 +15,7 @@ from django.conf.urls import url
|
||||
|
||||
from openstack_dashboard.test.test_panels.plugin_panel import views
|
||||
|
||||
urlpatterns = patterns('',
|
||||
urlpatterns = patterns(
|
||||
'',
|
||||
url(r'^$', views.IndexView.as_view(), name='index'),
|
||||
)
|
||||
|
@ -30,7 +30,8 @@ from django.contrib.staticfiles.urls import staticfiles_urlpatterns # noqa
|
||||
import horizon
|
||||
|
||||
|
||||
urlpatterns = patterns('',
|
||||
urlpatterns = patterns(
|
||||
'',
|
||||
url(r'^$', 'openstack_dashboard.views.splash', name='splash'),
|
||||
url(r'^auth/', include('openstack_auth.urls')),
|
||||
url(r'', include(horizon.urls))
|
||||
@ -45,6 +46,7 @@ urlpatterns += staticfiles_urlpatterns()
|
||||
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
|
||||
if settings.DEBUG:
|
||||
urlpatterns += patterns('',
|
||||
urlpatterns += patterns(
|
||||
'',
|
||||
url(r'^500/$', 'django.views.defaults.server_error')
|
||||
)
|
||||
|
3
tox.ini
3
tox.ini
@ -62,12 +62,11 @@ downloadcache = ~/cache/pip
|
||||
|
||||
[flake8]
|
||||
exclude = .venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py,*/local/*,*/test/test_plugins/*,.ropeproject
|
||||
# E128 continuation line under-indented for visual indent
|
||||
# H307 like imports should be grouped together
|
||||
# H405 multi line docstring summary not separated with an empty line
|
||||
# H803 git commit title should not end with period (disabled on purpose, see bug #1236621)
|
||||
# H904 Wrap long lines in parentheses instead of a backslash
|
||||
ignore = E128,H307,H405,H803,H904
|
||||
ignore = H307,H405,H803,H904
|
||||
|
||||
[hacking]
|
||||
import_exceptions = collections.defaultdict,
|
||||
|
Loading…
Reference in New Issue
Block a user