blob: d7efa521a07422c82ed4074136e7a04be067cdeb [file] [log] [blame]
Thomas Vachuska83e090e2014-10-22 14:25:35 -07001/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
Brian O'Connorb876bf12014-10-02 14:59:37 -070020/**
toma1d16b62014-10-02 23:45:11 -070021 * Set of abstractions for conveying high-level intents for treatment of
22 * selected network traffic by allowing applications to express the
23 * <em>what</em> rather than the <em>how</em>. This makes such instructions
24 * largely independent of topology and device specifics, thus allowing them to
25 * survive topology mutations.
tom6db1f0a2014-10-07 09:12:29 -070026 * <p/>
27 * The controller core provides a suite of built-in intents and their compilers
28 * and installers. However, the intent framework is extensible in that it allows
29 * additional intents and their compilers or installers to be added
30 * dynamically at run-time. This allows others to enhance the initial arsenal of
31 * connectivity and policy-based intents available in base controller software.
32 * <p/>
33 * The following diagram depicts the state transition diagram for each top-level intent:<br>
34 * <img src="doc-files/intent-states.png" alt="ONOS intent states">
35 * <p/>
36 * The controller core accepts the intent specifications and translates them, via a
37 * process referred to as intent compilation, to installable intents, which are
38 * essentially actionable operations on the network environment.
39 * These actions are carried out by intent installation process, which results
40 * in some changes to the environment, e.g. tunnel links being provisioned,
41 * flow rules being installed on the data-plane, optical lambdas being reserved.
42 * <p/>
43 * After an intent is submitted by an application, it will be sent immediately
44 * (but asynchronously) into a compiling phase, then to installing phase and if
45 * all goes according to plan into installed state. Once an application decides
46 * it no longer wishes the intent to hold, it can withdraw it. This describes
47 * the nominal flow. However, it may happen that some issue is encountered.
48 * For example, an application may ask for an objective that is not currently
49 * achievable, e.g. connectivity across to unconnected network segments.
50 * If this is the case, the compiling phase may fail to produce a set of
51 * installable intents and instead result in a failed compile. If this occurs,
52 * only a change in the environment can trigger a transition back to the
53 * compiling state.
54 * <p/>
55 * Similarly, an issue may be encountered during the installation phase in
56 * which case the framework will attempt to recompile the intent to see if an
57 * alternate approach is available. If so, the intent will be sent back to
58 * installing phase. Otherwise, it will be parked in the failed state. Another
59 * scenario that’s very likely to be encountered is where the intent is
60 * successfully compiled and installed, but due to some topology event, such
61 * as a downed or downgraded link, loss of throughput may occur or connectivity
62 * may be lost altogether, thus impacting the viability of a previously
63 * satisfied intent. If this occurs, the framework will attempt to recompile
64 * the intent, and if an alternate approach is available, its installation
65 * will be attempted. Otherwise, the original top-level intent will be parked
66 * in the failed state.
67 * <p/>
68 * Please note that all *ing states, depicted in orange, are transitional and
69 * are expected to last only a brief amount of time. The rest of the states
70 * are parking states where the intent may spent some time; except for the
71 * submitted state of course. There, the intent may pause, but only briefly,
72 * while the system determines where to perform the compilation or while it
73 * performs global recomputation/optimization across all prior intents.
Brian O'Connorb876bf12014-10-02 14:59:37 -070074 */
Toshio Koided32809b2014-10-09 10:58:54 -070075package org.onlab.onos.net.intent;