blob: 1bac21da8e874d9f868ebc940e3b13250137a94c [file] [log] [blame]
Thomas Vachuska83e090e2014-10-22 14:25:35 -07001/*
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07002 * Copyright 2014 Open Networking Laboratory
Thomas Vachuska83e090e2014-10-22 14:25:35 -07003 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07004 * 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
Thomas Vachuska83e090e2014-10-22 14:25:35 -07007 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07008 * 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.
Thomas Vachuska83e090e2014-10-22 14:25:35 -070015 */
16
Brian O'Connorb876bf12014-10-02 14:59:37 -070017/**
toma1d16b62014-10-02 23:45:11 -070018 * Set of abstractions for conveying high-level intents for treatment of
19 * selected network traffic by allowing applications to express the
20 * <em>what</em> rather than the <em>how</em>. This makes such instructions
21 * largely independent of topology and device specifics, thus allowing them to
22 * survive topology mutations.
tom6db1f0a2014-10-07 09:12:29 -070023 * <p/>
24 * The controller core provides a suite of built-in intents and their compilers
25 * and installers. However, the intent framework is extensible in that it allows
26 * additional intents and their compilers or installers to be added
27 * dynamically at run-time. This allows others to enhance the initial arsenal of
28 * connectivity and policy-based intents available in base controller software.
29 * <p/>
30 * The following diagram depicts the state transition diagram for each top-level intent:<br>
31 * <img src="doc-files/intent-states.png" alt="ONOS intent states">
32 * <p/>
33 * The controller core accepts the intent specifications and translates them, via a
34 * process referred to as intent compilation, to installable intents, which are
35 * essentially actionable operations on the network environment.
36 * These actions are carried out by intent installation process, which results
37 * in some changes to the environment, e.g. tunnel links being provisioned,
38 * flow rules being installed on the data-plane, optical lambdas being reserved.
39 * <p/>
40 * After an intent is submitted by an application, it will be sent immediately
41 * (but asynchronously) into a compiling phase, then to installing phase and if
42 * all goes according to plan into installed state. Once an application decides
43 * it no longer wishes the intent to hold, it can withdraw it. This describes
44 * the nominal flow. However, it may happen that some issue is encountered.
45 * For example, an application may ask for an objective that is not currently
46 * achievable, e.g. connectivity across to unconnected network segments.
47 * If this is the case, the compiling phase may fail to produce a set of
48 * installable intents and instead result in a failed compile. If this occurs,
49 * only a change in the environment can trigger a transition back to the
50 * compiling state.
51 * <p/>
52 * Similarly, an issue may be encountered during the installation phase in
53 * which case the framework will attempt to recompile the intent to see if an
54 * alternate approach is available. If so, the intent will be sent back to
55 * installing phase. Otherwise, it will be parked in the failed state. Another
56 * scenario that’s very likely to be encountered is where the intent is
57 * successfully compiled and installed, but due to some topology event, such
58 * as a downed or downgraded link, loss of throughput may occur or connectivity
59 * may be lost altogether, thus impacting the viability of a previously
60 * satisfied intent. If this occurs, the framework will attempt to recompile
61 * the intent, and if an alternate approach is available, its installation
62 * will be attempted. Otherwise, the original top-level intent will be parked
63 * in the failed state.
64 * <p/>
65 * Please note that all *ing states, depicted in orange, are transitional and
66 * are expected to last only a brief amount of time. The rest of the states
67 * are parking states where the intent may spent some time; except for the
68 * submitted state of course. There, the intent may pause, but only briefly,
69 * while the system determines where to perform the compilation or while it
70 * performs global recomputation/optimization across all prior intents.
Brian O'Connorb876bf12014-10-02 14:59:37 -070071 */
Toshio Koided32809b2014-10-09 10:58:54 -070072package org.onlab.onos.net.intent;