Package org.jboss.as.subsystem.test

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


    }

    @Test
    public void testReadWriteNamespace11() throws Exception {
        KernelServices services = installInController(AdditionalInitialization.MANAGEMENT, SUBSYSTEM_XML_1_1);
        ModelNode model = services.readWholeModel();

        String marshalled = outputModel(model);
        Assert.assertEquals(normalizeXML(SUBSYSTEM_XML_1_2), normalizeXML(marshalled));
    }
View Full Code Here


    }

    @Test
    public void testDescribeHandler() throws Exception {
        KernelServices servicesA = installInController(AdditionalInitialization.MANAGEMENT, SUBSYSTEM_XML_1_2);
        ModelNode modelA = servicesA.readWholeModel();
        ModelNode describeOp = new ModelNode();
        describeOp.get(ModelDescriptionConstants.OP).set(ModelDescriptionConstants.DESCRIBE);
        describeOp.get(ModelDescriptionConstants.OP_ADDR).set(
                PathAddress.pathAddress(PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, OSGiExtension.SUBSYSTEM_NAME)).toModelNode());
        List<ModelNode> operations = checkResultAndGetContents(servicesA.executeOperation(describeOp)).asList();
View Full Code Here

        describeOp.get(ModelDescriptionConstants.OP_ADDR).set(
                PathAddress.pathAddress(PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, OSGiExtension.SUBSYSTEM_NAME)).toModelNode());
        List<ModelNode> operations = checkResultAndGetContents(servicesA.executeOperation(describeOp)).asList();

        KernelServices servicesB = installInController(AdditionalInitialization.MANAGEMENT, operations);
        ModelNode modelB = servicesB.readWholeModel();

        compare(modelA, modelB);
    }

    private void assertOSGiSubsystemAddress(ModelNode address) {
View Full Code Here

        //  <subsystem xmlns="urn:jboss:domain:datasources:1.0"> ... </subsystem>
        String xml = readResource("datasource.xml");

        KernelServices services = super.installInController(AdditionalInitialization.MANAGEMENT, xml);

        ModelNode model = services.readWholeModel();

        //Check model..
        final String complexDs = "complexDs";
        final String complexDsJndi = "java:jboss/datasources/" + complexDs;
        Properties params=nonXaDsProperties(complexDsJndi);
View Full Code Here

       // Assert.assertEquals(normalizeXML(xml), normalizeXML(marshalled));

        services = super.installInController(AdditionalInitialization.MANAGEMENT, marshalled);

        //Check that the model looks the same
        ModelNode modelReloaded = services.readWholeModel();
        compare(model, modelReloaded);


        assertRemoveSubsystemResources(services);
    }
View Full Code Here

            }
        };

        KernelServices servicesA = super.installInController(additionalInit, subsystemXml);
        // get the model and the describe operations from the first controller.
        ModelNode modelA = servicesA.readWholeModel();
        ModelNode describeOp = new ModelNode();
        describeOp.get(OP).set(DESCRIBE);
        describeOp.get(OP_ADDR).set(
                PathAddress.pathAddress(
                        PathElement.pathElement(SUBSYSTEM, JacORBExtension.SUBSYSTEM_NAME)).toModelNode());
View Full Code Here

        Assert.assertEquals(1, operations.size());

        // install the describe options from the first controller into a second controller.
        KernelServices servicesB = super.installInController(additionalInit, operations);
        ModelNode modelB = servicesB.readWholeModel();
        servicesB.shutdown();

        // make sure the models from the two controllers are identical.
        super.compare(modelA, modelB);
View Full Code Here

        String xml = readResource(resourceFileName);

        KernelServices services = super.installInController(AdditionalInitialization.MANAGEMENT, xml);

        ModelNode model = services.readWholeModel();
        ConnectorServices.unregisterResourceIdentifiers(archiveName);

        // Marshal the xml to see that it is the same as before
        String marshalled = services.getPersistedSubsystemXml();
        if (checkMarshalledXML)
View Full Code Here

            Assert.assertEquals(normalizeXML(xml), normalizeXML(marshalled));

        services = super.installInController(AdditionalInitialization.MANAGEMENT, marshalled);

        // Check that the model looks the same
        ModelNode modelReloaded = services.readWholeModel();
        compare(model, modelReloaded);

        assertRemoveSubsystemResources(services);
        return model;
View Full Code Here

        // Parse the subsystem xml and install into the controller
        String subsystemXml = getSubsystemXml();
        KernelServices services = super.installInController(subsystemXml);

        // Read the whole model and make sure it looks as expected
        ModelNode model = services.readWholeModel();
        // System.out.println(model);
        Assert.assertTrue(model.get(SUBSYSTEM).hasDefined(AgentSubsystemExtension.SUBSYSTEM_NAME));
        Assert.assertTrue(model.get(SUBSYSTEM, AgentSubsystemExtension.SUBSYSTEM_NAME).hasDefined(
            AgentSubsystemExtension.AGENT_ENABLED));
        Assert.assertTrue(model
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.