Fix pep8 errors for zuul

Fix all pep8 errors in stx-gui
Ignore E501,E129 errors (129 is unavoidable without breaking indent)
Story: 2003364
Task: 24419

Change-Id: Ie8d80078c4c9d78a8e0cda99d0b71bd87af883b0
Signed-off-by: Lachlan Plant <lachlan.plant@windriver.com>
This commit is contained in:
Lachlan Plant 2018-08-29 14:20:03 -05:00
parent af152b3ff6
commit 9cca5b0fff
38 changed files with 110 additions and 102 deletions

View File

@ -26,4 +26,4 @@ except ImportError:
setuptools.setup(
setup_requires=['pbr>=1.8'],
pbr=True)
pbr=True)

View File

@ -1,7 +1,7 @@
#
# Copyright (c) 2018 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (c) 2018 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
import six
from django.conf import settings
@ -9,6 +9,7 @@ from horizon import exceptions
from openstack_dashboard.api import base
def get_request_page_size(request, limit=None):
default_limit = getattr(settings, 'API_RESULT_LIMIT', 1000)
try:
@ -17,6 +18,7 @@ def get_request_page_size(request, limit=None):
default_page_size = getattr(settings, 'API_RESULT_PAGE_SIZE', 20)
return request.session.get('horizon_pagesize', default_page_size)
def is_stx_region(request):
if not base.is_service_enabled(request, 'platform'):
return False

View File

@ -1,11 +1,12 @@
#
# Copyright (c) 2018 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (c) 2018 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
from openstack_dashboard.api.neutron import *
def provider_network_type_list(request, **params):
providernet_types = neutronclient(request).list_providernet_types(
**params).get(

View File

@ -1,7 +1,7 @@
#
# Copyright (c) 2018 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (c) 2018 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
from novaclient.v2 import wrs_pci
@ -9,6 +9,7 @@ from novaclient.v2 import wrs_providernets
from openstack_dashboard.api.nova import *
def server_group_list(request, all_projects=False):
return novaclient(request).server_groups.list(all_projects)

View File

@ -124,9 +124,9 @@ class ActiveAlarmsTab(tabs.TableTab):
search_opts = self.get_filters()
search_opts.update({
'paginate': True,
'sort_key': 'severity,entity_instance_id',
'sort_dir': 'asc'})
'paginate': True,
'sort_key': 'severity,entity_instance_id',
'sort_dir': 'asc'})
alarms = []
try:

View File

@ -158,15 +158,15 @@ class JSONView(View):
def add_resource_url(self, view, resources):
tenant_id = self.request.user.tenant_id
for resource in resources:
if (resource.get('tenant_id')
and tenant_id != resource.get('tenant_id')):
if (resource.get('tenant_id') and
tenant_id != resource.get('tenant_id')):
continue
resource['url'] = reverse(view, None, [str(resource['id'])])
def _check_router_external_port(self, ports, router_id, network_id):
for port in ports:
if (port['network_id'] == network_id
and port['device_id'] == router_id):
if (port['network_id'] == network_id and
port['device_id'] == router_id):
return True
return False

View File

@ -42,7 +42,7 @@ class UpdateView(forms.ModalFormView):
host_id = self.kwargs['host_id']
try:
self._object = stx_api.sysinv.host_device_get(self.request,
device_uuid)
device_uuid)
self._object.host_id = host_id
except Exception:
redirect = reverse("horizon:admin:inventory:detail",
@ -85,7 +85,7 @@ class DetailView(views.HorizonTemplateView):
host_id = self.kwargs['host_id']
try:
self._object = stx_api.sysinv.host_device_get(self.request,
device_uuid)
device_uuid)
self._object.host_id = host_id
except Exception:

View File

@ -190,7 +190,7 @@ class AddInterfaceProfileView(forms.ModalFormView):
p.namedisplay = p.get_port_display_name()
host.interfaces = stx_api.sysinv.host_interface_list(self.request,
host.uuid)
host.uuid)
for i in host.interfaces:
i.ports = [p.get_port_display_name()
for p in all_ports if
@ -235,7 +235,7 @@ class UpdateView(forms.ModalFormView):
host_id = self.kwargs['host_id']
try:
self._object = stx_api.sysinv.host_interface_get(self.request,
interface_id)
interface_id)
self._object.host_id = host_id
except Exception:
@ -355,7 +355,7 @@ class DetailView(tables.MultiTableView):
host_id = self.kwargs['host_id']
try:
self._object = stx_api.sysinv.host_interface_get(self.request,
interface_id)
interface_id)
self._object.host_id = host_id
self._object = self._add_pool_names(self._object)
except Exception:

View File

@ -38,7 +38,7 @@ class UpdateMemoryView(forms.ModalFormView):
try:
host = stx_api.sysinv.host_get(self.request, host_id)
host.memorys = stx_api.sysinv.host_memory_list(self.request,
host.uuid)
host.uuid)
host.nodes = \
stx_api.sysinv.host_node_list(self.request, host.uuid)
self._object = host

View File

@ -86,7 +86,7 @@ class DetailView(views.HorizonTemplateView):
host_id = self.kwargs['host_id']
try:
self._object = stx_api.sysinv.host_port_get(self.request,
port_id)
port_id)
self._object.host_id = host_id
except Exception:

View File

@ -207,8 +207,8 @@ class UpdateSensorGroup(forms.SelfHandlingForm):
try:
sensorgroup = stx_api.sysinv.host_sensorgroup_update(request,
sensorgroup_id,
**data)
sensorgroup_id,
**data)
msg = _('SensorGroup "%s" was '
'successfully updated.') % mysensorgroupname

View File

@ -76,7 +76,7 @@ class UpdateSensorGroupView(forms.ModalFormView):
sensorgroup_id, self.kwargs)
try:
self._object = stx_api.sysinv.host_sensorgroup_get(self.request,
sensorgroup_id)
sensorgroup_id)
self._object.host_id = host_id
except Exception:
@ -196,7 +196,7 @@ class DetailSensorGroupView(views.HorizonTemplateView):
sensorgroup_id = self.kwargs['sensorgroup_id']
try:
sensorgroup = stx_api.sysinv.host_sensorgroup_get(self.request,
sensorgroup_id)
sensorgroup_id)
except Exception:
redirect = reverse('horizon:admin:inventory:index')
exceptions.handle(self.request,

View File

@ -253,8 +253,8 @@ class AddStorageVolume(forms.SelfHandlingForm):
if d.istor_uuid and d.istor_uuid != this_stor_uuid:
continue
is_rootfs_device = \
(('stor_function' in d.capabilities)
and (d.capabilities['stor_function'] == 'rootfs'))
(('stor_function' in d.capabilities) and
(d.capabilities['stor_function'] == 'rootfs'))
if is_rootfs_device:
continue
disk_model = d.get_model_num()
@ -277,7 +277,7 @@ class AddStorageVolume(forms.SelfHandlingForm):
# Populate the available tiers for OSD assignment
avail_tier_list = stx_api.sysinv.storage_tier_list(self.request,
cluster_uuid)
cluster_uuid)
tier_tuple_list = [(t.uuid, t.name) for t in avail_tier_list]
# Populate available journal choices. If no journal is available,
@ -559,7 +559,7 @@ class AddPhysicalVolume(forms.SelfHandlingForm):
avail_disk_list = stx_api.sysinv.host_disk_list(self.request, host_uuid)
ilvg_list = stx_api.sysinv.host_lvg_list(self.request, host_uuid)
partitions = stx_api.sysinv.host_disk_partition_list(self.request,
host_uuid)
host_uuid)
ipv_list = stx_api.sysinv.host_pv_list(self.request, host_uuid)
disk_tuple_list = []
partitions_tuple_list = []
@ -592,12 +592,12 @@ class AddPhysicalVolume(forms.SelfHandlingForm):
disk_cap = d.capabilities
# TODO(rchurch): re-factor
is_cinder_device = \
(('device_function' in disk_cap)
and (disk_cap['device_function'] == 'cinder_device'))
(('device_function' in disk_cap) and
(disk_cap['device_function'] == 'cinder_device'))
is_rootfs_device = \
(('stor_function' in disk_cap)
and (disk_cap['stor_function'] == 'rootfs'))
(('stor_function' in disk_cap) and
(disk_cap['stor_function'] == 'rootfs'))
disk_model = d.get_model_num()
# TODO(rchurch): re-factor

View File

