123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531 |
- /*##############################################################################
- HPCC SYSTEMS software Copyright (C) 2018 HPCC Systems®.
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ############################################################################## */
- ESPstruct StatusMsgType
- {
- string MsgLevel; // message level ("info", "warning", "error", "fatal")
- string NodeId; // node identifier that generated this status message
- string NodeName(""); // node name (not unique, use nodeID to find node)
- string Attribute(""); // name of node's attribute generating the message ("" for the node itself)
- string Msg; // the message
- ESParray<string, parentId> ParentIdList;
- };
- ESPstruct StatusType
- {
- bool Error(false); // true if a message exsits in status (below) with a message level of error or higher
- ESParray<ESPstruct StatusMsgType, StatusMsg> StatusMessages;
- };
- ESPresponse [exceptions_inline] EmptyResponse
- {
- };
- ESPresponse StatusResponse
- {
- bool EnvironmentModified;
- ESPstruct StatusType Status;
- };
- //
- // Session management (not to be confused with platform session management)
- ESPrequest OpenSessionRequest
- {
- string Username;
- string SchemaPath(""); // location of configuration schema environmentFiles
- string MasterSchemaFile(""); // name of master schema control file
- string SourcePath(""); // path to envrionment files
- string ActivePath(""); // path to active environment file ("" for none)
- string PluginPaths(""); // comma separated list of paths
- };
- ESPresponse [exceptions_inline] OpenSessionResponse
- {
- string SessionId;
- };
- ESPrequest CloseSessionRequest
- {
- string SessionId;
- bool ForceClose(false); // set to true for force the closure of a modified environment w/o saving
- };
- ESPrequest ListOpenSessionsRequest
- {
- };
- ESPstruct OpenSessionInfo
- {
- string Username;
- string CurEnvironmentFile("");
- bool Locked;
- bool Modified;
- };
- ESPresponse [exceptions_inline] ListOpenSessionsResponse
- {
- ESParray<ESPstruct OpenSessionInfo, SessionInfo> OpenSessions;
- };
- //
- // Node management
- ESPrequest GetNodeRequest
- {
- string SessionId;
- string NodeId;
- };
- ESPrequest GetParentsRequest
- {
- string SessionId;
- string NodeId;
- };
- ESPrequest RemoveNodeRequest
- {
- string SessionId;
- string SessionLockKey;
- string NodeId;
- };
- ESPstruct DependentValueType
- {
- string AttributeName;
- string AttributeValue;
- };
- ESPstruct ChoiceType
- {
- string DisplayName;
- string Value;
- string Desc("");
- string MsgType("");
- string Msg("");
- ESParray<ESPstruct DependentValueType, dependentValue> Dependencies;
- ESParray<string, Attribute> OptionalAttributes; // Attributes to be enabled, but are optional if this choice is selected (UI)
- ESParray<string, Attribute> RequiredAttributes; // Attributes to be enabled and must be filled in (UI)
- };
- ESPstruct LimitsType
- {
- bool MinValid(false);
- bool MaxValid(false);
- int Min(0);
- int Max(0);
- bool hasChoices(false);
- ESParray<ESPstruct ChoiceType, Choice> ChoiceList;
- ESParray<string, Expr> Regex;
- };
- ESPstruct TypeInfo
- {
- string BaseType;
- string SubType;
- ESPstruct LimitsType Limits;
- };
- ESPstruct NodeInfoType
- {
- string DisplayName("");
- string NodeType("");
- string Name;
- string Class("");
- string Category("");
- bool Hidden(false);
- string Tooltip("");
- };
- ESPstruct Node
- {
- string NodeId;
- int NumChildren(0);
- ESPstruct NodeInfoType NodeInfo;
- };
- ESPstruct ChoiceLimitType
- {
- string DisplayName;
- string ItemType;
- };
- ESPstruct InsertItemType
- {
- string Name("");
- string NodeType("");
- string Class("");
- string Category("");
- bool Required(false);
- string Tooltip("");
- ESParray<ESPstruct ChoiceLimitType, ChoiceLimit> ChoiceList;
- bool FixedChoices(false);
- };
- ESPstruct AttributeType
- {
- string DisplayName;
- string Name;
- unsigned Ordinal;
- string Group("");
- string Tooltip("");
- ESPstruct TypeInfo Type;
- string CurrentValue("");
- string ForcedValue("");
- bool IsPresentInEnvironment;
- string PresetValue("");
- bool Required(true);
- bool ReadOnly(false);
- bool Hidden(false);
- bool Deprecated(false);
- ESParray<string, Modifier> Modifiers;
- };
- ESPstruct AttributeValueType
- {
- string Name;
- string Value;
- };
- ESPresponse [exceptions_inline] GetNodeResponse
- {
- string NodeId;
- ESPstruct NodeInfoType NodeInfo;
- ESParray<ESPstruct AttributeType, Attribute> Attributes;
- ESParray<ESPstruct Node, Child> Children;
- ESParray<ESPstruct InsertItemType, Item> Insertable; // list of insertable elements under this node
- ESPstruct StatusType Status;
- bool LocalValueDefined(false); // true if the node is configured to have a value (not usually true)
- ESPstruct AttributeType Value; // this would be <element>value</element> not normal, see valueDefined
- };
- ESPrequest InsertNodeRequest // response is same as GetPathRequest
- {
- string SessionId;
- string SessionLockKey;
- string ParentNodeId;
- string NodeType; // name of new instance to create
- ESParray<ESPstruct AttributeValueType, Attribute> AttributeValues;
- bool AllowInvalid(false); // true to allow setting an invalid value
- bool ForceCreate(false); // force creaation of new value if not defined
- string LocalValue("");
- };
- ESPrequest GetCreateNodeInfoRequest
- {
- string SessionId;
- string ParentNodeId;
- string NodeType; // name of new instance to create
- };
- ESPresponse [exceptions_inline] GetCreateNodeInfoResponse
- {
- ESPstruct NodeInfoType NodeInfo;
- ESParray<ESPstruct AttributeType, Attribute> Attributes;
- bool LocalValueDefined(false); // true if the node is configured to have a value (not usually true)
- ESPstruct AttributeType Value; // this would be <element>value</element> not normal, see valueDefined
- };
- ESPrequest SetValuesRequest
- {
- string SessionId;
- string SessionLockKey;
- string NodeId;
- ESParray<ESPstruct AttributeValueType, Attribute> AttributeValues;
- bool AllowInvalid(false); // true to allow setting an invalid value
- bool ForceCreate(false); // force creaation of new value if not defined
- string LocalValue("");
- };
- ESPresponse [exceptions_inline] GetParentsResponse
- {
- ESParray<string, parentId> ParentIdList;
- };
- ESPrequest GetNodeCopyRequest
- {
- string SessionId;
- string NodeId;
- };
- ESPresponse GetNodeCopyResponse
- {
- string ValidInsertPath(""); // path to where the copy can be inserted
- string NodeCopy(""); // opaque copy, DO NOT MODIFY
- };
- ESPrequest PasteNodeCopyRequest
- {
- string SessionId;
- string SessionLockKey;
- string ParentNodeId;
- string NodeCopy;
- };
- ESPresponse PasteNodeCopyResponse
- {
- bool NodeInserted(false);
- ESPstruct StatusType Status;
- string NewNodeId("");
- };
- //
- // Environment management
- ESPstruct EnvironmentFileType
- {
- string Filename;
- bool IsActive(false); // True if this is the current active environment
- };
- ESPrequest GetEnvironmentFileListRequest
- {
- string SessionId;
- };
- ESPrequest LockSessionRequest
- {
- string SessionId;
- };
- ESPresponse [exceptions_inline] GetEnvironmentListResponse
- {
- ESParray<ESPstruct EnvironmentFileType, EnvironmentFile> EnvironmentFiles;
- };
- ESPrequest OpenEnvironmentFileRequest
- {
- string SessionId;
- string Filename;
- };
- ESPresponse [exceptions_inline] OpenEnvironmentFileResponse
- {
- string RootNodeId;
- };
- ESPrequest CloseEnvironmentFileRequest
- {
- string SessionId;
- string SessionLockKey; // required if existing environment is modified and discarding changes
- bool DiscardChanges(false); // discard modifications
- };
- ESPrequest SaveEnvironmentFileRequest
- {
- string SessionId;
- string SessionLockKey; // required if saving existing environment and it has been modified
- string Filename(""); // empty string means to overwrite the existing file
- };
- ESPresponse [exceptions_inline] LockSessionResponse
- {
- string SessionLockKey; // filled in when a session is sucessfully locked
- };
- ESPrequest UnlockSessionRequest
- {
- string SessionId;
- string SessionLockKey;
- bool RejectIfModified(true);
- };
- ESPrequest ValidateEnvironmentRequest
- {
- string SessionId;
- bool IncludeHiddenNodes(false); // includes hidden nodes (hidden attributes always included)
- };
- ESPrequest GetTreeRequest
- {
- string SessionId;
- string NodeId;
- bool IncludeAttributes;
- int NumLevels(1);
- };
- ESPstruct TreeElementType
- {
- string NodeId;
- ESPstruct NodeInfoType NodeInfo;
- ESParray<ESPstruct AttributeType, attribute> Attributes;
- ESParray<ESPstruct TreeElementType, Element> Children;
- };
- ESPresponse [exceptions_inline] GetTreeResponse
- {
- ESPstruct TreeElementType Tree;
- };
- ESPrequest FetchNodesRequest
- {
- string SessionId;
- string StartingNodeId(""); // optional starting node for the fetch, "" for none
- string Path; // path to search (uses XPath syntax). If startingNodeId specified, path may not start at root ("/")
- };
- ESPresponse [exceptions_inline] FetchNodesResponse
- {
- ESParray<string, nodeId> NodeIds;
- };
- ESPrequest WizardTestRequest
- {
- string SessionId;
- string FqFilename;
- };
- ESPservice [auth_feature("DEFERRED"),version("2.0"), default_client_version("2.0"), exceptions_inline("xslt/exceptions.xslt")] ws_configmgr
- {
- ESPMethod
- [
- description("Open a session with the configuration manager service")
- ] OpenSession(OpenSessionRequest, OpenSessionResponse);
- ESPMethod
- [
- description("Close a previously open session")
- ] CloseSession(CloseSessionRequest, EmptyResponse);
- ESPMethod
- [
- description("Get a list of environment files available")
- ] GetEnvironmentFileList(GetEnvironmentFileListRequest, GetEnvironmentListResponse);
- ESPMethod
- [
- description("Open an environment file")
- ] OpenEnvironmentFile(OpenEnvironmentFileRequest, OpenEnvironmentFileResponse);
- ESPMethod
- [
- description("Close an open environment file")
- ] CloseEnvironmentFile(CloseEnvironmentFileRequest, EmptyResponse);
- ESPMethod
- [
- description("Save a modifed environment file, or save to a new environment file")
- ] SaveEnvironmentFile(SaveEnvironmentFileRequest, EmptyResponse);
- ESPMethod
- [
- description("Lock a session's open environment for modification")
- ] LockSession(LockSessionRequest, LockSessionResponse);
- ESPMethod
- [
- description("Unlock a previously locked session")
- ] UnlockSession(UnlockSessionRequest, EmptyResponse);
- ESPMethod
- [
- description("Get an environment node")
- ] GetNode(GetNodeRequest, GetNodeResponse);
- ESPMethod
- [
- description("Set one or more of a node's attribute values,and/or the node's local value")
- ] SetValues(SetValuesRequest, StatusResponse);
- ESPMethod
- [
- description("Returns the nodes parents all the way to the root")
- ] GetParents(GetParentsRequest, GetParentsResponse);
- ESPMethod
- [
- description("Insert a new node into the environment")
- ] InsertNode(InsertNodeRequest, GetNodeResponse);
- ESPMethod
- [
- description("Get information to insert a new node")
- ] GetCreateNodeInfo(GetCreateNodeInfoRequest, GetCreateNodeInfoResponse);
- ESPMethod
- [
- description("Remove a node from the environment")
- ] RemoveNode(RemoveNodeRequest, StatusResponse);
- ESPMethod
- [
- description("Validate the environment")
- ] ValidateEnvironment(ValidateEnvironmentRequest, StatusResponse);
- ESPMethod
- [
- description("Return a list of open sessions")
- ] GetOpenSessions(ListOpenSessionsRequest, ListOpenSessionsResponse);
- ESPMethod
- [
- description("Return the tree of nodes beneath the indicated node for the indicated number of levels")
- ] GetNodeTree(GetTreeRequest, GetTreeResponse);
- ESPMethod
- [
- description("Fetch nodes matching the indicated path")
- ] FetchNodes(FetchNodesRequest, FetchNodesResponse);
- ESPMethod
- [
- description("Get a copy of a node for paste operations")
- ] GetNodeCopy(GetNodeCopyRequest, GetNodeCopyResponse);
- ESPMethod
- [
- description("Paste the copy of a node to an environment")
- ] InsertNodeCopy(PasteNodeCopyRequest, PasteNodeCopyResponse);
- };
- SCMexportdef(ws_configmgr);
- SCMapi(ws_configmgr) IClientws_configmgr *createws_configmgrClient();
|