@broadcom/ops-for-zowe-cli 4.1.2 → 5.0.0-next.202401231457

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.
Files changed (105) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +64 -12
  3. package/lib/api/OpsProfilesConfig.js +10 -6
  4. package/lib/api/OpsProfilesConfig.js.map +1 -1
  5. package/lib/api/Show.d.ts +4 -3
  6. package/lib/api/Show.js +20 -6
  7. package/lib/api/Show.js.map +1 -1
  8. package/lib/api/Update.d.ts +2 -2
  9. package/lib/api/Update.js +40 -14
  10. package/lib/api/Update.js.map +1 -1
  11. package/lib/api/constants/Ops.constants.js +7 -5
  12. package/lib/api/constants/Ops.constants.js.map +1 -1
  13. package/lib/api/constants/PluginConstants.js +1 -1
  14. package/lib/api/constants/index.js +7 -3
  15. package/lib/api/constants/index.js.map +1 -1
  16. package/lib/api/doc/IShowResourceResponse.js +1 -1
  17. package/lib/api/doc/IShowRuleResponse.js +1 -1
  18. package/lib/api/doc/IShowRulesetResponse.d.ts +12 -0
  19. package/lib/api/doc/IShowRulesetResponse.js +25 -0
  20. package/lib/api/doc/IShowRulesetResponse.js.map +1 -0
  21. package/lib/api/index.js +7 -3
  22. package/lib/api/index.js.map +1 -1
  23. package/lib/api/utils/IOpsRestResponse.js +1 -1
  24. package/lib/api/utils/OpsRestClient.js +1 -1
  25. package/lib/api/utils/OpsRestUtils.d.ts +3 -2
  26. package/lib/api/utils/OpsRestUtils.js +20 -9
  27. package/lib/api/utils/OpsRestUtils.js.map +1 -1
  28. package/lib/api/utils/OpsTextUtils.js +14 -5
  29. package/lib/api/utils/OpsTextUtils.js.map +1 -1
  30. package/lib/api/utils/RuleListUtils.d.ts +1 -0
  31. package/lib/api/utils/RuleListUtils.js +36 -9
  32. package/lib/api/utils/RuleListUtils.js.map +1 -1
  33. package/lib/api/utils/RuleUtils.d.ts +4 -4
  34. package/lib/api/utils/RuleUtils.js +29 -13
  35. package/lib/api/utils/RuleUtils.js.map +1 -1
  36. package/lib/api/utils/RulesetListUtils.d.ts +4 -0
  37. package/lib/api/utils/RulesetListUtils.js +41 -0
  38. package/lib/api/utils/RulesetListUtils.js.map +1 -0
  39. package/lib/api/utils/RulesetUtils.d.ts +5 -0
  40. package/lib/api/utils/RulesetUtils.js +51 -0
  41. package/lib/api/utils/RulesetUtils.js.map +1 -0
  42. package/lib/api/utils/SSMResourceListUtils.js +21 -5
  43. package/lib/api/utils/SSMResourceListUtils.js.map +1 -1
  44. package/lib/api/utils/SSMUtils.d.ts +5 -4
  45. package/lib/api/utils/SSMUtils.js +80 -20
  46. package/lib/api/utils/SSMUtils.js.map +1 -1
  47. package/lib/api/utils/index.d.ts +4 -2
  48. package/lib/api/utils/index.js +11 -5
  49. package/lib/api/utils/index.js.map +1 -1
  50. package/lib/cli/OpsBaseHandler.js +1 -1
  51. package/lib/cli/ResourceParameterDefinitions.d.ts +1 -1
  52. package/lib/cli/ResourceParameterDefinitions.js +12 -7
  53. package/lib/cli/ResourceParameterDefinitions.js.map +1 -1
  54. package/lib/cli/RuleParameterDefinitions.js +2 -2
  55. package/lib/cli/RuleParameterDefinitions.js.map +1 -1
  56. package/lib/cli/RulesetParameterDefinitions.d.ts +5 -0
  57. package/lib/cli/RulesetParameterDefinitions.js +37 -0
  58. package/lib/cli/RulesetParameterDefinitions.js.map +1 -0
  59. package/lib/cli/disable/Disable.definition.js +3 -3
  60. package/lib/cli/disable/Disable.definition.js.map +1 -1
  61. package/lib/cli/disable/rule/Rule.definition.js +2 -2
  62. package/lib/cli/disable/rule/Rule.definition.js.map +1 -1
  63. package/lib/cli/disable/rule/Rule.handler.js +3 -3
  64. package/lib/cli/disable/rule/Rule.handler.js.map +1 -1
  65. package/lib/cli/enable/Enable.definition.js +3 -4
  66. package/lib/cli/enable/Enable.definition.js.map +1 -1
  67. package/lib/cli/enable/rule/Rule.definition.js +2 -2
  68. package/lib/cli/enable/rule/Rule.definition.js.map +1 -1
  69. package/lib/cli/enable/rule/Rule.handler.js +2 -2
  70. package/lib/cli/enable/rule/Rule.handler.js.map +1 -1
  71. package/lib/cli/show/Show.definition.js +5 -4
  72. package/lib/cli/show/Show.definition.js.map +1 -1
  73. package/lib/cli/show/resource/Resource.definition.js +15 -5
  74. package/lib/cli/show/resource/Resource.definition.js.map +1 -1
  75. package/lib/cli/show/resource/Resource.handler.js +2 -2
  76. package/lib/cli/show/resource/Resource.handler.js.map +1 -1
  77. package/lib/cli/show/rule/Rule.definition.js +12 -2
  78. package/lib/cli/show/rule/Rule.definition.js.map +1 -1
  79. package/lib/cli/show/rule/Rule.handler.js +9 -4
  80. package/lib/cli/show/rule/Rule.handler.js.map +1 -1
  81. package/lib/cli/show/ruleset/Ruleset.definition.d.ts +17 -0
  82. package/lib/cli/show/ruleset/Ruleset.definition.js +70 -0
  83. package/lib/cli/show/ruleset/Ruleset.definition.js.map +1 -0
  84. package/lib/cli/show/ruleset/Ruleset.handler.d.ts +5 -0
  85. package/lib/cli/show/ruleset/Ruleset.handler.js +50 -0
  86. package/lib/cli/show/ruleset/Ruleset.handler.js.map +1 -0
  87. package/lib/cli/start/Start.definition.js +3 -3
  88. package/lib/cli/start/Start.definition.js.map +1 -1
  89. package/lib/cli/start/resource/Resource.definition.js +9 -9
  90. package/lib/cli/start/resource/Resource.definition.js.map +1 -1
  91. package/lib/cli/start/resource/Resource.handler.js +2 -2
  92. package/lib/cli/start/resource/Resource.handler.js.map +1 -1
  93. package/lib/cli/stop/Stop.definition.js +3 -3
  94. package/lib/cli/stop/Stop.definition.js.map +1 -1
  95. package/lib/cli/stop/resource/Resource.definition.js +9 -9
  96. package/lib/cli/stop/resource/Resource.definition.js.map +1 -1
  97. package/lib/cli/stop/resource/Resource.handler.js +2 -2
  98. package/lib/cli/stop/resource/Resource.handler.js.map +1 -1
  99. package/lib/healthCheck.handler.js +1 -1
  100. package/lib/imperative.js +17 -10
  101. package/lib/imperative.js.map +1 -1
  102. package/lib/index.d.ts +6 -4
  103. package/lib/index.js +13 -7
  104. package/lib/index.js.map +1 -1
  105. package/package.json +36 -38
