Change handling of netconf cluster transactions
[netconf.git] / netconf / netconf-topology-singleton / src / main / java / org / opendaylight / netconf / topology / singleton / impl / utils / NetconfTopologyUtils.java
index 1b59e883989c8b6d3c21e2c3529e194b9741bbe1..39ac4dd718fd377019a6944de020d7ff882f5c93 100644 (file)
@@ -13,6 +13,7 @@ import java.io.File;
 import java.math.BigDecimal;
 import java.net.InetSocketAddress;
 import java.util.HashMap;
+import org.opendaylight.controller.config.util.xml.DocumentedException;
 import java.util.Map;
 import org.opendaylight.netconf.sal.connect.netconf.NetconfDevice;
 import org.opendaylight.netconf.sal.connect.netconf.NetconfStateSchemasResolverImpl;
@@ -218,4 +219,10 @@ public class NetconfTopologyUtils {
     public static InstanceIdentifier<Node> createTopologyNodePath(final String topologyId) {
         return createTopologyListPath(topologyId).child(Node.class);
     }
+
+    public static DocumentedException createMasterIsDownException(final RemoteDeviceId id) {
+        return new DocumentedException(id + ":Master is down. Please try again.",
+                DocumentedException.ErrorType.APPLICATION, DocumentedException.ErrorTag.OPERATION_FAILED,
+                DocumentedException.ErrorSeverity.WARNING);
+    }
 }