Lint: F401 <library> imported but unused

This commit is contained in:
Joshua Boniface 2020-11-06 19:22:49 -05:00
parent ebf254f62d
commit d9e7b7ec15
30 changed files with 7 additions and 115 deletions

View File

@ -30,8 +30,6 @@
# This script will run under root privileges as the provisioner does. Be careful
# with that.
import os
# Installation function - performs a debootstrap install of a Debian system
# Note that the only arguments are keyword arguments.
def install(**kwargs):

View File

@ -20,11 +20,10 @@
#
###############################################################################
import os
from flask_migrate import Migrate, MigrateCommand
from flask_script import Manager
from pvcapid.flaskapi import app, db, config
from pvcapid.flaskapi import app, db
migrate = Migrate(app, db)
manager = Manager(app)

View File

@ -20,4 +20,4 @@
#
###############################################################################
import pvcapid.Daemon
import pvcapid.Daemon # noqa: F401

View File

@ -20,26 +20,14 @@
#
###############################################################################
import flask
import json
import psycopg2
import psycopg2.extras
import os
import re
import time
import shlex
import subprocess
from distutils.util import strtobool as dustrtobool
import daemon_lib.common as pvc_common
import daemon_lib.node as pvc_node
import daemon_lib.ceph as pvc_ceph
import pvcapid.libvirt_schema as libvirt_schema
from pvcapid.ova import list_ova
def strtobool(stringv):
if stringv is None:
return False

View File

@ -20,22 +20,14 @@
#
###############################################################################
import json
import yaml
import os
import gevent.pywsgi
import flask
from distutils.util import strtobool as dustrtobool
from functools import wraps
from flask_restful import Resource, Api, reqparse, abort
from celery import Celery
from celery.task.control import inspect
import pvcapid.helper as api_helper
import pvcapid.provisioner as api_provisioner

View File

@ -21,7 +21,6 @@
###############################################################################
import flask
import json
import lxml.etree as etree
from distutils.util import strtobool as dustrtobool

View File

@ -20,7 +20,7 @@
#
###############################################################################
from pvcapid.flaskapi import app, db
from pvcapid.flaskapi import db
class DBSystemTemplate(db.Model):
__tablename__ = 'system_template'

View File

@ -21,29 +21,19 @@
###############################################################################
import flask
import json
import psycopg2
import psycopg2.extras
import os
import re
import time
import math
import tarfile
import shutil
import shlex
import subprocess
import lxml.etree
from werkzeug.formparser import parse_form_data
import daemon_lib.common as pvc_common
import daemon_lib.node as pvc_node
import daemon_lib.vm as pvc_vm
import daemon_lib.network as pvc_network
import daemon_lib.ceph as pvc_ceph
import pvcapid.libvirt_schema as libvirt_schema
import pvcapid.provisioner as provisioner
#

View File

@ -20,15 +20,10 @@
#
###############################################################################
import flask
import json
import psycopg2
import psycopg2.extras
import os
import re
import time
import shlex
import subprocess
from distutils.util import strtobool as dustrtobool

View File

@ -20,9 +20,7 @@
#
###############################################################################
import re
import json
import time
import math
from requests_toolbelt.multipart.encoder import MultipartEncoder, MultipartEncoderMonitor

View File

@ -21,7 +21,6 @@
###############################################################################
import os
import io
import math
import time
import requests

View File

@ -20,9 +20,6 @@
#
###############################################################################
import difflib
import colorama
import cli_lib.ansiprint as ansiprint
from cli_lib.common import call_api

View File

@ -20,9 +20,6 @@
#
###############################################################################
import time
import re
import subprocess
import ast
from requests_toolbelt.multipart.encoder import MultipartEncoder, MultipartEncoderMonitor

View File

@ -22,12 +22,8 @@
import time
import re
import subprocess
from collections import deque
import cli_lib.ansiprint as ansiprint
import cli_lib.ceph as ceph
from cli_lib.common import call_api, format_bytes, format_metric
#

View File

@ -20,11 +20,8 @@
#
###############################################################################
import kazoo.client
import uuid
import daemon_lib.ansiprint as ansiprint
# Exists function
def exists(zk_conn, key):
stat = zk_conn.exists(key)

