Examples of HostControllerComponent


Examples of org.rhq.modules.plugins.jbossas7.HostControllerComponent

*/
public class ServerGroupTest extends AbstractIntegrationTest {

    public void createServerGroupViaApi() throws Exception {
        ASConnection connection = getDomainControllerASConnection();
        HostControllerComponent hcc = new HostControllerComponent();
        hcc.setConnection(connection);

        Configuration rc = new Configuration();
        rc.put(new PropertySimple("profile", "default"));
        rc.put(new PropertySimple("socket-binding-group", "standard-sockets"));
        ResourceType rt = new ResourceType("ServerGroup", PLUGIN_NAME, ResourceCategory.SERVICE, null);

        String serverGroupName = "_test-sg";
        try {
            CreateResourceReport report = new CreateResourceReport(serverGroupName, rt, new Configuration(), rc, null);
            report = hcc.createResource(report);

            assert report != null : "Report was null.";
            assert report.getStatus() == CreateResourceStatus.SUCCESS : "Create was a failure: "
                + report.getErrorMessage();
        } finally {
View Full Code Here

Examples of org.rhq.modules.plugins.jbossas7.HostControllerComponent

        }
    }

    public void badCreateServerGroupViaApi() throws Exception {
        ASConnection connection = getDomainControllerASConnection();
        HostControllerComponent hcc = new HostControllerComponent();
        hcc.setConnection(connection);

        Configuration rc = new Configuration();
        rc.put(new PropertySimple("profile", "luzibumpf")); // Does not exist op should fail
        rc.put(new PropertySimple("socket-binding-group", "standard-sockets"));
        ResourceType rt = new ResourceType("ServerGroup", PLUGIN_NAME, ResourceCategory.SERVICE, null);

        String serverGroupName = "_test-sg";
        try {
            CreateResourceReport report = new CreateResourceReport(serverGroupName, rt, new Configuration(), rc, null);
            report = hcc.createResource(report);

            assert report != null : "Report was null.";
            assert report.getStatus() == CreateResourceStatus.FAILURE : "Is AS7-1430 solved ?";
            assert report.getException() == null : report.getException();
        } finally {
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.