@require_context
@pick_context_manager_writer
def ec2_instance_create(context, instance_uuid, id=None):
 ec2_instance_ref = models.InstanceIdMapping()
 ec2_instance_ref.update({'uuid': instance_uuid})
 if (id is not None):
  ec2_instance_ref.update({'id': id})
 ec2_instance_ref.save(context.session)
 return ec2_instance_ref

@ require_context @ pick_context_manager_writer def ec2_instance_create ( context , instance_uuid , id = None ) : ec2_instance_ref = models . InstanceIdMapping ( ) ec2_instance_ref . update ( { 'uuid' : instance_uuid } ) if ( id is not None ) : ec2_instance_ref . update ( { 'id' : id } ) ec2_instance_ref . save ( context . session ) return ec2_instance_ref
create ec2 compatible instance by provided uuid .