View File

@ -22,10 +22,7 @@
import socket
import click
import tempfile
import os
import stat
import subprocess
import difflib
import re
import time

View File

@ -20,12 +20,8 @@
#
###############################################################################
import json
import re
from distutils.util import strtobool
import daemon_lib.ansiprint as ansiprint
import daemon_lib.zkhandler as zkhandler
import daemon_lib.common as common
import daemon_lib.vm as pvc_vm

View File

@ -22,7 +22,6 @@
import uuid
import lxml
import math
import shlex
import subprocess
import kazoo.client

View File

@ -20,23 +20,13 @@
#
###############################################################################
import os
import socket
import time
import uuid
import re
import tempfile
import subprocess
import difflib
import colorama
import click
import lxml.objectify
import configparser
import kazoo.client
from kazoo.exceptions import NoNodeError
import daemon_lib.ansiprint as ansiprint
import daemon_lib.zkhandler as zkhandler
import daemon_lib.common as common
#
# Cluster search functions
@ -172,7 +162,7 @@ def getDHCPLeaseInformation(zk_conn, vni, mac_address):
try:
zkhandler.readdata(zk_conn, '/networks/{}/dhcp4_leases/{}'.format(vni, mac_address))
type_key = 'dhcp4_leases'
except kazoo.exceptions.NoNodeError:
except NoNodeError:
zkhandler.readdata(zk_conn, '/networks/{}/dhcp4_reservations/{}'.format(vni, mac_address))
type_key = 'dhcp4_reservations'

View File

@ -20,24 +20,13 @@
#
###############################################################################
import os
import socket
import time
import uuid
import re
import tempfile
import subprocess
import difflib
import colorama
import click
import lxml.objectify
import configparser
import kazoo.client
import daemon_lib.ansiprint as ansiprint
import daemon_lib.zkhandler as zkhandler
import daemon_lib.common as common
import daemon_lib.vm as pvc_vm
def getNodeInformation(zk_conn, node_name):
"""

View File

@ -20,20 +20,10 @@
#
###############################################################################
import os
import socket
import time
import uuid
import re
import subprocess
import difflib
import colorama
import click
import lxml.objectify
import configparser
import kazoo.client
from collections import deque
import daemon_lib.ansiprint as ansiprint
import daemon_lib.zkhandler as zkhandler

View File

@ -20,11 +20,8 @@
#
###############################################################################
import kazoo.client
import uuid
import daemon_lib.ansiprint as ansiprint
# Exists function
def exists(zk_conn, key):
stat = zk_conn.exists(key)

View File

@ -20,4 +20,4 @@
#
###############################################################################
import pvcnoded.Daemon
import pvcnoded.Daemon # noqa: F401

View File

@ -24,7 +24,6 @@ import time
import json
import psutil
import pvcnoded.log as log
import pvcnoded.zkhandler as zkhandler
import pvcnoded.common as common

View File

@ -27,8 +27,6 @@ import psycopg2
from threading import Thread, Event
import pvcnoded.log as log
import pvcnoded.zkhandler as zkhandler
import pvcnoded.common as common
class DNSAggregatorInstance(object):

View File

@ -24,7 +24,6 @@ import time
from threading import Thread
import pvcnoded.log as log
import pvcnoded.zkhandler as zkhandler
import pvcnoded.common as common

View File

@ -21,14 +21,11 @@
###############################################################################
import os
import uuid
import time
import libvirt
from threading import Thread, Event
from collections import deque
import pvcnoded.log as log
import pvcnoded.zkhandler as zkhandler
class VMConsoleWatcherInstance(object):

View File

@ -27,7 +27,6 @@ import json
from threading import Thread
import pvcnoded.log as log
import pvcnoded.zkhandler as zkhandler
import pvcnoded.common as common

View File

@ -25,7 +25,6 @@ import time
from textwrap import dedent
import pvcnoded.log as log
import pvcnoded.zkhandler as zkhandler
import pvcnoded.common as common

View File

@ -22,12 +22,10 @@
import subprocess
import signal
import time
from threading import Thread
from shlex import split as shlex_split
import pvcnoded.log as log
import pvcnoded.zkhandler as zkhandler
class OSDaemon(object):