| Current Path : /proc/thread-self/root/snap/lxd/39313/share/lxd-ui/assets/ |
| Current File : //proc/thread-self/root/snap/lxd/39313/share/lxd-ui/assets/network-acls-DPo6Eh5Y.js |
import{R as r,az as o,co as p,cp as c,cq as m}from"./index-BFGypnt-.js";const h=["can_edit","can_delete"],d=async(n,a)=>{const e=new URLSearchParams;return e.set("project",n),e.set("recursion","1"),c(e,a,h),fetch(`${r}/1.0/network-acls?${e.toString()}`).then(o).then(t=>t.metadata)},l=async(n,a,e)=>{const t=new URLSearchParams;return t.set("project",a),t.set("recursion","1"),c(t,e,h),fetch(`${r}/1.0/network-acls/${encodeURIComponent(n)}?${t.toString()}`).then(m).then(s=>s)},w=async(n,a)=>{const e=new URLSearchParams;return e.set("project",a),fetch(`${r}/1.0/network-acls/${encodeURIComponent(n)}/log?${e.toString()}`).then(p).then(t=>t)},S=async(n,a)=>{const e=new URLSearchParams;return e.set("project",a),fetch(`${r}/1.0/network-acls?${e.toString()}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then(o).then(t=>t)},$=async(n,a,e)=>{const t=new URLSearchParams;return t.set("project",e),await fetch(`${r}/1.0/network-acls/${encodeURIComponent(n)}?${t.toString()}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:a})}).then(o).then(s=>s)},u=async(n,a)=>{const e=new URLSearchParams;return e.set("project",a),await fetch(`${r}/1.0/network-acls/${encodeURIComponent(n.name)}?${e.toString()}`,{method:"PUT",body:JSON.stringify(n),headers:{"Content-Type":"application/json","If-Match":n.etag??""}}).then(o).then(t=>t)},R=async(n,a)=>{const e=new URLSearchParams;return e.set("project",a),await fetch(`${r}/1.0/network-acls/${encodeURIComponent(n)}?${e.toString()}`,{method:"DELETE"}).then(o).then(t=>t)};export{d as a,l as b,S as c,R as d,w as f,$ as r,u};