Ejemplo n.º 1
0
    def __init__(self):
        self._clustutils = utilsfactory.get_clusterutils()
        self._vmutils = utilsfactory.get_vmutils()
        self._clustutils.check_cluster_state()
        self._instance_map = {}

        self._this_node = hostops.HostOps.get_hostname()

        self._context = context.get_admin_context()
        self._network_api = network.API()
        self._vmops = vmops.VMOps()
        self._serial_console_ops = serialconsoleops.SerialConsoleOps()
Ejemplo n.º 2
0
    def __init__(self):
        self._clustutils = utilsfactory.get_clusterutils()
        self._vmutils = utilsfactory.get_vmutils()
        self._clustutils.check_cluster_state()
        self._instance_map = {}

        self._daemon = None
        self._this_node = self._clustutils.get_node_name()

        self._context = context.get_admin_context()
        self._network_api = network.API()
        self._vmops = vmops.VMOps()
        self._serial_console_ops = serialconsoleops.SerialConsoleOps()
Ejemplo n.º 3
0
 def __init__(self):
     super(ClusterLiveMigrationOps, self).__init__()
     self._clustutils = utilsfactory.get_clusterutils()
 def __init__(self):
     super(ClusterLiveMigrationOps, self).__init__()
     self._clustutils = utilsfactory.get_clusterutils()
Ejemplo n.º 5
0
import collections
import json

import openstack
from openstack import exceptions
from os_win import utilsfactory
from oslo_utils import uuidutils

# Let's pick a microversion for which the host ids will show up properly.
DEFAULT_COMPUTE_MICROVERSION = '2.55'

# openstack.enable_logging(debug=False)

try:
    clusterutils = utilsfactory.get_clusterutils()
except Exception as ex:
    # This node may not be part of a cluster. Make sure you run this
    # within the targeted cluster.
    clusterutils = None


def pretty_dict(dict_obj):
    return json.dumps(dict_obj, indent=4)


def get_hypervisor_vms(host='.'):
    nova_vms = []
    other_vms = []

    try:
        vmutils = utilsfactory.get_vmutils(host=host)