add ACL management

This commit is contained in:
Anish Mukherjee
2022-11-21 19:19:57 +05:30
parent c1f652487c
commit b5c9fe4e40
7 changed files with 111 additions and 3 deletions

16
cli/functions/acl.go Normal file
View File

@@ -0,0 +1,16 @@
package functions
import (
"fmt"
"net/http"
"github.com/gravitl/netmaker/logic/acls"
)
func GetACL(networkName string) *acls.ACLContainer {
return request[acls.ACLContainer](http.MethodGet, fmt.Sprintf("/api/networks/%s/acls", networkName), nil)
}
func UpdateACL(networkName string, payload *acls.ACLContainer) *acls.ACLContainer {
return request[acls.ACLContainer](http.MethodPut, fmt.Sprintf("/api/networks/%s/acls", networkName), payload)
}