package/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2019 Broadcom. All Rights Reserved. The term
1
+ Copyright (c) 2024 Broadcom. All Rights Reserved. The term
2
2
  "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
3
3
 
4
4
  This software and all information contained therein is
package/README.md CHANGED
@@ -42,27 +42,79 @@ To install the OPS/MVS® plug-in to the Zowe CLI from source, issue the followin
42
42
  $ zowe plugins validate @broadcom/ops-for-zowe-cli
43
43
  ```
44
44
 
45
- **Note:** For more information about using the install command,
46
- see [Manage Plug-ins.](**REMOVED**)
47
-
48
45
  ## Uninstall the OPS/MVS® Plug-in From Zowe CLI
49
46
  To uninstall the plug-in from Zowe CLI, issue the following command:
50
47
  ```sh
51
48
  $ zowe plugins uninstall @broadcom/ops-for-zowe-cli
52
49
  ```
53
50
 
54
- **Note:** For more information about using the uninstall command,
55
- see [Manage Plug-ins.](**REMOVED**)
56
-
57
51
  ### Create an OPS/MVS® Profile
58
52
 
59
53
  To create an OPS/MVS® plug-in profile gather the following data:
60
- - The host name of the LPAR on which OPS/MVS® Web Services is running
61
- - The OPS/MVS® Web Services port number
62
- - A user name that has authority to access OPS/MVS® Web Services
63
- - The password to the account tied to the user name
54
+ - The host name of the LPAR on which OPS/MVS® Web Services or OPS/MVS® REST API server is running
55
+ - The OPS/MVS® Web Services or OPS/MVS® REST API server port number
56
+ - A user name that has authority to access OPS/MVS® Web Services or OPS/MVS® REST API server
57
+ - The password to the account assigned to the user name
64
58
 
65
- To create an OPS/MVS® profile, issue the following command:
59
+ To create an OPS/MVS® profile, edit the "global config" located at ~/'.zowe/zowe.config.json' file:
66
60
  ```sh
