Lint: F401 <library> imported but unused
This commit is contained in:
parent
ebf254f62d
commit
d9e7b7ec15
|
@ -30,8 +30,6 @@
|
||||||
# This script will run under root privileges as the provisioner does. Be careful
|
# This script will run under root privileges as the provisioner does. Be careful
|
||||||
# with that.
|
# with that.
|
||||||
|
|
||||||
import os
|
|
||||||
|
|
||||||
# Installation function - performs a debootstrap install of a Debian system
|
# Installation function - performs a debootstrap install of a Debian system
|
||||||
# Note that the only arguments are keyword arguments.
|
# Note that the only arguments are keyword arguments.
|
||||||
def install(**kwargs):
|
def install(**kwargs):
|
||||||
|
|
|
@ -20,11 +20,10 @@
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
import os
|
|
||||||
from flask_migrate import Migrate, MigrateCommand
|
from flask_migrate import Migrate, MigrateCommand
|
||||||
from flask_script import Manager
|
from flask_script import Manager
|
||||||
|
|
||||||
from pvcapid.flaskapi import app, db, config
|
from pvcapid.flaskapi import app, db
|
||||||
|
|
||||||
migrate = Migrate(app, db)
|
migrate = Migrate(app, db)
|
||||||
manager = Manager(app)
|
manager = Manager(app)
|
||||||
|
|
|
@ -20,4 +20,4 @@
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
import pvcapid.Daemon
|
import pvcapid.Daemon # noqa: F401
|
||||||
|
|
|
@ -20,26 +20,14 @@
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
import flask
|
|
||||||
import json
|
|
||||||
import psycopg2
|
import psycopg2
|
||||||
import psycopg2.extras
|
import psycopg2.extras
|
||||||
import os
|
|
||||||
import re
|
|
||||||
import time
|
|
||||||
import shlex
|
|
||||||
import subprocess
|
|
||||||
|
|
||||||
from distutils.util import strtobool as dustrtobool
|
from distutils.util import strtobool as dustrtobool
|
||||||
|
|
||||||
import daemon_lib.common as pvc_common
|
import daemon_lib.common as pvc_common
|
||||||
import daemon_lib.node as pvc_node
|
|
||||||
import daemon_lib.ceph as pvc_ceph
|
import daemon_lib.ceph as pvc_ceph
|
||||||
|
|
||||||
import pvcapid.libvirt_schema as libvirt_schema
|
|
||||||
|
|
||||||
from pvcapid.ova import list_ova
|
|
||||||
|
|
||||||
def strtobool(stringv):
|
def strtobool(stringv):
|
||||||
if stringv is None:
|
if stringv is None:
|
||||||
return False
|
return False
|
||||||
|
|
|
@ -20,22 +20,14 @@
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
import json
|
|
||||||
import yaml
|
import yaml
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import gevent.pywsgi
|
|
||||||
|
|
||||||
import flask
|
import flask
|
||||||
|
|
||||||
from distutils.util import strtobool as dustrtobool
|
from distutils.util import strtobool as dustrtobool
|
||||||
|
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
|
|
||||||
from flask_restful import Resource, Api, reqparse, abort
|
from flask_restful import Resource, Api, reqparse, abort
|
||||||
|
|
||||||
from celery import Celery
|
from celery import Celery
|
||||||
from celery.task.control import inspect
|
|
||||||
|
|
||||||
import pvcapid.helper as api_helper
|
import pvcapid.helper as api_helper
|
||||||
import pvcapid.provisioner as api_provisioner
|
import pvcapid.provisioner as api_provisioner
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
import flask
|
import flask
|
||||||
import json
|
|
||||||
import lxml.etree as etree
|
import lxml.etree as etree
|
||||||
|
|
||||||
from distutils.util import strtobool as dustrtobool
|
from distutils.util import strtobool as dustrtobool
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
from pvcapid.flaskapi import app, db
|
from pvcapid.flaskapi import db
|
||||||
|
|
||||||
class DBSystemTemplate(db.Model):
|
class DBSystemTemplate(db.Model):
|
||||||
__tablename__ = 'system_template'
|
__tablename__ = 'system_template'
|
||||||
|
|
|
@ -21,29 +21,19 @@
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
import flask
|
import flask
|
||||||
import json
|
|
||||||
import psycopg2
|
import psycopg2
|
||||||
import psycopg2.extras
|
import psycopg2.extras
|
||||||
import os
|
|
||||||
import re
|
import re
|
||||||
import time
|
|
||||||
import math
|
import math
|
||||||
import tarfile
|
import tarfile
|
||||||
import shutil
|
|
||||||
import shlex
|
|
||||||
import subprocess
|
|
||||||
|
|
||||||
import lxml.etree
|
import lxml.etree
|
||||||
|
|
||||||
from werkzeug.formparser import parse_form_data
|
from werkzeug.formparser import parse_form_data
|
||||||
|
|
||||||
import daemon_lib.common as pvc_common
|
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 daemon_lib.ceph as pvc_ceph
|
||||||
|
|
||||||
import pvcapid.libvirt_schema as libvirt_schema
|
|
||||||
import pvcapid.provisioner as provisioner
|
import pvcapid.provisioner as provisioner
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -20,15 +20,10 @@
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
import flask
|
|
||||||
import json
|
import json
|
||||||
import psycopg2
|
import psycopg2
|
||||||
import psycopg2.extras
|
import psycopg2.extras
|
||||||
import os
|
|
||||||
import re
|
import re
|
||||||
import time
|
|
||||||
import shlex
|
|
||||||
import subprocess
|
|
||||||
|
|
||||||
from distutils.util import strtobool as dustrtobool
|
from distutils.util import strtobool as dustrtobool
|
||||||
|
|
||||||
|
|
|
@ -20,9 +20,7 @@
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
import re
|
|
||||||
import json
|
import json
|
||||||
import time
|
|
||||||
import math
|
import math
|
||||||
|
|
||||||
from requests_toolbelt.multipart.encoder import MultipartEncoder, MultipartEncoderMonitor
|
from requests_toolbelt.multipart.encoder import MultipartEncoder, MultipartEncoderMonitor
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import io
|
|
||||||
import math
|
import math
|
||||||
import time
|
import time
|
||||||
import requests
|
import requests
|
||||||
|
|
|
@ -20,9 +20,6 @@
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
import difflib
|
|
||||||
import colorama
|
|
||||||
|
|
||||||
import cli_lib.ansiprint as ansiprint
|
import cli_lib.ansiprint as ansiprint
|
||||||
from cli_lib.common import call_api
|
from cli_lib.common import call_api
|
||||||
|
|
||||||
|
|
|
@ -20,9 +20,6 @@
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
import time
|
|
||||||
import re
|
|
||||||
import subprocess
|
|
||||||
import ast
|
import ast
|
||||||
|
|
||||||
from requests_toolbelt.multipart.encoder import MultipartEncoder, MultipartEncoderMonitor
|
from requests_toolbelt.multipart.encoder import MultipartEncoder, MultipartEncoderMonitor
|
||||||
|
|
|
@ -22,12 +22,8 @@
|
||||||
|
|
||||||
import time
|
import time
|
||||||
import re
|
import re
|
||||||
import subprocess
|
|
||||||
|
|
||||||
from collections import deque
|
|
||||||
|
|
||||||
import cli_lib.ansiprint as ansiprint
|
import cli_lib.ansiprint as ansiprint
|
||||||
import cli_lib.ceph as ceph
|
|
||||||
from cli_lib.common import call_api, format_bytes, format_metric
|
from cli_lib.common import call_api, format_bytes, format_metric
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -20,11 +20,8 @@
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
import kazoo.client
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
import daemon_lib.ansiprint as ansiprint
|
|
||||||
|
|
||||||
# Exists function
|
# Exists function
|
||||||
def exists(zk_conn, key):
|
def exists(zk_conn, key):
|
||||||
stat = zk_conn.exists(key)
|
stat = zk_conn.exists(key)
|
||||||
|
|
|
@ -22,10 +22,7 @@
|
||||||
|
|
||||||
import socket
|
import socket
|
||||||
import click
|
import click
|
||||||
import tempfile
|
|
||||||
import os
|
import os
|
||||||
import stat
|
|
||||||
import subprocess
|
|
||||||
import difflib
|
import difflib
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
|
|
|
@ -20,12 +20,8 @@
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
import json
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from distutils.util import strtobool
|
|
||||||
|
|
||||||
import daemon_lib.ansiprint as ansiprint
|
|
||||||
import daemon_lib.zkhandler as zkhandler
|
import daemon_lib.zkhandler as zkhandler
|
||||||
import daemon_lib.common as common
|
import daemon_lib.common as common
|
||||||
import daemon_lib.vm as pvc_vm
|
import daemon_lib.vm as pvc_vm
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
import lxml
|
import lxml
|
||||||
import math
|
|
||||||
import shlex
|
import shlex
|
||||||
import subprocess
|
import subprocess
|
||||||
import kazoo.client
|
import kazoo.client
|
||||||
|
|
|
@ -20,23 +20,13 @@
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
import os
|
|
||||||
import socket
|
|
||||||
import time
|
|
||||||
import uuid
|
|
||||||
import re
|
import re
|
||||||
import tempfile
|
|
||||||
import subprocess
|
|
||||||
import difflib
|
|
||||||
import colorama
|
|
||||||
import click
|
import click
|
||||||
import lxml.objectify
|
|
||||||
import configparser
|
from kazoo.exceptions import NoNodeError
|
||||||
import kazoo.client
|
|
||||||
|
|
||||||
import daemon_lib.ansiprint as ansiprint
|
import daemon_lib.ansiprint as ansiprint
|
||||||
import daemon_lib.zkhandler as zkhandler
|
import daemon_lib.zkhandler as zkhandler
|
||||||
import daemon_lib.common as common
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Cluster search functions
|
# Cluster search functions
|
||||||
|
@ -172,7 +162,7 @@ def getDHCPLeaseInformation(zk_conn, vni, mac_address):
|
||||||
try:
|
try:
|
||||||
zkhandler.readdata(zk_conn, '/networks/{}/dhcp4_leases/{}'.format(vni, mac_address))
|
zkhandler.readdata(zk_conn, '/networks/{}/dhcp4_leases/{}'.format(vni, mac_address))
|
||||||
type_key = 'dhcp4_leases'
|
type_key = 'dhcp4_leases'
|
||||||
except kazoo.exceptions.NoNodeError:
|
except NoNodeError:
|
||||||
zkhandler.readdata(zk_conn, '/networks/{}/dhcp4_reservations/{}'.format(vni, mac_address))
|
zkhandler.readdata(zk_conn, '/networks/{}/dhcp4_reservations/{}'.format(vni, mac_address))
|
||||||
type_key = 'dhcp4_reservations'
|
type_key = 'dhcp4_reservations'
|
||||||
|
|
||||||
|
|
|
@ -20,24 +20,13 @@
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
import os
|
|
||||||
import socket
|
|
||||||
import time
|
import time
|
||||||
import uuid
|
|
||||||
import re
|
import re
|
||||||
import tempfile
|
|
||||||
import subprocess
|
|
||||||
import difflib
|
|
||||||
import colorama
|
|
||||||
import click
|
import click
|
||||||
import lxml.objectify
|
|
||||||
import configparser
|
|
||||||
import kazoo.client
|
|
||||||
|
|
||||||
import daemon_lib.ansiprint as ansiprint
|
import daemon_lib.ansiprint as ansiprint
|
||||||
import daemon_lib.zkhandler as zkhandler
|
import daemon_lib.zkhandler as zkhandler
|
||||||
import daemon_lib.common as common
|
import daemon_lib.common as common
|
||||||
import daemon_lib.vm as pvc_vm
|
|
||||||
|
|
||||||
def getNodeInformation(zk_conn, node_name):
|
def getNodeInformation(zk_conn, node_name):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -20,20 +20,10 @@
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
import os
|
|
||||||
import socket
|
|
||||||
import time
|
import time
|
||||||
import uuid
|
|
||||||
import re
|
import re
|
||||||
import subprocess
|
|
||||||
import difflib
|
|
||||||
import colorama
|
|
||||||
import click
|
import click
|
||||||
import lxml.objectify
|
import lxml.objectify
|
||||||
import configparser
|
|
||||||
import kazoo.client
|
|
||||||
|
|
||||||
from collections import deque
|
|
||||||
|
|
||||||
import daemon_lib.ansiprint as ansiprint
|
import daemon_lib.ansiprint as ansiprint
|
||||||
import daemon_lib.zkhandler as zkhandler
|
import daemon_lib.zkhandler as zkhandler
|
||||||
|
|
|
@ -20,11 +20,8 @@
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
import kazoo.client
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
import daemon_lib.ansiprint as ansiprint
|
|
||||||
|
|
||||||
# Exists function
|
# Exists function
|
||||||
def exists(zk_conn, key):
|
def exists(zk_conn, key):
|
||||||
stat = zk_conn.exists(key)
|
stat = zk_conn.exists(key)
|
||||||
|
|
|
@ -20,4 +20,4 @@
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
import pvcnoded.Daemon
|
import pvcnoded.Daemon # noqa: F401
|
||||||
|
|
|
@ -24,7 +24,6 @@ import time
|
||||||
import json
|
import json
|
||||||
import psutil
|
import psutil
|
||||||
|
|
||||||
import pvcnoded.log as log
|
|
||||||
import pvcnoded.zkhandler as zkhandler
|
import pvcnoded.zkhandler as zkhandler
|
||||||
import pvcnoded.common as common
|
import pvcnoded.common as common
|
||||||
|
|
||||||
|
|
|
@ -27,8 +27,6 @@ import psycopg2
|
||||||
|
|
||||||
from threading import Thread, Event
|
from threading import Thread, Event
|
||||||
|
|
||||||
import pvcnoded.log as log
|
|
||||||
import pvcnoded.zkhandler as zkhandler
|
|
||||||
import pvcnoded.common as common
|
import pvcnoded.common as common
|
||||||
|
|
||||||
class DNSAggregatorInstance(object):
|
class DNSAggregatorInstance(object):
|
||||||
|
|
|
@ -24,7 +24,6 @@ import time
|
||||||
|
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
|
|
||||||
import pvcnoded.log as log
|
|
||||||
import pvcnoded.zkhandler as zkhandler
|
import pvcnoded.zkhandler as zkhandler
|
||||||
import pvcnoded.common as common
|
import pvcnoded.common as common
|
||||||
|
|
||||||
|
|
|
@ -21,14 +21,11 @@
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import uuid
|
|
||||||
import time
|
import time
|
||||||
import libvirt
|
|
||||||
|
|
||||||
from threading import Thread, Event
|
from threading import Thread, Event
|
||||||
from collections import deque
|
from collections import deque
|
||||||
|
|
||||||
import pvcnoded.log as log
|
|
||||||
import pvcnoded.zkhandler as zkhandler
|
import pvcnoded.zkhandler as zkhandler
|
||||||
|
|
||||||
class VMConsoleWatcherInstance(object):
|
class VMConsoleWatcherInstance(object):
|
||||||
|
|
|
@ -27,7 +27,6 @@ import json
|
||||||
|
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
|
|
||||||
import pvcnoded.log as log
|
|
||||||
import pvcnoded.zkhandler as zkhandler
|
import pvcnoded.zkhandler as zkhandler
|
||||||
import pvcnoded.common as common
|
import pvcnoded.common as common
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,6 @@ import time
|
||||||
|
|
||||||
from textwrap import dedent
|
from textwrap import dedent
|
||||||
|
|
||||||
import pvcnoded.log as log
|
|
||||||
import pvcnoded.zkhandler as zkhandler
|
import pvcnoded.zkhandler as zkhandler
|
||||||
import pvcnoded.common as common
|
import pvcnoded.common as common
|
||||||
|
|
||||||
|
|
|
@ -22,12 +22,10 @@
|
||||||
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import signal
|
import signal
|
||||||
import time
|
|
||||||
|
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
from shlex import split as shlex_split
|
from shlex import split as shlex_split
|
||||||
|
|
||||||
import pvcnoded.log as log
|
|
||||||
import pvcnoded.zkhandler as zkhandler
|
import pvcnoded.zkhandler as zkhandler
|
||||||
|
|
||||||
class OSDaemon(object):
|
class OSDaemon(object):
|
||||||
|
|
Loading…
Reference in New Issue