Yoonseon Han | 096cea0 | 2017-05-15 15:10:41 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2017-present Open Networking Foundation |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package org.onosproject.incubator.net.virtual.intent; |
| 18 | |
| 19 | import com.google.common.annotations.Beta; |
| 20 | import org.onosproject.incubator.net.virtual.NetworkId; |
| 21 | import org.onosproject.net.intent.Intent; |
| 22 | |
| 23 | import java.util.List; |
| 24 | |
| 25 | /** |
| 26 | * Abstraction of a compiler which is capable of taking an intent |
| 27 | * and translating it to other, potentially installable, intents for virtual networks. |
| 28 | * |
| 29 | * @param <T> the type of intent |
| 30 | */ |
| 31 | @Beta |
| 32 | public interface VirtualIntentCompiler<T extends Intent> { |
| 33 | /** |
| 34 | * Compiles the specified intent into other intents. |
| 35 | * |
| 36 | * @param networkId network identifier |
| 37 | * @param intent intent to be compiled |
| 38 | * @param installable previous compilation result; optional |
| 39 | * @return list of resulting intents |
| 40 | * @throws VirtualIntentException if issues are encountered while compiling the intent |
| 41 | */ |
| 42 | List<Intent> compile(NetworkId networkId, T intent, List<Intent> installable); |
| 43 | } |