]> git.ipfire.org Git - people/ms/nitsi.git/blobdiff - src/nitsi/virtual_environ.py
Makefile: Ship nitsi.in in tarball
[people/ms/nitsi.git] / src / nitsi / virtual_environ.py
index 3dc86fdae9329f368d45cccdad1ca987ec022bd5..f375cd60a6b9ae3dd8b2c49470e244d2086802e7 100644 (file)
@@ -1,13 +1,12 @@
 #!/usr/bin/python3
 
-from nitsi.machine import machine
-
-from nitsi.network import network
-
-import os
 import configparser
 import libvirt
 import logging
+import os
+
+from . import machine
+from . import network
 
 logger = logging.getLogger("nitsi.virtual_environ")
 
@@ -61,14 +60,14 @@ class virtual_environ():
         networks = {}
         for _network in self.networks:
             self.log.debug(_network)
-            networks.setdefault(_network, network(self.con, os.path.normpath(self.path + "/" + self.config[_network]["xml_file"])))
+            networks.setdefault(_network, network.network(self.con, os.path.normpath(self.path + "/" + self.config[_network]["xml_file"])))
         return networks
 
     def get_machines(self):
         machines = {}
         for _machine in self.machines:
             self.log.debug(_machine)
-            machines.setdefault(_machine, machine(
+            machines.setdefault(_machine, machine.machine(
                 self.con,
                 os.path.normpath(self.path + "/" + self.config[_machine]["xml_file"]),
                 os.path.normpath(self.path + "/" + self.config[_machine]["snapshot_xml_file"]),
@@ -96,4 +95,4 @@ class virtual_environ():
                 if len(_machine) > self._longest_machine_name:
                     self._longest_machine_name = len(_machine)
 
-            return self._longest_machine_name
\ No newline at end of file
+            return self._longest_machine_name