67
- $ zowe profiles create ops myLPAR --hostname mylpar.example.com --port 1234 --username myself --password fakepassword
61
+ $ zowe config edit --gc
68
62
  ```
63
+ NOTE: See the 'zowe.config.example.json' file in this project for examples of
64
+ profiles for both OPS/MVS® Web Services or OPS/MVS® REST API server.
65
+
66
+ # Changes
67
+
68
+ Changes made to the OPS/MVS® Plug-in for Zowe CLI (OPS) are documented below.
69
+
70
+ ## [5.0.0] - 2024-01-19
71
+
72
+ This release includes a breaking change from the prior release (4.1.2) and support for the OPS/MVS® REST API server.
73
+
74
+ ### Breaking change
75
+
76
+ Commands 'start resource' and 'stop resource'
77
+
78
+ 'tablename' is now a required positional argument
79
+
80
+ POSITIONAL ARGUMENTS
81
+
82
+ resourcename (string)
83
+
84
+ The name of the resource.
85
+
86
+ tablename (string)
87
+
88
+ The name of the table that contains the resource.
89
+
90
+ ----------------------------------------------------------------------------------------------------------------------------
91
+
92
+ ### New command (only available with the REST API server)
93
+
94
+ show ruleset
95
+
96
+ ----------------------------------------------------------------------------------------------------------------------------
97
+
98
+ ### Enhanced commands (only available with the REST API server)
99
+
100
+ show resource
101
+
102
+ Show the current and desired state of all resources in the table MYTABLE for the OPSS subsystem.
103
+
104
+ zowe ops show resource * --table MYTABLE --subsystem OPSS
105
+
106
+ Show the current and desired state of all resources in all tables for the OPSS subsystem.
107
+
108
+ zowe ops show resource * --subsystem OPSS
109
+
110
+ ----------------------------------------------------------------------------------------------------------------------------
111
+
112
+ show rule
113
+
114
+ Show the status of all rules in ruleset OPSRULES for the OPSS subsystem.
115
+
116
+ zowe ops show rule OPSRULES * --subsystem OPSS
117
+
118
+ Show the status of all rules in all rulesets for the OPSS subsystem.
119
+
120
+ zowe ops show rule * * --subsystem OPSS
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- * Copyright (c) 2019 Broadcom. All Rights Reserved. The term
3
+ * Copyright (c) 2024 Broadcom. All Rights Reserved. The term
4
4
  * "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
5
5
  *
6
6
  * This software and all information contained therein is
@@ -29,8 +29,8 @@ exports.OpsProfilesConfig = [
29
29
  type: "ops",
30
30
  schema: {
31
31
  type: "object",
32
- title: "OPS Web Services session profile",
33
- description: "The OPS Web Services session profile schema, where you specify your session information and credentials",
32
+ title: "OPS/MVS Web Services / REST API session profile",
33
+ description: "The OPS/MVS Web Services / REST API session profile schema, where you specify your session information and credentials",
34
34
  properties: {
35
35
  host: {
36
36
  optionDefinition: OpsRestUtils_1.OpsRestUtils.HOST_OPTION,
@@ -61,21 +61,25 @@ exports.OpsProfilesConfig = [
61
61
  subsystem: {
62
62
  optionDefinition: OpsRestUtils_1.OpsRestUtils.SUBSYSTEM_OPTION,
63
63
  type: "string"
64
+ },
65
+ restApi: {
66
+ optionDefinition: OpsRestUtils_1.OpsRestUtils.RESTAPI_OPTION,
67
+ type: "boolean"
64
68
  }
65
69
  },
70
+ // required: ["host", "port"],
66
71
  },
67
- // validationPlanModule: __dirname + "/OpsProfileValidationPlan",
68
72
  createProfileExamples: [
69
73
  {
70
74
  options: "myLPAR --host lpar123 --port 8080 --user ibmuser --password !@#$^ --prot http --reject-unauthorized false",
71
- description: "Create an OPS profile called 'myLPAR' to connect to OPS Web Services at host lpar123 and port 8080, " +
75
+ description: "Create an OPS profile called 'myLPAR' to connect to OPS/MVS REST API at host lpar123 and port 8080, " +
72
76
  "using http protocol, allowing self-signed certificates"
73
77
  }
74
78
  ],
75
79
  updateProfileExamples: [
76
80
  {
77
81
  options: "myLPAR --host lpar456",
78
- description: "Update an OPS profile called 'myLPAR' to connect to OPS Web Services at host lpar456"
82
+ description: "Update an OPS profile called 'myLPAR' to connect to OPS/MVS Web Services at host lpar456"
79
83
  },
80
84
  {
81
85
  options: "myLPAR --user user101 --password Km5sv78",
@@ -1 +1 @@
1
- {"version":3,"file":"OpsProfilesConfig.js","sourceRoot":"","sources":["../../src/api/OpsProfilesConfig.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAGH,uDAAoD;AAEvC,QAAA,iBAAiB,GAAuC;IACjE;QACI,IAAI,EAAE,KAAK;QACX,MAAM,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,kCAAkC;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J;KACJ;CACJ,CAAC"}
package/lib/api/Show.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { Session } from "@zowe/imperative";
1
+ import { IHandlerParameters, Session } from "@zowe/imperative";
2
2
  import { IShowRuleResponse } from "./doc/IShowRuleResponse";
3
3
  import { IShowResourceResponse } from "./doc/IShowResourceResponse";
4
- export declare function showRule(session: Session, ruleSetName: string, ruleName: string, subSystem: string): Promise<IShowRuleResponse>;
5
- export declare function showResource(session: Session, resourceName: string, table: string, subsystem: string): Promise<IShowResourceResponse>;
4
+ export declare function showRule(session: Session, ruleSetName: string, ruleName: string, restApi: boolean, subSystem: string): Promise<IShowRuleResponse>;
5
+ export declare function showResource(session: Session, resourceName: string, restApi: boolean, table: string, subsystem: string): Promise<IShowResourceResponse>;
6
+ export declare function showRuleset(session: Session, ruleSetName: string, restApi: boolean, subSystem: string, params: IHandlerParameters): Promise<IShowRuleResponse>;
package/lib/api/Show.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- * Copyright (c) 2019 Broadcom. All Rights Reserved. The term
3
+ * Copyright (c) 2024 Broadcom. All Rights Reserved. The term
4
4
  * "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
5
5
  *
6
6
  * This software and all information contained therein is
@@ -31,23 +31,37 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
31
31
  });
32
32
  };
33
33
  Object.defineProperty(exports, "__esModule", { value: true });
34
- exports.showResource = exports.showRule = void 0;
34
+ exports.showRuleset = exports.showResource = exports.showRule = void 0;
35
35
  const RuleUtils_1 = require("./utils/RuleUtils");
36
+ const RulesetUtils_1 = require("./utils/RulesetUtils");
36
37
  const SSMUtils_1 = require("./utils/SSMUtils");
37
38
  const constants_1 = require("./constants");
38
39
  const OpsRestClient_1 = require("./utils/OpsRestClient");
39
- function showRule(session, ruleSetName, ruleName, subSystem) {
40
+ function showRule(session, ruleSetName, ruleName, restApi, subSystem) {
40
41
  return __awaiter(this, void 0, void 0, function* () {
41
- const ruleUrl = RuleUtils_1.RuleUtils.getRuleURL(session, ruleSetName, ruleName, subSystem);
42
+ const ruleUrl = RuleUtils_1.RuleUtils.getRuleURL(session, ruleSetName, ruleName, restApi, subSystem);
42
43
  return OpsRestClient_1.OpsRestClient.getExpectJSON(session, ruleUrl, constants_1.OpsConstants.headers);
43
44
  });
44
45
  }
45
46
  exports.showRule = showRule;
46
- function showResource(session, resourceName, table, subsystem) {
47
+ function showResource(session, resourceName, restApi, table, subsystem) {
47
48
  return __awaiter(this, void 0, void 0, function* () {
48
- const resourceUrl = SSMUtils_1.SSMUtils.getResourceURL(session, resourceName, table, subsystem);
49
+ const resourceUrl = SSMUtils_1.SSMUtils.getResourceURL(session, resourceName, restApi, table, subsystem);
49
50
  return OpsRestClient_1.OpsRestClient.getExpectJSON(session, resourceUrl, constants_1.OpsConstants.headers);
50
51
  });
51
52
  }
52
53
  exports.showResource = showResource;
54
+ function showRuleset(session, ruleSetName, restApi, subSystem, params) {
55
+ return __awaiter(this, void 0, void 0, function* () {
56
+ if (restApi) {
57
+ const rulesetUrl = RulesetUtils_1.RulesetUtils.getRulesetURL(session, ruleSetName, restApi, subSystem);
58
+ return OpsRestClient_1.OpsRestClient.getExpectJSON(session, rulesetUrl, constants_1.OpsConstants.headers);
59
+ }
60
+ else {
61
+ // Display message indicating 'show ruleset' not supported with web services
62
+ params.response.console.log("Command 'show ruleset' is only supported with the OPS/MVS REST API server");
63
+ }
64
+ });
65
+ }
66
+ exports.showRuleset = showRuleset;
53
67
  //# sourceMappingURL=Show.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Show.js","sourceRoot":"","sources":["../../src/api/Show.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAGH,iDAA8C;AAC9C,+CAA4C;AAC5C,2CAA2C;AAG3C,yDAAsD;AAEtD,SAAsB,QAAQ,CAAC,OAAgB,EAAE,WAAmB,EAAE,QAAgB,EAAE,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AAE,KAAK,EAAE,SAAS,CAAC,CAAC;QAC9F,OAAO,6BAAa,CAAC,aAAa,CAAC,OAAO,EAAE,WAAW,EAAE,wBAAY,CAAC,OAAO,CAAC,CAAC;IACnF,CAAC;CAAA;AAJD,oCAIC;AAED,SAAsB,WAAW,CAAC,OAAgB,EAAE,WAAmB,EAAE,OAAgB,EACvD,SAAiB,EAAE,MAA0B;;QAE3E,IAAI,OAAO,EAAE;YACT,MAAM,UAAU,GAAG,2BAAY,CAAC,aAAa,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;YACxF,OAAO,6BAAa,CAAC,aAAa,CAAC,OAAO,EAAE,UAAU,EAAE,wBAAY,CAAC,OAAO,CAAC,CAAC;SACjF;aAAM;YACH,4EAA4E;YAC5E,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,2EAA2E,CAAC,CAAC;SAC5G;IACL,CAAC;CAAA;AAVD,kCAUC"}
@@ -1,8 +1,8 @@
1
1
  import { Session } from "@zowe/imperative";
2
2
  export declare function updateRule(session: Session, ruleSetName: string, ruleName: string, newStatus: string, // eslint-disable-line
3
- subSystem?: string): Promise<{}>;
3
+ restApi: boolean, subSystem?: string): Promise<{}>;
4
4
  /**
5
5
  * updateResource
6
6
  */
7
- export declare function updateResource(session: Session, resource: string, desiredState: string, subsystem?: string, // eslint-disable-line
7
+ export declare function updateResource(session: Session, resource: string, restApi: boolean, desiredState: string, subsystem?: string, // eslint-disable-line
8
8
  table?: string, wait?: number): Promise<{}>;
package/lib/api/Update.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- * Copyright (c) 2019 Broadcom. All Rights Reserved. The term
3
+ * Copyright (c) 2024 Broadcom. All Rights Reserved. The term
4
4
  * "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
5
5
  *
6
6
  * This software and all information contained therein is
@@ -40,31 +40,45 @@ const ResourceParameterDefinitions_1 = require("../cli/ResourceParameterDefiniti
40
40
  const Show_1 = require("./Show");
41
41
  const OpsRestClient_1 = require("./utils/OpsRestClient");
42
42
  function updateRule(session, ruleSetName, ruleName, newStatus, // eslint-disable-line
43
- subSystem) {
43
+ restApi, subSystem) {
44
44
  return __awaiter(this, void 0, void 0, function* () {
45
- const ruleUrl = RuleUtils_1.RuleUtils.getRuleURL(session, ruleSetName, ruleName, subSystem);
46
- const postBody = {
45
+ const ruleUrl = RuleUtils_1.RuleUtils.getRuleURL(session, ruleSetName, ruleName, restApi, subSystem);
46
+ const body = {
47
47
  status: newStatus
48
48
  };
49
- return OpsRestClient_1.OpsRestClient.postExpectJSON(session, ruleUrl, constants_1.OpsConstants.headers, postBody);
49
+ if (restApi === false) {
50
+ return OpsRestClient_1.OpsRestClient.postExpectJSON(session, ruleUrl, constants_1.OpsConstants.headers, body);
51
+ }
52
+ else {
53
+ return OpsRestClient_1.OpsRestClient.putExpectJSON(session, ruleUrl, constants_1.OpsConstants.headers, body);
54
+ }
50
55
  });
51
56
  }
52
57
  exports.updateRule = updateRule;
53
58
  /**
54
59
  * updateResource
55
60
  */
56
- function updateResource(session, resource, desiredState, subsystem, // eslint-disable-line
61
+ function updateResource(session, resource, restApi, desiredState, subsystem, // eslint-disable-line
57
62
  table, wait) {
58
63
  return __awaiter(this, void 0, void 0, function* () {
59
64
  if (wait != null) {
60
- imperative_1.ImperativeExpect.toBeEqual(wait > 0 && wait <= ResourceParameterDefinitions_1.ResourceParameterDefinitions.ONE_DAY, true, "Wait value must be between 0 and " + ResourceParameterDefinitions_1.ResourceParameterDefinitions.ONE_DAY + "(inclusive) if specified. " +
65
+ imperative_1.ImperativeExpect.toBeEqual(wait > 0 && wait <= ResourceParameterDefinitions_1.ResourceParameterDefinitions.ONE_DAY, true, "Wait value must be between 0 and " + ResourceParameterDefinitions_1.ResourceParameterDefinitions.ONE_DAY + " (inclusive), if specified. " +
61
66
  "You specified: " + wait);
62
67
  }
63
- const resourceUrl = SSMUtils_1.SSMUtils.getResourceURL(session, resource, table, subsystem);
68
+ const resourceUrl = SSMUtils_1.SSMUtils.getResourceURLWithQueryParms(session, resource, restApi, table, subsystem);
64
69
  const postBody = {
65
70
  desired: desiredState
66
71
  };
67
- const response = yield OpsRestClient_1.OpsRestClient.postExpectJSON(session, resourceUrl, constants_1.OpsConstants.headers, postBody);
72
+ const postBodyRestApi = {
73
+ desiredState: desiredState
74
+ };
75
+ let response;
76
+ if (restApi) {
77
+ response = yield OpsRestClient_1.OpsRestClient.putExpectJSON(session, resourceUrl, constants_1.OpsConstants.headers, postBodyRestApi);
78
+ }
79
+ else {
80
+ response = yield OpsRestClient_1.OpsRestClient.postExpectJSON(session, resourceUrl, constants_1.OpsConstants.headers, postBody);
81
+ }
68
82
  if (wait == null) {
69
83
  // if we're not waiting, just return immediately
70
84
  return response;
@@ -72,19 +86,31 @@ table, wait) {
72
86
  else {
73
87
  // we are waiting, so set up the polling to determine if current = desired state
74
88
  // did we happen to instantly start/ stop the resource the first time? check
75
- if (response.ssmresource[0].current.toUpperCase() === desiredState.toUpperCase()) {
76
- return response;
89
+ let currentState = "";
90
+ if (restApi) {
91
+ if (response.currentState.toUpperCase() === desiredState.toUpperCase())
92
+ return response;
93
+ currentState = response.currentState;
94
+ }
95
+ else {
96
+ if (response.ssmresource[0].current.toUpperCase() === desiredState.toUpperCase())
97
+ return response;
98
+ currentState = response.ssmresource[0].current;
77
99
  }
78
100
  // otherwise we have to poll
79
101
  let pollResponse;
80
- let currentState = response.ssmresource[0].current;
81
102
  const ONE_SECOND = 1000;
82
103
  const start = new Date().getTime();
83
104
  // looping with 'wait' value as max was taking approximately twice the requested time
84
105
  // so use the actual time to calculate when the 'wait' time is exceeded
85
106
  while (((new Date().getTime() - start) / ONE_SECOND) < wait) {
86
- pollResponse = yield Show_1.showResource(session, resource, table, subsystem);
87
- currentState = pollResponse.ssmresource[0].current;
107
+ pollResponse = yield (0, Show_1.showResource)(session, resource, restApi, table, subsystem);
108
+ if (restApi) {
109
+ currentState = pollResponse[0].currentState;
110
+ }
111
+ else {
112
+ currentState = pollResponse.ssmresource[0].current;
113
+ }
88
114
  if (currentState.toUpperCase() === desiredState.toUpperCase()) {
89
115
  // successfully waited until the desired state equaled the current state
90
116
  return pollResponse;
@@ -1 +1 @@
1
- {"version":3,"file":"Update.js","sourceRoot":"","sources":["../../src/api/Update.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAEH,iDAA8E;AAC9E,2CAA2C;AAC3C,iDAA8C;AAC9C,+CAA4C;AAC5C,sFAAmF;AACnF,iCAAsC;AACtC,yDAAsD;AAEtD,SAAsB,UAAU,CAAC,OAAgB,EAAE,WAAmB,EACrC,QAAgB,EAAE,SAAiB,EAAG,sBAAsB;AAC5D,SAAkB;;QAE/C,MAAM,OAAO,GAAG,qBAAS,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;QAChF,MAAM,QAAQ,GAAG;YACb,MAAM,EAAE,SAAS;SACpB,CAAC;QAEF,OAAO,6BAAa,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,wBAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC1F,CAAC;CAAA;AAVD,gCAUC;AAED;;GAEG;AACH,SAAsB,cAAc,CAAC,OAAgB,EAAE,QAAgB,EAClC,YAAoB,EAAE,SAAkB,EAAI,sBAAsB;AAClE,KAAc,EAAE,IAAa;;QAC9D,IAAI,IAAI,IAAI,IAAI,EAAE;YACd,6BAAgB,CAAC,SAAS,CAAC,IAAI,GAAG,CAAC,IAAI,IAAI,IAAI,2DAA4B,CAAC,OAAO,EAAE,IAAI,EACrF,mCAAmC,GAAG,2DAA4B,CAAC,OAAO,GAAG,4BAA4B;gBACzG,iBAAiB,GAAG,IAAI,CAAC,CAAC;SACjC;QACD,MAAM,WAAW,GAAG,mBAAQ,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,K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N;IACL,CAAC;CAAA;AAzED,wCAyEC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- * Copyright (c) 2019 Broadcom. All Rights Reserved. The term
3
+ * Copyright (c) 2024 Broadcom. All Rights Reserved. The term
4
4
  * "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
5
5
  *
6
6
  * This software and all information contained therein is
@@ -30,12 +30,14 @@ exports.OpsConstants = {
30
30
  APP_URL: "/opsmvs/api",
31
31
  VERSION: "v1",
32
32
  BASE_URL: "/opsmvs/api/v1",
33
- AOF_URL: "/opsmvs/api/v1/aof",
34
- RULESET_URL: "/opsmvs/api/v1/aof/rulesets",
33
+ AOF_URL: "/api/v1/aof",
34
+ OPSMVS_URL: "/opsmvs",
35
+ RULES_URL: "/api/v1/aof/rules",
36
+ RULESET_URL: "/api/v1/aof/rulesets",
35
37
  RULE_URL: "/rules",
36
38
  STATUS_URL: "/status",
37
- SSM_URL: "/opsmvs/api/v1/ssm",
38
- RESOURCES_URL: "/opsmvs/api/v1/ssm/resources",
39
+ SSM_URL: "/api/v1/ssm",
40
+ RESOURCES_URL: "/api/v1/ssm/resources",
39
41
  STATE_URL: "/state",
40
42
  headers: [{ "Content-Type": "application/json" }, { Accept: "application/json" }]
41
43
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Ops.constants.js","sourceRoot":"","sources":["../../../src/api/constants/Ops.constants.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAEH;;GAEG;AACU,QAAA,YAAY,GAA2B;IAChD,OAAO,EAAE,aAAa;IACtB,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,gBAAgB;IAC1B,OAAO,EAAE,oBAAoB;IAC7B,WAAW,EAAE,6BAA6B;IAC1C,QAAQ,EAAE,QAAQ;IAClB,UAAU,EAAE,SAAS;IACrB,OAAO,EAAE,oBAAoB;IAC7B,aAAa,EAAE,8BAA8B;IAC7C,SAAS,EAAE,QAAQ;IACnB,OAAO,EAAE,CAAC,EAAC,cAAc,EAAE,kBAAkB,EAAC,EAAE,EAAC,MAAM,EAAG,kBAAkB,EAAC,CAAC;CACjF,CAAC"}
1
+ {"version":3,"file":"Ops.constants.js","sourceRoot":"","sources":["../../../src/api/constants/Ops.constants.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAEH;;GAEG;AACU,QAAA,YAAY,GAA2B;IAChD,OAAO,EAAE,aAAa;IACtB,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,gBAAgB;IAC1B,OAAO,EAAE,aAAa;IACtB,UAAU,EAAE,SAAS;IACrB,SAAS,EAAE,mBAAmB;IAC9B,WAAW,EAAE,sBAAsB;IACnC,QAAQ,EAAE,QAAQ;IAClB,UAAU,EAAE,SAAS;IACrB,OAAO,EAAE,aAAa;IACtB,aAAa,EAAE,uBAAuB;IACtC,SAAS,EAAE,QAAQ;IACnB,OAAO,EAAE,CAAC,EAAC,cAAc,EAAE,kBAAkB,EAAC,EAAE,EAAC,MAAM,EAAG,kBAAkB,EAAC,CAAC;CACjF,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- * Copyright (c) 2019 Broadcom. All Rights Reserved. The term
3
+ * Copyright (c) 2024 Broadcom. All Rights Reserved. The term
4
4
  * "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
5
5
  *
6
6
  * This software and all information contained therein is
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- * Copyright (c) 2019 Broadcom. All Rights Reserved. The term
3
+ * Copyright (c) 2024 Broadcom. All Rights Reserved. The term
4
4
  * "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
5
5
  *
6
6
  * This software and all information contained therein is
@@ -23,13 +23,17 @@
23
23
  */
24
24
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
25
25
  if (k2 === undefined) k2 = k;
26
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
26
+ var desc = Object.getOwnPropertyDescriptor(m, k);
27
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
28
+ desc = { enumerable: true, get: function() { return m[k]; } };
29
+ }
30
+ Object.defineProperty(o, k2, desc);
27
31
  }) : (function(o, m, k, k2) {
28
32
  if (k2 === undefined) k2 = k;
29
33
  o[k2] = m[k];
30
34
  }));
31
35
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
32
- for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
36
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
33
37
  };
34
38
  Object.defineProperty(exports, "__esModule", { value: true });
35
39
  __exportStar(require("./Ops.constants"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/constants/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAEH,kDAAgC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/constants/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;;;;;AAEH,kDAAgC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- * Copyright (c) 2019 Broadcom. All Rights Reserved. The term
3
+ * Copyright (c) 2024 Broadcom. All Rights Reserved. The term
4
4
  * "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
5
5
  *
6
6
  * This software and all information contained therein is
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- * Copyright (c) 2019 Broadcom. All Rights Reserved. The term
3
+ * Copyright (c) 2024 Broadcom. All Rights Reserved. The term
4
4
  * "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
5
5
  *
6
6
  * This software and all information contained therein is
@@ -0,0 +1,12 @@
1
+ export interface IShowRulesetResponse {
2
+ count: number;
3
+ schemaVersion: string;
4
+ aofruleset: Array<{
5
+ sysplex: string;
6
+ system: string;
7
+ subsystem: string;
8
+ ruleset: string;
9
+ status: string;
10
+ autoEnabled: string;
11
+ }>;
12
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2024 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
+ //# sourceMappingURL=IShowRulesetResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IShowRulesetResponse.js","sourceRoot":"","sources":["../../../src/api/doc/IShowRulesetResponse.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG"}
package/lib/api/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- * Copyright (c) 2019 Broadcom. All Rights Reserved. The term
3
+ * Copyright (c) 2024 Broadcom. All Rights Reserved. The term
4
4
  * "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
5
5
  *
6
6
  * This software and all information contained therein is
@@ -23,13 +23,17 @@
23
23
  */
24
24
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
25
25
  if (k2 === undefined) k2 = k;
26
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
26
+ var desc = Object.getOwnPropertyDescriptor(m, k);
27
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
28
+ desc = { enumerable: true, get: function() { return m[k]; } };
29
+ }
30
+ Object.defineProperty(o, k2, desc);
27
31
  }) : (function(o, m, k, k2) {
28
32
  if (k2 === undefined) k2 = k;
29
33
  o[k2] = m[k];
30
34
  }));
31
35
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
32
- for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
36
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
33
37
  };
34
38
  Object.defineProperty(exports, "__esModule", { value: true });
35
39
  __exportStar(require("./Show"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAEH,yCAAuB;AACvB,2CAAyB;AACzB,8CAA4B;AAC5B,0CAAwB;AACxB,8DAA4C;AAC5C,0DAAwC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;;;;;AAEH,yCAAuB;AACvB,2CAAyB;AACzB,8CAA4B;AAC5B,0CAAwB;AACxB,8DAA4C;AAC5C,0DAAwC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- * Copyright (c) 2019 Broadcom. All Rights Reserved. The term
3
+ * Copyright (c) 2024 Broadcom. All Rights Reserved. The term
4
4
  * "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
5
5
  *
6
6
  * This software and all information contained therein is
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- * Copyright (c) 2019 Broadcom. All Rights Reserved. The term
3
+ * Copyright (c) 2024 Broadcom. All Rights Reserved. The term
4
4
  * "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
5
5
  *
6
6
  * This software and all information contained therein is
@@ -1,6 +1,6 @@
1
1
  import { ICommandDefinitionPassOn, ICommandOptionDefinition } from "@zowe/imperative";
2
2
  /**
3
- * Class to hold APIs related to OPS Web Services
3
+ * Class to hold APIs related to OPS/MVS Web Services / REST API
4
4
  * @export
5
5
  * @class OpsRestUtils
6
6
  */
@@ -9,7 +9,7 @@ export declare class OpsRestUtils {
9
9
  static readonly VERSION: string;
10
10
  static readonly BASE_URL: string;
11
11
  static readonly AOF_URL: string;
12
- static readonly OPS_CONNECTION_GROUP = "OPS WEB SERVICES CONNECTION OPTIONS";
12
+ static readonly OPS_CONNECTION_GROUP = "OPS/MVS Web Services / REST API connection options";
13
13
  static HOST_OPTION: ICommandOptionDefinition;
14
14
  static PORT_OPTION: ICommandOptionDefinition;
15
15
  static USER_OPTION: ICommandOptionDefinition;
@@ -17,6 +17,7 @@ export declare class OpsRestUtils {
17
17
  static PROTOCOL_OPTION: ICommandOptionDefinition;
18
18
  static REJECT_UNAUTHORIZED_OPTION: ICommandOptionDefinition;
19
19
  static SUBSYSTEM_OPTION: ICommandOptionDefinition;
20
+ static RESTAPI_OPTION: ICommandOptionDefinition;
20
21
  static OPS_CONNECTION_OPTIONS: ICommandOptionDefinition[];
21
22
  /**
22
23
  * Using the passOn feature of imperative, we can make all child commands