Exemplo n.º 1
0
 def __init__(self):
     self._vmutils = utilsfactory.get_vmutils()
     self._vhdutils = utilsfactory.get_vhdutils()
     self._pathutils = pathutils.PathUtils()
     self._volumeops = volumeops.VolumeOps()
     self._vmops = vmops.VMOps()
     self._imagecache = imagecache.ImageCache()
     self._block_dev_man = block_device_manager.BlockDeviceInfoManager()
     self._migrationutils = utilsfactory.get_migrationutils()
     self._metricsutils = utilsfactory.get_metricsutils()
Exemplo n.º 2
0
 def __init__(self):
     self._vmutils = utilsfactory.get_vmutils()
     self._metricsutils = utilsfactory.get_metricsutils()
     self._vhdutils = utilsfactory.get_vhdutils()
     self._hostutils = utilsfactory.get_hostutils()
     self._pathutils = pathutils.PathUtils()
     self._volumeops = volumeops.VolumeOps()
     self._imagecache = imagecache.ImageCache()
     self._vif_driver = None
     self._load_vif_driver_class()
     self._vm_log_writers = {}
Exemplo n.º 3
0
 def __init__(self):
     self._vmutils = utilsfactory.get_vmutils()
     self._metricsutils = utilsfactory.get_metricsutils()
     self._vhdutils = utilsfactory.get_vhdutils()
     self._hostutils = utilsfactory.get_hostutils()
     self._pathutils = pathutils.PathUtils()
     self._volumeops = volumeops.VolumeOps()
     self._imagecache = imagecache.ImageCache()
     self._serial_console_ops = serialconsoleops.SerialConsoleOps()
     self._vif_driver = None
     self._load_vif_driver_class()
Exemplo n.º 4
0
 def __init__(self):
     self._vmutils = utilsfactory.get_vmutils()
     self._metricsutils = utilsfactory.get_metricsutils()
     self._vhdutils = utilsfactory.get_vhdutils()
     self._hostutils = utilsfactory.get_hostutils()
     self._pathutils = pathutils.PathUtils()
     self._volumeops = volumeops.VolumeOps()
     self._imagecache = imagecache.ImageCache()
     self._serial_console_ops = serialconsoleops.SerialConsoleOps()
     self._vif_driver = None
     self._load_vif_driver_class()
    def __init__(self, conf=None):
        """Initializes local configuration of the Hyper-V Neutron Agent.

        :param conf: dict or dict-like object containing the configuration
                     details used by this Agent. If None is specified, default
                     values are used instead. conf format is as follows:
        {
            'host': string,
            'AGENT': {'polling_interval': int,
                       'local_network_vswitch': string,
                       'physical_network_vswitch_mappings': array,
                       'enable_metrics_collection': boolean,
                       'metrics_max_retries': int},
            'SECURITYGROUP': {'enable_security_group': boolean}
        }

        For more information on the arguments, their meaning and their default
        values, visit: http://docs.openstack.org/juno/config-reference/content/
networking-plugin-hyperv_agent.html
        """

        super(HyperVNeutronAgentMixin, self).__init__()
        self._metricsutils = utilsfactory.get_metricsutils()
        self._utils = utilsfactory.get_networkutils()
        self._utils.init_caches()
        self._network_vswitch_map = {}
        self._port_metric_retries = {}

        self._nvgre_enabled = False
        self._cache_lock = threading.Lock()

        conf = conf or {}
        agent_conf = conf.get('AGENT', {})
        security_conf = conf.get('SECURITYGROUP', {})

        self._host = conf.get('host', None)

        self._polling_interval = agent_conf.get('polling_interval', 2)
        self._local_network_vswitch = agent_conf.get('local_network_vswitch',
                                                     'private')
        self._worker_count = agent_conf.get('worker_count')
        self._phys_net_map = agent_conf.get(
            'physical_network_vswitch_mappings', [])
        self.enable_metrics_collection = agent_conf.get(
            'enable_metrics_collection', False)
        self._metrics_max_retries = agent_conf.get('metrics_max_retries', 100)

        self.enable_security_groups = security_conf.get(
            'enable_security_group', False)

        tpool.set_num_threads(self._worker_count)

        self._load_physical_network_mappings(self._phys_net_map)
        self._init_nvgre()
