82
82
def service_get(context, service_id):
83
"""Get an service or raise if it does not exist."""
83
"""Get a service or raise if it does not exist."""
84
84
return IMPL.service_get(context, service_id)
87
def service_get_by_host_and_topic(context, host, topic):
88
"""Get a service by host it's on and topic it listens to"""
89
return IMPL.service_get_by_host_and_topic(context, host, topic)
87
92
def service_get_all(context, disabled=False):
88
93
"""Get all services."""
89
94
return IMPL.service_get_all(context, disabled)
255
260
####################
262
def migration_update(context, id, values):
263
"""Update a migration instance"""
264
return IMPL.migration_update(context, id, values)
267
def migration_create(context, values):
268
"""Create a migration record"""
269
return IMPL.migration_create(context, values)
272
def migration_get(context, migration_id):
273
"""Finds a migration by the id"""
274
return IMPL.migration_get(context, migration_id)
277
def migration_get_by_instance_and_status(context, instance_id, status):
278
"""Finds a migration by the instance id its migrating"""
279
return IMPL.migration_get_by_instance_and_status(context, instance_id,
258
285
def fixed_ip_associate(context, address, instance_id):
259
286
"""Associate fixed ip to instance.
633
def auth_destroy_token(context, token):
660
def auth_token_destroy(context, token_id):
634
661
"""Destroy an auth token."""
635
return IMPL.auth_destroy_token(context, token)
638
def auth_get_token(context, token_hash):
662
return IMPL.auth_token_destroy(context, token_id)
665
def auth_token_get(context, token_hash):
639
666
"""Retrieves a token given the hash representing it."""
640
return IMPL.auth_get_token(context, token_hash)
643
def auth_create_token(context, token):
667
return IMPL.auth_token_get(context, token_hash)
670
def auth_token_update(context, token_hash, values):
671
"""Updates a token given the hash representing it."""
672
return IMPL.auth_token_update(context, token_hash, values)
675
def auth_token_create(context, token):
644
676
"""Creates a new token."""
645
return IMPL.auth_create_token(context, token)
677
return IMPL.auth_token_create(context, token)
648
680
###################
1002
1034
return IMPL.console_get(context, console_id, instance_id)
1040
def instance_type_create(context, values):
1041
"""Create a new instance type"""
1042
return IMPL.instance_type_create(context, values)
1045
def instance_type_get_all(context, inactive=0):
1046
"""Get all instance types"""
1047
return IMPL.instance_type_get_all(context, inactive)
1050
def instance_type_get_by_name(context, name):
1051
"""Get instance type by name"""
1052
return IMPL.instance_type_get_by_name(context, name)
1055
def instance_type_get_by_flavor_id(context, id):
1056
"""Get instance type by name"""
1057
return IMPL.instance_type_get_by_flavor_id(context, id)
1060
def instance_type_destroy(context, name):
1061
"""Delete a instance type"""
1062
return IMPL.instance_type_destroy(context, name)
1065
def instance_type_purge(context, name):
1066
"""Purges (removes) an instance type from DB
1067
Use instance_type_destroy for most cases
1069
return IMPL.instance_type_purge(context, name)
1005
1072
####################