Skip to content

Commit

Permalink
Remove function from ftp extension
Browse files Browse the repository at this point in the history
Signed-off-by: likhithanimma1 <[email protected]>
  • Loading branch information
likhithanimma1 committed Jan 21, 2025
1 parent 2b59528 commit 7196577
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -303,15 +303,6 @@ export class FtpMvsApi extends AbstractFtpApi implements MainframeInteraction.IM
throw new ZoweFtpExtensionError("Copy dataset is not supported in ftp extension.");
}

public copyDataSetCrossLpar(
toDataSetName: string,
toMemberName: string,
options: zosfiles.ICrossLparCopyDatasetOptions,
sourceprofile: imperative.IProfileLoaded
): Promise<zosfiles.IZosFilesResponse> {
throw new ZoweFtpExtensionError("Copy dataset cross lpar is not supported in ftp extension.");
}

public async renameDataSet(currentDataSetName: string, newDataSetName: string): Promise<zosfiles.IZosFilesResponse> {
const result = this.getDefaultResponse();
let connection;
Expand Down
10 changes: 5 additions & 5 deletions packages/zowe-explorer/src/trees/dataset/DatasetActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1557,15 +1557,10 @@ export class DatasetActions {
}
const replace = await DatasetActions.determineReplacement(node.getProfile(), dsname, "ps");
if (replace !== "cancel") {
// const attributes = await ZoweExplorerApiRegister.getMvsApi(profile).dataSet(content.dataSetName, {
// attributes: true,
// });
// console.log("Response", attributes.apiResponse.items[0].spacu);
const options: zosfiles.ICrossLparCopyDatasetOptions = {
"from-dataset": { dsn: content.dataSetName, member: undefined },
responseTimeout: node.getProfile()?.profile?.responseTimeout,
replace: replace === "replace" ? true : false,
// targetStorageClass: attributes.apiResponse.items[0].spacu,
};
if (token.isCancellationRequested) {
Gui.showMessage(DatasetActions.localizedStrings.opCancelled);
Expand Down Expand Up @@ -1635,6 +1630,11 @@ export class DatasetActions {
{ replace: replace == "replace" ? true : false }
);
} else {
if (mvsApi?.copyDataSetCrossLpar == null) {
await Gui.errorMessage(vscode.l10n.t("Copying data sets cross lpars is not yet supported for this profile."));
return;

Check warning on line 1635 in packages/zowe-explorer/src/trees/dataset/DatasetActions.ts

View check run for this annotation

Codecov / codecov/patch

packages/zowe-explorer/src/trees/dataset/DatasetActions.ts#L1634-L1635

Added lines #L1634 - L1635 were not covered by tests
}

const options: zosfiles.ICrossLparCopyDatasetOptions = {
"from-dataset": { dsn: content.dataSetName, member: content.memberName },
responseTimeout: node.getProfile()?.profile?.responseTimeout,
Expand Down

0 comments on commit 7196577

Please sign in to comment.