Package org.jboss.as.subsystem.test

Examples of org.jboss.as.subsystem.test.KernelServices.transformOperation()


            PathAddress address = PathAddress.pathAddress(InfinispanSubsystemResourceDefinition.PATH, CacheContainerResourceDefinition.pathElement("container"), CacheType.DISTRIBUTED.pathElement("cache"));
            ModelNode operation = Util.createAddOperation(address);
            operation.get(DistributedCacheResourceDefinition.VIRTUAL_NODES.getName()).set(4);
            operation.get(CacheResourceDefinition.STATISTICS_ENABLED.getName()).set(true);

            OperationTransformer.TransformedOperation transformedOperation = services.transformOperation(version, operation);
            Assert.assertFalse(transformedOperation.getTransformedOperation().has(DistributedCacheResourceDefinition.VIRTUAL_NODES.getName()));
            Assert.assertEquals(24, transformedOperation.getTransformedOperation().get(DistributedCacheResourceDefinition.SEGMENTS.getName()).asInt());

            ModelNode result = new ModelNode();
            result.get(OUTCOME).set(SUCCESS);
View Full Code Here


            Assert.assertFalse(transformedOperation.rejectOperation(result));
            Assert.assertEquals(result, transformedOperation.transformResult(result));

            operation = OperationFactory.createWriteAttributeOperation(address, DistributedCacheResourceDefinition.VIRTUAL_NODES.getName(), new ModelNode(4));

            transformedOperation = services.transformOperation(version, operation);
            Assert.assertEquals(DistributedCacheResourceDefinition.SEGMENTS.getName(), transformedOperation.getTransformedOperation().get(NAME).asString());
            Assert.assertEquals(24, transformedOperation.getTransformedOperation().get(VALUE).asInt());
            Assert.assertFalse(transformedOperation.rejectOperation(result));
            Assert.assertEquals(result, transformedOperation.transformResult(result));
        }
View Full Code Here

        steps.add(getSecurityDomainComponentAdd(secDomAddr.append(PathElement.pathElement(Constants.AUTHORIZATION, Constants.CLASSIC)), Constants.POLICY_MODULES));
        steps.add(getSecurityDomainComponentAdd(secDomAddr.append(PathElement.pathElement(Constants.IDENTITY_TRUST, Constants.CLASSIC)), Constants.TRUST_MODULES));
        steps.add(getSecurityDomainComponentAdd(secDomAddr.append(PathElement.pathElement(Constants.MAPPING, Constants.CLASSIC)), Constants.MAPPING_MODULES));

        ModelTestUtils.checkOutcome(mainServices.executeOperation(composite));
        ModelTestUtils.checkOutcome(mainServices.executeOperation(modelVersion, mainServices.transformOperation(modelVersion, composite)));

    }

    private void testRejectedTransformers_1_1_0(ModelTestControllerVersion controllerVersion) throws Exception {
        ModelVersion modelVersion = ModelVersion.create(1, 1, 0);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.