diff --git a/cli-client/client-lib b/cli-client/client-lib new file mode 120000 index 00000000..3bdb8bdd --- /dev/null +++ b/cli-client/client-lib @@ -0,0 +1 @@ +../client-common/client-lib \ No newline at end of file diff --git a/cli-client/lib b/cli-client/lib deleted file mode 120000 index c9ad5dfd..00000000 --- a/cli-client/lib +++ /dev/null @@ -1 +0,0 @@ -../client-common/lib \ No newline at end of file diff --git a/cli-client/pvc.py b/cli-client/pvc.py index 12e82b86..03f11ded 100755 --- a/cli-client/pvc.py +++ b/cli-client/pvc.py @@ -23,9 +23,9 @@ import socket import click -import lib.common as common -import lib.node as node -import lib.vm as vm +import client_lib.common as common +import client_lib.node as node +import client_lib.vm as vm myhostname = socket.gethostname() zk_host = '' diff --git a/client-common/lib/ansiiprint.py b/client-common/client_lib/ansiiprint.py similarity index 100% rename from client-common/lib/ansiiprint.py rename to client-common/client_lib/ansiiprint.py diff --git a/client-common/lib/common.py b/client-common/client_lib/common.py similarity index 100% rename from client-common/lib/common.py rename to client-common/client_lib/common.py diff --git a/client-common/lib/network.py b/client-common/client_lib/network.py similarity index 100% rename from client-common/lib/network.py rename to client-common/client_lib/network.py diff --git a/client-common/lib/node.py b/client-common/client_lib/node.py similarity index 99% rename from client-common/lib/node.py rename to client-common/client_lib/node.py index 50a58a87..ff4859d9 100644 --- a/client-common/lib/node.py +++ b/client-common/client_lib/node.py @@ -34,8 +34,8 @@ import lxml.objectify import configparser import kazoo.client -import lib.ansiiprint as ansiiprint -import lib.common as common +import client_lib.ansiiprint as ansiiprint +import client_lib.common as common def getInformationFromNode(zk_conn, node_name, long_output): node_daemon_state = zk_conn.get('/nodes/{}/daemonstate'.format(node_name))[0].decode('ascii') diff --git a/client-common/lib/vm.py b/client-common/client_lib/vm.py similarity index 99% rename from client-common/lib/vm.py rename to client-common/client_lib/vm.py index 6ba7e5d5..add9f20b 100644 --- a/client-common/lib/vm.py +++ b/client-common/client_lib/vm.py @@ -34,8 +34,8 @@ import lxml.objectify import configparser import kazoo.client -import lib.ansiiprint as ansiiprint -import lib.common as common +import client_lib.ansiiprint as ansiiprint +import client_lib.common as common # # XML information parsing functions diff --git a/client-common/lib/zkhandler.py b/client-common/client_lib/zkhandler.py similarity index 97% rename from client-common/lib/zkhandler.py rename to client-common/client_lib/zkhandler.py index 2cfcf36f..d3fc5698 100644 --- a/client-common/lib/zkhandler.py +++ b/client-common/client_lib/zkhandler.py @@ -21,7 +21,7 @@ ############################################################################### import kazoo.client -import lib.ansiiprint +import client_lib.ansiiprint as ansiiprint # Child list function def listchildren(zk_conn, key): diff --git a/daemon-common/lib/ansiiprint.py b/daemon-common/daemon_lib/ansiiprint.py similarity index 100% rename from daemon-common/lib/ansiiprint.py rename to daemon-common/daemon_lib/ansiiprint.py diff --git a/daemon-common/lib/zkhandler.py b/daemon-common/daemon_lib/zkhandler.py similarity index 97% rename from daemon-common/lib/zkhandler.py rename to daemon-common/daemon_lib/zkhandler.py index 2cfcf36f..c778b8b5 100644 --- a/daemon-common/lib/zkhandler.py +++ b/daemon-common/daemon_lib/zkhandler.py @@ -21,7 +21,7 @@ ############################################################################### import kazoo.client -import lib.ansiiprint +import daemon_lib.ansiiprint as ansiiprint # Child list function def listchildren(zk_conn, key): diff --git a/debian/control b/debian/control index c673e8a4..af67ff51 100644 --- a/debian/control +++ b/debian/control @@ -20,9 +20,7 @@ Architecture: all Depends: pvc-daemon-common, python3-libvirt, ipmitool, libvirt-daemon-system Suggests: pvc-client Description: Parallel Virtual Cluster virtualization daemon (Python 3) - 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. + The Parallel Virtual Cluster provides a management solution for QEMU/KVM virtual clusters. . This package installs the PVC virtualization daemon @@ -31,18 +29,23 @@ Architecture: all Depends: pvc-daemon-common, python3-libvirt, ipmitool, libvirt-daemon-system Suggests: pvc-client, pvc-virtualization-daemon Description: Parallel Virtual Cluster network daemon (Python 3) - 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. + The Parallel Virtual Cluster provides a management solution for QEMU/KVM virtual clusters. . This package installs the PVC network daemon -Package: pvc-client +Package: pvc-client-common 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) - 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. + The Parallel Virtual Cluster provides a management solution for QEMU/KVM virtual clusters. . This package installs the PVC command-line client + diff --git a/debian/pvc-client.install b/debian/pvc-cli-client.install similarity index 100% rename from debian/pvc-client.install rename to debian/pvc-cli-client.install diff --git a/debian/pvc-client.postinst b/debian/pvc-cli-client.postinst similarity index 100% rename from debian/pvc-client.postinst rename to debian/pvc-cli-client.postinst diff --git a/debian/pvc-client.prerm b/debian/pvc-cli-client.prerm similarity index 100% rename from debian/pvc-client.prerm rename to debian/pvc-cli-client.prerm diff --git a/debian/pvc-client-common.install b/debian/pvc-client-common.install new file mode 100644 index 00000000..e47fb483 --- /dev/null +++ b/debian/pvc-client-common.install @@ -0,0 +1 @@ +client-common/client_lib usr/share/pvc diff --git a/debian/pvc-daemon-common.install b/debian/pvc-daemon-common.install index 371ce8ec..d17123b5 100644 --- a/debian/pvc-daemon-common.install +++ b/debian/pvc-daemon-common.install @@ -1 +1 @@ -daemon-common/lib usr/share/pvc +daemon-common/daemon_lib usr/share/pvc diff --git a/network-daemon/pvcnd/Daemon.py b/network-daemon/pvcnd/Daemon.py index 1ba14e7d..fec66fba 100644 --- a/network-daemon/pvcnd/Daemon.py +++ b/network-daemon/pvcnd/Daemon.py @@ -29,8 +29,8 @@ import psutil import configparser import time -import lib.ansiiprint as ansiiprint -import lib.zkhandler as zkhandler +import daemon_lib.ansiiprint as ansiiprint +import daemon_lib.zkhandler as zkhandler import pvcnd.VXNetworkInstance as VXNetworkInstance diff --git a/network-daemon/pvcnd/VXNetworkInstance.py b/network-daemon/pvcnd/VXNetworkInstance.py index af08d9a4..55602567 100644 --- a/network-daemon/pvcnd/VXNetworkInstance.py +++ b/network-daemon/pvcnd/VXNetworkInstance.py @@ -20,9 +20,11 @@ # ############################################################################### -import os, sys -import lib.ansiiprint as ansiiprint -import lib.zkhandler as zkhandler +import os +import sys + +import daemon_lib.ansiiprint as ansiiprint +import daemon_lib.zkhandler as zkhandler class VXNetworkInstance(): # Initialization function diff --git a/virtualization-daemon/pvcvd/Daemon.py b/virtualization-daemon/pvcvd/Daemon.py index 821f1c86..d98fbf90 100644 --- a/virtualization-daemon/pvcvd/Daemon.py +++ b/virtualization-daemon/pvcvd/Daemon.py @@ -33,8 +33,8 @@ import time import configparser import apscheduler.schedulers.background -import lib.ansiiprint as ansiiprint -import lib.zkhandler as zkhandler +import daemon_lib.ansiiprint as ansiiprint +import daemon_lib.zkhandler as zkhandler import pvcvd.VMInstance as VMInstance import pvcvd.NodeInstance as NodeInstance diff --git a/virtualization-daemon/pvcvd/NodeInstance.py b/virtualization-daemon/pvcvd/NodeInstance.py index e51bb759..e4bf1c01 100644 --- a/virtualization-daemon/pvcvd/NodeInstance.py +++ b/virtualization-daemon/pvcvd/NodeInstance.py @@ -20,9 +20,18 @@ # ############################################################################### -import os, sys, psutil, socket, time, libvirt, kazoo.client, threading, subprocess -import lib.ansiiprint as ansiiprint -import lib.zkhandler as zkhandler +import os +import sys +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(): # Initialization function diff --git a/virtualization-daemon/pvcvd/VMInstance.py b/virtualization-daemon/pvcvd/VMInstance.py index 0f3880e5..c632ba70 100644 --- a/virtualization-daemon/pvcvd/VMInstance.py +++ b/virtualization-daemon/pvcvd/VMInstance.py @@ -20,9 +20,17 @@ # ############################################################################### -import os, sys, uuid, socket, time, threading, libvirt, kazoo.client -import lib.ansiiprint as ansiiprint -import lib.zkhandler as zkhandler +import os +import sys +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: # Initialization function