region: fix host enable not clean sched cache

This commit is contained in:
Zexi Li
2018-12-04 18:52:17 +08:00
parent 3f3f1701c2
commit 5dceb2685c
2 changed files with 38 additions and 11 deletions
@@ -5,7 +5,9 @@ import (
"yunion.io/x/jsonutils"
"yunion.io/x/log"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/util/logclient"
)
type SEnabledStatusStandaloneResourceBase struct {
@@ -37,6 +39,7 @@ func (self *SEnabledStatusStandaloneResourceBase) PerformEnable(ctx context.Cont
return nil, err
}
OpsLog.LogEvent(self, ACT_ENABLE, "", userCred)
logclient.AddActionLog(self, logclient.ACT_ENABLE, nil, userCred, true)
}
return nil, nil
}
@@ -56,6 +59,7 @@ func (self *SEnabledStatusStandaloneResourceBase) PerformDisable(ctx context.Con
return nil, err
}
OpsLog.LogEvent(self, ACT_DISABLE, "", userCred)
logclient.AddActionLog(self, logclient.ACT_DISABLE, nil, userCred, true)
}
return nil, nil
}