~sandy-walsh/nova/zones

« back to all changes in this revision

Viewing changes to nova/db/api.py

  • Committer: Sandy Walsh
  • Date: 2011-02-17 21:39:03 UTC
  • mfrom: (635.1.60 nova)
  • Revision ID: sandy.walsh@rackspace.com-20110217213903-swehe88wea8inxow
changed from 003-004 migration

Show diffs side-by-side

added added

removed removed

Lines of Context:
288
288
    return IMPL.fixed_ip_disassociate_all_by_timeout(context, host, time)
289
289
 
290
290
 
 
291
def fixed_ip_get_all(context):
 
292
    """Get all defined fixed ips."""
 
293
    return IMPL.fixed_ip_get_all(context)
 
294
 
 
295
 
291
296
def fixed_ip_get_by_address(context, address):
292
297
    """Get a fixed ip by address or raise if it does not exist."""
293
298
    return IMPL.fixed_ip_get_by_address(context, address)
294
299
 
295
300
 
 
301
def fixed_ip_get_all_by_instance(context, instance_id):
 
302
    """Get fixed ips by instance or raise if none exist."""
 
303
    return IMPL.fixed_ip_get_all_by_instance(context, instance_id)
 
304
 
 
305
 
296
306
def fixed_ip_get_instance(context, address):
297
307
    """Get an instance for a fixed ip by address."""
298
308
    return IMPL.fixed_ip_get_instance(context, address)
500
510
    return IMPL.network_get(context, network_id)
501
511
 
502
512
 
 
513
def network_get_all(context):
 
514
    """Return all defined networks."""
 
515
    return IMPL.network_get_all(context)
 
516
 
 
517
 
503
518
# pylint: disable-msg=C0103
504
519
def network_get_associated_fixed_ips(context, network_id):
505
520
    """Get all network's ips that have been associated."""
516
531
    return IMPL.network_get_by_instance(context, instance_id)
517
532
 
518
533
 
 
534
def network_get_all_by_instance(context, instance_id):
 
535
    """Get all networks by instance id or raise if none exist."""
 
536
    return IMPL.network_get_all_by_instance(context, instance_id)
 
537
 
 
538
 
519
539
def network_get_index(context, network_id):
520
540
    """Get non-conflicting index for network."""
521
541
    return IMPL.network_get_index(context, network_id)