The watcher.decision_engine.model.model_root Module

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

Bases: watcher.decision_engine.model.base.Model

add_instance(instance)[source]
add_node(node)[source]
assert_instance(obj)[source]
assert_node(obj)[source]
create_resource(r)[source]
delete_instance(instance, node=None)[source]
classmethod from_xml(data)[source]
get_all_compute_nodes()[source]
get_all_instances()[source]
get_instance_by_uuid(uuid)[source]
get_mapping()[source]
get_node_by_instance_uuid(instance_uuid)[source]

Getting host information from the guest instance

Parameters:instance_uuid – the uuid of the instance
Returns:node
get_node_by_uuid(node_uuid)[source]
get_node_instances(node)[source]
get_resource_by_uuid(resource_id)[source]
map_instance(instance, node)[source]

Map a newly created instance to a node

Parameters:
migrate_instance(instance, source_node, destination_node)[source]

Migrate single instance from source_node to destination_node

Parameters:
  • instance
  • source_node
  • destination_node
Returns:

remove_instance(instance)[source]
remove_node(node)[source]
to_string()[source]
unmap_instance(instance, node)[source]

Unmap an instance from a node

Parameters: