X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fconfig%2Fconfig-manager-facade-xml%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Ffacade%2Fxml%2Fstrategy%2FDeleteEditConfigStrategy.java;h=08d9d21cdd80ee98dc416582f7c7879abb4e5e74;hb=refs%2Fchanges%2F40%2F62940%2F4;hp=423fac974f559fe631125b0a1c47462db54f7df5;hpb=23fe9ca678ada6263fec5dd996f4025e4a32fcf5;p=controller.git diff --git a/opendaylight/config/config-manager-facade-xml/src/main/java/org/opendaylight/controller/config/facade/xml/strategy/DeleteEditConfigStrategy.java b/opendaylight/config/config-manager-facade-xml/src/main/java/org/opendaylight/controller/config/facade/xml/strategy/DeleteEditConfigStrategy.java index 423fac974f..08d9d21cdd 100644 --- a/opendaylight/config/config-manager-facade-xml/src/main/java/org/opendaylight/controller/config/facade/xml/strategy/DeleteEditConfigStrategy.java +++ b/opendaylight/config/config-manager-facade-xml/src/main/java/org/opendaylight/controller/config/facade/xml/strategy/DeleteEditConfigStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. + * Copyright (c) 2015, 2017 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, @@ -23,29 +23,26 @@ public class DeleteEditConfigStrategy extends AbstractEditConfigStrategy { private static final Logger LOG = LoggerFactory.getLogger(DeleteEditConfigStrategy.class); - @Override void handleMissingInstance(Map configuration, ConfigTransactionClient ta, - String module, String instance, ServiceRegistryWrapper services) throws - ConfigHandlingException { - throw new ConfigHandlingException(String.format("Unable to delete %s : %s , ServiceInstance not found", module, instance), - DocumentedException.ErrorType.application, - DocumentedException.ErrorTag.operation_failed, - DocumentedException.ErrorSeverity.error); + String module, String instance, ServiceRegistryWrapper services) throws ConfigHandlingException { + throw new ConfigHandlingException( + String.format("Unable to delete %s : %s , ServiceInstance not found", module, instance), + DocumentedException.ErrorType.APPLICATION, DocumentedException.ErrorTag.OPERATION_FAILED, + DocumentedException.ErrorSeverity.ERROR); } @Override - void executeStrategy(Map configuration, ConfigTransactionClient ta, ObjectName on, ServiceRegistryWrapper services) throws - ConfigHandlingException { + void executeStrategy(Map configuration, ConfigTransactionClient ta, ObjectName on, + ServiceRegistryWrapper services) throws ConfigHandlingException { try { ta.destroyModule(on); LOG.debug("ServiceInstance {} deleted successfully", on); } catch (InstanceNotFoundException e) { throw new ConfigHandlingException( String.format("Unable to delete %s because of exception %s" + on, e.getMessage()), - DocumentedException.ErrorType.application, - DocumentedException.ErrorTag.operation_failed, - DocumentedException.ErrorSeverity.error); + DocumentedException.ErrorType.APPLICATION, DocumentedException.ErrorTag.OPERATION_FAILED, + DocumentedException.ErrorSeverity.ERROR); } } }