@broadcom/ops-for-zowe-cli 4.0.7 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/imgs/zowe-conformant-zowev2-cli-color.png +0 -0
- package/lib/api/OpsProfilesConfig.js +0 -2
- package/lib/api/OpsProfilesConfig.js.map +1 -1
- package/lib/api/constants/PluginConstants.d.ts +14 -0
- package/lib/api/constants/PluginConstants.js +41 -0
- package/lib/api/constants/PluginConstants.js.map +1 -0
- package/lib/api/methods/update/Update.js +4 -3
- package/lib/api/methods/update/Update.js.map +1 -1
- package/lib/api/utils/OpsRestUtils.d.ts +1 -10
- package/lib/api/utils/OpsRestUtils.js +4 -61
- package/lib/api/utils/OpsRestUtils.js.map +1 -1
- package/lib/api/utils/RuleUtils.js +1 -2
- package/lib/api/utils/RuleUtils.js.map +1 -1
- package/lib/api/utils/SSMUtils.js +4 -5
- package/lib/api/utils/SSMUtils.js.map +1 -1
- package/lib/cli/OpsBaseHandler.d.ts +11 -2
- package/lib/cli/OpsBaseHandler.js +20 -6
- package/lib/cli/OpsBaseHandler.js.map +1 -1
- package/lib/cli/start/resource/Resource.handler.js.map +1 -1
- package/lib/imperative.js +19 -3
- package/lib/imperative.js.map +1 -1
- package/package.json +10 -5
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OPS/MVS® Plug-in for Zowe CLI
|
|
2
2
|
|
|
3
|
-
<img src="imgs/zowe-conformant-
|
|
3
|
+
<img src="imgs/zowe-conformant-zowev2-cli-color.png" width=25% alt="Zowe v2 CLI Conformance Badge"/>
|
|
4
4
|
|
|
5
5
|
This repository contains the OPS/MVS® Plug-in for Zowe CLI (OPS).
|
|
6
6
|
|
|
Binary file
|
|
@@ -24,8 +24,6 @@
|
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.OpsProfilesConfig = void 0;
|
|
26
26
|
const utils_1 = require("./utils");
|
|
27
|
-
// const CCID_MAX_LEN = 12;
|
|
28
|
-
// const COMMENT_MAX_LEN = 40;
|
|
29
27
|
exports.OpsProfilesConfig = [
|
|
30
28
|
{
|
|
31
29
|
type: "ops",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpsProfilesConfig.js","sourceRoot":"","sources":["../../src/api/OpsProfilesConfig.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAGH,mCAAqC;
|
|
1
|
+
{"version":3,"file":"OpsProfilesConfig.js","sourceRoot":"","sources":["../../src/api/OpsProfilesConfig.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAGH,mCAAqC;AAExB,QAAA,iBAAiB,GAAwC;IAClE;QACI,IAAI,EAAE,KAAK;QACX,MAAM,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,kCAAkC;YACzC,WAAW,EAAE,yGAAyG;YACtH,UAAU,EAAE;gBACR,IAAI,EAAE;oBACF,gBAAgB,EAAE,oBAAY,CAAC,WAAW;oBAC1C,IAAI,EAAE,QAAQ;iBACjB;gBACD,IAAI,EAAE;oBACF,gBAAgB,EAAE,oBAAY,CAAC,WAAW;oBAC1C,IAAI,EAAE,QAAQ;iBACjB;gBACD,IAAI,EAAE;oBACF,gBAAgB,EAAE,oBAAY,CAAC,WAAW;oBAC1C,MAAM,EAAE,IAAI;oBACZ,IAAI,EAAE,QAAQ;iBACjB;gBACD,QAAQ,EAAE;oBACN,gBAAgB,EAAE,oBAAY,CAAC,eAAe;oBAC9C,MAAM,EAAE,IAAI;oBACZ,IAAI,EAAE,QAAQ;iBACjB;gBACD,QAAQ,EAAE;oBACN,gBAAgB,EAAE,oBAAY,CAAC,eAAe;oBAC9C,IAAI,EAAE,QAAQ;iBACjB;gBACD,kBAAkB,EAAE;oBAChB,gBAAgB,EAAE,oBAAY,CAAC,0BAA0B;oBACzD,IAAI,EAAE,SAAS;iBAClB;gBACD,SAAS,EAAE;oBACP,gBAAgB,EAAE,oBAAY,CAAC,gBAAgB;oBAC/C,IAAI,EAAE,QAAQ;iBACjB;aACJ;SAEJ;QACD,iEAAiE;QACjE,qBAAqB,EAAE;YACnB;gBACI,OAAO,EAAE,2GAA2G;gBACpH,WAAW,EAAE,sGAAsG;oBAC/G,wDAAwD;aAC/D;SACJ;QACD,qBAAqB,EAAE;YACnB;gBACI,OAAO,EAAE,uBAAuB;gBAChC,WAAW,EAAE,sFAAsF;aACtG;YACD;gBACI,OAAO,EAAE,0CAA0C;gBACnD,WAAW,EAAE,sFAAsF;aACtG;SACJ;KACJ;CACJ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare class PluginConstants {
|
|
2
|
+
/**
|
|
3
|
+
* The name of this plug-in
|
|
4
|
+
*/
|
|
5
|
+
static readonly PLUGIN_NAME = "Zowe CLI Plug-in for OPS/MVS\u00AE";
|
|
6
|
+
/**
|
|
7
|
+
* The description of the group exposed by this plug-in
|
|
8
|
+
*/
|
|
9
|
+
static readonly PLUGIN_DESCRIPTION = "Interact with OPS/MVS\u00AE for automation administration and resource management.";
|
|
10
|
+
/**
|
|
11
|
+
* The name of the command group exposed by this plug-in
|
|
12
|
+
*/
|
|
13
|
+
static readonly PLUGIN_GROUP_NAME = "ops";
|
|
14
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2019 Broadcom. All Rights Reserved. The term
|
|
4
|
+
* "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
|
5
|
+
*
|
|
6
|
+
* This software and all information contained therein is
|
|
7
|
+
* confidential and proprietary and shall not be duplicated,
|
|
8
|
+
* used, disclosed, or disseminated in any way except as
|
|
9
|
+
* authorized by the applicable license agreement, without the
|
|
10
|
+
* express written permission of Broadcom. All authorized
|
|
11
|
+
* reproductions must be marked with this language.
|
|
12
|
+
*
|
|
13
|
+
* EXCEPT AS SET FORTH IN THE APPLICABLE LICENSE AGREEMENT, TO
|
|
14
|
+
* THE EXTENT PERMITTED BY APPLICABLE LAW, BROADCOM PROVIDES THIS
|
|
15
|
+
* SOFTWARE WITHOUT WARRANTY OF ANY KIND, INCLUDING WITHOUT
|
|
16
|
+
* LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR
|
|
17
|
+
* FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL BROADCOM
|
|
18
|
+
* BE LIABLE TO THE END USER OR ANY THIRD PARTY FOR ANY LOSS OR
|
|
19
|
+
* DAMAGE, DIRECT OR INDIRECT, FROM THE USE OF THIS SOFTWARE,
|
|
20
|
+
* INCLUDING WITHOUT LIMITATION, LOST PROFITS, BUSINESS
|
|
21
|
+
* INTERRUPTION, GOODWILL, OR LOST DATA, EVEN IF BROADCOM IS
|
|
22
|
+
* EXPRESSLY ADVISED OF SUCH LOSS OR DAMAGE.
|
|
23
|
+
*/
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.PluginConstants = void 0;
|
|
26
|
+
class PluginConstants {
|
|
27
|
+
}
|
|
28
|
+
exports.PluginConstants = PluginConstants;
|
|
29
|
+
/**
|
|
30
|
+
* The name of this plug-in
|
|
31
|
+
*/
|
|
32
|
+
PluginConstants.PLUGIN_NAME = "Zowe CLI Plug-in for OPS/MVS®";
|
|
33
|
+
/**
|
|
34
|
+
* The description of the group exposed by this plug-in
|
|
35
|
+
*/
|
|
36
|
+
PluginConstants.PLUGIN_DESCRIPTION = "Interact with OPS/MVS® for automation administration and resource management.";
|
|
37
|
+
/**
|
|
38
|
+
* The name of the command group exposed by this plug-in
|
|
39
|
+
*/
|
|
40
|
+
PluginConstants.PLUGIN_GROUP_NAME = "ops";
|
|
41
|
+
//# sourceMappingURL=PluginConstants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PluginConstants.js","sourceRoot":"","sources":["../../../src/api/constants/PluginConstants.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAEH,MAAa,eAAe;;AAA5B,0CAgBC;AAdG;;GAEG;AACoB,2BAAW,GAAG,+BAA+B,CAAC;AAErE;;GAEG;AACoB,kCAAkB,GAAG,+EAA+E,CAAC;AAE5H;;GAEG;AACoB,iCAAiB,GAAG,KAAK,CAAC"}
|
|
@@ -74,12 +74,13 @@ table, wait) {
|
|
|
74
74
|
return response;
|
|
75
75
|
}
|
|
76
76
|
// otherwise we have to poll
|
|
77
|
-
let pollAttempts = 0;
|
|
78
77
|
let pollResponse;
|
|
79
78
|
let currentState = response.ssmresource[0].current;
|
|
80
79
|
const ONE_SECOND = 1000;
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
const start = new Date().getTime();
|
|
81
|
+
// looping with 'wait' value as max was taking approximately twice the requested time
|
|
82
|
+
// so use the actual time to calculate when the 'wait' time is exceeded
|
|
83
|
+
while (((new Date().getTime() - start) / ONE_SECOND) < wait) {
|
|
83
84
|
pollResponse = yield show_1.showResource(session, resource, table, subsystem);
|
|
84
85
|
currentState = pollResponse.ssmresource[0].current;
|
|
85
86
|
if (currentState.toUpperCase() === desiredState.toUpperCase()) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Update.js","sourceRoot":"","sources":["../../../../src/api/methods/update/Update.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAEH,iDAA0F;AAC1F,+CAA+C;AAC/C,uCAAkD;AAClD,4FAAyF;AACzF,kCAAuC;AAEvC,SAAsB,UAAU,CAAC,OAAgB,EAAE,WAAmB,EACrC,QAAgB,EAAE,SAAiB,EAAG,sBAAsB;AAC5D,SAAkB;;QAE/C,MAAM,OAAO,GAAG,iBAAS,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;QAChF,MAAM,QAAQ,GAAG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L,CAAC;CAAA;AAnDD,wCAmDC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ICommandDefinitionPassOn, ICommandOptionDefinition } from "@zowe/imperative";
|
|
2
2
|
/**
|
|
3
3
|
* Class to hold APIs related to OPS Web Services
|
|
4
4
|
* @export
|
|
@@ -23,13 +23,4 @@ export declare class OpsRestUtils {
|
|
|
23
23
|
*
|
|
24
24
|
*/
|
|
25
25
|
static OPS_CONNECTION_PASS_ON: ICommandDefinitionPassOn[];
|
|
26
|
-
/**
|
|
27
|
-
* Setup Ops Web Services session
|
|
28
|
-
*
|
|
29
|
-
* @static
|
|
30
|
-
* @param {ICommandArguments} args - command line arguments passed to the command handler
|
|
31
|
-
* @returns {Session} - the completed session to be used with OPS typescript APIs
|
|
32
|
-
* @memberof OpsRestUtils
|
|
33
|
-
*/
|
|
34
|
-
static setupOpsSession(args: ICommandArguments): Session;
|
|
35
26
|
}
|
|
@@ -23,69 +23,12 @@
|
|
|
23
23
|
*/
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.OpsRestUtils = void 0;
|
|
26
|
-
const imperative_1 = require("@zowe/imperative");
|
|
27
|
-
const util_1 = require("util");
|
|
28
26
|
/**
|
|
29
27
|
* Class to hold APIs related to OPS Web Services
|
|
30
28
|
* @export
|
|
31
29
|
* @class OpsRestUtils
|
|
32
30
|
*/
|
|
33
31
|
class OpsRestUtils {
|
|
34
|
-
/**
|
|
35
|
-
* Setup Ops Web Services session
|
|
36
|
-
*
|
|
37
|
-
* @static
|
|
38
|
-
* @param {ICommandArguments} args - command line arguments passed to the command handler
|
|
39
|
-
* @returns {Session} - the completed session to be used with OPS typescript APIs
|
|
40
|
-
* @memberof OpsRestUtils
|
|
41
|
-
*/
|
|
42
|
-
static setupOpsSession(args) {
|
|
43
|
-
let sessionHost = "";
|
|
44
|
-
let sessionPort = "";
|
|
45
|
-
let sessionUser = "";
|
|
46
|
-
let sessionPassword = "";
|
|
47
|
-
let sessionProtocol;
|
|
48
|
-
let sessionRejectUnauthorized = true;
|
|
49
|
-
// Imperative framework takes care of the precedence of
|
|
50
|
-
// CLI args > environmental variables > profile fields
|
|
51
|
-
// so we can just check the args
|
|
52
|
-
sessionProtocol = args.protocol.toLowerCase(); // eslint-disable-line
|
|
53
|
-
sessionRejectUnauthorized = args.rejectUnauthorized;
|
|
54
|
-
sessionHost = args.host;
|
|
55
|
-
sessionPort = args.port;
|
|
56
|
-
sessionUser = args.user;
|
|
57
|
-
sessionPassword = args.password;
|
|
58
|
-
const errorStack = [];
|
|
59
|
-
if (util_1.isNullOrUndefined(sessionHost)) {
|
|
60
|
-
errorStack.push("host");
|
|
61
|
-
}
|
|
62
|
-
if (util_1.isNullOrUndefined(sessionPort)) {
|
|
63
|
-
errorStack.push("port");
|
|
64
|
-
}
|
|
65
|
-
if (util_1.isNullOrUndefined(sessionUser)) {
|
|
66
|
-
errorStack.push("user");
|
|
67
|
-
}
|
|
68
|
-
if (util_1.isNullOrUndefined(sessionPassword)) {
|
|
69
|
-
errorStack.push("password");
|
|
70
|
-
}
|
|
71
|
-
if (util_1.isNullOrUndefined(sessionRejectUnauthorized)) {
|
|
72
|
-
errorStack.push("reject-unauthorized");
|
|
73
|
-
}
|
|
74
|
-
if (errorStack.length > 0) {
|
|
75
|
-
throw new imperative_1.ImperativeError({
|
|
76
|
-
msg: "Missing arguments or ops profile specification for " + errorStack.join(", "),
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
return new imperative_1.Session({
|
|
80
|
-
hostname: sessionHost,
|
|
81
|
-
port: Number(sessionPort),
|
|
82
|
-
protocol: sessionProtocol,
|
|
83
|
-
type: "basic",
|
|
84
|
-
user: sessionUser,
|
|
85
|
-
password: sessionPassword,
|
|
86
|
-
rejectUnauthorized: sessionRejectUnauthorized
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
32
|
}
|
|
90
33
|
exports.OpsRestUtils = OpsRestUtils;
|
|
91
34
|
OpsRestUtils.APP_URL = "/opsmvs/api";
|
|
@@ -98,28 +41,28 @@ OpsRestUtils.HOST_OPTION = {
|
|
|
98
41
|
description: "The hostname of the server where OPS Web Services is running.",
|
|
99
42
|
type: "string",
|
|
100
43
|
name: "host",
|
|
101
|
-
required:
|
|
44
|
+
required: false,
|
|
102
45
|
group: OpsRestUtils.OPS_CONNECTION_GROUP
|
|
103
46
|
};
|
|
104
47
|
OpsRestUtils.PORT_OPTION = {
|
|
105
48
|
description: "The port number for OPS Web Services.",
|
|
106
49
|
type: "number",
|
|
107
50
|
name: "port", aliases: ["p"],
|
|
108
|
-
required:
|
|
51
|
+
required: false,
|
|
109
52
|
group: OpsRestUtils.OPS_CONNECTION_GROUP
|
|
110
53
|
};
|
|
111
54
|
OpsRestUtils.USER_OPTION = {
|
|
112
55
|
description: "Your z/OS user name used to authenticate to OPS Web Services",
|
|
113
56
|
type: "string",
|
|
114
57
|
name: "user",
|
|
115
|
-
required:
|
|
58
|
+
required: false,
|
|
116
59
|
group: OpsRestUtils.OPS_CONNECTION_GROUP
|
|
117
60
|
};
|
|
118
61
|
OpsRestUtils.PASSWORD_OPTION = {
|
|
119
62
|
description: "Your z/OS password used to authenticate to OPS Web Services",
|
|
120
63
|
type: "string",
|
|
121
64
|
name: "password", aliases: ["pass"],
|
|
122
|
-
required:
|
|
65
|
+
required: false,
|
|
123
66
|
group: OpsRestUtils.OPS_CONNECTION_GROUP
|
|
124
67
|
};
|
|
125
68
|
OpsRestUtils.PROTOCOL_OPTION = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpsRestUtils.js","sourceRoot":"","sources":["../../../src/api/utils/OpsRestUtils.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;
|
|
1
|
+
{"version":3,"file":"OpsRestUtils.js","sourceRoot":"","sources":["../../../src/api/utils/OpsRestUtils.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;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AAe,EAAE;QACb,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;QACzB,aAAa,EAAE,KAAK;KACvB;IACD,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,YAAY,CAAC,oBAAoB;CAC3C,CAAC;AAEY,uCAA0B,GAA6B;IACjE,WAAW,EAAE,0FAA0F;QACnG,0DAA0D;IAC9D,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,qBAAqB,EAAE,OAAO,EAAE,CAAC,IAAI,CAAC;IAC5C,YAAY,EAAE,IAAI;IAClB,KAAK,EAAE,YAAY,CAAC,oBAAoB;CAC3C,CAAC;AAEY,6BAAgB,GAA6B;IACvD,WAAW,EAAE,wFAAwF;IACrG,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC,MAAM,CAAC;IACpC,KAAK,EAAE,YAAY,CAAC,oBAAoB;CAC3C,CAAC;AAEY,mCAAsB,GAA+B;IAC/D,YAAY,CAAC,WAAW;IACxB,YAAY,CAAC,eAAe;IAC5B,YAAY,CAAC,WAAW;IACxB,YAAY,CAAC,WAAW;IACxB,YAAY,CAAC,0BAA0B;IACvC,YAAY,CAAC,eAAe;IAC5B,YAAY,CAAC,gBAAgB;CAChC,CAAC;AAEF;;;GAGG;AACW,mCAAsB,GAA+B,CAAC;QAChE,WAAW,EAAE,CAAC;gBACV,IAAI,EAAE,OAAO;aAChB,CAAC;QACF,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE,YAAY,CAAC,sBAAsB;QAC1C,KAAK,EAAE,IAAI;KACd,CAAC,CAAC"}
|
|
@@ -35,7 +35,6 @@ exports.RuleUtils = void 0;
|
|
|
35
35
|
const imperative_1 = require("@zowe/imperative");
|
|
36
36
|
const constants_1 = require("../constants");
|
|
37
37
|
const OpsTextUtils_1 = require("./OpsTextUtils");
|
|
38
|
-
const util_1 = require("util");
|
|
39
38
|
class RuleUtils {
|
|
40
39
|
// public static readonly RULESET_URL: string = OpsRestUtils.AOF_URL + "/rulesets";
|
|
41
40
|
// public static readonly RULE_URL: string = "/rules";
|
|
@@ -63,7 +62,7 @@ class RuleUtils {
|
|
|
63
62
|
ruleSetName = encodeURIComponent(ruleSetName);
|
|
64
63
|
ruleName = encodeURIComponent(ruleName);
|
|
65
64
|
let subsystemQueryString = "";
|
|
66
|
-
if (
|
|
65
|
+
if (subSystem != null) {
|
|
67
66
|
subsystemQueryString = "?sub=" + encodeURIComponent(subSystem);
|
|
68
67
|
}
|
|
69
68
|
return constants_1.OpsConstants.RULESET_URL + "/" + ruleSetName + constants_1.OpsConstants.RULE_URL + "/" +
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RuleUtils.js","sourceRoot":"","sources":["../../../src/api/utils/RuleUtils.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAEH,iDAAqD;AACrD,4CAA0C;AAC1C,iDAA4C;
|
|
1
|
+
{"version":3,"file":"RuleUtils.js","sourceRoot":"","sources":["../../../src/api/utils/RuleUtils.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAEH,iDAAqD;AACrD,4CAA0C;AAC1C,iDAA4C;AAE5C,MAAa,SAAS;IAElB,mFAAmF;IACnF,sDAAsD;IACtD,yDAAyD;IACzD,0GAA0G;IAC1G;;OAEG;IACI,MAAM,CAAO,aAAa,CAAC,OAAgB,EAAE,WAAmB,EAAE,QAAgB,EAAE,QAAgB,EAAE,SAAkB;;YAE3H,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;YAC3E,MAAM,QAAQ,GAAG;gBACb,MAAM,EAAE,QAAQ;aACnB,CAAC;YAEF,OAAO,uBAAU,CAAC,cAAc,CAAK,OAAO,EAAE,OAAO,EAAE,wBAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;Q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AC,aAAa,CAAC,SAAS,CAAC,CAAC;SACrD;QAED,MAAM,YAAY,GAAG,2BAAY,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;QACpE,MAAM,YAAY,GAAG,2BAAY,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;QAEpE,OAAO,YAAY,GAAG,SAAS,GAAG,IAAI,GAAG,YAAY,GAAG,SAAS,CAAC;IACtE,CAAC;IAEM,MAAM,CAAC,kBAAkB,CAAC,MAAc;QAE3C,IAAI,MAAM,KAAK,SAAS,EAAE;YACtB,MAAM,GAAG,2BAAY,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;SAC5C;aAAM;YACH,MAAM,GAAG,2BAAY,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;SAC/C;QAED,MAAM,eAAe,GAAG,2BAAY,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;QAEnE,OAAO,eAAe,GAAG,MAAM,CAAC;IACpC,CAAC;CACJ;AAtED,8BAsEC"}
|
|
@@ -35,7 +35,6 @@ exports.SSMUtils = void 0;
|
|
|
35
35
|
const imperative_1 = require("@zowe/imperative");
|
|
36
36
|
const OpsRestUtils_1 = require("./OpsRestUtils");
|
|
37
37
|
const OpsTextUtils_1 = require("./OpsTextUtils");
|
|
38
|
-
const util_1 = require("util");
|
|
39
38
|
class SSMUtils {
|
|
40
39
|
/**
|
|
41
40
|
* setResourceState
|
|
@@ -60,16 +59,16 @@ class SSMUtils {
|
|
|
60
59
|
let tableQueryString = "";
|
|
61
60
|
let subsystemQueryString = "";
|
|
62
61
|
let resourceURL = this.RESOURCES_URL + "/" + resourceName + this.STATE_URL;
|
|
63
|
-
if (
|
|
62
|
+
if (table != null) {
|
|
64
63
|
tableQueryString = "table=" + encodeURIComponent(table);
|
|
65
64
|
}
|
|
66
|
-
if (
|
|
65
|
+
if (subSystem != null) {
|
|
67
66
|
subsystemQueryString = "sub=" + encodeURIComponent(subSystem);
|
|
68
67
|
}
|
|
69
|
-
if ((
|
|
68
|
+
if ((table != null) && (subSystem != null)) {
|
|
70
69
|
resourceURL += "?" + tableQueryString + "&" + subsystemQueryString;
|
|
71
70
|
}
|
|
72
|
-
else if ((
|
|
71
|
+
else if ((table != null) || (subSystem != null)) {
|
|
73
72
|
resourceURL += "?" + tableQueryString + subsystemQueryString;
|
|
74
73
|
}
|
|
75
74
|
return resourceURL;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SSMUtils.js","sourceRoot":"","sources":["../../../src/api/utils/SSMUtils.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAEH,iDAAqD;AACrD,iDAA4C;AAC5C,iDAA4C;
|
|
1
|
+
{"version":3,"file":"SSMUtils.js","sourceRoot":"","sources":["../../../src/api/utils/SSMUtils.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAEH,iDAAqD;AACrD,iDAA4C;AAC5C,iDAA4C;AAE5C,MAAa,QAAQ;IAMjB;;OAEG;IACI,MAAM,CAAO,gBAAgB,CAAC,OAAgB,EAAE,QAAgB,EAAE,YAAoB,EAAE,SAAkB,EAAE,KAAc;;YAE7H,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;YAC7E,MAAM,QAAQ,GAAG;gBACb,OAAO,EAAE,YAAY;aACxB,CAAC;YAEF,OAAO,uBAAU,CAAC,cAAc,CAAK,OAAO,EAAE,WAAW,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC3F,CAAC;KAAA;IAEM,MAAM,CAAO,iBAAiB,CAAC,OAAgB,EAAE,YAAoB,EAAE,SAAkB,EAAE,KAAc;;YAE5G,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;YACj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D,IAAI,YAAY,GAAG,OAAO,CAAC;QAC3B,IAAI,YAAY,GAAG,OAAO,CAAC;QAC3B,IAAI,YAAY,KAAK,YAAY,EAAE;YAC/B,YAAY,GAAG,2BAAY,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;YACrD,YAAY,GAAG,2BAAY,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;SACxD;aAAM;YACH,YAAY,GAAG,2BAAY,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;YACxD,YAAY,GAAG,2BAAY,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;SAC3D;QAED,MAAM,gBAAgB,GAAG,2BAAY,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;QACrE,MAAM,gBAAgB,GAAG,2BAAY,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;QAErE,OAAO,gBAAgB,GAAG,YAAY,GAAG,GAAG,GAAG,gBAAgB,GAAG,YAAY,CAAC;IACnF,CAAC;;AAvEL,4BAwEC;AAtE0B,gBAAO,GAAW,2BAAY,CAAC,QAAQ,GAAG,MAAM,CAAC;AACjD,sBAAa,GAAW,QAAQ,CAAC,OAAO,GAAG,YAAY,CAAC;AACxD,kBAAS,GAAW,QAAQ,CAAC;AAC7B,gBAAO,GAAG,CAAC,EAAC,cAAc,EAAE,kBAAkB,EAAC,EAAE,EAAC,MAAM,EAAG,kBAAkB,EAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AbstractSession, ICommandHandler, IHandlerParameters } from "@zowe/imperative";
|
|
2
|
-
export declare class OpsBaseHandler implements ICommandHandler {
|
|
2
|
+
export declare abstract class OpsBaseHandler implements ICommandHandler {
|
|
3
|
+
private mParams;
|
|
3
4
|
protected session: AbstractSession;
|
|
4
5
|
/**
|
|
5
6
|
* Set up things like the session to reduce code duplication
|
|
@@ -11,5 +12,13 @@ export declare class OpsBaseHandler implements ICommandHandler {
|
|
|
11
12
|
* to do the work of your command
|
|
12
13
|
* @param params - the params passed from imperative to our command handler
|
|
13
14
|
*/
|
|
14
|
-
processOps(params: IHandlerParameters): Promise<void>;
|
|
15
|
+
abstract processOps(params: IHandlerParameters): Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* Given command line arguments, create a REST Client Session.
|
|
18
|
+
* @static
|
|
19
|
+
* @param {ICommandArguments} args - The arguments specified by the user
|
|
20
|
+
* @param {boolean} doPrompting - Whether to prompt for missing arguments (defaults to true)
|
|
21
|
+
* @returns {Session} - A session for usage with the sample API
|
|
22
|
+
*/
|
|
23
|
+
private createSessCfgFromArgs;
|
|
15
24
|
}
|
|
@@ -32,6 +32,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
32
32
|
};
|
|
33
33
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
34
|
exports.OpsBaseHandler = void 0;
|
|
35
|
+
const imperative_1 = require("@zowe/imperative");
|
|
35
36
|
const utils_1 = require("../api/utils");
|
|
36
37
|
class OpsBaseHandler {
|
|
37
38
|
/**
|
|
@@ -40,7 +41,8 @@ class OpsBaseHandler {
|
|
|
40
41
|
*/
|
|
41
42
|
process(params) {
|
|
42
43
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
this.
|
|
44
|
+
this.mParams = params;
|
|
45
|
+
this.session = yield this.createSessCfgFromArgs(params.arguments);
|
|
44
46
|
try {
|
|
45
47
|
yield this.processOps(params);
|
|
46
48
|
}
|
|
@@ -51,13 +53,25 @@ class OpsBaseHandler {
|
|
|
51
53
|
});
|
|
52
54
|
}
|
|
53
55
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
* @param
|
|
56
|
+
* Given command line arguments, create a REST Client Session.
|
|
57
|
+
* @static
|
|
58
|
+
* @param {ICommandArguments} args - The arguments specified by the user
|
|
59
|
+
* @param {boolean} doPrompting - Whether to prompt for missing arguments (defaults to true)
|
|
60
|
+
* @returns {Session} - A session for usage with the sample API
|
|
57
61
|
*/
|
|
58
|
-
|
|
62
|
+
createSessCfgFromArgs(args, doPrompting = true) {
|
|
59
63
|
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
-
//
|
|
64
|
+
// Create session config with connection info to access service
|
|
65
|
+
const sessCfg = {
|
|
66
|
+
hostname: args.host,
|
|
67
|
+
port: args.port,
|
|
68
|
+
basePath: args.basePath,
|
|
69
|
+
rejectUnauthorized: args.rejectUnauthorized,
|
|
70
|
+
protocol: args.protocol || "https"
|
|
71
|
+
};
|
|
72
|
+
// Add credentials to session config and prompt the user for any missing arguments
|
|
73
|
+
const sessCfgWithCreds = yield imperative_1.ConnectionPropsForSessCfg.addPropsOrPrompt(sessCfg, args, { doPrompting, parms: this.mParams });
|
|
74
|
+
return new imperative_1.Session(sessCfgWithCreds);
|
|
61
75
|
});
|
|
62
76
|
}
|
|
63
77
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpsBaseHandler.js","sourceRoot":"","sources":["../../src/cli/OpsBaseHandler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"OpsBaseHandler.js","sourceRoot":"","sources":["../../src/cli/OpsBaseHandler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAEH,iDAQ0B;AAC1B,wCAA4C;AAE5C,MAAsB,cAAc;IAKhC;;;OAGG;IACU,OAAO,CAAC,MAA0B;;YAC3C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;YACtB,IAAI,CAAC,OAAO,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YAClE,IAAI;gBACA,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;aACjC;YAAC,OAAO,CAAC,EAAE;gBACR,oBAAY,CAAC,cAAc,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;gBACvC,MAAM,CAAC,CAAC;aACX;QACL,CAAC;KAAA;IASD;;;;;;OAMG;IACW,qBAAqB,CAAC,IAAuB,EAAE,WAAW,GAAG,IAAI;;YAC3E,+DAA+D;YAC/D,MAAM,OAAO,GAAa;gBACtB,QAAQ,EAAE,IAAI,CAAC,IAAI;gBACnB,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;gBAC3C,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,OAAO;aACrC,CAAC;YAEF,kFAAkF;YAClF,MAAM,gBAAgB,GAAG,MAAM,sCAAyB,CAAC,gBAAgB,CAAW,OAAO,EAAE,IAAI,EAC7F,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;YAC1C,OAAO,IAAI,oBAAO,CAAC,gBAAgB,CAAC,CAAC;QACzC,CAAC;KAAA;CACJ;AAjDD,wCAiDC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Resource.handler.js","sourceRoot":"","sources":["../../../../src/cli/start/resource/Resource.handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;AAGH,
|
|
1
|
+
{"version":3,"file":"Resource.handler.js","sourceRoot":"","sources":["../../../../src/cli/start/resource/Resource.handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;AAGH,0CAAqE;AACrE,yDAAoD;AAEpD,MAAqB,eAAgB,SAAQ,+BAAc;IAE1C,UAAU,CAAC,MAA0B;;YAE9C,MAAM,QAAQ,GAAQ,MAAM,sBAAc,CAAC,IAAI,CAAC,OAAO,EACnD,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,IAAI,EACnC,MAAM,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YACnF,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YACtC,4BAAoB,CAAC,iBAAiB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC7D,CAAC;KAAA;CACJ;AAVD,kCAUC"}
|
package/lib/imperative.js
CHANGED
|
@@ -21,14 +21,30 @@
|
|
|
21
21
|
* INTERRUPTION, GOODWILL, OR LOST DATA, EVEN IF BROADCOM IS
|
|
22
22
|
* EXPRESSLY ADVISED OF SUCH LOSS OR DAMAGE.
|
|
23
23
|
*/
|
|
24
|
+
const PluginConstants_1 = require("./api/constants/PluginConstants");
|
|
24
25
|
const OpsProfilesConfig_1 = require("./api/OpsProfilesConfig");
|
|
25
26
|
const config = {
|
|
26
27
|
commandModuleGlobs: ["**/cli/*/*.definition!(.d).*s"],
|
|
28
|
+
rootCommandDescription: PluginConstants_1.PluginConstants.PLUGIN_DESCRIPTION,
|
|
29
|
+
productDisplayName: PluginConstants_1.PluginConstants.PLUGIN_NAME,
|
|
27
30
|
pluginHealthCheck: __dirname + "/healthCheck.handler",
|
|
28
31
|
pluginSummary: "Zowe CLI Plug-in for OPS/MVS®",
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
name: PluginConstants_1.PluginConstants.PLUGIN_GROUP_NAME,
|
|
33
|
+
// TODO - when the plugin moves to using the OPS/MVS REST API (APIML conformant) then enable
|
|
34
|
+
//Per Timothy Johnson: You are correct that those Zowe v2 conformance criteria are not currently applicable to the
|
|
35
|
+
// OPS plug-in for Zowe CLI, as long as it is intended to be used with the old OPS API.
|
|
36
|
+
//I would suggest removing the apimlConnLookup definition until you support base paths.
|
|
37
|
+
// Otherwise, someone who has the new OPS API on APIML and runs "zowe config auto-init" would get an invalid
|
|
38
|
+
// OPS profile with a basePath property auto-created in their zowe.config.json.
|
|
39
|
+
//Whenever you update the OPS plug-in to support the new APIML-conformant OPS API, you should address those
|
|
40
|
+
// conformance criteria and add the apimlConnLookup property.
|
|
41
|
+
// apimlConnLookup: [
|
|
42
|
+
// {
|
|
43
|
+
// apiId: "bcm.opsmvs",
|
|
44
|
+
// gatewayUrl: "api/v1",
|
|
45
|
+
// connProfType: "ops"
|
|
46
|
+
// }
|
|
47
|
+
// ],
|
|
32
48
|
profiles: OpsProfilesConfig_1.OpsProfilesConfig
|
|
33
49
|
};
|
|
34
50
|
module.exports = config;
|
package/lib/imperative.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"imperative.js","sourceRoot":"","sources":["../src/imperative.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,+DAA4D;AAE5D,MAAM,MAAM,GAAsB;IAC9B,kBAAkB,EAAE,CAAC,+BAA+B,CAAC;IACrD,iBAAiB,EAAE,SAAS,GAAG,sBAAsB;IACrD,aAAa,EAAE,+BAA+B;IAC9C,
|
|
1
|
+
{"version":3,"file":"imperative.js","sourceRoot":"","sources":["../src/imperative.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,qEAAkE;AAClE,+DAA4D;AAE5D,MAAM,MAAM,GAAsB;IAC9B,kBAAkB,EAAE,CAAC,+BAA+B,CAAC;IACrD,sBAAsB,EAAE,iCAAe,CAAC,kBAAkB;IAC1D,kBAAkB,EAAE,iCAAe,CAAC,WAAW;IAC/C,iBAAiB,EAAE,SAAS,GAAG,sBAAsB;IACrD,aAAa,EAAE,+BAA+B;IAC9C,IAAI,EAAE,iCAAe,CAAC,iBAAiB;IACvC,4FAA4F;IAC5F,kHAAkH;IAClH,uFAAuF;IACvF,uFAAuF;IACvF,4GAA4G;IAC5G,+EAA+E;IAC/E,2GAA2G;IAC3G,6DAA6D;IAC7D,qBAAqB;IACrB,QAAQ;IACR,+BAA+B;IAC/B,gCAAgC;IAChC,8BAA8B;IAC9B,QAAQ;IACR,KAAK;IACL,QAAQ,EAAE,qCAAiB;CAC9B,CAAC;AAEF,iBAAS,MAAM,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@broadcom/ops-for-zowe-cli",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.1",
|
|
4
4
|
"description": "OPS/MVS® Plug-in for Zowe CLI",
|
|
5
5
|
"author": "Broadcom",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
"zowe",
|
|
9
9
|
"cli",
|
|
10
10
|
"ops",
|
|
11
|
+
"zos",
|
|
12
|
+
"zowe-cli",
|
|
13
|
+
"mainframe",
|
|
11
14
|
"plugin"
|
|
12
15
|
],
|
|
13
16
|
"repository": "",
|
|
@@ -20,7 +23,7 @@
|
|
|
20
23
|
"registry": "https://registry.npmjs.org/"
|
|
21
24
|
},
|
|
22
25
|
"scripts": {
|
|
23
|
-
"build": "node scripts/updateLicense.js && tsc --pretty && madge -c lib",
|
|
26
|
+
"build": "node scripts/updateLicense.js && tsc --pretty && madge -c lib && npm run checkTestsCompile",
|
|
24
27
|
"checkTestsCompile": "echo \"Checking that test source compiles...\" && tsc --project __tests__/test-tsconfig.json --noEmit ",
|
|
25
28
|
"prebuild": "npm run clean && npm run lint && echo Using TypeScript && tsc --version",
|
|
26
29
|
"clean": "rimraf lib",
|
|
@@ -40,8 +43,7 @@
|
|
|
40
43
|
},
|
|
41
44
|
"dependencies": {},
|
|
42
45
|
"peerDependencies": {
|
|
43
|
-
"@zowe/
|
|
44
|
-
"@zowe/imperative": "^4.0.0"
|
|
46
|
+
"@zowe/imperative": "^5.1.0"
|
|
45
47
|
},
|
|
46
48
|
"devDependencies": {
|
|
47
49
|
"@types/fs-extra": "^8.0.0",
|
|
@@ -50,7 +52,10 @@
|
|
|
50
52
|
"@types/yargs": "^15.0.0",
|
|
51
53
|
"@typescript-eslint/eslint-plugin": "^4.29.0",
|
|
52
54
|
"@typescript-eslint/parser": "^4.29.0",
|
|
53
|
-
"@zowe/
|
|
55
|
+
"@zowe/cli-test-utils": "^7.1.0",
|
|
56
|
+
"@zowe/core-for-zowe-sdk": "^7.1.0",
|
|
57
|
+
"@zowe/imperative": "5.3.0",
|
|
58
|
+
"@zowe/zosmf-for-zowe-sdk": "^7.1.0",
|
|
54
59
|
"env-cmd": "^8.0.2",
|
|
55
60
|
"eslint": "^7.32.0",
|
|
56
61
|
"eslint-plugin-jest": "^24.4.0",
|