-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(comms): Add support for WsSasha
Fixes #4219 Comms Layer for WsSasha Added Signed-off-by: Kunal Aswani <[email protected]>
- Loading branch information
1 parent
8d7f75b
commit 7ffb27c
Showing
5 changed files
with
121 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { SashaServiceBase, WsSasha } from "./wsdl/WsSasha/v1.01/WsSasha"; | ||
|
||
export { | ||
WsSasha | ||
}; | ||
|
||
export class SashaService extends SashaServiceBase { | ||
} |
100 changes: 100 additions & 0 deletions
100
packages/comms/src/services/wsdl/WsSasha/v1.01/WsSasha.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
import { IConnection, IOptions } from "../../../../connection"; | ||
import { Service } from "../../../../espConnection"; | ||
|
||
export namespace WsSasha { | ||
|
||
export type unsignedInt = number; | ||
|
||
export enum WUTypes { | ||
ECL = "ECL", | ||
DFU = "DFU" | ||
} | ||
|
||
export interface ArchiveWURequest { | ||
Wuid?: string; | ||
WUType?: WUTypes; | ||
DeleteOnSuccess?: boolean; | ||
} | ||
|
||
export interface Exception { | ||
Code: string; | ||
Audience: string; | ||
Source: string; | ||
Message: string; | ||
} | ||
|
||
export interface Exceptions { | ||
Source: string; | ||
Exception: Exception[]; | ||
} | ||
|
||
export interface ResultResponse { | ||
Exceptions: Exceptions; | ||
Result: string; | ||
} | ||
|
||
export interface GetVersionRequest { | ||
|
||
} | ||
|
||
export interface ListWURequest { | ||
WUType?: WUTypes; | ||
Wuid?: string; | ||
Cluster?: string; | ||
Owner?: string; | ||
JobName?: string; | ||
State?: string; | ||
FromDate?: string; | ||
ToDate?: string; | ||
Archived?: boolean; | ||
Online?: boolean; | ||
IncludeDT?: boolean; | ||
BeforeWU?: string; | ||
AfterWU?: string; | ||
MaxNumberWUs?: unsignedInt; | ||
Descending?: boolean; | ||
OutputFields?: string; | ||
} | ||
|
||
export interface WSSashaPingRequest { | ||
|
||
} | ||
|
||
export interface WSSashaPingResponse { | ||
|
||
} | ||
|
||
export interface RestoreWURequest { | ||
Wuid?: string; | ||
WUType?: WUTypes; | ||
} | ||
|
||
} | ||
|
||
export class SashaServiceBase extends Service { | ||
|
||
constructor(optsConnection: IOptions | IConnection) { | ||
super(optsConnection, "WSSasha", "1.01"); | ||
} | ||
|
||
ArchiveWU(request: Partial<WsSasha.ArchiveWURequest>): Promise<WsSasha.ResultResponse> { | ||
return this._connection.send("ArchiveWU", request, "json", false, undefined, "ResultResponse"); | ||
} | ||
|
||
GetVersion(request: Partial<WsSasha.GetVersionRequest>): Promise<WsSasha.ResultResponse> { | ||
return this._connection.send("GetVersion", request, "json", false, undefined, "ResultResponse"); | ||
} | ||
|
||
ListWU(request: Partial<WsSasha.ListWURequest>): Promise<WsSasha.ResultResponse> { | ||
return this._connection.send("ListWU", request, "json", false, undefined, "ResultResponse"); | ||
} | ||
|
||
Ping(request: Partial<WsSasha.WSSashaPingRequest>): Promise<WsSasha.WSSashaPingResponse> { | ||
return this._connection.send("Ping", request, "json", false, undefined, "WSSashaPingResponse"); | ||
} | ||
|
||
RestoreWU(request: Partial<WsSasha.RestoreWURequest>): Promise<WsSasha.ResultResponse> { | ||
return this._connection.send("RestoreWU", request, "json", false, undefined, "ResultResponse"); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { expect } from "chai"; | ||
|
||
import { SashaService } from "@hpcc-js/comms"; | ||
import { ESP_URL } from "../testLib"; | ||
|
||
describe("WsSasha", function () { | ||
it("basic", function () { | ||
const service = new SashaService({ baseUrl: ESP_URL }); | ||
expect(service).exist; | ||
}); | ||
}); |