use of com.axway.apim.setup.lib.APIManagerSetupExportParams in project apim-cli by Axway-API-Management-Plus.
the class APIManagerSettingsApp method exportConfig.
@CLIServiceMethod(name = "get", description = "Get actual API-Manager configuration")
public static int exportConfig(String[] args) {
APIManagerSetupExportParams params;
try {
params = (APIManagerSetupExportParams) APIManagerSetupExportCLIOptions.create(args).getParams();
} catch (AppException e) {
LOG.error("Error " + e.getMessage());
return e.getError().getCode();
}
APIManagerSettingsApp app = new APIManagerSettingsApp();
return app.runExport(params).getRc();
}
use of com.axway.apim.setup.lib.APIManagerSetupExportParams in project apim-cli by Axway-API-Management-Plus.
the class ExportManagerConfigTestAction method runTest.
@Override
public ExportResult runTest(TestContext context) {
APIManagerSetupExportParams params = new APIManagerSetupExportParams();
addParameters(params, context);
params.setRemoteHostName(getVariable(context, PARAM_NAME));
params.setRemoteHostId(getVariable(context, PARAM_ID));
APIManagerSettingsApp app = new APIManagerSettingsApp();
LOG.info("Running " + app.getClass().getSimpleName() + " with params: " + params);
ExportResult result = app.runExport(params);
if (this.getExpectedReturnCode(context) != result.getRc()) {
throw new ValidationException("Expected RC was: " + this.getExpectedReturnCode(context) + " but got: " + result.getRc());
}
return result;
}
Aggregations