4 The ALTO project provides support for _Application Layer Traffic
5 Optimization_ services defined in link:https://tools.ietf.org/html/rfc7285[RFC
8 In the Lithium release, ALTO uses the YANG model described in
9 link:https://tools.ietf.org/html/draft-shi-alto-yang-model-03[this draft].
13 There are three kinds of ALTO packages in OpenDaylight.
16 The **core** packages include:
17 .. `alto-model`: Defines the YANG model of ALTO services in MD-SAL
18 .. `service-api-rfc7285`: Defines interfaces for ALTO services in AD-SAL
19 .. `alto-northbound`: Implements the RFC7285-compatible RESTful API
21 The **basic** packages include:
22 .. Basic implementations of ALTO services:
23 ... `alto-provider`: Implements the services defined in `alto-model`
24 ... `simple-impl`: Implements the services defined in `service-api-rfc7285`
26 ... `alto-manager`: Provides a karaf command line tool to manipulate network
29 The **service** packages include:
30 .. `alto-hosttracker`: Generates a network map, a corresponding cost map and
31 the endpoint cost service based on <<_l2switch_user_guide, l2switch>>.
35 There are three packages that require their own configuration files,
36 including `alto-provider`, `alto-hosttracker` and `simple-impl`. However, the
37 only configurable option is the type of the data broker in all three
40 === Administering or Managing ALTO
42 To enable ALTO, the features must be installed first.
45 karaf > feature:install odl-alto-provider
46 karaf > feature:install odl-alto-manager
47 karaf > feature:install odl-alto-northbound
48 karaf > feature:install odl-alto-hosttracker
50 ==== Managing Data with RESTCONF
52 After installing `odl-alto-provider` feature in karaf, it is possible to manage
53 network-maps and cost-maps using RESTCONF. Take a look at all the operations
54 provided by `alto-model` at the API service page which can be found at
55 `http://localhost:8181/apidoc/explorer/index.html`.
57 With the example input below you can insert a network map into the data store,
58 either by filling the form in the API doc page, or by using tools such as `curl`.
61 HOST_IP=localhost # IP address of the controller
62 CREDENTIAL=admin:admin # username and password for authentication
63 BASE_URL=$HOST_IP:8181/restconf/config
64 SERVICE_PATH=alto-service:resources/alto-service:network-maps/alto-service:network-map
65 RESOURCE_ID=test_odl # Should match the one in the input file
66 curl -X PUT -H "content-type:application/yang.data+json" \
67 -d @example-input.json -u $CREDENTIAL \
68 http://$BASE_URL/$SERVICE_PATH/$RESOURCE_ID
71 include::example-input.json[]
73 [[read-restconf]]Use the following command to see the results:
76 HOST_IP=localhost # IP address of the controller
77 CREDENTIAL=admin:admin # username and password for authentication
78 BASE_URL=$HOST_IP:8181/restconf/config
79 SERVICE_PATH=alto-service:resources/alto-service:network-maps/alto-service:network-map
81 curl -X GET -u $CREDENTIAL http://$BASE_URL/$SERVICE_PATH/$RESOURCE_ID
83 Use `DELETE` method to remove the data from the data store.
86 HOST_IP=localhost # IP address of the controller
87 CREDENTIAL=admin:admin # username and password for authentication
88 BASE_URL=$HOST_IP:8181/restconf/config
89 SERVICE_PATH=alto-service:resources/alto-service:network-maps/alto-service:network-map
91 curl -X DELETE -H "content-type:application/yang.data+json" \
92 -u $CREDENTIAL http://$BASE_URL/$SERVICE_PATH/$RESOURCE_ID
94 ==== Using `alto-manager`
96 The `alto-manager` package provides a karaf command line tool which wraps up
97 the functions described in the last section.
100 karaf > alto-create <type> <resource-file>
101 karaf > alto-delete <type> <resource-id>
103 Currently only `network-map` and `cost-map` are supported. Also the resource
104 files used in `alto-manager` follow the RFC7285-compatible format instead of
107 The following example shows how to use `alto-manager` to put a network map into
111 karaf > alto-create network-map example-rfc7285-networkmap.json
114 include::example-rfc7285-networkmap.json[]
116 ==== Using `alto-hosttracker`
118 As a real instance of ALTO services, `alto-hosttracker` reads data from
119 `l2switch` and generates a network map with resource id
120 `hosttracker-network-map` and a cost map with resource id `hostracker-cost-map`.
121 It can only work with OpenFlow-enabled networks.
123 After installing the `odl-alto-hosttracker` feature, the corresponding network
124 map and cost map will be inserted into the data store. Follow the steps in
125 <<read-restconf, how to read data with RESTCONF>> to see the contents.