Skip to content

Commit

Permalink
common: Relocate libvirtconnection to common
Browse files Browse the repository at this point in the history
Change-Id: I4bb0bb27898fb068475a3b04f5e77ccd25bf6bcd
Signed-off-by: Edward Haas <edwardh@redhat.com>
  • Loading branch information
EdDev committed Dec 6, 2017
1 parent 72d1739 commit f64a138
Show file tree
Hide file tree
Showing 34 changed files with 34 additions and 37 deletions.
2 changes: 1 addition & 1 deletion contrib/shell_helper
Expand Up @@ -149,7 +149,7 @@ del_ovs_bridges() {
del_test_nets() {
cat << EOF | sudo python -
from __future__ import print_function
from vdsm import libvirtconnection
from vdsm.common import libvirtconnection
c = libvirtconnection.get()
nets = c.listAllNetworks(0)
for net in nets:
Expand Down
1 change: 0 additions & 1 deletion lib/vdsm/Makefile.am
Expand Up @@ -41,7 +41,6 @@ dist_vdsmpylib_PYTHON = \
jobs.py \
jsonrpcvdscli.py \
kvm2ovirt.py \
libvirtconnection.py \
logUtils.py \
machinetype.py \
moduleloader.py \
Expand Down
2 changes: 1 addition & 1 deletion lib/vdsm/clientIF.py
Expand Up @@ -49,10 +49,10 @@
from vdsm.virt.utils import isVdsmImage
import libvirt
from vdsm import alignmentScan
from vdsm import libvirtconnection
from vdsm import numa
from vdsm.common import concurrent
from vdsm.common import function
from vdsm.common import libvirtconnection
from vdsm.common import response
from vdsm.common import supervdsm
from vdsm.virt import vm
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/vdsm/host/caps.py
Expand Up @@ -28,6 +28,7 @@

from vdsm.common import cache
from vdsm.common import dsaversion
from vdsm.common import libvirtconnection
from vdsm.common import hooks
from vdsm.common import supervdsm
from vdsm.config import config
Expand All @@ -39,7 +40,6 @@
from vdsm import host
from vdsm import hostdev
from vdsm import hugepages
from vdsm import libvirtconnection
from vdsm import machinetype
from vdsm import numa
from vdsm import osinfo
Expand Down
2 changes: 1 addition & 1 deletion lib/vdsm/hostdev.py
Expand Up @@ -30,12 +30,12 @@

from vdsm.common import conv
from vdsm.common import hooks
from vdsm.common import libvirtconnection
from vdsm.common import supervdsm
from vdsm.common import validate
from vdsm.common.cache import memoized

from . import cpuarch
from . import libvirtconnection

CAPABILITY_TO_XML_ATTR = collections.defaultdict(
lambda: 'unknown',
Expand Down
2 changes: 1 addition & 1 deletion lib/vdsm/kvm2ovirt.py
Expand Up @@ -27,8 +27,8 @@

from ovirt_imageio_common import directio

from vdsm import libvirtconnection
from vdsm.common import concurrent
from vdsm.common import libvirtconnection
from vdsm.common import time
from vdsm.common.password import ProtectedPassword

Expand Down
2 changes: 1 addition & 1 deletion lib/vdsm/machinetype.py
Expand Up @@ -28,9 +28,9 @@
import libvirt

from vdsm.common import cache
from vdsm.common import libvirtconnection

from . import cpuarch
from . import libvirtconnection

CPU_MAP_FILE = '/usr/share/libvirt/cpu_map.xml'

Expand Down
2 changes: 1 addition & 1 deletion lib/vdsm/numa.py
Expand Up @@ -23,11 +23,11 @@
from collections import defaultdict, namedtuple
import xml.etree.cElementTree as ET

from vdsm import libvirtconnection
from vdsm import taskset
from vdsm.common import cache
from vdsm.common import cmdutils
from vdsm.common import commands
from vdsm.common import libvirtconnection
from vdsm.common.cmdutils import CommandPath


Expand Down
2 changes: 1 addition & 1 deletion lib/vdsm/tool/configurators/passwd.py
Expand Up @@ -23,7 +23,7 @@

from vdsm.common import cmdutils
from vdsm.common import commands
from vdsm.libvirtconnection import libvirt_password, SASL_USERNAME
from vdsm.common.libvirtconnection import libvirt_password, SASL_USERNAME

from . import YES, NO, MAYBE

Expand Down
2 changes: 1 addition & 1 deletion lib/vdsm/tool/dummybr.py
Expand Up @@ -24,8 +24,8 @@
from libvirt import libvirtError, VIR_ERR_NO_NETWORK

from vdsm.common import commands
from vdsm.common import libvirtconnection
from vdsm.network.api import DUMMY_BRIDGE
from .. import libvirtconnection
from . import expose, ExtraArgsError

EXT_BRCTL = '/usr/sbin/brctl'
Expand Down
4 changes: 2 additions & 2 deletions lib/vdsm/tool/nwfilter.py
@@ -1,4 +1,4 @@
# Copyright 2012-2013 Red Hat, Inc.
# Copyright 2012-2017 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand All @@ -23,7 +23,7 @@

import libvirt

from .. import libvirtconnection
from vdsm.common import libvirtconnection
from . import expose, ExtraArgsError


Expand Down
2 changes: 1 addition & 1 deletion lib/vdsm/v2v.py
Expand Up @@ -41,9 +41,9 @@

import libvirt

from vdsm import libvirtconnection
from vdsm.common import cmdutils
from vdsm.common import concurrent
from vdsm.common import libvirtconnection
from vdsm.common import password
from vdsm.common import response
from vdsm.common import zombiereaper
Expand Down
2 changes: 1 addition & 1 deletion lib/vdsm/vdsmd.py
Expand Up @@ -32,12 +32,12 @@
from vdsm import health
from vdsm import jobs
from vdsm import schedule
from vdsm import libvirtconnection
from vdsm import containersconnection
from vdsm import taskset
from vdsm import metrics
from vdsm.common import commands
from vdsm.common import dsaversion
from vdsm.common import libvirtconnection
from vdsm.common import sigutils
from vdsm.common import time
from vdsm.common import zombiereaper
Expand Down
2 changes: 1 addition & 1 deletion lib/vdsm/virt/libvirtnetwork.py
Expand Up @@ -28,7 +28,7 @@

from libvirt import libvirtError, VIR_ERR_NO_NETWORK

from vdsm import libvirtconnection
from vdsm.common import libvirtconnection

LIBVIRT_NET_PREFIX = 'vdsm-'

Expand Down
4 changes: 2 additions & 2 deletions lib/vdsm/virt/periodic.py
@@ -1,5 +1,5 @@
#
# Copyright 2016 Red Hat, Inc.
# Copyright 2016-2017 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -32,9 +32,9 @@
from vdsm import containersconnection
from vdsm import executor
from vdsm import host
from vdsm import libvirtconnection
from vdsm import throttledlog
from vdsm.common import exception
from vdsm.common import libvirtconnection
from vdsm.config import config
from vdsm.virt import migration
from vdsm.virt import recovery
Expand Down
2 changes: 1 addition & 1 deletion lib/vdsm/virt/recovery.py
Expand Up @@ -29,11 +29,11 @@
import libvirt

from vdsm.common import fileutils
from vdsm.common import libvirtconnection
from vdsm.common import response
from vdsm.common.compat import pickle
from vdsm import constants
from vdsm import containersconnection
from vdsm import libvirtconnection
from vdsm import utils
from vdsm.virt import vmchannels
from vdsm.virt import vmstatus
Expand Down
4 changes: 2 additions & 2 deletions lib/vdsm/virt/secret.py
@@ -1,5 +1,5 @@
#
# Copyright 2015 Red Hat, Inc.
# Copyright 2015-2017 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand All @@ -25,8 +25,8 @@
import logging
import uuid

from vdsm.common import libvirtconnection
from vdsm.common import response
from vdsm import libvirtconnection


def register(secrets, clear=False):
Expand Down
2 changes: 1 addition & 1 deletion lib/vdsm/virt/vm.py
Expand Up @@ -39,6 +39,7 @@
# vdsm imports
from vdsm.common import api
from vdsm.common import exception
from vdsm.common import libvirtconnection
from vdsm.common import logutils
from vdsm.common import response
import vdsm.common.time
Expand All @@ -47,7 +48,6 @@
from vdsm import cpuarch
from vdsm import host
from vdsm import hugepages
from vdsm import libvirtconnection
from vdsm import osinfo
from vdsm import utils
from vdsm.config import config
Expand Down
1 change: 0 additions & 1 deletion tests/Makefile.am
Expand Up @@ -83,7 +83,6 @@ test_modules = \
jobs_test.py \
jsonRpcClient_test.py \
jsonrpc_test.py \
libvirtconnection_test.py \
loopback_test.py \
mkimage_test.py \
modprobe.py \
Expand Down
Expand Up @@ -22,7 +22,7 @@
import contextlib
import os

from vdsm import libvirtconnection
from vdsm.common import libvirtconnection
from testlib import VdsmTestCase as TestCaseBase
from monkeypatch import MonkeyPatch

Expand Down
2 changes: 1 addition & 1 deletion tests/hostdev_test.py
Expand Up @@ -29,8 +29,8 @@

from vdsm import cpuarch
from vdsm import hostdev
from vdsm import libvirtconnection
from vdsm.common import hooks
from vdsm.common import libvirtconnection

import hostdevlib

Expand Down
2 changes: 1 addition & 1 deletion tests/kvm2ovirt_test.py
Expand Up @@ -20,7 +20,7 @@
from collections import namedtuple
from contextlib import contextmanager
from monkeypatch import MonkeyPatchScope
from vdsm import libvirtconnection
from vdsm.common import libvirtconnection
from vdsm import v2v

from testlib import VdsmTestCase as TestCaseBase, namedTemporaryDir
Expand Down
2 changes: 1 addition & 1 deletion tests/network/tc_test.py
Expand Up @@ -43,7 +43,7 @@
from .nettestlib import running
from .nettestlib import EXT_TC

from vdsm import libvirtconnection
from vdsm.common import libvirtconnection
from vdsm.network import cmd
from vdsm.network import tc
from vdsm.network.configurators import qos
Expand Down
2 changes: 1 addition & 1 deletion tests/virttests/v2v_test.py
Expand Up @@ -32,7 +32,7 @@
from v2v_testlib import VM_SPECS, MockVirDomain
from v2v_testlib import MockVirConnect, _mac_from_uuid, BLOCK_DEV_PATH
from vdsm import v2v
from vdsm import libvirtconnection
from vdsm.common import libvirtconnection
from vdsm.common import response
from vdsm.common.cmdutils import CommandPath
from vdsm.common.commands import execCmd, terminating
Expand Down
2 changes: 1 addition & 1 deletion tests/virttests/vm_test.py
Expand Up @@ -38,12 +38,12 @@
from vdsm import cpuarch
from vdsm import host
from vdsm import hugepages
from vdsm import libvirtconnection
from vdsm import osinfo
from vdsm import utils

from vdsm.common import define
from vdsm.common import exception
from vdsm.common import libvirtconnection
from vdsm.common import password
from vdsm.common import response

Expand Down
2 changes: 1 addition & 1 deletion tests/virttests/vmoperations_test.py
Expand Up @@ -27,9 +27,9 @@

from nose.plugins.skip import SkipTest

from vdsm import libvirtconnection
from vdsm.common import define
from vdsm.common import hooks
from vdsm.common import libvirtconnection
from vdsm.common import password
from vdsm.common import response
from vdsm.config import config
Expand Down
2 changes: 1 addition & 1 deletion tests/virttests/vmrecovery_test.py
Expand Up @@ -23,14 +23,14 @@
import os
import threading

from vdsm.common import libvirtconnection
from vdsm.common import response
from vdsm.common.compat import pickle
from vdsm.virt import recovery
from vdsm.virt import vmstatus
from vdsm import constants
from vdsm import containersconnection
from vdsm import cpuarch
from vdsm import libvirtconnection


from monkeypatch import MonkeyPatchScope
Expand Down
4 changes: 2 additions & 2 deletions tests/virttests/vmsecret_test.py
@@ -1,5 +1,5 @@
#
# Copyright 2015 Red Hat, Inc.
# Copyright 2015-2017 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -28,7 +28,7 @@
from testlib import expandPermutations, permutations
import vmfakecon

from vdsm import libvirtconnection
from vdsm.common import libvirtconnection
from vdsm.common import response
from vdsm.common.password import ProtectedPassword
from vdsm.virt import secret
Expand Down
2 changes: 1 addition & 1 deletion tests/vmfakelib.py
Expand Up @@ -29,7 +29,7 @@
from vdsm import constants
from vdsm import containersconnection
from vdsm import cpuarch
from vdsm import libvirtconnection
from vdsm.common import libvirtconnection
from vdsm.common import response
from vdsm.virt import sampling
from vdsm.virt import vm
Expand Down
1 change: 0 additions & 1 deletion vdsm.spec.in
Expand Up @@ -1068,7 +1068,6 @@ exit 0
%{python_sitelib}/%{vdsm_name}/jobs.py*
%{python_sitelib}/%{vdsm_name}/jsonrpcvdscli.py*
%{python_sitelib}/%{vdsm_name}/kvm2ovirt.py*
%{python_sitelib}/%{vdsm_name}/libvirtconnection.py*
%{python_sitelib}/%{vdsm_name}/logUtils.py*
%{python_sitelib}/%{vdsm_name}/machinetype.py*
%{python_sitelib}/%{vdsm_name}/metrics/*.py*
Expand Down
2 changes: 1 addition & 1 deletion vdsm_hooks/vmfex/before_vm_migrate_destination.py
Expand Up @@ -11,7 +11,7 @@
libvirtconnection
except ImportError:
# 3.1 compat
from vdsm import libvirtconnection
from vdsm.common import libvirtconnection

'''
Placed in before_vm_migrate_destination
Expand Down
2 changes: 1 addition & 1 deletion vdsm_hooks/vmfex/before_vm_start.py
Expand Up @@ -13,7 +13,7 @@
libvirtconnection
except ImportError:
# 3.1 compat
from vdsm import libvirtconnection
from vdsm.common import libvirtconnection

'''
Placed in before_vm_start
Expand Down
2 changes: 1 addition & 1 deletion vdsm_hooks/vmfex_dev/vmfex_vnic.py
Expand Up @@ -32,7 +32,7 @@
import sys
import traceback

from vdsm import libvirtconnection
from vdsm.common import libvirtconnection
import hooking

VMFEX_NET_POOL = 'direct-pool'
Expand Down

0 comments on commit f64a138

Please sign in to comment.