private static void fillHistoryIn(ModelNode result, Entry entry) throws PatchingException { ModelNode history = new ModelNode(); history.get(Constants.PATCH_ID).set(entry.getPatchId()); history.get(Constants.TYPE).set(entry.getType().getName()); final ModelNode appliedAtNode = history.get(Constants.APPLIED_AT); if(entry.getAppliedAt() != null) { appliedAtNode.set(entry.getAppliedAt()); } history.get(Constants.AGED_OUT).set(entry.isAgedOut()); result.add(history); } }
while(iterator.hasNext()) { final Entry next = iterator.next(); if(patchId.equals(next.getPatchId())) { final ModelNode response = new ModelNode(); response.get(OUTCOME).set(SUCCESS); final ModelNode result = response.get(RESULT); result.get(Constants.PATCH_ID).set(next.getPatchId()); result.get(Constants.TYPE).set(next.getType().getName()); final Patch metadata = next.getMetadata(); result.get(Constants.IDENTITY_NAME).set(metadata.getIdentity().getName()); result.get(Constants.IDENTITY_VERSION).set(metadata.getIdentity().getVersion()); result.get(Constants.DESCRIPTION).set(next.getMetadata().getDescription()); if (next.getMetadata().getLink() != null) { result.get(Constants.LINK).set(next.getMetadata().getLink());
while(historyIterator.hasNext()) { final Entry entry = historyIterator.next(); if(entry.getType() == PatchType.CUMULATIVE) { prevCP = entry.getMetadata(); break; final Patch oneOff = entry.getMetadata(); for(PatchElement oneOffElement : oneOff.getElements()) { final Map<String, List<PatchElement>> providerPatches;
while(historyIterator.hasNext()) { final Entry entry = historyIterator.next(); if(entry.getType() == PatchType.CUMULATIVE) { prevCP = entry.getMetadata(); break; final Patch oneOff = entry.getMetadata(); for(PatchElement oneOffElement : oneOff.getElements()) { final Map<String, List<PatchElement>> providerPatches;
while (iterator.hasNextCP()) { final PatchingHistory.Entry entry = iterator.nextCP(); final String patchId = addOn ? entry.getAddOnPatches().get(name) : entry.getLayerPatches().get(name); final Patch original = loadPatchInformation(entry.getPatchId(), installedImage); for (final PatchElement originalElement : original.getElements()) { if (name.equals(originalElement.getProvider().getName())
final Map<String, String> layerPatches = entry.getLayerPatches(); final List<DeleteOp> ops = new ArrayList<>(); final File patchHistoryDir = installedIdentity.getInstalledImage().getPatchHistoryDir(entry.getPatchId()); if (patchHistoryDir.exists()) { ops.add(new DeleteOp(patchHistoryDir, HISTORY_FILTER));
while (iterator.hasNextCP()) { final PatchingHistory.Entry entry = iterator.nextCP(); final String patchId = addOn ? entry.getAddOnPatches().get(name) : entry.getLayerPatches().get(name); final Patch original = loadPatchInformation(entry.getPatchId(), installedImage); for (final PatchElement originalElement : original.getElements()) { if (name.equals(originalElement.getProvider().getName())
final Map<String, String> layerPatches = entry.getLayerPatches(); final List<DeleteOp> ops = new ArrayList<>(); final File patchHistoryDir = installedIdentity.getInstalledImage().getPatchHistoryDir(entry.getPatchId()); if (patchHistoryDir.exists()) { ops.add(new DeleteOp(patchHistoryDir, HISTORY_FILTER));
while(iterator.hasNext()) { final Entry next = iterator.next(); if(patchId.equals(next.getPatchId())) { final ModelNode response = new ModelNode(); response.get(OUTCOME).set(SUCCESS); final ModelNode result = response.get(RESULT); result.get(Constants.PATCH_ID).set(next.getPatchId()); result.get(Constants.TYPE).set(next.getType().getName()); final Patch metadata = next.getMetadata(); result.get(Constants.IDENTITY_NAME).set(metadata.getIdentity().getName()); result.get(Constants.IDENTITY_VERSION).set(metadata.getIdentity().getVersion()); result.get(Constants.DESCRIPTION).set(next.getMetadata().getDescription()); if (next.getMetadata().getLink() != null) { result.get(Constants.LINK).set(next.getMetadata().getLink());
private ModelNode patchIdInfo(final OperationContext context, final String patchId, final boolean verbose, final PatchingHistory.Iterator i) { while(i.hasNext()) { final Entry entry = i.next(); if(patchId.equals(entry.getPatchId())) { final ModelNode result = new ModelNode(); result.get(Constants.PATCH_ID).set(entry.getPatchId()); result.get(Constants.TYPE).set(entry.getType().getName()); result.get(Constants.DESCRIPTION).set(entry.getMetadata().getDescription()); final String link = entry.getMetadata().getLink(); if (link != null) { result.get(Constants.LINK).set(link); final Identity identity = entry.getMetadata().getIdentity(); result.get(Constants.IDENTITY_NAME).set(identity.getName()); result.get(Constants.IDENTITY_VERSION).set(identity.getVersion()); final Patch metadata = entry.getMetadata(); for(PatchElement e : metadata.getElements()) { final ModelNode element = new ModelNode();
private ModelNode patchIdInfo(final OperationContext context, final String patchId, final boolean verbose, final PatchingHistory.Iterator i) { while(i.hasNext()) { final Entry entry = i.next(); if(patchId.equals(entry.getPatchId())) { final ModelNode result = new ModelNode(); result.get(Constants.PATCH_ID).set(entry.getPatchId()); result.get(Constants.TYPE).set(entry.getType().getName()); result.get(Constants.DESCRIPTION).set(entry.getMetadata().getDescription()); final String link = entry.getMetadata().getLink(); if (link != null) { result.get(Constants.LINK).set(link); final Identity identity = entry.getMetadata().getIdentity(); result.get(Constants.IDENTITY_NAME).set(identity.getName()); result.get(Constants.IDENTITY_VERSION).set(identity.getVersion()); final Patch metadata = entry.getMetadata(); for(PatchElement e : metadata.getElements()) { final ModelNode element = new ModelNode();
private static void fillHistoryIn(ModelNode result, Entry entry) throws PatchingException { ModelNode history = new ModelNode(); history.get(Constants.PATCH_ID).set(entry.getPatchId()); history.get(Constants.TYPE).set(entry.getType().getName()); final ModelNode appliedAtNode = history.get(Constants.APPLIED_AT); if(entry.getAppliedAt() != null) { appliedAtNode.set(entry.getAppliedAt()); } history.get(Constants.AGED_OUT).set(entry.isAgedOut()); result.add(history); } }