Replace supported admonitions with rst directives
[docs.git] / docs / developer-guide / of-config-developer-guide.rst
1 OF-CONFIG Developer Guide
2 =========================
3
4 Overview
5 --------
6
7 OF-CONFIG defines an OpenFlow switch as an abstraction called an
8 OpenFlow Logical Switch. The OF-CONFIG protocol enables configuration of
9 essential artifacts of an OpenFlow Logical Switch so that an OpenFlow
10 controller can communicate and control the OpenFlow Logical switch via
11 the OpenFlow protocol. OF-CONFIG introduces an operating context for one
12 or more OpenFlow data paths called an OpenFlow Capable Switch for one or
13 more switches. An OpenFlow Capable Switch is intended to be equivalent
14 to an actual physical or virtual network element (e.g. an Ethernet
15 switch) which is hosting one or more OpenFlow data paths by partitioning
16 a set of OpenFlow related resources such as ports and queues among the
17 hosted OpenFlow data paths. The OF-CONFIG protocol enables dynamic
18 association of the OpenFlow related resources of an OpenFlow Capable
19 Switch with specific OpenFlow Logical Switches which are being hosted on
20 the OpenFlow Capable Switch. OF-CONFIG does not specify or report how
21 the partitioning of resources on an OpenFlow Capable Switch is achieved.
22 OF-CONFIG assumes that resources such as ports and queues are
23 partitioned amongst multiple OpenFlow Logical Switches such that each
24 OpenFlow Logical Switch can assume full control over the resources that
25 is assigned to it.
26
27 How to start
28 ------------
29
30 -  start OF-CONFIG feature as below:
31
32    ::
33
34        feature:install odl-of-config-all
35
36 Compatible with NETCONF
37 -----------------------
38
39 -  Config OpenFlow Capable Switch via OpenFlow Configuration Points
40
41    Method: POST
42
43    URI:
44    http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules
45
46    Headers: Content-Type" and "Accept" header attributes set to
47    application/xml
48
49    Payload:
50
51    .. code:: xml
52
53        <module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
54          <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">prefix:sal-netconf-connector</type>
55          <name>testtool</name>
56          <address xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">10.74.151.67</address>
57          <port xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">830</port>
58          <username xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">mininet</username>
59          <password xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">mininet</password>
60          <tcp-only xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">false</tcp-only>
61          <event-executor xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
62            <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netty">prefix:netty-event-executor</type>
63            <name>global-event-executor</name>
64          </event-executor>
65          <binding-registry xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
66            <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">prefix:binding-broker-osgi-registry</type>
67            <name>binding-osgi-broker</name>
68          </binding-registry>
69          <dom-registry xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
70            <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">prefix:dom-broker-osgi-registry</type>
71            <name>dom-broker</name>
72          </dom-registry>
73          <client-dispatcher xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
74            <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:config:netconf">prefix:netconf-client-dispatcher</type>
75            <name>global-netconf-dispatcher</name>
76          </client-dispatcher>
77          <processing-executor xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
78            <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:threadpool">prefix:threadpool</type>
79            <name>global-netconf-processing-executor</name>
80          </processing-executor>
81        </module>
82
83 -  NETCONF establishes the connections with OpenFlow Capable Switches
84    using the parameters in the previous step. NETCONF also gets the
85    information of whether the OpenFlow Switch supports NETCONF during
86    the signal handshaking. The information will be stored in the NETCONF
87    topology as prosperity of a node.
88
89 -  OF-CONFIG can be aware of the switches accessing and leaving by
90    monitoring the data changes in the NETCONF topology. For the detailed
91    information it can be refered to the
92    `implementation <https://git.opendaylight.org/gerrit/gitweb?p=of-config.git;a=blob_plain;f=southbound/southbound-impl/src/main/java/org/opendaylight/ofconfig/southbound/impl/OdlOfconfigApiServiceImpl.java;hb=refs/heads/stable/boron>`__.
93
94 The establishment of OF-CONFIG topology
95 ---------------------------------------
96
97 Firstly, OF-CONFIG will check whether the newly accessed switch supports
98 OF-CONFIG by querying the NETCONF interface.
99
100 1. During the NETCONF connection’s establishment, the NETCONF and the
101    switches will exchange the their capabilities via the "hello"
102    message.
103
104 2. OF-CONFIG gets the connection information between the NETCONF and
105    switches by monitoring the data changes via the interface of
106    DataChangeListener.
107
108 3. After the NETCONF connection established, the OF-CONFIG module will
109    check whether OF-CONFIG capability is in the switch’s capabilities
110    list which is got in step 1.
111
112 4. If the result of step 3 is yes, the OF-CONFIG will call the following
113    processing steps to create the topology database.
114
115 For the detailed information it can be referred to the
116 `implementation <https://git.opendaylight.org/gerrit/gitweb?p=of-config.git;a=blob_plain;f=southbound/southbound-impl/src/main/java/org/opendaylight/ofconfig/southbound/impl/listener/OfconfigListenerHelper.java;hb=refs/heads/stable/boron>`__.
117
118 Secondly, the capable switch node and logical switch node are added in
119 the OF-CONFIG topology if the switch supports OF-CONFIG.
120
121 OF-CONFIG’s topology compromise: Capable Switch topology (underlay) and
122 logical Switch topology (overlay). Both of them are enhanced (augment)
123 on
124
125 /topo:network-topology/topo:topology/topo:node
126
127 The NETCONF will add the nodes in the Topology via the path of
128 "/topo:network-topology/topo:topology/topo:node" if it gets the
129 configuration information of the switches.
130
131 For the detailed information it can be referred to the
132 `implementation <https://git.opendaylight.org/gerrit/gitweb?p=of-config.git;a=blob;f=southbound/southbound-api/src/main/yang/odl-ofconfig-topology.yang;h=dbdaec46ee59da3791386011f571d7434dd1e416;hb=refs/heads/stable/boron>`__.
133