[Kimchi-devel] [PATCH 2/5] [WOK] Change relative to absolute imports in Kimchi.
pvital at linux.vnet.ibm.com
pvital at linux.vnet.ibm.com
Mon Sep 28 19:49:15 UTC 2015
From: Paulo Vital <pvital at linux.vnet.ibm.com>
Update some imports from Kimchi plugin code to be absolute instead of relative.
Signed-off-by: Paulo Vital <pvital at linux.vnet.ibm.com>
---
src/wok/plugins/kimchi/control/storagepools.py | 2 +-
src/wok/plugins/kimchi/model/debugreports.py | 2 +-
src/wok/plugins/kimchi/model/diskutils.py | 2 +-
src/wok/plugins/kimchi/model/host.py | 8 ++++----
src/wok/plugins/kimchi/model/interfaces.py | 2 +-
src/wok/plugins/kimchi/model/libvirtstoragepool.py | 2 +-
src/wok/plugins/kimchi/model/networks.py | 10 +++++-----
src/wok/plugins/kimchi/model/storagepools.py | 6 +++---
src/wok/plugins/kimchi/model/storagevolumes.py | 4 ++--
src/wok/plugins/kimchi/model/templates.py | 6 +++---
src/wok/plugins/kimchi/model/vmifaces.py | 2 +-
src/wok/plugins/kimchi/model/vms.py | 14 +++++++-------
src/wok/plugins/kimchi/model/vmstorages.py | 6 +++---
src/wok/plugins/kimchi/xmlutils/interface.py | 2 +-
14 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/src/wok/plugins/kimchi/control/storagepools.py b/src/wok/plugins/kimchi/control/storagepools.py
index e5f264e..8bc7e50 100644
--- a/src/wok/plugins/kimchi/control/storagepools.py
+++ b/src/wok/plugins/kimchi/control/storagepools.py
@@ -24,7 +24,7 @@ from wok.control.utils import get_class_name, model_fn
from wok.control.utils import validate_params
from wok.control.utils import UrlSubNode
-from ..model.storagepools import ISO_POOL_NAME
+from wok.plugins.kimchi.model.storagepools import ISO_POOL_NAME
from storagevolumes import IsoVolumes, StorageVolumes
diff --git a/src/wok/plugins/kimchi/model/debugreports.py b/src/wok/plugins/kimchi/model/debugreports.py
index 48e6b26..dcd1b64 100644
--- a/src/wok/plugins/kimchi/model/debugreports.py
+++ b/src/wok/plugins/kimchi/model/debugreports.py
@@ -31,7 +31,7 @@ from wok.utils import add_task, wok_log
from wok.utils import run_command
from wok.model.tasks import TaskModel
-from .. import config
+from wok.plugins.kimchi import config
class DebugReportsModel(object):
diff --git a/src/wok/plugins/kimchi/model/diskutils.py b/src/wok/plugins/kimchi/model/diskutils.py
index 350e6eb..59d5afa 100644
--- a/src/wok/plugins/kimchi/model/diskutils.py
+++ b/src/wok/plugins/kimchi/model/diskutils.py
@@ -20,7 +20,7 @@
from wok.exception import OperationFailed, NotFoundError
from wok.utils import wok_log
-from ..xmlutils.disk import get_vm_disk_info, get_vm_disks
+from wok.plugins.kimchi.xmlutils.disk import get_vm_disk_info, get_vm_disks
from vms import VMModel, VMsModel
"""
diff --git a/src/wok/plugins/kimchi/model/host.py b/src/wok/plugins/kimchi/model/host.py
index 75d4de0..6a3e942 100644
--- a/src/wok/plugins/kimchi/model/host.py
+++ b/src/wok/plugins/kimchi/model/host.py
@@ -33,10 +33,10 @@ from wok.xmlutils.utils import xpath_get_text
from wok.model.tasks import TaskModel
import hostdev
-from .. import disks
-from .. import netinfo
-from ..repositories import Repositories
-from ..swupdate import SoftwareUpdate
+from wok.plugins.kimchi import disks
+from wok.plugins.kimchi import netinfo
+from wok.plugins.kimchi.repositories import Repositories
+from wok.plugins.kimchi.swupdate import SoftwareUpdate
from config import CapabilitiesModel
from vms import DOM_STATE_MAP
diff --git a/src/wok/plugins/kimchi/model/interfaces.py b/src/wok/plugins/kimchi/model/interfaces.py
index 149afe3..b8b679c 100644
--- a/src/wok/plugins/kimchi/model/interfaces.py
+++ b/src/wok/plugins/kimchi/model/interfaces.py
@@ -19,7 +19,7 @@
from wok.exception import NotFoundError
-from .. import netinfo
+from wok.plugins.kimchi import netinfo
from networks import NetworksModel
diff --git a/src/wok/plugins/kimchi/model/libvirtstoragepool.py b/src/wok/plugins/kimchi/model/libvirtstoragepool.py
index b22856b..5da0b3b 100644
--- a/src/wok/plugins/kimchi/model/libvirtstoragepool.py
+++ b/src/wok/plugins/kimchi/model/libvirtstoragepool.py
@@ -27,7 +27,7 @@ from wok.exception import InvalidParameter, OperationFailed, TimeoutExpired
from wok.rollbackcontext import RollbackContext
from wok.utils import parse_cmd_output, run_command, wok_log
-from ..iscsi import TargetClient
+from wok.plugins.kimchi.iscsi import TargetClient
class StoragePoolDef(object):
diff --git a/src/wok/plugins/kimchi/model/networks.py b/src/wok/plugins/kimchi/model/networks.py
index b579865..71ea595 100644
--- a/src/wok/plugins/kimchi/model/networks.py
+++ b/src/wok/plugins/kimchi/model/networks.py
@@ -30,11 +30,11 @@ from wok.rollbackcontext import RollbackContext
from wok.utils import run_command, wok_log
from wok.xmlutils.utils import xpath_get_text
-from .. import netinfo
-from .. import network as knetwork
-from ..osinfo import defaults as tmpl_defaults
-from ..xmlutils.network import create_vlan_tagged_bridge_xml
-from ..xmlutils.network import to_network_xml
+from wok.plugins.kimchi import netinfo
+from wok.plugins.kimchi import network as knetwork
+from wok.plugins.kimchi.osinfo import defaults as tmpl_defaults
+from wok.plugins.kimchi.xmlutils.network import create_vlan_tagged_bridge_xml
+from wok.plugins.kimchi.xmlutils.network import to_network_xml
KIMCHI_BRIDGE_PREFIX = 'kb'
diff --git a/src/wok/plugins/kimchi/model/storagepools.py b/src/wok/plugins/kimchi/model/storagepools.py
index 0db2ef4..db68252 100644
--- a/src/wok/plugins/kimchi/model/storagepools.py
+++ b/src/wok/plugins/kimchi/model/storagepools.py
@@ -28,9 +28,9 @@ 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 ..osinfo import defaults as tmpl_defaults
-from ..scan import Scanner
-from ..utils import pool_name_from_uri
+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
diff --git a/src/wok/plugins/kimchi/model/storagevolumes.py b/src/wok/plugins/kimchi/model/storagevolumes.py
index 99b17d3..5d28966 100644
--- a/src/wok/plugins/kimchi/model/storagevolumes.py
+++ b/src/wok/plugins/kimchi/model/storagevolumes.py
@@ -34,8 +34,8 @@ from wok.utils import wok_log
from wok.xmlutils.utils import xpath_get_text
from wok.model.tasks import TaskModel
-from ..config import READONLY_POOL_TYPE
-from ..isoinfo import IsoImage
+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
diff --git a/src/wok/plugins/kimchi/model/templates.py b/src/wok/plugins/kimchi/model/templates.py
index 4f0b204..b6fb84e 100644
--- a/src/wok/plugins/kimchi/model/templates.py
+++ b/src/wok/plugins/kimchi/model/templates.py
@@ -27,9 +27,9 @@ from wok.exception import NotFoundError, OperationFailed
from wok.utils import probe_file_permission_as_user, run_setfacl_set_attr
from wok.xmlutils.utils import xpath_get_text
-from ..kvmusertests import UserTests
-from ..utils import pool_name_from_uri
-from ..vmtemplate import VMTemplate
+from wok.plugins.kimchi.kvmusertests import UserTests
+from wok.plugins.kimchi.utils import pool_name_from_uri
+from wok.plugins.kimchi.vmtemplate import VMTemplate
from cpuinfo import CPUInfoModel
diff --git a/src/wok/plugins/kimchi/model/vmifaces.py b/src/wok/plugins/kimchi/model/vmifaces.py
index 87565c8..8f4997f 100644
--- a/src/wok/plugins/kimchi/model/vmifaces.py
+++ b/src/wok/plugins/kimchi/model/vmifaces.py
@@ -24,7 +24,7 @@ from lxml import etree, objectify
from wok.exception import InvalidParameter, MissingParameter
from wok.exception import NotFoundError, InvalidOperation
-from ..xmlutils.interface import get_iface_xml
+from wok.plugins.kimchi.xmlutils.interface import get_iface_xml
from config import CapabilitiesModel
from vms import DOM_STATE_MAP, VMModel
diff --git a/src/wok/plugins/kimchi/model/vms.py b/src/wok/plugins/kimchi/model/vms.py
index f37b5d6..fbbbe1d 100644
--- a/src/wok/plugins/kimchi/model/vms.py
+++ b/src/wok/plugins/kimchi/model/vms.py
@@ -38,13 +38,13 @@ from wok.xmlutils.utils import xpath_get_text, xml_item_update
from wok.xmlutils.utils import dictize
from wok.model.tasks import TaskModel
-from .. import model
-from .. import vnc
-from ..config import READONLY_POOL_TYPE
-from ..kvmusertests import UserTests
-from ..screenshot import VMScreenshot
-from ..utils import template_name_from_uri
-from ..xmlutils.cpu import get_cpu_xml, get_numa_xml
+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.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 templates import TemplateModel
from utils import get_vm_name
diff --git a/src/wok/plugins/kimchi/model/vmstorages.py b/src/wok/plugins/kimchi/model/vmstorages.py
index bec16c6..9d7bcaa 100644
--- a/src/wok/plugins/kimchi/model/vmstorages.py
+++ b/src/wok/plugins/kimchi/model/vmstorages.py
@@ -24,9 +24,9 @@ from wok.exception import InvalidOperation, InvalidParameter, NotFoundError
from wok.exception import OperationFailed
from wok.utils import wok_log
-from ..osinfo import lookup
-from ..xmlutils.disk import get_device_node, get_disk_xml
-from ..xmlutils.disk import get_vm_disk_info, get_vm_disks
+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
diff --git a/src/wok/plugins/kimchi/xmlutils/interface.py b/src/wok/plugins/kimchi/xmlutils/interface.py
index 0f3e848..64df8cd 100644
--- a/src/wok/plugins/kimchi/xmlutils/interface.py
+++ b/src/wok/plugins/kimchi/xmlutils/interface.py
@@ -21,7 +21,7 @@ import lxml.etree as ET
from distutils.version import LooseVersion
from lxml.builder import E
-from .. import osinfo
+from wok.plugins.kimchi import osinfo
def get_iface_xml(params, arch=None, os_distro=None, os_version=None):
--
2.4.3
More information about the Kimchi-devel
mailing list