Exemple #1
0
        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)
                       ));
        }
Exemple #2
0
        public async Task <ActionResult <Vm> > Initialize(int id)
        {
            VmTemplate template = await _templateService.GetDeployableTemplate(id, null);

            return(Ok(await _pod.CreateDisks(template)));
        }