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;
}