Documentation ¶
Index ¶
- Constants
- func Delete(manager ResourceManager, session *mcclient.ClientSession, path string, ...) (jsonutils.JSONObject, error)
- func Get(manager ResourceManager, session *mcclient.ClientSession, path string, ...) (jsonutils.JSONObject, error)
- func GetAppOptions(s *mcclient.ClientSession, serviceType string) (jsonutils.JSONObject, error)
- func GetPProfByType(s *mcclient.ClientSession, serviceType string, profileType string, seconds int) (io.Reader, error)
- func GetRegisterdModules() ([]string, []string)
- func GetScopeResources(s *mcclient.ClientSession, serviceType string) (jsonutils.JSONObject, error)
- func GetStats(s *mcclient.ClientSession, path string, serviceType string) (jsonutils.JSONObject, error)
- func GetVersion(s *mcclient.ClientSession, serviceType string) (string, error)
- func Head(manager ResourceManager, session *mcclient.ClientSession, path string, ...) (jsonutils.JSONObject, error)
- func JsonRequest(manager ResourceManager, session *mcclient.ClientSession, ...) (http.Header, jsonutils.JSONObject, error)
- func ListResult2JSON(result *ListResult) jsonutils.JSONObject
- func ListResult2JSONWithKey(result *ListResult, key string) jsonutils.JSONObject
- func Patch(manager ResourceManager, session *mcclient.ClientSession, path string, ...) (jsonutils.JSONObject, error)
- func Post(manager ResourceManager, session *mcclient.ClientSession, path string, ...) (jsonutils.JSONObject, error)
- func Put(manager ResourceManager, session *mcclient.ClientSession, path string, ...) (jsonutils.JSONObject, error)
- func RawRequest(manager ResourceManager, session *mcclient.ClientSession, ...) (*http.Response, error)
- func Register(mod IBaseManager)
- func RegisterJointModule(mod IBaseManager)
- func SubmitResults2JSON(results []SubmitResult) jsonutils.JSONObject
- type BaseManager
- type IBaseManager
- type IResourceManager
- type JointManager
- type JointResourceManager
- func (this *JointResourceManager) Attach(s *mcclient.ClientSession, mid, sid string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (this *JointResourceManager) BatchAttach(s *mcclient.ClientSession, mid string, sids []string, ...) []SubmitResult
- func (this *JointResourceManager) BatchAttach2(s *mcclient.ClientSession, mid string, sids []string, ...) []SubmitResult
- func (this *JointResourceManager) BatchDetach(s *mcclient.ClientSession, mid string, sids []string) []SubmitResult
- func (this *JointResourceManager) BatchDetach2(s *mcclient.ClientSession, mid string, sids []string) []SubmitResult
- func (this *JointResourceManager) BatchPatch(s *mcclient.ClientSession, mid string, sids []string, ...) []SubmitResult
- func (this *JointResourceManager) BatchUpdate(s *mcclient.ClientSession, mid string, sids []string, ...) []SubmitResult
- func (this *JointResourceManager) Detach(s *mcclient.ClientSession, mid, sid string, query jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (this *JointResourceManager) Get(s *mcclient.ClientSession, mid, sid string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (this *JointResourceManager) ListAscendent(s *mcclient.ClientSession, mid string, params jsonutils.JSONObject) (*ListResult, error)
- func (this *JointResourceManager) ListDescendent(s *mcclient.ClientSession, mid string, params jsonutils.JSONObject) (*ListResult, error)
- func (this *JointResourceManager) ListDescendent2(s *mcclient.ClientSession, sid string, params jsonutils.JSONObject) (*ListResult, error)
- func (this *JointResourceManager) MasterManager() Manager
- func (this *JointResourceManager) Patch(s *mcclient.ClientSession, mid, sid string, query jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- func (this *JointResourceManager) SlaveManager() Manager
- func (this *JointResourceManager) Update(s *mcclient.ClientSession, mid, sid string, query jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- type ListResult
- func JSON2ListResult(result jsonutils.JSONObject) *ListResult
- func List(manager ResourceManager, session *mcclient.ClientSession, path, respKey string) (*ListResult, error)
- func ListWorkers(s *mcclient.ClientSession, serviceType string) (*ListResult, error)
- func SubmitResults2ListResult(results []SubmitResult) *ListResult
- type Manager
- type ManagerContext
- type ResourceManager
- func (this *ResourceManager) BatchCreate(session *mcclient.ClientSession, params jsonutils.JSONObject, count int) []SubmitResult
- func (this *ResourceManager) BatchCreateInContext(session *mcclient.ClientSession, params jsonutils.JSONObject, count int, ...) []SubmitResult
- func (this *ResourceManager) BatchCreateInContexts(session *mcclient.ClientSession, params jsonutils.JSONObject, count int, ...) []SubmitResult
- func (this *ResourceManager) BatchDelete(session *mcclient.ClientSession, idlist []string, body jsonutils.JSONObject) []SubmitResult
- func (this *ResourceManager) BatchDeleteInContext(session *mcclient.ClientSession, idlist []string, body jsonutils.JSONObject, ...) []SubmitResult
- func (this *ResourceManager) BatchDeleteInContextWithParam(session *mcclient.ClientSession, idlist []string, ...) []SubmitResult
- func (this *ResourceManager) BatchDeleteInContexts(session *mcclient.ClientSession, idlist []string, body jsonutils.JSONObject, ...) []SubmitResult
- func (this *ResourceManager) BatchDeleteInContextsWithParam(session *mcclient.ClientSession, idlist []string, ...) []SubmitResult
- func (this *ResourceManager) BatchDeleteWithParam(session *mcclient.ClientSession, idlist []string, ...) []SubmitResult
- func (this *ResourceManager) BatchGet(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject) []SubmitResult
- func (this *ResourceManager) BatchGetInContext(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject, ...) []SubmitResult
- func (this *ResourceManager) BatchGetInContexts(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject, ...) []SubmitResult
- func (this *ResourceManager) BatchParamsPutInContexts(session *mcclient.ClientSession, idlist []string, ...) []SubmitResult
- func (this *ResourceManager) BatchParamsUpdate(session *mcclient.ClientSession, idlist []string, ...) []SubmitResult
- func (this *ResourceManager) BatchPatch(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject) []SubmitResult
- func (this *ResourceManager) BatchPatchInContext(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject, ...) []SubmitResult
- func (this *ResourceManager) BatchPatchInContexts(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject, ...) []SubmitResult
- func (this *ResourceManager) BatchPerformAction(session *mcclient.ClientSession, idlist []string, action string, ...) []SubmitResult
- func (this *ResourceManager) BatchPerformActionInContext(session *mcclient.ClientSession, idlist []string, action string, ...) []SubmitResult
- func (this *ResourceManager) BatchPerformActionInContexts(session *mcclient.ClientSession, idlist []string, action string, ...) []SubmitResult
- func (this *ResourceManager) BatchPerformClassAction(session *mcclient.ClientSession, action string, ...) []SubmitResult
- func (this *ResourceManager) BatchPerformClassActionInContexts(session *mcclient.ClientSession, action string, ...) []SubmitResult
- func (this *ResourceManager) BatchPut(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject) []SubmitResult
- func (this *ResourceManager) BatchPutInContext(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject, ...) []SubmitResult
- func (this *ResourceManager) BatchPutInContexts(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject, ...) []SubmitResult
- func (this *ResourceManager) BatchUpdate(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject) []SubmitResult
- func (this *ResourceManager) ContextPath(ctxs []ManagerContext) string
- func (this *ResourceManager) Create(session *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (this *ResourceManager) CreateInContext(session *mcclient.ClientSession, params jsonutils.JSONObject, ctx Manager, ...) (jsonutils.JSONObject, error)
- func (this *ResourceManager) CreateInContexts(session *mcclient.ClientSession, params jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- func (this *ResourceManager) Delete(session *mcclient.ClientSession, id string, body jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (this *ResourceManager) DeleteInContext(session *mcclient.ClientSession, id string, body jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- func (this *ResourceManager) DeleteInContextWithParam(session *mcclient.ClientSession, id string, query jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- func (this *ResourceManager) DeleteInContexts(session *mcclient.ClientSession, id string, body jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- func (this *ResourceManager) DeleteInContextsWithParam(session *mcclient.ClientSession, id string, params, body jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- func (this *ResourceManager) DeleteWithParam(session *mcclient.ClientSession, id string, params, body jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (this ResourceManager) EndpointType() string
- func (this *ResourceManager) Get(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (this *ResourceManager) GetById(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (this *ResourceManager) GetByIdInContext(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- func (this *ResourceManager) GetByIdInContexts(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- func (this *ResourceManager) GetByName(session *mcclient.ClientSession, name string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (this *ResourceManager) GetByNameInContext(session *mcclient.ClientSession, name string, params jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- func (this *ResourceManager) GetByNameInContexts(session *mcclient.ClientSession, name string, params jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- func (this *ResourceManager) GetId(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (string, error)
- func (this *ResourceManager) GetIdInContext(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ...) (string, error)
- func (this *ResourceManager) GetIdInContexts(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ...) (string, error)
- func (this *ResourceManager) GetInContext(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- func (this *ResourceManager) GetInContexts(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- func (this ResourceManager) GetKeyword() string
- func (this *ResourceManager) GetMetadata(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (this *ResourceManager) GetSpecific(session *mcclient.ClientSession, id string, spec string, ...) (jsonutils.JSONObject, error)
- func (this *ResourceManager) GetSpecificInContext(session *mcclient.ClientSession, id string, spec string, ...) (jsonutils.JSONObject, error)
- func (this *ResourceManager) GetSpecificInContexts(session *mcclient.ClientSession, id string, spec string, ...) (jsonutils.JSONObject, error)
- func (this *ResourceManager) Head(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (this *ResourceManager) HeadInContext(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- func (this *ResourceManager) HeadInContexts(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- func (this ResourceManager) KeyString() string
- func (this *ResourceManager) List(session *mcclient.ClientSession, params jsonutils.JSONObject) (*ListResult, error)
- func (this *ResourceManager) ListInContext(session *mcclient.ClientSession, params jsonutils.JSONObject, ctx Manager, ...) (*ListResult, error)
- func (this *ResourceManager) ListInContexts(session *mcclient.ClientSession, params jsonutils.JSONObject, ...) (*ListResult, error)
- func (this *ResourceManager) Patch(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (this *ResourceManager) PatchInContext(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- func (this *ResourceManager) PatchInContexts(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- func (this *ResourceManager) PerformAction(session *mcclient.ClientSession, id string, action string, ...) (jsonutils.JSONObject, error)
- func (this *ResourceManager) PerformActionInContext(session *mcclient.ClientSession, id string, action string, ...) (jsonutils.JSONObject, error)
- func (this *ResourceManager) PerformActionInContexts(session *mcclient.ClientSession, id string, action string, ...) (jsonutils.JSONObject, error)
- func (this *ResourceManager) PerformClassAction(session *mcclient.ClientSession, action string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (this *ResourceManager) PerformClassActionInContexts(session *mcclient.ClientSession, action string, params jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- func (this *ResourceManager) Put(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (this *ResourceManager) PutInContext(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- func (this *ResourceManager) PutInContexts(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- func (this *ResourceManager) PutSpecific(session *mcclient.ClientSession, id string, spec string, ...) (jsonutils.JSONObject, error)
- func (this *ResourceManager) PutSpecificInContext(session *mcclient.ClientSession, id string, spec string, ...) (jsonutils.JSONObject, error)
- func (this *ResourceManager) PutSpecificInContexts(session *mcclient.ClientSession, id string, spec string, ...) (jsonutils.JSONObject, error)
- func (this ResourceManager) ServiceType() string
- func (this *ResourceManager) SetEnableFilter(enable bool) *ResourceManager
- func (this *ResourceManager) SetMetadata(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (this *ResourceManager) SetNameField(fn string) *ResourceManager
- func (this *ResourceManager) SetReadFilter(filter TResourceFilter) *ResourceManager
- func (this *ResourceManager) SetWriteFilter(filter TResourceFilter) *ResourceManager
- func (this ResourceManager) URLPath() string
- func (this *ResourceManager) Update(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (this ResourceManager) Version() string
- type SubmitResult
- type TResourceFilter
Constants ¶
View Source
const ( DEFAULT_NAME_FIELD_NAME = "name" DEFAULT_ID_FIELD_NAME = "id" )
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
func Delete(manager ResourceManager, session *mcclient.ClientSession, path string, body jsonutils.JSONObject, respKey string) (jsonutils.JSONObject, error)
func Get ¶
func Get(manager ResourceManager, session *mcclient.ClientSession, path string, respKey string) (jsonutils.JSONObject, error)
func GetAppOptions ¶
func GetAppOptions(s *mcclient.ClientSession, serviceType string) (jsonutils.JSONObject, error)
func GetPProfByType ¶
func GetRegisterdModules ¶
func GetScopeResources ¶
func GetScopeResources(s *mcclient.ClientSession, serviceType string) (jsonutils.JSONObject, error)
func GetStats ¶
func GetStats(s *mcclient.ClientSession, path string, serviceType string) (jsonutils.JSONObject, error)
path: stats, db_stats, worker_stats
func GetVersion ¶
func GetVersion(s *mcclient.ClientSession, serviceType string) (string, error)
func Head ¶
func Head(manager ResourceManager, session *mcclient.ClientSession, path string, respKey string) (jsonutils.JSONObject, error)
func JsonRequest ¶
func JsonRequest(manager ResourceManager, session *mcclient.ClientSession, method httputils.THttpMethod, path string, header http.Header, body jsonutils.JSONObject) (http.Header, jsonutils.JSONObject, error)
func ListResult2JSON ¶
func ListResult2JSON(result *ListResult) jsonutils.JSONObject
func ListResult2JSONWithKey ¶
func ListResult2JSONWithKey(result *ListResult, key string) jsonutils.JSONObject
func Patch ¶
func Patch(manager ResourceManager, session *mcclient.ClientSession, path string, body jsonutils.JSONObject, respKey string) (jsonutils.JSONObject, error)
func Post ¶
func Post(manager ResourceManager, session *mcclient.ClientSession, path string, body jsonutils.JSONObject, respKey string) (jsonutils.JSONObject, error)
func Put ¶
func Put(manager ResourceManager, session *mcclient.ClientSession, path string, body jsonutils.JSONObject, respKey string) (jsonutils.JSONObject, error)
func RawRequest ¶
func RawRequest(manager ResourceManager, session *mcclient.ClientSession, method httputils.THttpMethod, path string, header http.Header, body io.Reader) (*http.Response, error)
func Register ¶
func Register(mod IBaseManager)
func RegisterJointModule ¶
func RegisterJointModule(mod IBaseManager)
func SubmitResults2JSON ¶
func SubmitResults2JSON(results []SubmitResult) jsonutils.JSONObject
Types ¶
type BaseManager ¶
type BaseManager struct {
// contains filtered or unexported fields
}
func NewBaseManager ¶
func NewBaseManager(serviceType, endpointType, version string, columns, adminColumns []string) *BaseManager
func (*BaseManager) GetColumns ¶
func (this *BaseManager) GetColumns(session *mcclient.ClientSession) []string
func (*BaseManager) SetVersion ¶
func (this *BaseManager) SetVersion(v string)
type IBaseManager ¶
type IBaseManager interface { Version() string // GetApiVersion() string GetKeyword() string KeyString() string ServiceType() string EndpointType() string GetColumns(session *mcclient.ClientSession) []string List(session *mcclient.ClientSession, params jsonutils.JSONObject) (*ListResult, error) }
type IResourceManager ¶
type IResourceManager interface { Manager GetMetadata(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error) SetMetadata(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error) }
type JointManager ¶
type JointManager interface { IBaseManager MasterManager() Manager SlaveManager() Manager Get(s *mcclient.ClientSession, mid, sid string, params jsonutils.JSONObject) (jsonutils.JSONObject, error) ListDescendent(s *mcclient.ClientSession, mid string, params jsonutils.JSONObject) (*ListResult, error) ListDescendent2(s *mcclient.ClientSession, sid string, params jsonutils.JSONObject) (*ListResult, error) ListAscendent(s *mcclient.ClientSession, mid string, params jsonutils.JSONObject) (*ListResult, error) Attach(s *mcclient.ClientSession, mid, sid string, params jsonutils.JSONObject) (jsonutils.JSONObject, error) BatchAttach(s *mcclient.ClientSession, mid string, sids []string, params jsonutils.JSONObject) []SubmitResult BatchAttach2(s *mcclient.ClientSession, mid string, sids []string, params jsonutils.JSONObject) []SubmitResult Detach(s *mcclient.ClientSession, mid, sid string, query jsonutils.JSONObject) (jsonutils.JSONObject, error) BatchDetach(s *mcclient.ClientSession, mid string, sids []string) []SubmitResult BatchDetach2(s *mcclient.ClientSession, mid string, sids []string) []SubmitResult Update(s *mcclient.ClientSession, mid, sid string, query jsonutils.JSONObject, params jsonutils.JSONObject) (jsonutils.JSONObject, error) BatchUpdate(s *mcclient.ClientSession, mid string, sids []string, query jsonutils.JSONObject, params jsonutils.JSONObject) []SubmitResult Patch(s *mcclient.ClientSession, mid, sid string, query jsonutils.JSONObject, params jsonutils.JSONObject) (jsonutils.JSONObject, error) BatchPatch(s *mcclient.ClientSession, mid string, sids []string, query jsonutils.JSONObject, params jsonutils.JSONObject) []SubmitResult }
func GetJointModule ¶
func GetJointModule(session *mcclient.ClientSession, name string) (JointManager, error)
func GetJointModule2 ¶
func GetJointModule2(session *mcclient.ClientSession, mod1 Manager, mod2 Manager) (JointManager, error)
type JointResourceManager ¶
type JointResourceManager struct { ResourceManager Master Manager Slave Manager }
func (*JointResourceManager) Attach ¶
func (this *JointResourceManager) Attach(s *mcclient.ClientSession, mid, sid string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*JointResourceManager) BatchAttach ¶
func (this *JointResourceManager) BatchAttach(s *mcclient.ClientSession, mid string, sids []string, params jsonutils.JSONObject) []SubmitResult
func (*JointResourceManager) BatchAttach2 ¶
func (this *JointResourceManager) BatchAttach2(s *mcclient.ClientSession, mid string, sids []string, params jsonutils.JSONObject) []SubmitResult
func (*JointResourceManager) BatchDetach ¶
func (this *JointResourceManager) BatchDetach(s *mcclient.ClientSession, mid string, sids []string) []SubmitResult
func (*JointResourceManager) BatchDetach2 ¶
func (this *JointResourceManager) BatchDetach2(s *mcclient.ClientSession, mid string, sids []string) []SubmitResult
func (*JointResourceManager) BatchPatch ¶
func (this *JointResourceManager) BatchPatch(s *mcclient.ClientSession, mid string, sids []string, query jsonutils.JSONObject, params jsonutils.JSONObject) []SubmitResult
func (*JointResourceManager) BatchUpdate ¶
func (this *JointResourceManager) BatchUpdate(s *mcclient.ClientSession, mid string, sids []string, query jsonutils.JSONObject, params jsonutils.JSONObject) []SubmitResult
func (*JointResourceManager) Detach ¶
func (this *JointResourceManager) Detach(s *mcclient.ClientSession, mid, sid string, query jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*JointResourceManager) Get ¶
func (this *JointResourceManager) Get(s *mcclient.ClientSession, mid, sid string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*JointResourceManager) ListAscendent ¶
func (this *JointResourceManager) ListAscendent(s *mcclient.ClientSession, mid string, params jsonutils.JSONObject) (*ListResult, error)
func (*JointResourceManager) ListDescendent ¶
func (this *JointResourceManager) ListDescendent(s *mcclient.ClientSession, mid string, params jsonutils.JSONObject) (*ListResult, error)
func (*JointResourceManager) ListDescendent2 ¶
func (this *JointResourceManager) ListDescendent2(s *mcclient.ClientSession, sid string, params jsonutils.JSONObject) (*ListResult, error)
func (*JointResourceManager) MasterManager ¶
func (this *JointResourceManager) MasterManager() Manager
func (*JointResourceManager) Patch ¶
func (this *JointResourceManager) Patch(s *mcclient.ClientSession, mid, sid string, query jsonutils.JSONObject, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*JointResourceManager) SlaveManager ¶
func (this *JointResourceManager) SlaveManager() Manager
func (*JointResourceManager) Update ¶
func (this *JointResourceManager) Update(s *mcclient.ClientSession, mid, sid string, query jsonutils.JSONObject, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
type ListResult ¶
type ListResult struct { Data []jsonutils.JSONObject `json:"data,allowempty"` Total int Limit int Offset int NextMarker string MarkerField string MarkerOrder string }
func JSON2ListResult ¶
func JSON2ListResult(result jsonutils.JSONObject) *ListResult
func List ¶
func List(manager ResourceManager, session *mcclient.ClientSession, path, respKey string) (*ListResult, error)
func ListWorkers ¶
func ListWorkers(s *mcclient.ClientSession, serviceType string) (*ListResult, error)
func SubmitResults2ListResult ¶
func SubmitResults2ListResult(results []SubmitResult) *ListResult
type Manager ¶
type Manager interface { IBaseManager /* resource list GET <base_url>/<resource_plural_keyword> e.g GET <base_url>/alarms querystring stores in params e.g. GET <base_url>/alarms?limit=20&offset=20&search=test return list of resources in json format { "<resource_plural_keyword>": [ {object details}, {object details}, ...] }, limit: 20, offset: 20, total: 2000} */ // List(session *mcclient.ClientSession, params jsonutils.JSONObject) (*ListResult, error) /* resource list in a context GET <base_url>/<context_plural_keyword>/<context_id>/<resource_plural_keyword>?querystring e.g. GET <base_url>/nodes/1/labels?name=xxx ListInContext(s, params, &modules.Labels, label_id) return: { "<resource_plural_keyword>": [ {object details}, {object details}, ...] }, limit: 20, offset: 20, total: 2000} */ ListInContext(session *mcclient.ClientSession, params jsonutils.JSONObject, ctx Manager, ctxid string) (*ListResult, error) ListInContexts(session *mcclient.ClientSession, params jsonutils.JSONObject, ctxs []ManagerContext) (*ListResult, error) /* GET <base_url>/<resource_plural_keyword>/<resource_id> e.g GET <base_url>/alarams/1 */ Get(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error) GetInContext(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ctx Manager, ctxid string) (jsonutils.JSONObject, error) GetInContexts(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ctxs []ManagerContext) (jsonutils.JSONObject, error) GetId(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (string, error) GetIdInContext(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ctx Manager, ctxid string) (string, error) GetIdInContexts(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ctxs []ManagerContext) (string, error) GetById(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error) GetByIdInContext(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ctx Manager, ctxid string) (jsonutils.JSONObject, error) GetByIdInContexts(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ctxs []ManagerContext) (jsonutils.JSONObject, error) GetByName(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error) GetByNameInContext(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ctx Manager, ctxid string) (jsonutils.JSONObject, error) GetByNameInContexts(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ctxs []ManagerContext) (jsonutils.JSONObject, error) /* HEAD <base_url>/<resource_plural_keyword>/<resource_id> e.g HEAD <base_url>/alarams/1 */ Head(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error) HeadInContext(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ctx Manager, ctxid string) (jsonutils.JSONObject, error) HeadInContexts(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ctxs []ManagerContext) (jsonutils.JSONObject, error) BatchGet(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject) []SubmitResult BatchGetInContext(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject, ctx Manager, ctxid string) []SubmitResult BatchGetInContexts(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject, ctxs []ManagerContext) []SubmitResult GetSpecific(session *mcclient.ClientSession, id string, spec string, params jsonutils.JSONObject) (jsonutils.JSONObject, error) GetSpecificInContext(session *mcclient.ClientSession, id string, spec string, params jsonutils.JSONObject, ctx Manager, ctxid string) (jsonutils.JSONObject, error) GetSpecificInContexts(session *mcclient.ClientSession, id string, spec string, params jsonutils.JSONObject, ctxs []ManagerContext) (jsonutils.JSONObject, error) /* POST <base_url>/<resource_plural_keyword>/<resource_id> e.g POST <base_url>/alarams/1 */ Create(session *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error) CreateInContext(session *mcclient.ClientSession, params jsonutils.JSONObject, ctx Manager, ctxid string) (jsonutils.JSONObject, error) CreateInContexts(session *mcclient.ClientSession, params jsonutils.JSONObject, ctxs []ManagerContext) (jsonutils.JSONObject, error) BatchCreate(session *mcclient.ClientSession, params jsonutils.JSONObject, count int) []SubmitResult BatchCreateInContext(session *mcclient.ClientSession, params jsonutils.JSONObject, count int, ctx Manager, ctxid string) []SubmitResult BatchCreateInContexts(session *mcclient.ClientSession, params jsonutils.JSONObject, count int, ctxs []ManagerContext) []SubmitResult Update(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error) Put(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error) PutSpecific(session *mcclient.ClientSession, id string, spec string, query jsonutils.JSONObject, params jsonutils.JSONObject) (jsonutils.JSONObject, error) PutInContext(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ctx Manager, ctxid string) (jsonutils.JSONObject, error) PutInContexts(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ctxs []ManagerContext) (jsonutils.JSONObject, error) BatchUpdate(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject) []SubmitResult BatchParamsUpdate(session *mcclient.ClientSession, idlist []string, params []jsonutils.JSONObject) []SubmitResult BatchPut(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject) []SubmitResult BatchPutInContext(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject, ctx Manager, ctxid string) []SubmitResult BatchPutInContexts(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject, ctxs []ManagerContext) []SubmitResult Patch(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error) PatchInContext(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ctx Manager, ctxid string) (jsonutils.JSONObject, error) PatchInContexts(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ctxs []ManagerContext) (jsonutils.JSONObject, error) BatchPatch(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject) []SubmitResult BatchPatchInContext(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject, ctx Manager, ctxid string) []SubmitResult BatchPatchInContexts(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject, ctxs []ManagerContext) []SubmitResult PerformAction(session *mcclient.ClientSession, id string, action string, params jsonutils.JSONObject) (jsonutils.JSONObject, error) PerformClassAction(session *mcclient.ClientSession, action string, params jsonutils.JSONObject) (jsonutils.JSONObject, error) PerformActionInContext(session *mcclient.ClientSession, id string, action string, params jsonutils.JSONObject, ctx Manager, ctxid string) (jsonutils.JSONObject, error) PerformActionInContexts(session *mcclient.ClientSession, id string, action string, params jsonutils.JSONObject, ctxs []ManagerContext) (jsonutils.JSONObject, error) BatchPerformAction(session *mcclient.ClientSession, idlist []string, action string, params jsonutils.JSONObject) []SubmitResult BatchPerformActionInContext(session *mcclient.ClientSession, idlist []string, action string, params jsonutils.JSONObject, ctx Manager, ctxid string) []SubmitResult BatchPerformActionInContexts(session *mcclient.ClientSession, idlist []string, action string, params jsonutils.JSONObject, ctxs []ManagerContext) []SubmitResult Delete(session *mcclient.ClientSession, id string, body jsonutils.JSONObject) (jsonutils.JSONObject, error) DeleteWithParam(session *mcclient.ClientSession, id string, query jsonutils.JSONObject, body jsonutils.JSONObject) (jsonutils.JSONObject, error) DeleteInContext(session *mcclient.ClientSession, id string, body jsonutils.JSONObject, ctx Manager, ctxid string) (jsonutils.JSONObject, error) DeleteInContextWithParam(session *mcclient.ClientSession, id string, query jsonutils.JSONObject, body jsonutils.JSONObject, ctx Manager, ctxid string) (jsonutils.JSONObject, error) DeleteInContexts(session *mcclient.ClientSession, id string, body jsonutils.JSONObject, ctxs []ManagerContext) (jsonutils.JSONObject, error) DeleteInContextsWithParam(session *mcclient.ClientSession, id string, query jsonutils.JSONObject, body jsonutils.JSONObject, ctxs []ManagerContext) (jsonutils.JSONObject, error) BatchDelete(session *mcclient.ClientSession, idlist []string, body jsonutils.JSONObject) []SubmitResult BatchDeleteWithParam(session *mcclient.ClientSession, idlist []string, query jsonutils.JSONObject, body jsonutils.JSONObject) []SubmitResult BatchDeleteInContext(session *mcclient.ClientSession, idlist []string, body jsonutils.JSONObject, ctx Manager, ctxid string) []SubmitResult BatchDeleteInContextWithParam(session *mcclient.ClientSession, idlist []string, query jsonutils.JSONObject, body jsonutils.JSONObject, ctx Manager, ctxid string) []SubmitResult BatchDeleteInContexts(session *mcclient.ClientSession, idlist []string, body jsonutils.JSONObject, ctxs []ManagerContext) []SubmitResult BatchDeleteInContextsWithParam(session *mcclient.ClientSession, idlist []string, query jsonutils.JSONObject, body jsonutils.JSONObject, ctxs []ManagerContext) []SubmitResult }
type ManagerContext ¶
type ResourceManager ¶
type ResourceManager struct { BaseManager Keyword string KeywordPlural string // contains filtered or unexported fields }
func (*ResourceManager) BatchCreate ¶
func (this *ResourceManager) BatchCreate(session *mcclient.ClientSession, params jsonutils.JSONObject, count int) []SubmitResult
func (*ResourceManager) BatchCreateInContext ¶
func (this *ResourceManager) BatchCreateInContext(session *mcclient.ClientSession, params jsonutils.JSONObject, count int, ctx Manager, ctxid string) []SubmitResult
func (*ResourceManager) BatchCreateInContexts ¶
func (this *ResourceManager) BatchCreateInContexts(session *mcclient.ClientSession, params jsonutils.JSONObject, count int, ctxs []ManagerContext) []SubmitResult
func (*ResourceManager) BatchDelete ¶
func (this *ResourceManager) BatchDelete(session *mcclient.ClientSession, idlist []string, body jsonutils.JSONObject) []SubmitResult
func (*ResourceManager) BatchDeleteInContext ¶
func (this *ResourceManager) BatchDeleteInContext(session *mcclient.ClientSession, idlist []string, body jsonutils.JSONObject, ctx Manager, ctxid string) []SubmitResult
func (*ResourceManager) BatchDeleteInContextWithParam ¶
func (this *ResourceManager) BatchDeleteInContextWithParam(session *mcclient.ClientSession, idlist []string, params, body jsonutils.JSONObject, ctx Manager, ctxid string) []SubmitResult
func (*ResourceManager) BatchDeleteInContexts ¶
func (this *ResourceManager) BatchDeleteInContexts(session *mcclient.ClientSession, idlist []string, body jsonutils.JSONObject, ctxs []ManagerContext) []SubmitResult
func (*ResourceManager) BatchDeleteInContextsWithParam ¶
func (this *ResourceManager) BatchDeleteInContextsWithParam(session *mcclient.ClientSession, idlist []string, params, body jsonutils.JSONObject, ctxs []ManagerContext) []SubmitResult
func (*ResourceManager) BatchDeleteWithParam ¶
func (this *ResourceManager) BatchDeleteWithParam(session *mcclient.ClientSession, idlist []string, params, body jsonutils.JSONObject) []SubmitResult
func (*ResourceManager) BatchGet ¶
func (this *ResourceManager) BatchGet(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject) []SubmitResult
func (*ResourceManager) BatchGetInContext ¶
func (this *ResourceManager) BatchGetInContext(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject, ctx Manager, ctxid string) []SubmitResult
func (*ResourceManager) BatchGetInContexts ¶
func (this *ResourceManager) BatchGetInContexts(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject, ctxs []ManagerContext) []SubmitResult
func (*ResourceManager) BatchParamsPutInContexts ¶
func (this *ResourceManager) BatchParamsPutInContexts(session *mcclient.ClientSession, idlist []string, params []jsonutils.JSONObject, ctxs []ManagerContext) []SubmitResult
func (*ResourceManager) BatchParamsUpdate ¶
func (this *ResourceManager) BatchParamsUpdate(session *mcclient.ClientSession, idlist []string, params []jsonutils.JSONObject) []SubmitResult
func (*ResourceManager) BatchPatch ¶
func (this *ResourceManager) BatchPatch(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject) []SubmitResult
func (*ResourceManager) BatchPatchInContext ¶
func (this *ResourceManager) BatchPatchInContext(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject, ctx Manager, ctxid string) []SubmitResult
func (*ResourceManager) BatchPatchInContexts ¶
func (this *ResourceManager) BatchPatchInContexts(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject, ctxs []ManagerContext) []SubmitResult
func (*ResourceManager) BatchPerformAction ¶
func (this *ResourceManager) BatchPerformAction(session *mcclient.ClientSession, idlist []string, action string, params jsonutils.JSONObject) []SubmitResult
func (*ResourceManager) BatchPerformActionInContext ¶
func (this *ResourceManager) BatchPerformActionInContext(session *mcclient.ClientSession, idlist []string, action string, params jsonutils.JSONObject, ctx Manager, ctxid string) []SubmitResult
func (*ResourceManager) BatchPerformActionInContexts ¶
func (this *ResourceManager) BatchPerformActionInContexts(session *mcclient.ClientSession, idlist []string, action string, params jsonutils.JSONObject, ctxs []ManagerContext) []SubmitResult
func (*ResourceManager) BatchPerformClassAction ¶
func (this *ResourceManager) BatchPerformClassAction(session *mcclient.ClientSession, action string, batchParams []jsonutils.JSONObject) []SubmitResult
func (*ResourceManager) BatchPerformClassActionInContexts ¶
func (this *ResourceManager) BatchPerformClassActionInContexts(session *mcclient.ClientSession, action string, batchParams []jsonutils.JSONObject, ctxs []ManagerContext) []SubmitResult
func (*ResourceManager) BatchPut ¶
func (this *ResourceManager) BatchPut(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject) []SubmitResult
func (*ResourceManager) BatchPutInContext ¶
func (this *ResourceManager) BatchPutInContext(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject, ctx Manager, ctxid string) []SubmitResult
func (*ResourceManager) BatchPutInContexts ¶
func (this *ResourceManager) BatchPutInContexts(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject, ctxs []ManagerContext) []SubmitResult
func (*ResourceManager) BatchUpdate ¶
func (this *ResourceManager) BatchUpdate(session *mcclient.ClientSession, idlist []string, params jsonutils.JSONObject) []SubmitResult
func (*ResourceManager) ContextPath ¶
func (this *ResourceManager) ContextPath(ctxs []ManagerContext) string
func (*ResourceManager) Create ¶
func (this *ResourceManager) Create(session *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*ResourceManager) CreateInContext ¶
func (this *ResourceManager) CreateInContext(session *mcclient.ClientSession, params jsonutils.JSONObject, ctx Manager, ctxid string) (jsonutils.JSONObject, error)
func (*ResourceManager) CreateInContexts ¶
func (this *ResourceManager) CreateInContexts(session *mcclient.ClientSession, params jsonutils.JSONObject, ctxs []ManagerContext) (jsonutils.JSONObject, error)
func (*ResourceManager) Delete ¶
func (this *ResourceManager) Delete(session *mcclient.ClientSession, id string, body jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*ResourceManager) DeleteInContext ¶
func (this *ResourceManager) DeleteInContext(session *mcclient.ClientSession, id string, body jsonutils.JSONObject, ctx Manager, ctxid string) (jsonutils.JSONObject, error)
func (*ResourceManager) DeleteInContextWithParam ¶
func (this *ResourceManager) DeleteInContextWithParam(session *mcclient.ClientSession, id string, query jsonutils.JSONObject, body jsonutils.JSONObject, ctx Manager, ctxid string) (jsonutils.JSONObject, error)
func (*ResourceManager) DeleteInContexts ¶
func (this *ResourceManager) DeleteInContexts(session *mcclient.ClientSession, id string, body jsonutils.JSONObject, ctxs []ManagerContext) (jsonutils.JSONObject, error)
func (*ResourceManager) DeleteInContextsWithParam ¶
func (this *ResourceManager) DeleteInContextsWithParam(session *mcclient.ClientSession, id string, params, body jsonutils.JSONObject, ctxs []ManagerContext) (jsonutils.JSONObject, error)
func (*ResourceManager) DeleteWithParam ¶
func (this *ResourceManager) DeleteWithParam(session *mcclient.ClientSession, id string, params, body jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (ResourceManager) EndpointType ¶
func (this ResourceManager) EndpointType() string
func (*ResourceManager) Get ¶
func (this *ResourceManager) Get(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*ResourceManager) GetById ¶
func (this *ResourceManager) GetById(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*ResourceManager) GetByIdInContext ¶
func (this *ResourceManager) GetByIdInContext(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ctx Manager, ctxid string) (jsonutils.JSONObject, error)
func (*ResourceManager) GetByIdInContexts ¶
func (this *ResourceManager) GetByIdInContexts(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ctxs []ManagerContext) (jsonutils.JSONObject, error)
func (*ResourceManager) GetByName ¶
func (this *ResourceManager) GetByName(session *mcclient.ClientSession, name string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*ResourceManager) GetByNameInContext ¶
func (this *ResourceManager) GetByNameInContext(session *mcclient.ClientSession, name string, params jsonutils.JSONObject, ctx Manager, ctxid string) (jsonutils.JSONObject, error)
func (*ResourceManager) GetByNameInContexts ¶
func (this *ResourceManager) GetByNameInContexts(session *mcclient.ClientSession, name string, params jsonutils.JSONObject, ctxs []ManagerContext) (jsonutils.JSONObject, error)
func (*ResourceManager) GetId ¶
func (this *ResourceManager) GetId(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (string, error)
func (*ResourceManager) GetIdInContext ¶
func (this *ResourceManager) GetIdInContext(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ctx Manager, ctxid string) (string, error)
func (*ResourceManager) GetIdInContexts ¶
func (this *ResourceManager) GetIdInContexts(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ctxs []ManagerContext) (string, error)
func (*ResourceManager) GetInContext ¶
func (this *ResourceManager) GetInContext(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ctx Manager, ctxid string) (jsonutils.JSONObject, error)
func (*ResourceManager) GetInContexts ¶
func (this *ResourceManager) GetInContexts(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ctxs []ManagerContext) (jsonutils.JSONObject, error)
func (ResourceManager) GetKeyword ¶
func (this ResourceManager) GetKeyword() string
func (*ResourceManager) GetMetadata ¶
func (this *ResourceManager) GetMetadata(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*ResourceManager) GetSpecific ¶
func (this *ResourceManager) GetSpecific(session *mcclient.ClientSession, id string, spec string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*ResourceManager) GetSpecificInContext ¶
func (this *ResourceManager) GetSpecificInContext(session *mcclient.ClientSession, id string, spec string, params jsonutils.JSONObject, ctx Manager, ctxid string) (jsonutils.JSONObject, error)
func (*ResourceManager) GetSpecificInContexts ¶
func (this *ResourceManager) GetSpecificInContexts(session *mcclient.ClientSession, id string, spec string, params jsonutils.JSONObject, ctxs []ManagerContext) (jsonutils.JSONObject, error)
func (*ResourceManager) Head ¶
func (this *ResourceManager) Head(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*ResourceManager) HeadInContext ¶
func (this *ResourceManager) HeadInContext(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ctx Manager, ctxid string) (jsonutils.JSONObject, error)
func (*ResourceManager) HeadInContexts ¶
func (this *ResourceManager) HeadInContexts(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ctxs []ManagerContext) (jsonutils.JSONObject, error)
func (ResourceManager) KeyString ¶
func (this ResourceManager) KeyString() string
func (*ResourceManager) List ¶
func (this *ResourceManager) List(session *mcclient.ClientSession, params jsonutils.JSONObject) (*ListResult, error)
func (*ResourceManager) ListInContext ¶
func (this *ResourceManager) ListInContext(session *mcclient.ClientSession, params jsonutils.JSONObject, ctx Manager, ctxid string) (*ListResult, error)
func (*ResourceManager) ListInContexts ¶
func (this *ResourceManager) ListInContexts(session *mcclient.ClientSession, params jsonutils.JSONObject, ctxs []ManagerContext) (*ListResult, error)
func (*ResourceManager) Patch ¶
func (this *ResourceManager) Patch(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*ResourceManager) PatchInContext ¶
func (this *ResourceManager) PatchInContext(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ctx Manager, ctxid string) (jsonutils.JSONObject, error)
func (*ResourceManager) PatchInContexts ¶
func (this *ResourceManager) PatchInContexts(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ctxs []ManagerContext) (jsonutils.JSONObject, error)
func (*ResourceManager) PerformAction ¶
func (this *ResourceManager) PerformAction(session *mcclient.ClientSession, id string, action string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*ResourceManager) PerformActionInContext ¶
func (this *ResourceManager) PerformActionInContext(session *mcclient.ClientSession, id string, action string, params jsonutils.JSONObject, ctx Manager, ctxid string) (jsonutils.JSONObject, error)
func (*ResourceManager) PerformActionInContexts ¶
func (this *ResourceManager) PerformActionInContexts(session *mcclient.ClientSession, id string, action string, params jsonutils.JSONObject, ctxs []ManagerContext) (jsonutils.JSONObject, error)
func (*ResourceManager) PerformClassAction ¶
func (this *ResourceManager) PerformClassAction(session *mcclient.ClientSession, action string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*ResourceManager) PerformClassActionInContexts ¶
func (this *ResourceManager) PerformClassActionInContexts(session *mcclient.ClientSession, action string, params jsonutils.JSONObject, ctxs []ManagerContext) (jsonutils.JSONObject, error)
func (*ResourceManager) Put ¶
func (this *ResourceManager) Put(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*ResourceManager) PutInContext ¶
func (this *ResourceManager) PutInContext(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ctx Manager, ctxid string) (jsonutils.JSONObject, error)
func (*ResourceManager) PutInContexts ¶
func (this *ResourceManager) PutInContexts(session *mcclient.ClientSession, id string, params jsonutils.JSONObject, ctxs []ManagerContext) (jsonutils.JSONObject, error)
func (*ResourceManager) PutSpecific ¶
func (this *ResourceManager) PutSpecific(session *mcclient.ClientSession, id string, spec string, query, body jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*ResourceManager) PutSpecificInContext ¶
func (this *ResourceManager) PutSpecificInContext(session *mcclient.ClientSession, id string, spec string, query, body jsonutils.JSONObject, ctx Manager, ctxid string) (jsonutils.JSONObject, error)
func (*ResourceManager) PutSpecificInContexts ¶
func (this *ResourceManager) PutSpecificInContexts(session *mcclient.ClientSession, id string, spec string, query, body jsonutils.JSONObject, ctxs []ManagerContext) (jsonutils.JSONObject, error)
func (ResourceManager) ServiceType ¶
func (this ResourceManager) ServiceType() string
func (*ResourceManager) SetEnableFilter ¶
func (this *ResourceManager) SetEnableFilter(enable bool) *ResourceManager
func (*ResourceManager) SetMetadata ¶
func (this *ResourceManager) SetMetadata(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*ResourceManager) SetNameField ¶
func (this *ResourceManager) SetNameField(fn string) *ResourceManager
func (*ResourceManager) SetReadFilter ¶
func (this *ResourceManager) SetReadFilter(filter TResourceFilter) *ResourceManager
func (*ResourceManager) SetWriteFilter ¶
func (this *ResourceManager) SetWriteFilter(filter TResourceFilter) *ResourceManager
func (ResourceManager) URLPath ¶
func (this ResourceManager) URLPath() string
func (*ResourceManager) Update ¶
func (this *ResourceManager) Update(session *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (ResourceManager) Version ¶
func (this ResourceManager) Version() string
type SubmitResult ¶
type SubmitResult struct { Status int Id interface{} Data jsonutils.JSONObject }
func BatchDo ¶
func BatchDo(ids []string, do func(id string) (jsonutils.JSONObject, error)) []SubmitResult
func BatchDoClassAction ¶
func BatchDoClassAction( batchParams []jsonutils.JSONObject, do func(jsonutils.JSONObject) (jsonutils.JSONObject, error), ) []SubmitResult
func BatchParamsDo ¶
func BatchParamsDo( ids []string, params []jsonutils.JSONObject, do func(id string, param jsonutils.JSONObject) (jsonutils.JSONObject, error), ) []SubmitResult
type TResourceFilter ¶
type TResourceFilter func(*mcclient.ClientSession, jsonutils.JSONObject, jsonutils.JSONObject) (jsonutils.JSONObject, error)
Click to show internal directories.
Click to hide internal directories.