|
@@ -23,6 +23,7 @@ func CreateDefaultAclNetworkPolicies(netID models.NetworkID) {
|
|
if netID.String() == "" {
|
|
if netID.String() == "" {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ _, _ = ListAcls(netID)
|
|
if !IsAclExists(fmt.Sprintf("%s.%s", netID, "all-nodes")) {
|
|
if !IsAclExists(fmt.Sprintf("%s.%s", netID, "all-nodes")) {
|
|
defaultDeviceAcl := models.Acl{
|
|
defaultDeviceAcl := models.Acl{
|
|
ID: fmt.Sprintf("%s.%s", netID, "all-nodes"),
|
|
ID: fmt.Sprintf("%s.%s", netID, "all-nodes"),
|
|
@@ -172,9 +173,6 @@ func InsertAcl(a models.Acl) error {
|
|
func GetAcl(aID string) (models.Acl, error) {
|
|
func GetAcl(aID string) (models.Acl, error) {
|
|
a := models.Acl{}
|
|
a := models.Acl{}
|
|
if servercfg.CacheEnabled() {
|
|
if servercfg.CacheEnabled() {
|
|
- if len(aclCacheMap) == 0 {
|
|
|
|
- _ = listAcls()
|
|
|
|
- }
|
|
|
|
var ok bool
|
|
var ok bool
|
|
a, ok = getAclFromCache(aID)
|
|
a, ok = getAclFromCache(aID)
|
|
if ok {
|
|
if ok {
|