/*############################################################################## 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 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 ThorClusters; [min_ver("1.07"), depr_ver("1.16")] ESParray RoxieClusters; [min_ver("1.12"), depr_ver("1.16")] ESParray HThorClusters; [min_ver("1.16")] ESParray ThorClusterList; [min_ver("1.16")] ESParray RoxieClusterList; [min_ver("1.16")] ESParray HThorClusterList; ESParray DFUJobs; ESParray 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 ServerJobQueues; }; ESPrequest SMCIndexRequest { }; ESPresponse [exceptions_inline] SMCIndexResponse { }; ESPStruct Capability { string name; string description; }; ESPStruct Permission { string Feature; ESParray Capabilities; }; ESPrequest SMCPermissionsRequest { }; ESPresponse [] SMCPermissionsResponse { ESParray 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 SMCJobs; }; ESPresponse [exceptions_inline] SMCPriorityResponse { }; ESPrequest GetThorQueueAvailabilityRequest { }; ESPresponse [exceptions_inline] GetThorQueueAvailabilityResponse { ESParray 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 HPCCResources; }; ESPrequest [ ] BrowseResourcesRequest { }; ESPresponse [ exceptions_inline, nil_remove ] BrowseResourcesResponse { string PortalURL; string NetAddress; int OS; [min_ver("1.13")] bool UseResource; ESParray 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 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 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 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();