@ -126,7 +126,7 @@ class DeletePartition(tables.DeleteAction):
# Get all the partitions from the same disk.
disk_partitions = \
stx_api.sysinv.host_disk_partition_list(request, host.uuid,
partition.idisk_uuid)
partition.idisk_uuid)
if partition.device_path:
partition_number = re.match('.*?([0-9]+)$',
@ -195,8 +195,8 @@ class EditPartition(tables.LinkAction):
# Get all the partitions from the same disk.
disk_partitions = \
stx_api.sysinv.host_disk_partition_list(request,
host.uuid,
partition.idisk_uuid)
host.uuid,
partition.idisk_uuid)
if partition.device_path:
partition_number = re.match('.*?([0-9]+)$',
@ -287,7 +287,7 @@ class EditStor(tables.LinkAction):
forihostuuid = self.table.kwargs['host'].uuid
journal_stors = \
stx_api.sysinv.host_stor_get_by_function(request, forihostuuid,
'journal')
'journal')
if not journal_stors:
self.classes = [c for c in self.classes] + ['disabled']
@ -430,8 +430,7 @@ class RemoveLocalVolumeGroup(tables.DeleteAction):
cinder_backend = stx_api.sysinv.get_cinder_backend(request)
if lvg.lvm_vg_name == stx_api.sysinv.LVG_NOVA_LOCAL:
return ((host._administrative == 'locked')
or
return ((host._administrative == 'locked') or
(('compute' in host._subfunctions) and
(host.compute_config_required is True)))
elif lvg.lvm_vg_name == stx_api.sysinv.LVG_CINDER_VOLUMES:
@ -552,8 +551,7 @@ class RemovePhysicalVolume(tables.DeleteAction):
cinder_backend = stx_api.sysinv.get_cinder_backend(request)
if pv.lvm_vg_name == stx_api.sysinv.LVG_NOVA_LOCAL:
return ((host._administrative == 'locked')
or
return ((host._administrative == 'locked') or
(('compute' in host._subfunctions) and
(host.compute_config_required is True)))
elif pv.lvm_vg_name == stx_api.sysinv.LVG_CINDER_VOLUMES:

View File

@ -86,7 +86,7 @@ class EditStorageVolumeView(forms.ModalFormView):
stor_uuid, self.kwargs)
try:
self._object = stx_api.sysinv.host_stor_get(self.request,
stor_uuid)
stor_uuid)
self._object.host_id = host_id
except Exception:
redirect = reverse("horizon:admin:inventory:detail",

View File

@ -837,7 +837,7 @@ class DeleteInterfaceProfile(tables.DeleteAction):
def delete(self, request, interfaceprofile_id):
try:
stx_api.sysinv.host_interfaceprofile_delete(request,
interfaceprofile_id)
interfaceprofile_id)
except Exception:
msg = _(
'Failed to delete interface profile %s') % interfaceprofile_id

View File

@ -116,7 +116,7 @@ class DetailView(tabs.TabbedTableView):
icpu_utils.restructure_host_cpu_data(host)
host.memorys = stx_api.sysinv.host_memory_list(self.request,
host.uuid)
host.uuid)
for m in host.memorys:
for n in host.nodes:
if m.inode_uuid == n.uuid:
@ -125,9 +125,9 @@ class DetailView(tabs.TabbedTableView):
host.ports = stx_api.sysinv.host_port_list(self.request, host.uuid)
host.interfaces = stx_api.sysinv.host_interface_list(self.request,
host.uuid)
host.uuid)
host.devices = stx_api.sysinv.host_device_list(self.request,
host.uuid)
host.uuid)
host.disks = stx_api.sysinv.host_disk_list(self.request, host.uuid)
host.stors = stx_api.sysinv.host_stor_list(self.request, host.uuid)
host.pvs = stx_api.sysinv.host_pv_list(self.request, host.uuid)
@ -154,7 +154,7 @@ class DetailView(tabs.TabbedTableView):
pv.lvm_vg_name)
host.lvgs = stx_api.sysinv.host_lvg_list(self.request, host.uuid,
get_params=True)
get_params=True)
# Adjust lvg state to be more "user friendly"
for lvg in host.lvgs:
@ -162,7 +162,7 @@ class DetailView(tabs.TabbedTableView):
lvg.lvm_vg_name)
host.sensors = stx_api.sysinv.host_sensor_list(self.request,
host.uuid)
host.uuid)
host.sensorgroups = stx_api.sysinv.host_sensorgroup_list(
self.request, host.uuid)

