@Override protected ModelNode rollback(final String streamName, final String patchId, final ContentPolicyBuilderImpl builder, boolean rollbackTo, boolean resetConfiguration) { final ContentVerificationPolicy policy = builder.createPolicy(); ModelNode result = new ModelNode(); try { PatchingResult rollback = tool.rollback(streamName, patchId, policy, rollbackTo, resetConfiguration); rollback.commit(); result.get(OUTCOME).set(SUCCESS); result.get(RESULT).setEmptyObject(); } catch (PatchingException e) { return formatFailedResponse(e); } return result; }
@Override protected ModelNode rollback(final String streamName, final String patchId, final ContentPolicyBuilderImpl builder, boolean rollbackTo, boolean resetConfiguration) { final ContentVerificationPolicy policy = builder.createPolicy(); ModelNode result = new ModelNode(); try { PatchingResult rollback = tool.rollback(streamName, patchId, policy, rollbackTo, resetConfiguration); rollback.commit(); result.get(OUTCOME).set(SUCCESS); result.get(RESULT).setEmptyObject(); } catch (PatchingException e) { return formatFailedResponse(e); } return result; }
protected PatchingResult rollback(PatchTool tool, String patchId, boolean rollbackTo, ContentVerificationPolicy policy) throws IOException, PatchingException { final PatchingResult result = tool.rollback(patchId, policy, rollbackTo, true); result.commit(); return result; }
try { final PatchingResult result = runner.rollback(patchStream, patchId, policy, rollbackTo, restoreConfiguration); installationManager.restartRequired(); context.restartRequired();
try { final PatchingResult result = runner.rollback(patchStream, patchId, policy, rollbackTo, restoreConfiguration); installationManager.restartRequired(); context.restartRequired();
protected PatchingResult rollback(final PatchingTestStepBuilder builder, final ContentVerificationPolicy verificationPolicy, final PatchStepAssertions assertions, boolean rollbackTo) throws PatchingException { final Patch patch = builder.build(); final File installation = new File(tempDir, JBOSS_INSTALLATION); try { assertions.before(installation, patch, installationManager); } catch (IOException e) { throw new PatchingException(e); } final String patchId = patch.getPatchId(); final PatchTool patchTool = PatchTool.Factory.create(installationManager); final PatchingResult result = patchTool.rollback(patchId, verificationPolicy, rollbackTo, false); result.commit(); final InstalledIdentity identity = installationManager.getInstalledIdentity(patch.getIdentity().getName(), null); Assert.assertFalse(identity.getAllInstalledPatches().contains(patch.getPatchId())); try { assertions.after(installation, patch, installationManager); } catch (IOException e) { throw new PatchingException(e); } return result; }