@require_context
@pick_context_manager_writer
def ec2_volume_create(context, volume_uuid, id=None):
 ec2_volume_ref = models.VolumeIdMapping()
 ec2_volume_ref.update({'uuid': volume_uuid})
 if (id is not None):
  ec2_volume_ref.update({'id': id})
 ec2_volume_ref.save(context.session)
 return ec2_volume_ref

@ require_context @ pick_context_manager_writer def ec2_volume_create ( context , volume_uuid , id = None ) : ec2_volume_ref = models . VolumeIdMapping ( ) ec2_volume_ref . update ( { 'uuid' : volume_uuid } ) if ( id is not None ) : ec2_volume_ref . update ( { 'id' : id } ) ec2_volume_ref . save ( context . session ) return ec2_volume_ref
create ec2 compatible volume by provided uuid .