View File

@ -32,8 +32,8 @@ PERSONALITY_CHOICES = (
FIELD_LABEL_PERFORMANCE_PROFILE = _("Performance Profile")
PERFORMANCE_CHOICES = (
(stx_api.sysinv.SUBFUNCTIONS_COMPUTE, _("Standard")),
(stx_api.sysinv.SUBFUNCTIONS_COMPUTE + ','
+ stx_api.sysinv.SUBFUNCTIONS_LOWLATENCY, _("Low Latency")),
(stx_api.sysinv.SUBFUNCTIONS_COMPUTE + ',' +
stx_api.sysinv.SUBFUNCTIONS_LOWLATENCY, _("Low Latency")),
)
PERSONALITY_CHOICES_WITHOUT_STORAGE = (
@ -358,7 +358,7 @@ class UpdateHostInfoAction(workflows.Action):
('', _("Copy from an available cpu profile."))]
for ip in avail_cpu_profile_list:
nodes = stx_api.sysinv.host_node_list(self.request,
ip.uuid)
ip.uuid)
cpu_profile = icpu_utils.CpuProfile(ip.cpus, nodes)
if host_profile.profile_applicable(cpu_profile):
cpu_profile_tuple_list.append(
@ -395,8 +395,8 @@ class UpdateHostInfoAction(workflows.Action):
self.fields[
'interfaceProfile'].widget = forms.widgets.HiddenInput()
if ((personality == 'storage' or 'compute' in host._subfunctions)
and host.disks):
if ((personality == 'storage' or 'compute' in host._subfunctions) and
host.disks):
# Populate Available Disk Profile Choices
try:
disk_profile_tuple_list = [
@ -471,8 +471,8 @@ class UpdateHostInfoAction(workflows.Action):
cleaned_data['subfunctions'] = self._subfunctions
elif cleaned_data['personality'] == stx_api.sysinv.PERSONALITY_CONTROLLER:
if self.system_type == constants.TS_AIO:
self._subfunctions = (stx_api.sysinv.PERSONALITY_CONTROLLER + ','
+ stx_api.sysinv.PERSONALITY_COMPUTE)
self._subfunctions = (stx_api.sysinv.PERSONALITY_CONTROLLER + ',' +
stx_api.sysinv.PERSONALITY_COMPUTE)
else:
self._subfunctions = stx_api.sysinv.PERSONALITY_CONTROLLER
cleaned_data['subfunctions'] = self._subfunctions
@ -773,14 +773,14 @@ class UpdateHost(workflows.Workflow):
if data['cpuProfile']:
profile_uuid = profile_get_uuid(request, data['cpuProfile'])
stx_api.sysinv.host_apply_profile(request, data['host_id'],
profile_uuid)
profile_uuid)
data.pop('cpuProfile')
if data['interfaceProfile']:
profile_uuid = profile_get_uuid(request,
data['interfaceProfile'])
stx_api.sysinv.host_apply_profile(request, data['host_id'],
profile_uuid)
profile_uuid)
data.pop('interfaceProfile')
if not data['bm_password']:
@ -789,13 +789,13 @@ class UpdateHost(workflows.Workflow):
if data['diskProfile']:
profile_uuid = profile_get_uuid(request, data['diskProfile'])
stx_api.sysinv.host_apply_profile(request, data['host_id'],
profile_uuid)
profile_uuid)
data.pop('diskProfile')
if data['memoryProfile']:
profile_uuid = profile_get_uuid(request, data['memoryProfile'])
stx_api.sysinv.host_apply_profile(request, data['host_id'],
profile_uuid)
profile_uuid)
data.pop('memoryProfile')
# if not trying to change personality, skip check

View File

@ -52,7 +52,7 @@ class CreateView(forms.ModalFormView):
try:
providernet_id = self.kwargs["providernet_id"]
self._object = stx_api.neutron.provider_network_get(self.request,
providernet_id)
providernet_id)
except Exception:
redirect = reverse(self.failure_url,
args=(self.kwargs['providernet_id'],))
@ -114,7 +114,7 @@ class DetailView(tabs.TabView):
def get_providernet_name(self, providernet_id):
try:
providernet = stx_api.neutron.provider_network_get(self.request,
providernet_id)
providernet_id)
providernet.set_id_as_name_if_empty(length=0)
except Exception:
providernet = {}

