Skip to content

Commit

Permalink
scheduler: refactor network predicate (#7553)
Browse files Browse the repository at this point in the history
  • Loading branch information
zexi committed Aug 13, 2020
1 parent 95130f8 commit 7a08a60
Show file tree
Hide file tree
Showing 5 changed files with 134 additions and 300 deletions.
5 changes: 5 additions & 0 deletions pkg/compute/models/networks.go
Expand Up @@ -2076,6 +2076,11 @@ func (self *SNetwork) ValidateUpdateCondition(ctx context.Context) error {
return self.SSharableVirtualResourceBase.ValidateUpdateCondition(ctx)
}

func (self *SNetwork) PostUpdate(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) {
self.SSharableVirtualResourceBase.PostUpdate(ctx, userCred, query, data)
self.ClearSchedDescCache()
}

func (self *SNetwork) AllowPerformPurge(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool {
return db.IsAdminAllowPerform(userCred, self, "purge")
}
Expand Down

0 comments on commit 7a08a60

Please sign in to comment.