Skip to content

Add delete system variables #525

Merged
frankgiordano merged 4 commits into
zowe:mainfrom
Ashish-Kumar-Dash:delete-sys-variables
Jun 27, 2026
Merged

Add delete system variables #525
frankgiordano merged 4 commits into
zowe:mainfrom
Ashish-Kumar-Dash:delete-sys-variables

Conversation

@Ashish-Kumar-Dash

Copy link
Copy Markdown
Contributor

Summary

Implements the z/OSMF "Delete system variables" REST API (closes #508 ): DELETE /variables/rest/1.0/systems/.

Changes

  • VariableDelete (methods) — new API class with two operations: - delete(sysplexName, systemName) — bodyless request that deletes the entire system variable pool
    • delete(sysplexName, systemName, variableNames) — sends a JSON array body to delete specific named variables
  • DeleteJsonZosmfRequest (rest) — enhanced to optionally carry a request body. setBody now stores the body (instead of throwing) and executeRequest attaches it only when present, so existing bodyless deletes are unchanged.

Notes

  • The IBM doc example path had a typo (.../variables/systems/...); used the canonical .../systems/... consistent with the existing VariableConstants.RESOURCE.
  • The whole-pool delete clears any prior body so a reused request instance always issues a true bodyless request.
  • Empty variableNames is rejected with IllegalArgumentException (the API treats [] as a no-op; rejecting guides correct usage).

Signed-off-by: Ashish Kumar Dash <ashishdash2410@gmail.com>
Comment thread src/main/java/zowe/client/sdk/zosvariables/methods/VariableDelete.java Outdated
Comment thread src/main/java/zowe/client/sdk/zosvariables/methods/VariableDelete.java Outdated
Signed-off-by: Ashish Kumar Dash <ashishdash2410@gmail.com>
Comment thread src/main/java/zowe/client/sdk/zosvariables/methods/VariableDelete.java Outdated
Comment thread src/main/java/zowe/client/sdk/zosvariables/methods/VariableDelete.java Outdated
Comment thread src/main/java/zowe/client/sdk/zosvariables/methods/VariableDelete.java Outdated
@frankgiordano frankgiordano self-requested a review June 27, 2026 20:45

@frankgiordano frankgiordano left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments

Signed-off-by: Ashish Kumar Dash <ashishdash2410@gmail.com>
Signed-off-by: Ashish Kumar Dash <ashishdash2410@gmail.com>
@frankgiordano frankgiordano merged commit 8dc5fc5 into zowe:main Jun 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Delete system variables

2 participants