View File

@ -35,6 +35,7 @@ from openstack_dashboard.dashboards.project.instances import tables
from starlingx_dashboard.api import nova as stx_nova
class CreateForm(forms.SelfHandlingForm):
tenantP = forms.ChoiceField(label=_("Project"), required=True)
name = forms.CharField(max_length="255", label=_("Server Group Name"))

View File

@ -283,7 +283,7 @@ class DeleteStrategy(tables.Action):
def single(self, table, request, obj_id):
try:
result = stx_api.vim.delete_strategy(request, self.strategy_name,
self.force)
self.force)
if result:
messages.success(request, "Strategy Deleted")
else:
@ -443,7 +443,7 @@ class ApplyStage(tables.BatchAction):
try:
stage_id = obj_id.split('-', 1)[1]
result = stx_api.vim.apply_strategy(request, self.strategy_name,
stage_id)
stage_id)
if result is None:
messages.error(request, "Strategy stage %s apply failed" %
stage_id)
@ -504,7 +504,7 @@ class AbortStage(tables.BatchAction):
try:
stage_id = obj_id.split('-', 1)[1]
result = stx_api.vim.abort_strategy(request, self.strategy_name,
stage_id)
stage_id)
if result is None:
messages.error(request,
"Strategy stage %s abort in progress" %

View File

@ -101,7 +101,7 @@ class UpgradeOrchestrationTab(tabs.TableTab):
strategy = None
try:
strategy = stx_api.vim.get_strategy(request,
stx_api.vim.STRATEGY_SW_UPGRADE)
stx_api.vim.STRATEGY_SW_UPGRADE)
except Exception as ex:
LOG.exception(ex)
exceptions.handle(request,

View File

@ -127,7 +127,7 @@ class DetailStageView(tables.DataTableView):
stage_id = self.kwargs['stage_id']
try:
stage = stx_api.vim.get_stage(self.request, self.strategy_name,
phase, stage_id)
phase, stage_id)
stage.timeout_display = \
datetime.timedelta(seconds=stage.timeout)
except Exception:

View File

@ -126,7 +126,7 @@ class UpdateAddressPool(CreateAddressPool):
if data.get('ranges'):
updates['ranges'] = data['ranges']
pool = stx_api.sysinv.address_pool_update(request, data['id'],
**updates)
**updates)
msg = (_('Address pool was successfully updated'))
messages.success(request, msg)
return pool

View File

@ -184,7 +184,7 @@ class UpdatecDNS(forms.SelfHandlingForm):
if send_to_sysinv is True:
my_dns = stx_api.sysinv.dns_update(request,
dns_config_uuid, **data)
dns_config_uuid, **data)
if my_dns:
msg = _('DNS Server was successfully updated.')
@ -494,8 +494,8 @@ class UpdatecEXT_OAM(forms.SelfHandlingForm):
LOG.info("OAM sendtosysinv data=%s", data)
myoam_data = stx_api.sysinv.extoam_update(self.request,
oam_data_uuid,
**data)
oam_data_uuid,
**data)
if myoam_data:
msg = _('OAM configuration was successfully updated. ')
@ -619,8 +619,8 @@ class UpdateiStorage(forms.SelfHandlingForm):
if new_data:
my_storage = stx_api.sysinv.storfs_update_many(request,
system_uuid,
**new_data)
system_uuid,
**new_data)
return True
except exc.ClientException as ce:
@ -706,7 +706,7 @@ class UpdateiStoragePools(forms.SelfHandlingForm):
data['uuid'] = ' '
storage_config = stx_api.sysinv.storagepool_get(request,
data['uuid'])
data['uuid'])
data.pop('uuid')
if hasattr(storage_config, 'uuid'):
@ -750,8 +750,8 @@ class UpdateiStoragePools(forms.SelfHandlingForm):
if send_to_sysinv:
my_storage = stx_api.sysinv.storpool_update(request,
storage_config_uuid,
**data)
storage_config_uuid,
**data)
if my_storage:
msg = _(

View File

@ -344,7 +344,7 @@ class DetailSDNControllerView(tables.DataTableView):
uuid = self.kwargs['uuid']
try:
self._object = stx_api.sysinv.sdn_controller_get(self.request,
uuid)
uuid)
except Exception:
redirect = self.failure_url
msg = _("Unable to retrieve details for "
@ -384,7 +384,7 @@ class UpdateSDNControllerView(forms.ModalFormView):
controller_uuid = self.kwargs['uuid']
try:
self._object = stx_api.sysinv.sdn_controller_get(self.request,
controller_uuid)
controller_uuid)
except Exception:
redirect = self.success_url
msg = _('Unable to retrieve SDN controller details.')

