Package org.rhq.core.domain.resource

Examples of org.rhq.core.domain.resource.CreateResourceStatus


        LOG.info("Creating resource through report: " + report);

        String resourceName = null;
        String resourceKey = null;
        String errorMessage;
        CreateResourceStatus status;
        Configuration configuration = null;

        try {
            // Make the create call to the plugin
            report = facet.createResource(report);

            // Pull out the plugin populated parts of the report and add to the request
            resourceName = report.getResourceName();
            resourceKey = report.getResourceKey();
            errorMessage = report.getErrorMessage();
            status = report.getStatus();
            configuration = report.getResourceConfiguration();

            // Validate the status returned from the plugin
            CreateResourceStatus reportedStatus = report.getStatus();
            if ((reportedStatus == null) || (reportedStatus == CreateResourceStatus.IN_PROGRESS)) {
                LOG.warn("Plugin did not indicate the result of the request: " + requestId);
                errorMessage = "Plugin did not indicate the result of the resource creation attempt.";
                status = CreateResourceStatus.FAILURE;
            }
View Full Code Here


        }

        CreateResourceHistory history = resourceFactory.createResource(caller,parentId, resType.getId(),name,defaultPc,
            defaultRc, null);

        CreateResourceStatus status = history.getStatus();

        try {
            Thread.sleep(2000L); // give the agent time to do the work
        } catch (InterruptedException e) {
            ; // nothing
View Full Code Here

        String packageName = DEFAULT_PACKAGE;

        CreateResourceHistory history = resourceFactory.createResource(caller,parentId, resType.getId(),name,pluginConfig,
            packageName, null,null,deployConfig,resourceBits);

        CreateResourceStatus status = history.getStatus();

        try {
            Thread.sleep(2000L); // give the agent time to do the work
        } catch (InterruptedException e) {
            ; // nothing
View Full Code Here

                throw new StuffNotFoundException("Resource creation status with id " + historyId);
            else
                return Response.serverError().entity(e.getMessage()).build();
        }

        CreateResourceStatus status = history.getStatus();

        Response.ResponseBuilder builder;
        try {
            Thread.sleep(2000L); // give the agent time to do the work
        } catch (InterruptedException e) {
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.resource.CreateResourceStatus

Copyright © 2018 www.massapicom. 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.