The watcher.decision_engine.model.model_root Module

Openstack implementation of the cluster graph.

class watcher.decision_engine.model.model_root.ModelRoot(stale=False)[source]

Bases: networkx.classes.digraph.DiGraph, watcher.decision_engine.model.base.Model

Cluster graph for an Openstack cluster.

add_instance(*args, **kwargs)[source]
add_node(*args, **kwargs)[source]
static assert_instance(obj)[source]
static assert_node(obj)[source]
delete_instance(instance, node=None)[source]
classmethod from_xml(data)[source]
get_all_compute_nodes(*args, **kwargs)[source]
get_all_instances(*args, **kwargs)[source]
get_instance_by_uuid(*args, **kwargs)[source]
get_node_by_instance_uuid(*args, **kwargs)[source]
get_node_by_uuid(*args, **kwargs)[source]
get_node_instances(*args, **kwargs)[source]
map_instance(*args, **kwargs)[source]

Map a newly created instance to a node

Parameters:
migrate_instance(*args, **kwargs)[source]

Migrate single instance from source_node to destination_node

Parameters:
  • instance
  • source_node
  • destination_node
Returns:

remove_instance(*args, **kwargs)[source]
remove_node(*args, **kwargs)[source]
to_string()[source]
to_xml()[source]
unmap_instance(*args, **kwargs)[source]