Browse Source

Fix flake8 errors in sysinv

Story: 2003087
Task: 23171

Change-Id: I297f686875afb66ff7c0c44be6da8a6a6ebba29d
Signed-off-by: Patrick Bonnell <patrick.bonnell@windriver.com>
Patrick Bonnell 7 months ago
parent
commit
64ec1486b1

+ 2
- 2
.zuul.yaml View File

@@ -4,8 +4,7 @@
4 4
       jobs:
5 5
         - openstack-tox-linters
6 6
         - sysinv-tox-py27
7
-        - sysinv-tox-flake8:
8
-            voting: false
7
+        - sysinv-tox-flake8
9 8
         - controllerconfig-tox-flake8
10 9
         - controllerconfig-tox-py27
11 10
         - controllerconfig-tox-pylint
@@ -14,6 +13,7 @@
14 13
       jobs:
15 14
         - openstack-tox-linters
16 15
         - sysinv-tox-py27
16
+        - sysinv-tox-flake8
17 17
         - controllerconfig-tox-flake8
18 18
         - controllerconfig-tox-py27
19 19
         - controllerconfig-tox-pylint

+ 0
- 3
sysinv/sysinv/sysinv/sysinv/agent/lldp.py View File

@@ -543,7 +543,6 @@ class LLDPOperator(object):
543 543
         LOG.error("vswitch_lldp_agent_list is not implemented.")
544 544
         return []
545 545
 
546
-
547 546
     def vswitch_lldp_neighbour_list(self):
548 547
         """Sends a request to the vswitch requesting the full list of LLDP
549 548
 
@@ -553,7 +552,6 @@ class LLDPOperator(object):
553 552
         LOG.error("vswitch_lldp_neighbour_ist s not implemented.")
554 553
         return []
555 554
 
556
-
557 555
     def lldp_agents_list(self, do_compute=False):
558 556
         self.agent_audit_count += 1
559 557
         if self.agent_audit_count > constants.LLDP_FULL_AUDIT_COUNT:
@@ -660,5 +658,4 @@ class LLDPOperator(object):
660 658
                               newname], stdout=subprocess.PIPE)
661 659
 
662 660
         if do_compute:
663
-            attrs = {"system-name": newname}
664 661
             LOG.error("lldp_update_systemname failed due to lack of vswitch")

+ 0
- 1
sysinv/sysinv/sysinv/sysinv/agent/manager.py View File

@@ -1552,7 +1552,6 @@ class AgentManager(service.PeriodicService):
1552 1552
         :returns: none
1553 1553
         """
1554 1554
         try:
1555
-            from controllerconfig import backup_restore
1556 1555
             from controllerconfig.upgrades import \
1557 1556
                 management as upgrades_management
1558 1557
         except ImportError:

+ 0
- 1
sysinv/sysinv/sysinv/sysinv/api/controllers/v1/__init__.py View File

@@ -515,7 +515,6 @@ class V1(base.APIBase):
515 515
                                            bookmark=True)
516 516
                          ]
517 517
 
518
-
519 518
         v1.iinfra = [link.Link.make_link('self', pecan.request.host_url,
520 519
                                           'iinfra', ''),
521 520
                       link.Link.make_link('bookmark',

+ 1
- 2
sysinv/sysinv/sysinv/sysinv/api/controllers/v1/helm_charts.py View File

@@ -80,7 +80,7 @@ class HelmChartsController(rest.RestController):
80 80
             # Extract the info we want.
81 81
             values = output.split('USER-SUPPLIED VALUES:\n')[1].split(
82 82
                                   '\nCOMPUTED VALUES:')[0]
83
-        except:
83
+        except Exception:
84 84
             raise
85 85
         finally:
86 86
             os.remove(chartfile)
@@ -91,7 +91,6 @@ class HelmChartsController(rest.RestController):
91 91
 
92 92
         return values
93 93
 
94
-
95 94
     @wsme_pecan.wsexpose(wtypes.text)
96 95
     def get_all(self):
97 96
         """Provides information about the available charts to override."""

+ 1
- 1
sysinv/sysinv/sysinv/sysinv/db/sqlalchemy/migrate_repo/versions/071_storage_ceph_external.py View File

@@ -24,7 +24,7 @@ def upgrade(migrate_engine):
24 24
     meta = MetaData()
25 25
     meta.bind = migrate_engine
26 26
 
27
-    storage_backend = Table('storage_backend', meta, autoload=True)
27
+    Table('storage_backend', meta, autoload=True)
28 28
 
29 29
     # Define and create the storage_external table.
30 30
     storage_external = Table(

+ 1
- 0
sysinv/sysinv/sysinv/sysinv/db/sqlalchemy/migrate_repo/versions/075_ptp.py View File

@@ -15,6 +15,7 @@ from sqlalchemy import Column, MetaData, Table, ForeignKey
15 15
 ENGINE = 'InnoDB'
16 16
 CHARSET = 'utf8'
17 17
 
18
+
18 19
 def _populate_ptp_table(migrate_engine, meta, ptp, i_system):
19 20
     """This function inserts all the initial data about journals,
20 21
        into the ptp table.

+ 0
- 1
sysinv/sysinv/sysinv/sysinv/puppet/puppet.py View File

@@ -13,7 +13,6 @@ import os
13 13
 import tempfile
14 14
 import yaml
15 15
 
16
-from oslo_utils import importutils
17 16
 from stevedore import extension
18 17
 
19 18
 from sysinv.openstack.common import log as logging

Loading…
Cancel
Save