View File

@ -35,7 +35,6 @@ from openstack_dashboard.dashboards.project.instances import tables
from starlingx_dashboard.api import nova as stx_nova
class CreateForm(forms.SelfHandlingForm):
name = forms.CharField(max_length="255", label=_("Server Group Name"))
policy = forms.ChoiceField(label=_("Policy"),
@ -95,7 +94,7 @@ class CreateForm(forms.SelfHandlingForm):
'policies': policies,
'metadata': metadata,
'project_id': project_id}
server_group = stx_nova.server_group_create(request, **kwargs)
return server_group

View File

@ -25,6 +25,7 @@ from openstack_dashboard.api import nova
from starlingx_dashboard.api import nova as stx_nova
class OverviewTab(tabs.Tab):
name = _("Overview")
slug = "overview"

View File

@ -8,4 +8,3 @@ PANEL_GROUP = 'platform'
# Python panel class of the PANEL to be added.
ADD_PANEL = 'starlingx_dashboard.dashboards.admin.' \
'fault_management.panel.FaultManagement'

View File

@ -8,4 +8,3 @@ PANEL_GROUP = 'platform'
# Python panel class of the PANEL to be added.
ADD_PANEL = 'starlingx_dashboard.dashboards.admin.software_management.' \
'panel.SoftwareManagement'

View File

@ -7,4 +7,3 @@ PANEL_GROUP = 'platform'
# Python panel class of the PANEL to be added.
ADD_PANEL = 'starlingx_dashboard.dashboards.admin.inventory.panel.Inventory'

View File

@ -7,4 +7,4 @@ PANEL_GROUP = 'platform'
# Python panel class of the PANEL to be added.
ADD_PANEL = 'starlingx_dashboard.dashboards.admin.storage_overview.' \
'panel.StorageOverview'
'panel.StorageOverview'

View File

@ -7,4 +7,4 @@ PANEL_GROUP = 'platform'
# Python panel class of the PANEL to be added.
ADD_PANEL = ('starlingx_dashboard.dashboards.admin.'
'system_config.panel.SystemConfig')
'system_config.panel.SystemConfig')

View File

@ -1,2 +1,2 @@
from starlingx_dashboard.stx_horizon.tables.actions import FixedWithQueryFilter
from starlingx_dashboard.stx_horizon.tables.actions import LimitAction
from starlingx_dashboard.stx_horizon.tables.actions import LimitAction

View File

@ -1,7 +1,7 @@
#
# Copyright (c) 2018 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (c) 2018 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
from collections import OrderedDict
@ -14,6 +14,7 @@ from horizon.tables import FilterAction
DEFAULT_TABLE_LIMITS = [10, 20, 50, 100, 500, 1000]
class FixedWithQueryFilter(FilterAction):
"""A FilterAction that visually renders like a combination
FixedFilterAction and a FilterAction of type "query.
@ -193,4 +194,4 @@ class LimitAction(BaseAction):
limits = {}
for count in self.limits:
limits[count] = self.get_limit_name(count)
return OrderedDict(sorted(limits.items(), key=lambda limit: limit[0]))
return OrderedDict(sorted(limits.items(), key=lambda limit: limit[0]))

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2018 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
#
# Copyright (c) 2018 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#

View File

@ -14,4 +14,4 @@ from pbr import version
version_info = version.VersionInfo('starlingx_dashboard')
__version__ = version_info.cached_version_string()
__version__ = version_info.cached_version_string()

View File

@ -28,6 +28,13 @@ commands =
-o -type f -name '*.yaml' \
-print0 | xargs --no-run-if-empty -0 yamllint"
[pep8]
# Ignoring these warnings
# E501 line too long
ignore = E501,E129
[testenv:pep8]
usedevelop = False
skip_install = True