mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-10-29 17:58:36 +08:00
feat(apigateway): add rpc methods of scheduler for apigateway (#21380)
This commit is contained in:
@@ -21,6 +21,7 @@ import (
|
||||
"yunion.io/x/jsonutils"
|
||||
|
||||
api "yunion.io/x/onecloud/pkg/apis/scheduler"
|
||||
"yunion.io/x/onecloud/pkg/httperrors"
|
||||
"yunion.io/x/onecloud/pkg/mcclient"
|
||||
"yunion.io/x/onecloud/pkg/mcclient/auth"
|
||||
"yunion.io/x/onecloud/pkg/mcclient/modulebase"
|
||||
@@ -118,6 +119,18 @@ func (this *SchedulerManager) DoForecast(s *mcclient.ClientSession, params jsonu
|
||||
return obj, err
|
||||
}
|
||||
|
||||
func (this *SchedulerManager) DoHistoryList(s *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error) {
|
||||
return this.HistoryList(s, params)
|
||||
}
|
||||
|
||||
func (this *SchedulerManager) DoHistoryShow(s *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error) {
|
||||
sessionId, err := params.GetString("session_id")
|
||||
if err != nil {
|
||||
return nil, httperrors.NewNotFoundError("session_id")
|
||||
}
|
||||
return this.HistoryShow(s, sessionId, params)
|
||||
}
|
||||
|
||||
func (this *SchedulerManager) Cleanup(s *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error) {
|
||||
url := newSchedURL("cleanup")
|
||||
return modulebase.Post(this.ResourceManager, s, url, params, "")
|
||||
|
||||
Reference in New Issue
Block a user