2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.bgpcep.programming.topology;
10 import static java.util.Objects.requireNonNull;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.programming.rev131102.TopologyInstructionInput;
13 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology;
14 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
19 public final class TopologyProgrammingUtil {
21 private TopologyProgrammingUtil() {
22 throw new UnsupportedOperationException();
25 @SuppressWarnings("unchecked")
26 public static InstanceIdentifier<Topology> topologyForInput(final TopologyInstructionInput input) {
27 requireNonNull(input.getNetworkTopologyRef());
28 return (InstanceIdentifier<Topology>) input.getNetworkTopologyRef().getValue();