'Initializes a ReservableResource.
Reservable resources are those resources which directly
correspond to objects in the database, i.e., instances,
cores, etc.
Usage synchronization function must be associated with each
object. This function will be called to determine the current
counts of one or more resources. This association is done in
database backend.
The usage synchronization function will be passed three
arguments: an admin context, the project ID, and an opaque
session object, which should in turn be passed to the
underlying database function.  Synchronization functions
should return a dictionary mapping resource names to the
current in_use count for those resources; more than one
resource and resource count may be returned.  Note that
synchronization functions may be associated with more than one
ReservableResource.
:param name: The name of the resource, i.e., "volumes".
:param sync: A dbapi methods name which returns a dictionary
to resynchronize the in_use count for one or more
resources, as described above.
:param flag: The name of the flag or configuration option
which specifies the default value of the quota
for this resource.'

def __init__(self, name, sync, flag=None):

    super(ReservableResource, self).__init__(name, flag=flag)
    self.sync = sync
