- String module, String instance, Services services) {
- ObjectName on = null;
- try {
- on = ta.createModule(module, instance);
- logger.info("New instance for {} {} created under name {}", module, instance, on);
- addRefNames(services, providedServices, module, instance, ta, on);
- executeStrategy(configuration, ta, on, services);
- } catch (InstanceAlreadyExistsException e1) {
- throw new IllegalStateException("Unable to create instance for " + module + " : " + instance);
- } catch (InstanceNotFoundException e) {
- throw new IllegalStateException("Unable to save default ref name for instance " + on, e);
- }
+ String module, String instance, ServiceRegistryWrapper services) throws NetconfConfigHandlingException {
+ throw new NetconfConfigHandlingException(
+ String.format("Unable to handle missing instance, no missing instances should appear at this point, missing: %s : %s ",
+ module,
+ instance),
+ NetconfDocumentedException.ErrorType.application,
+ NetconfDocumentedException.ErrorTag.operation_failed,
+ NetconfDocumentedException.ErrorSeverity.error);