blob: 20476e532f2617975f850157700eaa28f7513993 [file] [log] [blame]
Brian O'Connorb876bf12014-10-02 14:59:37 -07001package org.onlab.onos.net.intent;
2
3/**
4 * This class represents the states of an intent.
5 *
6 * <p>
7 * Note: The state is expressed as enum, but there is possibility
8 * in the future that we define specific class instead of enum to improve
9 * the extensibility of state definition.
10 * </p>
11 */
12public enum IntentState {
13 // FIXME: requires discussion on State vs. EventType and a solid state-transition diagram
14 // TODO: consider the impact of conflict detection
15 // TODO: consider the impact that external events affect an installed intent
16 /**
17 * The beginning state.
18 *
19 * All intent in the runtime take this state first.
20 */
21 SUBMITTED,
22
23 /**
24 * The intent compilation has been completed.
25 *
26 * An intent translation graph (tree) is completely created.
27 * Leaves of the graph are installable intent type.
28 */
29 COMPILED,
30
31 /**
32 * The intent has been successfully installed.
33 */
34 INSTALLED,
35
36 /**
37 * The intent is being withdrawn.
38 *
39 * When {@link IntentService#withdraw(Intent)} is called,
40 * the intent takes this state first.
41 */
42 WITHDRAWING,
43
44 /**
45 * The intent has been successfully withdrawn.
46 */
47 WITHDRAWN,
48
49 /**
50 * The intent has failed to be compiled, installed, or withdrawn.
51 *
52 * When the intent failed to be withdrawn, it is still, at least partially installed.
53 */
54 FAILED,
55}