Search in sources :

Example 56 with PathAddress

use of org.jboss.as.controller.PathAddress in project wildfly by wildfly.

the class RBACConfigTestCase method testAddServerGroupScopedRole.

@Test
public void testAddServerGroupScopedRole() throws IOException {
    PathAddress address = RBAC_BASE.append(SERVER_GROUP_SCOPED_ROLE, "WFCORE-1622_S");
    String attribute = BASE_ROLE;
    ModelNode value = new ModelNode("Operator");
    ModelNode addOp = Util.createAddOperation(address);
    addOp.get(attribute).set(value);
    addOp.get(SERVER_GROUPS).add("main-server-group");
    addTest(address, attribute, value, addOp);
}
Also used : PathAddress(org.jboss.as.controller.PathAddress) ModelNode(org.jboss.dmr.ModelNode) Test(org.junit.Test)

Example 57 with PathAddress

use of org.jboss.as.controller.PathAddress in project wildfly by wildfly.

the class RBACConfigTestCase method testAddRoleMapping.

@Test
public void testAddRoleMapping() throws IOException {
    PathAddress address = RBAC_BASE.append(ROLE_MAPPING, "Operator");
    String attribute = INCLUDE_ALL;
    ModelNode value = new ModelNode(true);
    ModelNode addOp = Util.createAddOperation(address);
    addOp.get(attribute).set(value);
    addTest(address, attribute, value, addOp);
}
Also used : PathAddress(org.jboss.as.controller.PathAddress) ModelNode(org.jboss.dmr.ModelNode) Test(org.junit.Test)

Example 58 with PathAddress

use of org.jboss.as.controller.PathAddress in project wildfly by wildfly.

the class RBACConfigTestCase method testModifySensitiveExpressionsConstraint.

@Test
public void testModifySensitiveExpressionsConstraint() throws IOException {
    PathAddress mapping = RBAC_BASE.append(CONSTRAINT, VAULT_EXPRESSION);
    modifyTest(mapping, CONFIGURED_REQUIRES_WRITE, new ModelNode(true), true);
}
Also used : PathAddress(org.jboss.as.controller.PathAddress) ModelNode(org.jboss.dmr.ModelNode) Test(org.junit.Test)

Example 59 with PathAddress

use of org.jboss.as.controller.PathAddress in project wildfly by wildfly.

the class RBACConfigTestCase method testAddHostScopedRole.

@Test
public void testAddHostScopedRole() throws IOException {
    PathAddress address = RBAC_BASE.append(HOST_SCOPED_ROLE, "WFCORE-1622_H");
    String attribute = BASE_ROLE;
    ModelNode value = new ModelNode("Operator");
    ModelNode addOp = Util.createAddOperation(address);
    addOp.get(attribute).set(value);
    addOp.get(HOSTS).add("slave");
    addTest(address, attribute, value, addOp);
}
Also used : PathAddress(org.jboss.as.controller.PathAddress) ModelNode(org.jboss.dmr.ModelNode) Test(org.junit.Test)

Example 60 with PathAddress

use of org.jboss.as.controller.PathAddress in project wildfly by wildfly.

the class RBACConfigTestCase method testModifyApplicationConstraint.

@Test
public void testModifyApplicationConstraint() throws IOException {
    PathAddress mapping = RBAC_BASE.append(CONSTRAINT, APPLICATION_CLASSIFICATION).append(TYPE, CORE).append(CLASSIFICATION, "deployment");
    modifyTest(mapping, CONFIGURED_APPLICATION, new ModelNode(true), true);
}
Also used : PathAddress(org.jboss.as.controller.PathAddress) ModelNode(org.jboss.dmr.ModelNode) Test(org.junit.Test)

Aggregations

PathAddress (org.jboss.as.controller.PathAddress)473 ModelNode (org.jboss.dmr.ModelNode)345 PathElement (org.jboss.as.controller.PathElement)54 Resource (org.jboss.as.controller.registry.Resource)53 ServiceName (org.jboss.msc.service.ServiceName)53 OperationFailedException (org.jboss.as.controller.OperationFailedException)48 Test (org.junit.Test)36 ServiceTarget (org.jboss.msc.service.ServiceTarget)32 ParseUtils.unexpectedElement (org.jboss.as.controller.parsing.ParseUtils.unexpectedElement)29 OperationContext (org.jboss.as.controller.OperationContext)28 ResourceTransformationDescriptionBuilder (org.jboss.as.controller.transform.description.ResourceTransformationDescriptionBuilder)25 KernelServices (org.jboss.as.subsystem.test.KernelServices)24 ParseUtils.requireNoNamespaceAttribute (org.jboss.as.controller.parsing.ParseUtils.requireNoNamespaceAttribute)23 ParseUtils.unexpectedAttribute (org.jboss.as.controller.parsing.ParseUtils.unexpectedAttribute)23 Map (java.util.Map)22 ActiveMQServer (org.apache.activemq.artemis.core.server.ActiveMQServer)19 OperationStepHandler (org.jboss.as.controller.OperationStepHandler)19 ArrayList (java.util.ArrayList)18 TransformationContext (org.jboss.as.controller.transform.TransformationContext)17 FailedOperationTransformationConfig (org.jboss.as.model.test.FailedOperationTransformationConfig)15