Prevent NPE's on failures
[netconf.git] / opendaylight / netconf / abstract-topology / src / main / java / org / opendaylight / netconf / topology / InitialStateProvider.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.netconf.topology;
10
11 import com.google.common.annotations.Beta;
12 import javax.annotation.Nonnull;
13 import javax.annotation.Nullable;
14 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
15 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
16
17 /**
18  * Provides initial and failed state for NodeManagers
19  */
20 @Beta
21 public interface InitialStateProvider {
22     @Nonnull
23     Node getInitialState(@Nonnull final NodeId nodeId, @Nonnull final Node configNode);
24
25     @Nonnull
26     Node getFailedState(@Nonnull final NodeId nodeId, @Nullable final Node configNode);
27 }