/** * {@inheritDoc} */ @Override public TransformedOperation transformOperation(TransformationContext context, PathAddress address, ModelNode operation) { String name = Operations.getAttributeName(operation); ModelNode legacyOperation = org.jboss.as.controller.client.helpers.Operations.createUndefineAttributeOperation(this.addressTransformer.transform(address).toModelNode(), name); return new TransformedOperation(legacyOperation, OperationResultTransformer.ORIGINAL_RESULT); } }
private void processAttributes(final Node current, final Node remote, final OrderedOperationsCollection operations, final ImmutableManagementResourceRegistration registration) { for (final String attribute : remote.attributes.keySet()) { // Remove from current model final ModelNode currentOp = current.attributes.remove(attribute); if (currentOp == null) { operations.add(remote.attributes.get(attribute)); } else { final ModelNode remoteOp = remote.attributes.get(attribute); if (!remoteOp.equals(currentOp)) { operations.add(remoteOp); } } } // Undefine operations if the remote write-attribute operation does not exist for (final String attribute : current.attributes.keySet()) { final ModelNode op = Operations.createUndefineAttributeOperation(current.address.toModelNode(), attribute); operations.add(op); } }
private void processAttributes(final Node current, final Node remote, final OrderedOperationsCollection operations, final ImmutableManagementResourceRegistration registration) { for (final String attribute : remote.attributes.keySet()) { // Remove from current model final ModelNode currentOp = current.attributes.remove(attribute); if (currentOp == null) { operations.add(remote.attributes.get(attribute)); } else { final ModelNode remoteOp = remote.attributes.get(attribute); if (!remoteOp.equals(currentOp)) { operations.add(remoteOp); } } } // Undefine operations if the remote write-attribute operation does not exist for (final String attribute : current.attributes.keySet()) { final ModelNode op = Operations.createUndefineAttributeOperation(current.address.toModelNode(), attribute); operations.add(op); } }
/** * {@inheritDoc} */ @Override public TransformedOperation transformOperation(TransformationContext context, PathAddress address, ModelNode operation) { String name = Operations.getAttributeName(operation); ModelNode legacyOperation = org.jboss.as.controller.client.helpers.Operations.createUndefineAttributeOperation(this.addressTransformer.transform(address).toModelNode(), name); return new TransformedOperation(legacyOperation, OperationResultTransformer.ORIGINAL_RESULT); } }
final ModelNode op = Operations.createUndefineAttributeOperation(current.address.toModelNode(), attribute); if (remoteAttributes.containsKey(attribute)) { throw new IllegalStateException();
final ModelNode op = Operations.createUndefineAttributeOperation(current.address.toModelNode(), attribute); if (remoteAttributes.containsKey(attribute)) { throw new IllegalStateException();
@Override public void tearDown(ManagementClient managementClient, String s) throws Exception { ModelNode op = Operations.createUndefineAttributeOperation( ADDRESS_TRANSACTIONS_SUBSYSTEM, "default-timeout" ); ModelNode result = managementClient.getControllerClient().execute( op ); if ( !Operations.isSuccessfulOutcome( result ) ) { logger.warning( "Can't reset default transaction timeout: " + result.toJSONString( false ) ); } }