[Kimchi-devel] [PATCH 4/4] Use absolute import path
Aline Manera
alinefm at linux.vnet.ibm.com
Mon Oct 19 21:10:43 UTC 2015
Signed-off-by: Aline Manera <alinefm at linux.vnet.ibm.com>
---
src/wok/control/tasks.py | 4 +--
src/wok/plugins/kimchi/__init__.py | 2 +-
src/wok/plugins/kimchi/control/host.py | 2 +-
src/wok/plugins/kimchi/control/storagepools.py | 3 ++-
src/wok/plugins/kimchi/control/vms.py | 2 +-
src/wok/plugins/kimchi/distroloader.py | 3 +--
src/wok/plugins/kimchi/mockmodel.py | 36 ++++++++++++++------------
src/wok/plugins/kimchi/model/config.py | 19 +++++++-------
src/wok/plugins/kimchi/model/diskutils.py | 3 ++-
src/wok/plugins/kimchi/model/host.py | 6 ++---
src/wok/plugins/kimchi/model/hostdev.py | 2 +-
src/wok/plugins/kimchi/model/interfaces.py | 2 +-
src/wok/plugins/kimchi/model/model.py | 2 +-
src/wok/plugins/kimchi/model/storagepools.py | 6 ++---
src/wok/plugins/kimchi/model/storageservers.py | 3 ++-
src/wok/plugins/kimchi/model/storagetargets.py | 4 +--
src/wok/plugins/kimchi/model/storagevolumes.py | 5 ++--
src/wok/plugins/kimchi/model/templates.py | 2 +-
src/wok/plugins/kimchi/model/vmhostdevs.py | 8 +++---
src/wok/plugins/kimchi/model/vmifaces.py | 4 +--
src/wok/plugins/kimchi/model/vms.py | 13 +++++-----
src/wok/plugins/kimchi/model/vmsnapshots.py | 4 +--
src/wok/plugins/kimchi/model/vmstorages.py | 11 ++++----
src/wok/plugins/kimchi/repositories.py | 9 ++++---
src/wok/plugins/kimchi/scan.py | 2 +-
src/wok/plugins/kimchi/screenshot.py | 2 +-
src/wok/plugins/kimchi/swupdate.py | 8 +++---
src/wok/plugins/kimchi/vmtemplate.py | 21 +++++++--------
28 files changed, 98 insertions(+), 90 deletions(-)
diff --git a/src/wok/control/tasks.py b/src/wok/control/tasks.py
index e689661..fef310b 100644
--- a/src/wok/control/tasks.py
+++ b/src/wok/control/tasks.py
@@ -19,8 +19,8 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-from base import Collection, Resource
-from utils import UrlSubNode
+from wok.control.base import Collection, Resource
+from wok.control.utils import UrlSubNode
@UrlSubNode("tasks", True)
diff --git a/src/wok/plugins/kimchi/__init__.py b/src/wok/plugins/kimchi/__init__.py
index 9330044..d253d84 100644
--- a/src/wok/plugins/kimchi/__init__.py
+++ b/src/wok/plugins/kimchi/__init__.py
@@ -17,5 +17,5 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-from root import KimchiRoot
+from wok.plugins.kimchi.root import KimchiRoot
__all__ = [KimchiRoot]
diff --git a/src/wok/plugins/kimchi/control/host.py b/src/wok/plugins/kimchi/control/host.py
index 9fe4c0a..32ab38f 100644
--- a/src/wok/plugins/kimchi/control/host.py
+++ b/src/wok/plugins/kimchi/control/host.py
@@ -22,7 +22,7 @@ from wok.control.base import Resource, SimpleCollection
from wok.control.utils import UrlSubNode
from wok.exception import NotFoundError
-from cpuinfo import CPUInfo
+from wok.plugins.kimchi.control.cpuinfo import CPUInfo
@UrlSubNode('host', True)
diff --git a/src/wok/plugins/kimchi/control/storagepools.py b/src/wok/plugins/kimchi/control/storagepools.py
index 8bc7e50..d66b634 100644
--- a/src/wok/plugins/kimchi/control/storagepools.py
+++ b/src/wok/plugins/kimchi/control/storagepools.py
@@ -24,8 +24,9 @@ from wok.control.utils import get_class_name, model_fn
from wok.control.utils import validate_params
from wok.control.utils import UrlSubNode
+from wok.plugins.kimchi.control.storagevolumes import IsoVolumes
+from wok.plugins.kimchi.control.storagevolumes import StorageVolumes
from wok.plugins.kimchi.model.storagepools import ISO_POOL_NAME
-from storagevolumes import IsoVolumes, StorageVolumes
@UrlSubNode('storagepools', True)
diff --git a/src/wok/plugins/kimchi/control/vms.py b/src/wok/plugins/kimchi/control/vms.py
index 858b23c..1b0e3e0 100644
--- a/src/wok/plugins/kimchi/control/vms.py
+++ b/src/wok/plugins/kimchi/control/vms.py
@@ -20,7 +20,7 @@
from wok.control.base import AsyncCollection, Resource
from wok.control.utils import internal_redirect, UrlSubNode
-from vm import sub_nodes
+from wok.plugins.kimchi.control.vm import sub_nodes
@UrlSubNode('vms', True)
diff --git a/src/wok/plugins/kimchi/distroloader.py b/src/wok/plugins/kimchi/distroloader.py
index 0032737..2b10502 100644
--- a/src/wok/plugins/kimchi/distroloader.py
+++ b/src/wok/plugins/kimchi/distroloader.py
@@ -22,11 +22,10 @@ import glob
import json
import os
-
from wok.exception import NotFoundError, OperationFailed
from wok.utils import wok_log
-import config
+from wok.plugins.kimchi import config
ARCHS = {'x86_64': ['x86_64', 'amd64', 'i686', 'x86', 'i386'],
diff --git a/src/wok/plugins/kimchi/mockmodel.py b/src/wok/plugins/kimchi/mockmodel.py
index 0832b20..9ee5a15 100644
--- a/src/wok/plugins/kimchi/mockmodel.py
+++ b/src/wok/plugins/kimchi/mockmodel.py
@@ -30,23 +30,25 @@ from wok.objectstore import ObjectStore
from wok.utils import add_task, get_next_clone_name, wok_log
from wok.xmlutils.utils import xml_item_update
-import config
-import imageinfo
-import osinfo
-from model import cpuinfo
-from model import vmifaces
-from model.debugreports import DebugReportsModel
-from model.host import DeviceModel
-from model.libvirtstoragepool import IscsiPoolDef, NetfsPoolDef
-from model.libvirtstoragepool import StoragePoolDef
-from model.model import Model
-from model.storagepools import StoragePoolModel
-from model.storagevolumes import StorageVolumeModel, StorageVolumesModel
-from model import storagevolumes
-from model.templates import LibvirtVMTemplate
-from model.users import PAMUsersModel
-from model.groups import PAMGroupsModel
-from vmtemplate import VMTemplate
+from wok.plugins.kimchi import config
+from wok.plugins.kimchi import imageinfo
+from wok.plugins.kimchi import osinfo
+from wok.plugins.kimchi.model import cpuinfo
+from wok.plugins.kimchi.model import vmifaces
+from wok.plugins.kimchi.model.debugreports import DebugReportsModel
+from wok.plugins.kimchi.model.host import DeviceModel
+from wok.plugins.kimchi.model.libvirtstoragepool import IscsiPoolDef
+from wok.plugins.kimchi.model.libvirtstoragepool import NetfsPoolDef
+from wok.plugins.kimchi.model.libvirtstoragepool import StoragePoolDef
+from wok.plugins.kimchi.model.model import Model
+from wok.plugins.kimchi.model.storagepools import StoragePoolModel
+from wok.plugins.kimchi.model.storagevolumes import StorageVolumeModel
+from wok.plugins.kimchi.model.storagevolumes import StorageVolumesModel
+from wok.plugins.kimchi.model import storagevolumes
+from wok.plugins.kimchi.model.templates import LibvirtVMTemplate
+from wok.plugins.kimchi.model.users import PAMUsersModel
+from wok.plugins.kimchi.model.groups import PAMGroupsModel
+from wok.plugins.kimchi.vmtemplate import VMTemplate
fake_user = {'root': 'letmein!'}
diff --git a/src/wok/plugins/kimchi/model/config.py b/src/wok/plugins/kimchi/model/config.py
index 680d7dc..80b698b 100644
--- a/src/wok/plugins/kimchi/model/config.py
+++ b/src/wok/plugins/kimchi/model/config.py
@@ -24,17 +24,18 @@ from wok.basemodel import Singleton
from wok.config import config as kconfig
from wok.config import get_version
from wok.exception import NotFoundError
-from wok.plugins.kimchi.utils import check_url_path
from wok.utils import run_command, wok_log
-from ..config import find_qemu_binary
-from ..distroloader import DistroLoader
-from ..repositories import Repositories
-from ..screenshot import VMScreenshot
-from ..swupdate import SoftwareUpdate
-from debugreports import DebugReportsModel
-from featuretests import FeatureTests, FEATURETEST_POOL_NAME
-from featuretests import FEATURETEST_VM_NAME
+from wok.plugins.kimchi.config import find_qemu_binary
+from wok.plugins.kimchi.distroloader import DistroLoader
+from wok.plugins.kimchi.model.debugreports import DebugReportsModel
+from wok.plugins.kimchi.model.featuretests import FeatureTests
+from wok.plugins.kimchi.model.featuretests import FEATURETEST_POOL_NAME
+from wok.plugins.kimchi.model.featuretests import FEATURETEST_VM_NAME
+from wok.plugins.kimchi.repositories import Repositories
+from wok.plugins.kimchi.screenshot import VMScreenshot
+from wok.plugins.kimchi.swupdate import SoftwareUpdate
+from wok.plugins.kimchi.utils import check_url_path
class ConfigModel(object):
diff --git a/src/wok/plugins/kimchi/model/diskutils.py b/src/wok/plugins/kimchi/model/diskutils.py
index 59d5afa..076b334 100644
--- a/src/wok/plugins/kimchi/model/diskutils.py
+++ b/src/wok/plugins/kimchi/model/diskutils.py
@@ -20,8 +20,9 @@
from wok.exception import OperationFailed, NotFoundError
from wok.utils import wok_log
+from wok.plugins.kimchi.model.vms import VMModel, VMsModel
from wok.plugins.kimchi.xmlutils.disk import get_vm_disk_info, get_vm_disks
-from vms import VMModel, VMsModel
+
"""
Functions that multiple storage-related models (e.g. VMStoragesModel,
diff --git a/src/wok/plugins/kimchi/model/host.py b/src/wok/plugins/kimchi/model/host.py
index 9b1fc32..2db226d 100644
--- a/src/wok/plugins/kimchi/model/host.py
+++ b/src/wok/plugins/kimchi/model/host.py
@@ -33,13 +33,13 @@ from wok.utils import add_task, wok_log
from wok.xmlutils.utils import xpath_get_text
from wok.model.tasks import TaskModel
-import hostdev
from wok.plugins.kimchi import disks
from wok.plugins.kimchi import netinfo
+from wok.plugins.kimchi.model import hostdev
+from wok.plugins.kimchi.model.config import CapabilitiesModel
+from wok.plugins.kimchi.model.vms import DOM_STATE_MAP, VMModel, VMsModel
from wok.plugins.kimchi.repositories import Repositories
from wok.plugins.kimchi.swupdate import SoftwareUpdate
-from config import CapabilitiesModel
-from vms import DOM_STATE_MAP, VMModel, VMsModel
HOST_STATS_INTERVAL = 1
diff --git a/src/wok/plugins/kimchi/model/hostdev.py b/src/wok/plugins/kimchi/model/hostdev.py
index 46d7e13..93c47d3 100644
--- a/src/wok/plugins/kimchi/model/hostdev.py
+++ b/src/wok/plugins/kimchi/model/hostdev.py
@@ -24,7 +24,7 @@ from pprint import pprint
from wok.utils import wok_log
from wok.xmlutils.utils import dictize
-from libvirtconnection import LibvirtConnection
+from wok.plugins.kimchi.model.libvirtconnection import LibvirtConnection
def _get_all_host_dev_infos(libvirt_conn):
diff --git a/src/wok/plugins/kimchi/model/interfaces.py b/src/wok/plugins/kimchi/model/interfaces.py
index b8b679c..8556fd5 100644
--- a/src/wok/plugins/kimchi/model/interfaces.py
+++ b/src/wok/plugins/kimchi/model/interfaces.py
@@ -20,7 +20,7 @@
from wok.exception import NotFoundError
from wok.plugins.kimchi import netinfo
-from networks import NetworksModel
+from wok.plugins.kimchi.model.networks import NetworksModel
class InterfacesModel(object):
diff --git a/src/wok/plugins/kimchi/model/model.py b/src/wok/plugins/kimchi/model/model.py
index 0c94f63..ac90b7b 100644
--- a/src/wok/plugins/kimchi/model/model.py
+++ b/src/wok/plugins/kimchi/model/model.py
@@ -24,7 +24,7 @@ from wok.basemodel import BaseModel
from wok.objectstore import ObjectStore
from wok.utils import import_module, listPathModules
-from libvirtconnection import LibvirtConnection
+from wok.plugins.kimchi.model.libvirtconnection import LibvirtConnection
class Model(BaseModel):
diff --git a/src/wok/plugins/kimchi/model/storagepools.py b/src/wok/plugins/kimchi/model/storagepools.py
index db68252..a5c5581 100644
--- a/src/wok/plugins/kimchi/model/storagepools.py
+++ b/src/wok/plugins/kimchi/model/storagepools.py
@@ -28,12 +28,12 @@ from wok.exception import NotFoundError, OperationFailed
from wok.utils import add_task, run_command, wok_log
from wok.xmlutils.utils import xpath_get_text
+from wok.plugins.kimchi.model.config import CapabilitiesModel
+from wok.plugins.kimchi.model.host import DeviceModel
+from wok.plugins.kimchi.model.libvirtstoragepool import StoragePoolDef
from wok.plugins.kimchi.osinfo import defaults as tmpl_defaults
from wok.plugins.kimchi.scan import Scanner
from wok.plugins.kimchi.utils import pool_name_from_uri
-from config import CapabilitiesModel
-from host import DeviceModel
-from libvirtstoragepool import StoragePoolDef
ISO_POOL_NAME = u'kimchi_isos'
diff --git a/src/wok/plugins/kimchi/model/storageservers.py b/src/wok/plugins/kimchi/model/storageservers.py
index accc5f5..2d4e1f7 100644
--- a/src/wok/plugins/kimchi/model/storageservers.py
+++ b/src/wok/plugins/kimchi/model/storageservers.py
@@ -19,7 +19,8 @@
from wok.exception import NotFoundError
-from storagepools import StoragePoolModel, StoragePoolsModel
+from wok.plugins.kimchi.model.storagepools import StoragePoolModel
+from wok.plugins.kimchi.model.storagepools import StoragePoolsModel
# Types of remote storage servers supported
STORAGE_SERVERS = ['netfs', 'iscsi']
diff --git a/src/wok/plugins/kimchi/model/storagetargets.py b/src/wok/plugins/kimchi/model/storagetargets.py
index 4090b45..6c7bf0b 100644
--- a/src/wok/plugins/kimchi/model/storagetargets.py
+++ b/src/wok/plugins/kimchi/model/storagetargets.py
@@ -24,8 +24,8 @@ from lxml.builder import E
from wok.utils import patch_find_nfs_target, wok_log
-from config import CapabilitiesModel
-from storageservers import STORAGE_SERVERS
+from wok.plugins.kimchi.model.config import CapabilitiesModel
+from wok.plugins.kimchi.model.storageservers import STORAGE_SERVERS
class StorageTargetsModel(object):
diff --git a/src/wok/plugins/kimchi/model/storagevolumes.py b/src/wok/plugins/kimchi/model/storagevolumes.py
index 81f63ab..4e28712 100644
--- a/src/wok/plugins/kimchi/model/storagevolumes.py
+++ b/src/wok/plugins/kimchi/model/storagevolumes.py
@@ -37,8 +37,9 @@ from wok.model.tasks import TaskModel
from wok.plugins.kimchi.config import READONLY_POOL_TYPE
from wok.plugins.kimchi.isoinfo import IsoImage
-from diskutils import get_disk_used_by, set_disk_used_by
-from storagepools import StoragePoolModel
+from wok.plugins.kimchi.model.diskutils import get_disk_used_by
+from wok.plugins.kimchi.model.diskutils import set_disk_used_by
+from wok.plugins.kimchi.model.storagepools import StoragePoolModel
VOLUME_TYPE_MAP = {0: 'file',
diff --git a/src/wok/plugins/kimchi/model/templates.py b/src/wok/plugins/kimchi/model/templates.py
index 5c1b0c0..2886c87 100644
--- a/src/wok/plugins/kimchi/model/templates.py
+++ b/src/wok/plugins/kimchi/model/templates.py
@@ -28,9 +28,9 @@ from wok.utils import probe_file_permission_as_user, run_setfacl_set_attr
from wok.xmlutils.utils import xpath_get_text
from wok.plugins.kimchi.kvmusertests import UserTests
+from wok.plugins.kimchi.model.cpuinfo import CPUInfoModel
from wok.plugins.kimchi.utils import pool_name_from_uri
from wok.plugins.kimchi.vmtemplate import VMTemplate
-from cpuinfo import CPUInfoModel
class TemplatesModel(object):
diff --git a/src/wok/plugins/kimchi/model/vmhostdevs.py b/src/wok/plugins/kimchi/model/vmhostdevs.py
index 5baff2f..7d13585 100644
--- a/src/wok/plugins/kimchi/model/vmhostdevs.py
+++ b/src/wok/plugins/kimchi/model/vmhostdevs.py
@@ -29,10 +29,10 @@ from wok.exception import OperationFailed
from wok.rollbackcontext import RollbackContext
from wok.utils import run_command, wok_log
-from config import CapabilitiesModel
-from host import DeviceModel, DevicesModel
-from utils import get_vm_config_flag
-from vms import DOM_STATE_MAP, VMModel
+from wok.plugins.kimchi.model.config import CapabilitiesModel
+from wok.plugins.kimchi.model.host import DeviceModel, DevicesModel
+from wok.plugins.kimchi.model.utils import get_vm_config_flag
+from wok.plugins.kimchi.model.vms import DOM_STATE_MAP, VMModel
class VMHostDevsModel(object):
diff --git a/src/wok/plugins/kimchi/model/vmifaces.py b/src/wok/plugins/kimchi/model/vmifaces.py
index 95466db..0b1ee10 100644
--- a/src/wok/plugins/kimchi/model/vmifaces.py
+++ b/src/wok/plugins/kimchi/model/vmifaces.py
@@ -24,9 +24,9 @@ from lxml import etree, objectify
from wok.exception import InvalidParameter, MissingParameter
from wok.exception import NotFoundError, InvalidOperation
+from wok.plugins.kimchi.model.config import CapabilitiesModel
+from wok.plugins.kimchi.model.vms import DOM_STATE_MAP, VMModel
from wok.plugins.kimchi.xmlutils.interface import get_iface_xml
-from config import CapabilitiesModel
-from vms import DOM_STATE_MAP, VMModel
def getDHCPLeases(net, mac):
diff --git a/src/wok/plugins/kimchi/model/vms.py b/src/wok/plugins/kimchi/model/vms.py
index a42e8af..60145d0 100644
--- a/src/wok/plugins/kimchi/model/vms.py
+++ b/src/wok/plugins/kimchi/model/vms.py
@@ -44,15 +44,16 @@ from wok.plugins.kimchi import model
from wok.plugins.kimchi import vnc
from wok.plugins.kimchi.config import READONLY_POOL_TYPE
from wok.plugins.kimchi.kvmusertests import UserTests
+from wok.plugins.kimchi.model.config import CapabilitiesModel
+from wok.plugins.kimchi.model.featuretests import FeatureTests
+from wok.plugins.kimchi.model.templates import TemplateModel
+from wok.plugins.kimchi.model.utils import get_ascii_nonascii_name, get_vm_name
+from wok.plugins.kimchi.model.utils import get_metadata_node
+from wok.plugins.kimchi.model.utils import remove_metadata_node
+from wok.plugins.kimchi.model.utils import set_metadata_node
from wok.plugins.kimchi.screenshot import VMScreenshot
from wok.plugins.kimchi.utils import template_name_from_uri
from wok.plugins.kimchi.xmlutils.cpu import get_cpu_xml, get_numa_xml
-from config import CapabilitiesModel
-from featuretests import FeatureTests
-from templates import TemplateModel
-from utils import get_ascii_nonascii_name, get_vm_name
-from utils import get_metadata_node, remove_metadata_node
-from utils import set_metadata_node
DOM_STATE_MAP = {0: 'nostate',
diff --git a/src/wok/plugins/kimchi/model/vmsnapshots.py b/src/wok/plugins/kimchi/model/vmsnapshots.py
index fff1908..4fea9ed 100644
--- a/src/wok/plugins/kimchi/model/vmsnapshots.py
+++ b/src/wok/plugins/kimchi/model/vmsnapshots.py
@@ -28,8 +28,8 @@ from wok.utils import add_task
from wok.xmlutils.utils import xpath_get_text
from wok.model.tasks import TaskModel
-from vms import DOM_STATE_MAP, VMModel
-from vmstorages import VMStorageModel, VMStoragesModel
+from wok.plugins.kimchi.model.vms import DOM_STATE_MAP, VMModel
+from wok.plugins.kimchi.model.vmstorages import VMStorageModel, VMStoragesModel
class VMSnapshotsModel(object):
diff --git a/src/wok/plugins/kimchi/model/vmstorages.py b/src/wok/plugins/kimchi/model/vmstorages.py
index 1a88008..23db0a6 100644
--- a/src/wok/plugins/kimchi/model/vmstorages.py
+++ b/src/wok/plugins/kimchi/model/vmstorages.py
@@ -24,14 +24,15 @@ from wok.exception import InvalidOperation, InvalidParameter, NotFoundError
from wok.exception import OperationFailed
from wok.utils import wok_log
+from wok.plugins.kimchi.model.config import CapabilitiesModel
+from wok.plugins.kimchi.model.diskutils import get_disk_used_by
+from wok.plugins.kimchi.model.diskutils import set_disk_used_by
+from wok.plugins.kimchi.model.storagevolumes import StorageVolumeModel
+from wok.plugins.kimchi.model.utils import get_vm_config_flag
+from wok.plugins.kimchi.model.vms import DOM_STATE_MAP, VMModel
from wok.plugins.kimchi.osinfo import lookup
from wok.plugins.kimchi.xmlutils.disk import get_device_node, get_disk_xml
from wok.plugins.kimchi.xmlutils.disk import get_vm_disk_info, get_vm_disks
-from config import CapabilitiesModel
-from diskutils import get_disk_used_by, set_disk_used_by
-from storagevolumes import StorageVolumeModel
-from utils import get_vm_config_flag
-from vms import DOM_STATE_MAP, VMModel
HOTPLUG_TYPE = ['scsi', 'virtio']
diff --git a/src/wok/plugins/kimchi/repositories.py b/src/wok/plugins/kimchi/repositories.py
index 5c395c2..2d6bac2 100644
--- a/src/wok/plugins/kimchi/repositories.py
+++ b/src/wok/plugins/kimchi/repositories.py
@@ -26,11 +26,12 @@ from ConfigParser import ConfigParser
from wok.basemodel import Singleton
from wok.exception import InvalidOperation, InvalidParameter
from wok.exception import OperationFailed, NotFoundError, MissingParameter
-from wok.plugins.kimchi.utils import validate_repo_url
-from config import kimchiLock
-from yumparser import get_yum_repositories, write_repo_to_file
-from yumparser import get_display_name, get_expanded_url
+from wok.plugins.kimchi.config import kimchiLock
+from wok.plugins.kimchi.utils import validate_repo_url
+from wok.plugins.kimchi.yumparser import get_yum_repositories
+from wok.plugins.kimchi.yumparser import write_repo_to_file, get_display_name
+from wok.plugins.kimchi.yumparser import get_expanded_url
class Repositories(object):
diff --git a/src/wok/plugins/kimchi/scan.py b/src/wok/plugins/kimchi/scan.py
index b475c46..32827bb 100644
--- a/src/wok/plugins/kimchi/scan.py
+++ b/src/wok/plugins/kimchi/scan.py
@@ -27,7 +27,7 @@ import time
from wok.utils import wok_log
-from isoinfo import IsoImage, probe_iso
+from wok.plugins.kimchi.isoinfo import IsoImage, probe_iso
SCAN_IGNORE = ['/tmp/kimchi-scan-*']
diff --git a/src/wok/plugins/kimchi/screenshot.py b/src/wok/plugins/kimchi/screenshot.py
index ffe5a1a..144c74e 100644
--- a/src/wok/plugins/kimchi/screenshot.py
+++ b/src/wok/plugins/kimchi/screenshot.py
@@ -33,7 +33,7 @@ except ImportError:
from wok.utils import wok_log
-import config
+from wok.plugins.kimchi import config
(fd, pipe) = tempfile.mkstemp()
diff --git a/src/wok/plugins/kimchi/swupdate.py b/src/wok/plugins/kimchi/swupdate.py
index 2eed2f5..aba53e6 100644
--- a/src/wok/plugins/kimchi/swupdate.py
+++ b/src/wok/plugins/kimchi/swupdate.py
@@ -22,15 +22,15 @@ import os
import signal
import subprocess
import time
+from configobj import ConfigObj, ConfigObjError
+from psutil import pid_exists
from wok.basemodel import Singleton
from wok.exception import NotFoundError, OperationFailed
from wok.utils import run_command, wok_log
-from config import kimchiLock
-from configobj import ConfigObj, ConfigObjError
-from psutil import pid_exists
-from yumparser import get_yum_packages_list_update
+from wok.plugins.kimchi.config import kimchiLock
+from wok.plugins.kimchi.yumparser import get_yum_packages_list_update
class SoftwareUpdate(object):
diff --git a/src/wok/plugins/kimchi/vmtemplate.py b/src/wok/plugins/kimchi/vmtemplate.py
index 3d0b442..283d94d 100644
--- a/src/wok/plugins/kimchi/vmtemplate.py
+++ b/src/wok/plugins/kimchi/vmtemplate.py
@@ -27,17 +27,16 @@ from lxml.builder import E
from wok.exception import InvalidParameter, ImageFormatError, IsoFormatError
from wok.exception import MissingParameter, OperationFailed
-from wok.plugins.kimchi.utils import check_url_path
-
-import imageinfo
-import osinfo
-from isoinfo import IsoImage
-from utils import pool_name_from_uri
-from xmlutils.cpu import get_cpu_xml
-from xmlutils.disk import get_disk_xml
-from xmlutils.graphics import get_graphics_xml
-from xmlutils.interface import get_iface_xml
-from xmlutils.qemucmdline import get_qemucmdline_xml
+
+from wok.plugins.kimchi import imageinfo
+from wok.plugins.kimchi import osinfo
+from wok.plugins.kimchi.isoinfo import IsoImage
+from wok.plugins.kimchi.utils import check_url_path, pool_name_from_uri
+from wok.plugins.kimchi.xmlutils.cpu import get_cpu_xml
+from wok.plugins.kimchi.xmlutils.disk import get_disk_xml
+from wok.plugins.kimchi.xmlutils.graphics import get_graphics_xml
+from wok.plugins.kimchi.xmlutils.interface import get_iface_xml
+from wok.plugins.kimchi.xmlutils.qemucmdline import get_qemucmdline_xml
class VMTemplate(object):
--
2.1.0
More information about the Kimchi-devel
mailing list