123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437 |
- /*##############################################################################
- HPCC SYSTEMS software Copyright (C) 2012 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.
- ############################################################################## */
- ////////////////////////////////////////////////////////////
- #include "ws_topology.hpp"
- EspInclude(ws_topology);
- #include "ws_workunits.hpp"
- EspInclude(ws_workunits);
- ESPStruct ActiveWorkunit
- {
- string Wuid;
- string State;
- int StateID; //remove it later
- string Owner;
- string Jobname;
- string Server;
- strint Instance;
- string Priority;
- [min_ver("1.01")] string Extra;
- [min_ver("1.02")] string GraphName;
- [min_ver("1.02")] string Duration;
- [min_ver("1.02")] string GID;
- [min_ver("1.03")] string QueueName;
- [min_ver("1.04")] int MemoryBlocked;
- [min_ver("1.09")] bool IsPausing(false);
- [min_ver("1.10")] string Warning;
- [min_ver("1.15")] ClusterName;
- [min_ver("1.15")] string ClusterType;
- [min_ver("1.15")] string ClusterQueueName;
- [min_ver("1.16")] string TargetClusterName;
- };
- ESPStruct TargetCluster
- {
- string ClusterName;
- string QueueName;
- string QueueStatus;
- string StatusDetails;
- string Warning;
- int ClusterType;
- int ClusterSize;
- int ClusterStatus;
- };
- ESPStruct ThorCluster
- {
- string ClusterName;
- [min_ver("1.03")] string QueueName;
- string QueueStatus;
- [min_ver("1.05")] int QueueAvailable;
- [min_ver("1.05")] int JobsRunning;
- [min_ver("1.05")] int JobsInQueue;
- [min_ver("1.07")] int QueueStatus2;
- [min_ver("1.09")] string ThorLCR;
- [min_ver("1.11")] int ClusterSize;
- };
- ESPStruct HThorCluster
- {
- string ClusterName;
- string QueueName;
- string QueueStatus;
- int JobsRunning;
- int JobsInQueue;
- int QueueStatus2;
- int ClusterSize;
- };
- ESPStruct RoxieCluster
- {
- string ClusterName;
- string QueueName;
- string QueueStatus;
- int JobsRunning;
- int JobsInQueue;
- int QueueStatus2;
- [min_ver("1.11")] int ClusterSize;
- };
- ESPStruct DFUJob
- {
- string TimeStarted;
- int Done;
- int Total;
- string Command;
- };
- ESPStruct ServerJobQueue
- {
- string QueueName;
- string ServerName;
- string ServerType;
- string QueueStatus;
- [min_ver("1.17")] string StatusDetails;
- [min_ver("1.19")] string NetworkAddress;
- [min_ver("1.19")] int Port;
- };
- ESPstruct [nil_remove] StatusServerInfo
- {
- ESPstruct TargetCluster TargetClusterInfo;
- ESPstruct ServerJobQueue ServerInfo;
- ESParray<ESPstruct ActiveWorkunit> Workunits;
- };
- ESPrequest [nil_remove] ActivityRequest
- {
- string ChatURL;
- string BannerContent;
- string BannerColor;
- string BannerSize;
- string BannerScroll;
- int BannerAction(0);
- bool EnableChatURL;
- bool FromSubmitBtn(false);
- string SortBy;
- bool Descending(false);
- };
- ESPresponse [exceptions_inline] ActivityResponse
- {
- string Build;
- [depr_ver("1.16")] ESParray<ESPstruct ThorCluster> ThorClusters;
- [min_ver("1.07"), depr_ver("1.16")] ESParray<ESPstruct RoxieCluster> RoxieClusters;
- [min_ver("1.12"), depr_ver("1.16")] ESParray<ESPstruct HThorCluster> HThorClusters;
- [min_ver("1.16")] ESParray<ESPstruct TargetCluster> ThorClusterList;
- [min_ver("1.16")] ESParray<ESPstruct TargetCluster> RoxieClusterList;
- [min_ver("1.16")] ESParray<ESPstruct TargetCluster> HThorClusterList;
- ESParray<ESPstruct DFUJob> DFUJobs;
- ESParray<ESPstruct ActiveWorkunit> Running;
- [min_ver("1.06")] string BannerContent;
- [min_ver("1.06")] string BannerColor;
- [min_ver("1.06")] string BannerSize;
- [min_ver("1.08")] string BannerScroll;
- [min_ver("1.06")] string ChatURL;
- [min_ver("1.06")] int ShowBanner(0);
- [min_ver("1.06")] int ShowChatURL(0);
- [min_ver("1.11")] string SortBy;
- [min_ver("1.11")] bool Descending(false);
- [min_ver("1.12")] bool SuperUser(false);
- [min_ver("1.12")] string AccessRight;
- [min_ver("1.14")] ESParray<ESPstruct ServerJobQueue> ServerJobQueues;
- };
- ESPrequest SMCIndexRequest
- {
- };
- ESPresponse [exceptions_inline] SMCIndexResponse
- {
- };
- ESPStruct Capability
- {
- string name;
- string description;
- };
- ESPStruct Permission
- {
- string Feature;
- ESParray<ESPstruct Capability> Capabilities;
- };
- ESPrequest SMCPermissionsRequest
- {
- };
- ESPresponse [] SMCPermissionsResponse
- {
- ESParray<ESPstruct Permission> Permissions;
- };
- ESPrequest SMCQueueRequest
- {
- string Cluster;
- string QueueName;
- string Comment;
- [min_ver("1.19")] string ServerType;
- [min_ver("1.19")] string NetworkAddress;
- [min_ver("1.19")] int Port;
- };
- ESPresponse [exceptions_inline] SMCQueueResponse
- {
- [min_ver("1.19")] ESPstruct StatusServerInfo StatusServerInfo;
- };
- ESPrequest SMCJobRequest
- {
- int ClusterType;
- string Cluster;
- string QueueName;
- string Wuid;
- };
- ESPresponse [exceptions_inline] SMCJobResponse
- {
- };
- ESPStruct SMCJob
- {
- string Wuid;
- string QueueName;
- };
- ESPrequest SMCPriorityRequest
- {
- [depr_ver("1.18")] int ClusterType;
- [depr_ver("1.18")] string Cluster;
- string QueueName;
- string Wuid;
- string Priority;
- [min_ver("1.18")] ESParray<ESPstruct SMCJob> SMCJobs;
- };
- ESPresponse [exceptions_inline] SMCPriorityResponse
- {
- };
- ESPrequest GetThorQueueAvailabilityRequest
- {
- };
- ESPresponse [exceptions_inline] GetThorQueueAvailabilityResponse
- {
- ESParray<ESPstruct ThorCluster> ThorClusters;
- };
- ESPrequest [nil_remove] SetBannerRequest
- {
- string ChatURL;
- string BannerContent;
- string BannerColor;
- string BannerSize;
- string BannerScroll;
- int BannerAction;
- bool EnableChatURL;
- bool FromSubmitBtn(false);
- };
- ESPresponse [exceptions_inline] SetBannerResponse
- {
- };
- ESPrequest NotInCommunityEditionRequest
- {
- string EEPortal;
- };
- ESPresponse [exceptions_inline] NotInCommunityEditionResponse
- {
- };
- ESPStruct HPCCResource
- {
- string Name;
- string Description;
- string FileName;
- string Version;
- };
- ESPStruct HPCCResourceRepository
- {
- string Name;
- string Path;
- ESParray<ESPstruct HPCCResource> HPCCResources;
- };
- ESPrequest
- [
- ]
- BrowseResourcesRequest
- {
- };
- ESPresponse
- [
- exceptions_inline, nil_remove
- ]
- BrowseResourcesResponse
- {
- string PortalURL;
- string NetAddress;
- int OS;
- [min_ver("1.13")] bool UseResource;
- ESParray<ESPstruct HPCCResourceRepository> HPCCResourceRepositories;
- };
- ESPenum RoxieControlCmdType : string
- {
- ATTACH("Attach"),
- DETACH("Detach"),
- STATE("State"),
- RELOAD("Reload"),
- RELOAD_RETRY("ReloadRetry")
- };
- ESPrequest RoxieControlCmdRequest
- {
- string ProcessCluster;
- ESPenum RoxieControlCmdType Command;
- int Wait;
- };
- ESPStruct [nil_remove] RoxieControlEndpointInfo
- {
- string Address;
- bool Attached;
- string StateHash;
- string Status;
- };
- ESPresponse
- [
- exceptions_inline, nil_remove
- ]
- RoxieControlCmdResponse
- {
- ESParray<ESPstruct RoxieControlEndpointInfo, Endpoint> Endpoints;
- };
- ESPrequest GetStatusServerInfoRequest
- {
- string ServerName;
- string ServerType;
- string NetworkAddress;
- int Port;
- };
- ESPresponse
- [
- exceptions_inline, nil_remove
- ]
- GetStatusServerInfoResponse
- {
- ESPstruct StatusServerInfo StatusServerInfo;
- };
- ESPenum LockModes : string
- {
- ALL("ALL"),
- READ("READ"),
- WRITE("WRITE"),
- HOLD("HOLD"),
- SUB("SUB")
- };
- ESPStruct [nil_remove] Lock
- {
- string EPIP;
- string XPath;
- string LogicalFile;
- int64 SessionID;
- unsigned DurationMS;
- string TimeLocked;
- string Modes;
- ESParray<string> ModeNames;
- };
- ESPrequest [nil_remove] LockQueryRequest
- {
- string EPIP;
- string XPath;
- unsigned DurationMSLow;
- unsigned DurationMSHigh;
- string TimeLockedLow;
- string TimeLockedHigh;
- ESPenum LockModes Mode;
- bool AllFileLocks(false);
- };
- ESPresponse [exceptions_inline] LockQueryResponse
- {
- ESParray<ESPstruct Lock> Locks;
- int NumLocks;
- };
- ESPservice [auth_feature("DEFERRED"), noforms, version("1.19"), exceptions_inline("./smc_xslt/exceptions.xslt"), use_method_name] WsSMC
- {
- ESPmethod Index(SMCIndexRequest, SMCIndexResponse);
- ESPmethod [resp_xsl_default("/esp/xslt/index.xslt")] Activity(ActivityRequest, ActivityResponse);
- ESPmethod ClearQueue(SMCQueueRequest, SMCQueueResponse);
- ESPmethod PauseQueue(SMCQueueRequest, SMCQueueResponse);
- ESPmethod ResumeQueue(SMCQueueRequest, SMCQueueResponse);
- ESPmethod StopQueue(SMCQueueRequest, SMCQueueResponse);
- ESPmethod RemoveJob(SMCJobRequest, SMCJobResponse);
- ESPmethod MoveJobFront(SMCJobRequest, SMCJobResponse);
- ESPmethod MoveJobBack(SMCJobRequest, SMCJobResponse);
- ESPmethod MoveJobUp(SMCJobRequest, SMCJobResponse);
- ESPmethod MoveJobDown(SMCJobRequest, SMCJobResponse);
- //this one doesn't seem to do any feature level check, Kevin/Tony?
- ESPmethod [auth_feature("NONE")] SetJobPriority(SMCPriorityRequest, SMCPriorityResponse);
- ESPmethod GetThorQueueAvailability(GetThorQueueAvailabilityRequest, GetThorQueueAvailabilityResponse);
- //this one ensures superuser, but no feature check is done, Kevin/Tony?
- ESPmethod [auth_feature("NONE")] SetBanner(SetBannerRequest, SetBannerResponse);
- //this one ensures superuser, but no feature check is done, Kevin/Tony?
- ESPmethod [auth_feature("NONE")] NotInCommunityEdition(NotInCommunityEditionRequest, NotInCommunityEditionResponse);
- ESPmethod [resp_xsl_default("/esp/xslt/hpccresourcelist.xslt")] BrowseResources(BrowseResourcesRequest, BrowseResourcesResponse);
- ESPmethod RoxieControlCmd(RoxieControlCmdRequest, RoxieControlCmdResponse);
- //this one doesn't seem to do any feature level check, Kevin/Tony?
- ESPmethod [auth_feature("NONE")] GetStatusServerInfo(GetStatusServerInfoRequest, GetStatusServerInfoResponse);
- //this one doesn't seem to do any feature level check, Kevin/Tony?
- ESPmethod [auth_feature("NONE")] LockQuery(LockQueryRequest, LockQueryResponse);
- };
- SCMexportdef(WSSMC);
- SCMapi(WSSMC) IClientWsSMC *createWsSMCClient();
|