AgentClient agentClient = this.agentManager.getAgentClient(parentResource.getAgent());
DiscoveryAgentService discoveryAgentService = agentClient.getDiscoveryAgentService();
mergeResourceResponse = discoveryAgentService.manuallyAddResource(resourceType, parentResourceId,
importResourceRequest.getPluginConfiguration(), subject.getId());
} catch (CannotConnectException e) {
throw new CannotConnectToAgentException("Error adding [" + resourceType + "] Resource to inventory as "
+ "a child of " + parentResource + " - cause: " + e.getMessage(), e);
} catch (RuntimeException e) {
throw new RuntimeException("Error adding [" + resourceType + "] Resource to inventory as a child of "
+ parentResource + " - cause: " + e, e);
}