public async Task <ActionResult <Vm> > InitializeVmTemplate(string id) { VmTemplate template = await _templateService.GetDeployableTemplate(id, null); string name = $"{template.Name}#{template.IsolationTag}"; AuthorizeAny( () => Actor.IsAdmin, () => CanManageVm(name, Actor.Id).Result ); return(Ok( await _pod.CreateDisks(template) )); }
public async Task <ActionResult <Vm> > Initialize(int id) { VmTemplate template = await _templateService.GetDeployableTemplate(id, null); return(Ok(await _pod.CreateDisks(template))); }