Major refactor to separate out and standardize libraries
This commit is contained in:
parent
c9258edcad
commit
513de96626
|
@ -0,0 +1 @@
|
||||||
|
../client-common/client-lib
|
|
@ -1 +0,0 @@
|
||||||
../client-common/lib
|
|
|
@ -23,9 +23,9 @@
|
||||||
import socket
|
import socket
|
||||||
import click
|
import click
|
||||||
|
|
||||||
import lib.common as common
|
import client_lib.common as common
|
||||||
import lib.node as node
|
import client_lib.node as node
|
||||||
import lib.vm as vm
|
import client_lib.vm as vm
|
||||||
|
|
||||||
myhostname = socket.gethostname()
|
myhostname = socket.gethostname()
|
||||||
zk_host = ''
|
zk_host = ''
|
||||||
|
|
|
@ -34,8 +34,8 @@ import lxml.objectify
|
||||||
import configparser
|
import configparser
|
||||||
import kazoo.client
|
import kazoo.client
|
||||||
|
|
||||||
import lib.ansiiprint as ansiiprint
|
import client_lib.ansiiprint as ansiiprint
|
||||||
import lib.common as common
|
import client_lib.common as common
|
||||||
|
|
||||||
def getInformationFromNode(zk_conn, node_name, long_output):
|
def getInformationFromNode(zk_conn, node_name, long_output):
|
||||||
node_daemon_state = zk_conn.get('/nodes/{}/daemonstate'.format(node_name))[0].decode('ascii')
|
node_daemon_state = zk_conn.get('/nodes/{}/daemonstate'.format(node_name))[0].decode('ascii')
|
|
@ -34,8 +34,8 @@ import lxml.objectify
|
||||||
import configparser
|
import configparser
|
||||||
import kazoo.client
|
import kazoo.client
|
||||||
|
|
||||||
import lib.ansiiprint as ansiiprint
|
import client_lib.ansiiprint as ansiiprint
|
||||||
import lib.common as common
|
import client_lib.common as common
|
||||||
|
|
||||||
#
|
#
|
||||||
# XML information parsing functions
|
# XML information parsing functions
|
|
@ -21,7 +21,7 @@
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
import kazoo.client
|
import kazoo.client
|
||||||
import lib.ansiiprint
|
import client_lib.ansiiprint as ansiiprint
|
||||||
|
|
||||||
# Child list function
|
# Child list function
|
||||||
def listchildren(zk_conn, key):
|
def listchildren(zk_conn, key):
|
|
@ -21,7 +21,7 @@
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
import kazoo.client
|
import kazoo.client
|
||||||
import lib.ansiiprint
|
import daemon_lib.ansiiprint as ansiiprint
|
||||||
|
|
||||||
# Child list function
|
# Child list function
|
||||||
def listchildren(zk_conn, key):
|
def listchildren(zk_conn, key):
|
|
@ -20,9 +20,7 @@ Architecture: all
|
||||||
Depends: pvc-daemon-common, python3-libvirt, ipmitool, libvirt-daemon-system
|
Depends: pvc-daemon-common, python3-libvirt, ipmitool, libvirt-daemon-system
|
||||||
Suggests: pvc-client
|
Suggests: pvc-client
|
||||||
Description: Parallel Virtual Cluster virtualization daemon (Python 3)
|
Description: Parallel Virtual Cluster virtualization daemon (Python 3)
|
||||||
The Parallel Virtual Cluster provides a management solution for QEMU/KVM virtual clusters,
|
The Parallel Virtual Cluster provides a management solution for QEMU/KVM virtual clusters.
|
||||||
including full control of running VMs, definitions, and hypervisors (including fencing via
|
|
||||||
IPMI). This package provides the daemon component for a hypervisor node.
|
|
||||||
.
|
.
|
||||||
This package installs the PVC virtualization daemon
|
This package installs the PVC virtualization daemon
|
||||||
|
|
||||||
|
@ -31,18 +29,23 @@ Architecture: all
|
||||||
Depends: pvc-daemon-common, python3-libvirt, ipmitool, libvirt-daemon-system
|
Depends: pvc-daemon-common, python3-libvirt, ipmitool, libvirt-daemon-system
|
||||||
Suggests: pvc-client, pvc-virtualization-daemon
|
Suggests: pvc-client, pvc-virtualization-daemon
|
||||||
Description: Parallel Virtual Cluster network daemon (Python 3)
|
Description: Parallel Virtual Cluster network daemon (Python 3)
|
||||||
The Parallel Virtual Cluster provides a management solution for QEMU/KVM virtual clusters,
|
The Parallel Virtual Cluster provides a management solution for QEMU/KVM virtual clusters.
|
||||||
including full control of running VMs, definitions, and hypervisors (including fencing via
|
|
||||||
IPMI). This package provides the daemon component for networking on a hypervisor node.
|
|
||||||
.
|
.
|
||||||
This package installs the PVC network daemon
|
This package installs the PVC network daemon
|
||||||
|
|
||||||
Package: pvc-client
|
Package: pvc-client-common
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Depends: python3-kazoo, python3-libvirt, python3-psutil, python3-click, python3-lxml
|
Depends: python3-kazoo, python3-psutil, python3-click, python3-lxml
|
||||||
|
Description: Parallel Virtual Cluster common client libraries (Python 3)
|
||||||
|
The Parallel Virtual Cluster provides a management solution for QEMU/KVM virtual clusters.
|
||||||
|
.
|
||||||
|
This package installs the common client libraries
|
||||||
|
|
||||||
|
Package: pvc-cli-client
|
||||||
|
Architecture: all
|
||||||
|
Depends: pvc-client-common
|
||||||
Description: Parallel Virtual Cluster client (Python 3)
|
Description: Parallel Virtual Cluster client (Python 3)
|
||||||
The Parallel Virtual Cluster provides a management solution for QEMU/KVM virtual clusters,
|
The Parallel Virtual Cluster provides a management solution for QEMU/KVM virtual clusters.
|
||||||
including full control of running VMs, definitions, and hypervisors (including fencing via
|
|
||||||
IPMI). This package provides the client command-line interface.
|
|
||||||
.
|
.
|
||||||
This package installs the PVC command-line client
|
This package installs the PVC command-line client
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
client-common/client_lib usr/share/pvc
|
|
@ -1 +1 @@
|
||||||
daemon-common/lib usr/share/pvc
|
daemon-common/daemon_lib usr/share/pvc
|
||||||
|
|
|
@ -29,8 +29,8 @@ import psutil
|
||||||
import configparser
|
import configparser
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import lib.ansiiprint as ansiiprint
|
import daemon_lib.ansiiprint as ansiiprint
|
||||||
import lib.zkhandler as zkhandler
|
import daemon_lib.zkhandler as zkhandler
|
||||||
|
|
||||||
import pvcnd.VXNetworkInstance as VXNetworkInstance
|
import pvcnd.VXNetworkInstance as VXNetworkInstance
|
||||||
|
|
||||||
|
|
|
@ -20,9 +20,11 @@
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
import os, sys
|
import os
|
||||||
import lib.ansiiprint as ansiiprint
|
import sys
|
||||||
import lib.zkhandler as zkhandler
|
|
||||||
|
import daemon_lib.ansiiprint as ansiiprint
|
||||||
|
import daemon_lib.zkhandler as zkhandler
|
||||||
|
|
||||||
class VXNetworkInstance():
|
class VXNetworkInstance():
|
||||||
# Initialization function
|
# Initialization function
|
||||||
|
|
|
@ -33,8 +33,8 @@ import time
|
||||||
import configparser
|
import configparser
|
||||||
import apscheduler.schedulers.background
|
import apscheduler.schedulers.background
|
||||||
|
|
||||||
import lib.ansiiprint as ansiiprint
|
import daemon_lib.ansiiprint as ansiiprint
|
||||||
import lib.zkhandler as zkhandler
|
import daemon_lib.zkhandler as zkhandler
|
||||||
|
|
||||||
import pvcvd.VMInstance as VMInstance
|
import pvcvd.VMInstance as VMInstance
|
||||||
import pvcvd.NodeInstance as NodeInstance
|
import pvcvd.NodeInstance as NodeInstance
|
||||||
|
|
|
@ -20,9 +20,18 @@
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
import os, sys, psutil, socket, time, libvirt, kazoo.client, threading, subprocess
|
import os
|
||||||
import lib.ansiiprint as ansiiprint
|
import sys
|
||||||
import lib.zkhandler as zkhandler
|
import psutil
|
||||||
|
import socket
|
||||||
|
import time
|
||||||
|
import libvirt
|
||||||
|
import kazoo.client
|
||||||
|
import threading
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
import daemon_lib.ansiiprint as ansiiprint
|
||||||
|
import daemon_lib.zkhandler as zkhandler
|
||||||
|
|
||||||
class NodeInstance():
|
class NodeInstance():
|
||||||
# Initialization function
|
# Initialization function
|
||||||
|
|
|
@ -20,9 +20,17 @@
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
import os, sys, uuid, socket, time, threading, libvirt, kazoo.client
|
import os
|
||||||
import lib.ansiiprint as ansiiprint
|
import sys
|
||||||
import lib.zkhandler as zkhandler
|
import uuid
|
||||||
|
import socket
|
||||||
|
import time
|
||||||
|
import threading
|
||||||
|
import libvirt
|
||||||
|
import kazoo.client
|
||||||
|
|
||||||
|
import daemon_lib.ansiiprint as ansiiprint
|
||||||
|
import daemon_lib.zkhandler as zkhandler
|
||||||
|
|
||||||
class VMInstance:
|
class VMInstance:
|
||||||
# Initialization function
|
# Initialization function
|
||||||
|
|
Loading…
Reference in New Issue