@zowe/provisioning-for-zowe-sdk
Version:
Zowe SDK to interact with the z/OS provisioning APIs
51 lines • 2.73 kB
JavaScript
;
/*
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ListCatalogTemplates = void 0;
const core_for_zowe_sdk_1 = require("@zowe/core-for-zowe-sdk");
const ProvisioningValidator_1 = require("./ProvisioningValidator");
const ProvisioningConstants_1 = require("./ProvisioningConstants");
/**
* Get info about all published templates.
* @export
* @class ListCatalogTemplates
*/
class ListCatalogTemplates {
/**
* This operation returns the catalog of published software service templates.
* @param {AbstractSession} session - z/OSMF connection info
* @param {string} zOSMFVersion - the URI path variable that identifies the version of the z/OSMF software services template service.
* The following value is valid: 1.0.
* @returns {Promise<IPublishedTemplates>} z/OSMF response object, @see {IPublishedTemplates}
* @memberof ListCatalogTemplates
*/
static listCatalogCommon(session, zOSMFVersion) {
return __awaiter(this, void 0, void 0, function* () {
ProvisioningValidator_1.ProvisioningValidator.validateSession(session);
ProvisioningValidator_1.ProvisioningValidator.validateNotEmptyString(zOSMFVersion, core_for_zowe_sdk_1.nozOSMFVersion.message);
let listTemplatesResources = `${ProvisioningConstants_1.ProvisioningConstants.RESOURCE}/${zOSMFVersion}`;
listTemplatesResources += `/${ProvisioningConstants_1.ProvisioningConstants.TEMPLATES_RESOURCES}/`;
return core_for_zowe_sdk_1.ZosmfRestClient.getExpectJSON(session, listTemplatesResources);
});
}
}
exports.ListCatalogTemplates = ListCatalogTemplates;
//# sourceMappingURL=ListCatalogTemplates.js.map