'Add volume type resource options.
Adds elements to the opts hash for volume type quotas.
If a resource is being reserved (\'gigabytes\', etc) and the volume
type is set up for its own quotas, these reservations are copied
into keys for \'gigabytes_<volume type name>\', etc.
:param context: The request context, for access checks.
:param opts: The reservations options hash.
:param volume_type_id: The volume type id for this reservation.'

def add_volume_type_opts(self, context, opts, volume_type_id):

    if (not volume_type_id):
        return
    volume_type = db.volume_type_get(context, volume_type_id, True)
    for quota in ('volumes', 'gigabytes', 'snapshots'):
        if (quota in opts):
            vtype_quota = ('%s_%s' % (quota, volume_type['name']))
            opts[vtype_quota] = opts[quota]
