Fix flake8 errors in sysinv
Story: 2003087 Task: 23171 Change-Id: I297f686875afb66ff7c0c44be6da8a6a6ebba29d Signed-off-by: Patrick Bonnell <patrick.bonnell@windriver.com>
This commit is contained in:
parent
63f30fba51
commit
64ec1486b1
|
@ -4,8 +4,7 @@
|
||||||
jobs:
|
jobs:
|
||||||
- openstack-tox-linters
|
- openstack-tox-linters
|
||||||
- sysinv-tox-py27
|
- sysinv-tox-py27
|
||||||
- sysinv-tox-flake8:
|
- sysinv-tox-flake8
|
||||||
voting: false
|
|
||||||
- controllerconfig-tox-flake8
|
- controllerconfig-tox-flake8
|
||||||
- controllerconfig-tox-py27
|
- controllerconfig-tox-py27
|
||||||
- controllerconfig-tox-pylint
|
- controllerconfig-tox-pylint
|
||||||
|
@ -14,6 +13,7 @@
|
||||||
jobs:
|
jobs:
|
||||||
- openstack-tox-linters
|
- openstack-tox-linters
|
||||||
- sysinv-tox-py27
|
- sysinv-tox-py27
|
||||||
|
- sysinv-tox-flake8
|
||||||
- controllerconfig-tox-flake8
|
- controllerconfig-tox-flake8
|
||||||
- controllerconfig-tox-py27
|
- controllerconfig-tox-py27
|
||||||
- controllerconfig-tox-pylint
|
- controllerconfig-tox-pylint
|
||||||
|
|
|
@ -543,7 +543,6 @@ class LLDPOperator(object):
|
||||||
LOG.error("vswitch_lldp_agent_list is not implemented.")
|
LOG.error("vswitch_lldp_agent_list is not implemented.")
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
||||||
def vswitch_lldp_neighbour_list(self):
|
def vswitch_lldp_neighbour_list(self):
|
||||||
"""Sends a request to the vswitch requesting the full list of LLDP
|
"""Sends a request to the vswitch requesting the full list of LLDP
|
||||||
|
|
||||||
|
@ -553,7 +552,6 @@ class LLDPOperator(object):
|
||||||
LOG.error("vswitch_lldp_neighbour_ist s not implemented.")
|
LOG.error("vswitch_lldp_neighbour_ist s not implemented.")
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
||||||
def lldp_agents_list(self, do_compute=False):
|
def lldp_agents_list(self, do_compute=False):
|
||||||
self.agent_audit_count += 1
|
self.agent_audit_count += 1
|
||||||
if self.agent_audit_count > constants.LLDP_FULL_AUDIT_COUNT:
|
if self.agent_audit_count > constants.LLDP_FULL_AUDIT_COUNT:
|
||||||
|
@ -660,5 +658,4 @@ class LLDPOperator(object):
|
||||||
newname], stdout=subprocess.PIPE)
|
newname], stdout=subprocess.PIPE)
|
||||||
|
|
||||||
if do_compute:
|
if do_compute:
|
||||||
attrs = {"system-name": newname}
|
|
||||||
LOG.error("lldp_update_systemname failed due to lack of vswitch")
|
LOG.error("lldp_update_systemname failed due to lack of vswitch")
|
||||||
|
|
|
@ -1552,7 +1552,6 @@ class AgentManager(service.PeriodicService):
|
||||||
:returns: none
|
:returns: none
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
from controllerconfig import backup_restore
|
|
||||||
from controllerconfig.upgrades import \
|
from controllerconfig.upgrades import \
|
||||||
management as upgrades_management
|
management as upgrades_management
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|
|
@ -515,7 +515,6 @@ class V1(base.APIBase):
|
||||||
bookmark=True)
|
bookmark=True)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
v1.iinfra = [link.Link.make_link('self', pecan.request.host_url,
|
v1.iinfra = [link.Link.make_link('self', pecan.request.host_url,
|
||||||
'iinfra', ''),
|
'iinfra', ''),
|
||||||
link.Link.make_link('bookmark',
|
link.Link.make_link('bookmark',
|
||||||
|
|
|
@ -80,7 +80,7 @@ class HelmChartsController(rest.RestController):
|
||||||
# Extract the info we want.
|
# Extract the info we want.
|
||||||
values = output.split('USER-SUPPLIED VALUES:\n')[1].split(
|
values = output.split('USER-SUPPLIED VALUES:\n')[1].split(
|
||||||
'\nCOMPUTED VALUES:')[0]
|
'\nCOMPUTED VALUES:')[0]
|
||||||
except:
|
except Exception:
|
||||||
raise
|
raise
|
||||||
finally:
|
finally:
|
||||||
os.remove(chartfile)
|
os.remove(chartfile)
|
||||||
|
@ -91,7 +91,6 @@ class HelmChartsController(rest.RestController):
|
||||||
|
|
||||||
return values
|
return values
|
||||||
|
|
||||||
|
|
||||||
@wsme_pecan.wsexpose(wtypes.text)
|
@wsme_pecan.wsexpose(wtypes.text)
|
||||||
def get_all(self):
|
def get_all(self):
|
||||||
"""Provides information about the available charts to override."""
|
"""Provides information about the available charts to override."""
|
||||||
|
|
|
@ -24,7 +24,7 @@ def upgrade(migrate_engine):
|
||||||
meta = MetaData()
|
meta = MetaData()
|
||||||
meta.bind = migrate_engine
|
meta.bind = migrate_engine
|
||||||
|
|
||||||
storage_backend = Table('storage_backend', meta, autoload=True)
|
Table('storage_backend', meta, autoload=True)
|
||||||
|
|
||||||
# Define and create the storage_external table.
|
# Define and create the storage_external table.
|
||||||
storage_external = Table(
|
storage_external = Table(
|
||||||
|
|
|
@ -15,6 +15,7 @@ from sqlalchemy import Column, MetaData, Table, ForeignKey
|
||||||
ENGINE = 'InnoDB'
|
ENGINE = 'InnoDB'
|
||||||
CHARSET = 'utf8'
|
CHARSET = 'utf8'
|
||||||
|
|
||||||
|
|
||||||
def _populate_ptp_table(migrate_engine, meta, ptp, i_system):
|
def _populate_ptp_table(migrate_engine, meta, ptp, i_system):
|
||||||
"""This function inserts all the initial data about journals,
|
"""This function inserts all the initial data about journals,
|
||||||
into the ptp table.
|
into the ptp table.
|
||||||
|
|
|
@ -13,7 +13,6 @@ import os
|
||||||
import tempfile
|
import tempfile
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
from oslo_utils import importutils
|
|
||||||
from stevedore import extension
|
from stevedore import extension
|
||||||
|
|
||||||
from sysinv.openstack.common import log as logging
|
from sysinv.openstack.common import log as logging
|
||||||
|
|
Loading…
Reference in New Issue