~ubuntu-branches/ubuntu/quantal/nova/quantal-proposed

« back to all changes in this revision

Viewing changes to nova/db/api.py

  • Committer: Package Import Robot
  • Author(s): Adam Gandelman, Adam Gandelman, Chuck Short
  • Date: 2012-08-27 15:37:18 UTC
  • mfrom: (1.1.60)
  • Revision ID: package-import@ubuntu.com-20120827153718-lj8er44eqqz1gsrj
Tags: 2012.2~rc1~20120827.15815-0ubuntu1
[ Adam Gandelman ]
* New upstream release.

[ Chuck Short ]
* debian/patches/0001-Update-tools-hacking-for-pep8-1.2-and-
  beyond.patch: Dropped we dont run pep8 tests anymore.
* debian/control: Drop pep8 build depends
* debian/*.upstart.in: Make sure we transition correctly from runlevel
  1 to 2. (LP: #820694)

Show diffs side-by-side

added added

removed removed

Lines of Context:
208
208
    return IMPL.compute_node_create(context, values)
209
209
 
210
210
 
211
 
def compute_node_update(context, compute_id, values, auto_adjust=True):
 
211
def compute_node_update(context, compute_id, values, prune_stats=False):
212
212
    """Set the given properties on a computeNode and update it.
213
213
 
214
214
    Raises NotFound if computeNode does not exist.
215
215
    """
216
 
    return IMPL.compute_node_update(context, compute_id, values, auto_adjust)
 
216
    return IMPL.compute_node_update(context, compute_id, values, prune_stats)
217
217
 
218
218
 
219
219
def compute_node_get_by_host(context, host):
220
220
    return IMPL.compute_node_get_by_host(context, host)
221
221
 
222
222
 
223
 
def compute_node_utilization_update(context, host, free_ram_mb_delta=0,
224
 
                          free_disk_gb_delta=0, work_delta=0, vm_delta=0):
225
 
    return IMPL.compute_node_utilization_update(context, host,
226
 
                          free_ram_mb_delta, free_disk_gb_delta, work_delta,
227
 
                          vm_delta)
228
 
 
229
 
 
230
 
def compute_node_utilization_set(context, host, free_ram_mb=None,
231
 
                                 free_disk_gb=None, work=None, vms=None):
232
 
    return IMPL.compute_node_utilization_set(context, host, free_ram_mb,
233
 
                                             free_disk_gb, work, vms)
234
 
 
235
 
 
236
223
def compute_node_statistics(context):
237
224
    return IMPL.compute_node_statistics(context)
238
225
 
700
687
                                            security_group_id)
701
688
 
702
689
 
703
 
def instance_get_id_to_uuid_mapping(context, ids):
704
 
    """Return a dictionary containing 'ID: UUID' given the ids"""
705
 
    return IMPL.instance_get_id_to_uuid_mapping(context, ids)
706
 
 
707
 
 
708
690
###################
709
691
 
710
692
 
999
981
    return IMPL.quota_usage_get_all_by_project(context, project_id)
1000
982
 
1001
983
 
1002
 
def quota_usage_update(context, class_name, resource, in_use, reserved,
 
984
def quota_usage_update(context, project_id, resource, in_use, reserved,
1003
985
                       until_refresh):
1004
986
    """Update a quota usage or raise if it does not exist."""
1005
987
    return IMPL.quota_usage_update(context, project_id, resource,
1463
1445
    return IMPL.instance_type_destroy(context, name)
1464
1446
 
1465
1447
 
 
1448
def instance_type_access_get_by_flavor_id(context, flavor_id):
 
1449
    """Get flavor access by flavor id."""
 
1450
    return IMPL.instance_type_access_get_by_flavor_id(context, flavor_id)
 
1451
 
 
1452
 
 
1453
def instance_type_access_add(context, flavor_id, project_id):
 
1454
    """Add flavor access for project."""
 
1455
    return IMPL.instance_type_access_add(context, flavor_id, project_id)
 
1456
 
 
1457
 
 
1458
def instance_type_access_remove(context, flavor_id, project_id):
 
1459
    """Remove flavor access for project."""
 
1460
    return IMPL.instance_type_access_remove(context, flavor_id, project_id)
 
1461
 
 
1462
 
1466
1463
####################
1467
1464
 
1468
1465
 
1478
1475
 
1479
1476
def instance_metadata_update(context, instance_uuid, metadata, delete):
1480
1477
    """Update metadata if it exists, otherwise create it."""
1481
 
    IMPL.instance_metadata_update(context, instance_uuid, metadata, delete)
 
1478
    return IMPL.instance_metadata_update(context, instance_uuid,
 
1479
                                             metadata, delete)
1482
1480
 
1483
1481
 
1484
1482
####################