Exemplo n.º 6
0
 def __init__(self, virtapi=None):
     self._virtapi = virtapi
     self._vmutils = utilsfactory.get_vmutils()
     self._metricsutils = utilsfactory.get_metricsutils()
     self._vhdutils = utilsfactory.get_vhdutils()
     self._hostutils = utilsfactory.get_hostutils()
     self._pathutils = pathutils.PathUtils()
     self._volumeops = volumeops.VolumeOps()
     self._imagecache = imagecache.ImageCache()
     self._serial_console_ops = serialconsoleops.SerialConsoleOps()
     self._block_dev_man = (block_device_manager.BlockDeviceInfoManager())
     self._vif_driver = vif_utils.HyperVVIFDriver()
Exemplo n.º 7
0
    def __init__(self, conf=None):
        """Initializes local configuration of the Hyper-V Neutron Agent.

        :param conf: dict or dict-like object containing the configuration
                     details used by this Agent. If None is specified, default
                     values are used instead. conf format is as follows:
        {
            'host': string,
            'AGENT': {'polling_interval': int,
                       'local_network_vswitch': string,
                       'physical_network_vswitch_mappings': array,
                       'enable_metrics_collection': boolean,
                       'metrics_max_retries': int},
            'SECURITYGROUP': {'enable_security_group': boolean}
        }

        For more information on the arguments, their meaning and their default
        values, visit: http://docs.openstack.org/juno/config-reference/content/
networking-plugin-hyperv_agent.html
        """

        super(HyperVNeutronAgentMixin, self).__init__()
        self._metricsutils = utilsfactory.get_metricsutils()
        self._utils = utilsfactory.get_networkutils()
        self._utils.init_caches()
        self._network_vswitch_map = {}
        self._port_metric_retries = {}

        self._nvgre_enabled = False
        self._cache_lock = threading.Lock()

        conf = conf or {}
        agent_conf = conf.get('AGENT', {})
        security_conf = conf.get('SECURITYGROUP', {})

        self._host = conf.get('host', None)

        self._polling_interval = agent_conf.get('polling_interval', 2)
        self._local_network_vswitch = agent_conf.get('local_network_vswitch',
                                                     'private')
        self._worker_count = agent_conf.get('worker_count')
        self._phys_net_map = agent_conf.get(
            'physical_network_vswitch_mappings', [])
        self.enable_metrics_collection = agent_conf.get(
            'enable_metrics_collection', False)
        self._metrics_max_retries = agent_conf.get('metrics_max_retries', 100)

        self.enable_security_groups = security_conf.get(
            'enable_security_group', False)

        tpool.set_num_threads(self._worker_count)

        self._load_physical_network_mappings(self._phys_net_map)
Exemplo n.º 8
0
 def __init__(self, virtapi=None):
     self._virtapi = virtapi
     self._vmutils = utilsfactory.get_vmutils()
     self._metricsutils = utilsfactory.get_metricsutils()
     self._vhdutils = utilsfactory.get_vhdutils()
     self._hostutils = utilsfactory.get_hostutils()
     self._pathutils = pathutils.PathUtils()
     self._serial_console_ops = serialconsoleops.SerialConsoleOps()
     self._volumeops = volumeops.VolumeOps()
     self._imagecache = imagecache.ImageCache()
     self._vif_driver_cache = {}
     self._block_device_manager = (
         block_device_manager.BlockDeviceInfoManager())
Exemplo n.º 9
0
    def __init__(self):
        super(HyperVNeutronAgent, self).__init__()
        self._agent_id = 'hyperv_%s' % platform.node()

        self._qos_ext = None
        self._nvgre_enabled = False

        self._metricsutils = utilsfactory.get_metricsutils()
        self._port_metric_retries = {}

        agent_conf = CONF.get('AGENT', {})
        security_conf = CONF.get('SECURITYGROUP', {})
        self._enable_metrics_collection = agent_conf.get(
            'enable_metrics_collection', False)
        self._metrics_max_retries = agent_conf.get('metrics_max_retries', 100)
        self._enable_security_groups = security_conf.get(
            'enable_security_group', False)

        self._init_nvgre()
Exemplo n.º 10
0
 def __init__(self, conf):
     super(HyperVInspector, self).__init__(conf)
     self._utils = utilsfactory.get_metricsutils()
     self._host_max_cpu_clock = self._compute_host_max_cpu_clock()
Exemplo n.º 11
0
 def __init__(self, conf):
     super(HyperVInspector, self).__init__(conf)
     self._utils = utilsfactory.get_metricsutils()
     self._host_max_cpu_clock = self._compute_host_max_cpu_clock()