Skip to content

Commit 1460ae6

Browse files
committed
Update README page
Signed-off-by: jensenzhang <jingxuan.n.zhang@gmail.com>
1 parent d867386 commit 1460ae6

File tree

1 file changed

+221
-73
lines changed

1 file changed

+221
-73
lines changed

README.md

Lines changed: 221 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,254 @@
1+
# Sextant: Automated Network Information Collection, Abstraction & Exposure
12

2-
# TODO
3+
## Installation
34

4-
1. Use [routed RPC service][routed-rpc] to implement ALTO instances. Also see
5-
[examples][routed-rpc-example].
5+
This plugin is still an on-going work. The official release has not included it yet.
66

7-
[routed-rpc]: https://ask.opendaylight.org/question/99/how-does-request-routing-works/
8-
[routed-rpc-example]: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blob;f=opendaylight/md-sal/sal-binding-it/src/test/java/org/opendaylight/controller/test/sal/binding/it/RoutedServiceTest.jav=d49d6f0e25e271e43c8550feb5eef63d9630118b=HEAD4a
7+
To try it, you should download the latest [pre-released patch](https://github.com/openalto/odl-alto/releases) and follow the instruction to install it into a pre-installed OpenDaylight Oxygen-SR4 release.
98

10-
# Test service models for ALTO
9+
## Prepare
10+
11+
Before trying this plugin, you should set up at least one BGP-LS session with your BGP speaker.
12+
13+
## Install Auto Map Features
14+
15+
To try out the alto-auto-maps plugin, you should install the following features in order:
16+
17+
``` bash
18+
opendaylight-user@root>feature:install odl-alto-core
19+
opendaylight-user@root>feature:install odl-alto-simpleird
20+
opendaylight-user@root>feature:install odl-alto-manual-maps
21+
opendaylight-user@root>feature:install odl-alto-auto-maps
22+
```
23+
24+
## Auto Map Configuration
25+
26+
You can use the Restconf API to create a new network map as follows:
27+
28+
``` http
29+
PUT /restconf/config/alto-auto-maps:config-context/00000000-0000-0000-0000-000000000000/network-map-config/igp-bgp-networkmap HTTP/1.1
30+
Host: localhost:8181
31+
Content-Type: application/json
1132
12-
~~~
13-
resourcepool
1433
{
15-
"input": {
16-
"service-reference":"/alto-resourcepool:context[alto-resourcepool:context-id='00000000-0000-0000-0000-000000000000']/alto-resourcepool:resource[alto-resourcepool:resource-id='test-model-base']/alto-resourcepool:context-tag[alto-resourcepool:tag='NEED TO CHECK THE RESOURCEPOOL']"
34+
"network-map-config": {
35+
"resource-id": "simple-bgp-networkmap",
36+
"bgp-params": {
37+
"bgp-rib": [
38+
{
39+
"rib-id": "alto-tcdn-ipv4",
40+
"bgp-ls": true
41+
}
42+
]
43+
},
44+
"first-hop-cluster-algorithm": {
45+
"inspect-igp": false,
46+
"inspect-internal-link": false
1747
}
48+
}
1849
}
50+
```
51+
52+
In the configuration above, you should replace `simple-bgp-networkmap` with your own resource id, and replace `alto-tcdn-ipv4` with your own BGP-LS protocol instance id (you should have configured one in the [Prepare Stage](#prepare)).
53+
54+
Similarly, you can create a new cost map depending on the network map above:
55+
56+
``` http
57+
PUT /restconf/config/alto-auto-maps:config-context/00000000-0000-0000-0000-000000000000/cost-map-config/igp-bgp-hopcount-costmap HTTP/1.1
58+
Host: localhost:8181
59+
Content-Type: application/json
1960
20-
networkmap
2161
{
22-
"input": {
23-
"service-reference":"/alto-resourcepool:context[alto-resourcepool:context-id='00000000-0000-0000-0000-000000000000']/alto-resourcepool:resource[alto-resourcepool:resource-id='test-model-networkmap']/alto-resourcepool:context-tag[alto-resourcepool:tag='NEED TO CHECK THE RESOURCEPOOL']",
24-
"type":"alto-model-networkmap:resource-type-networkmap",
25-
"networkmap-filter": {
26-
"pid": ["PID1", "PID2", "PID3"],
27-
"address-type": [
28-
"alto-model-networkmap:address-type-ipv4",
29-
"alto-model-networkmap:address-type-ipv6"
30-
]
62+
"cost-map-config": {
63+
"resource-id": "igp-bgp-hopcount-costmap",
64+
"dependent-network-map": "simple-bgp-networkmap",
65+
"bgp-params": {
66+
"alternative-bgp-rib": [
67+
{
68+
"rib-id": "alto-tcdn-ls",
69+
"bgp-ls": true
3170
}
32-
}
71+
]
72+
},
73+
"cost-type": [
74+
{
75+
"cost-mode": "numerical",
76+
"cost-metric": "hopcount"
77+
}
78+
]
79+
}
3380
}
81+
```
82+
83+
Now you can try to access the default IRD of the ALTO server:
84+
85+
``` http
86+
GET /alto/simpleird/default HTTP/1.1
87+
Host: localhost:8181
88+
Accept: application/alto-directory+json,application/alto-error+json
89+
90+
HTTP/1.1 200 OK
91+
Content-Type: application/alto-directory+json
3492
35-
costmap
3693
{
37-
"input": {
38-
"service-reference":"/alto-resourcepool:context[alto-resourcepool:context-id='00000000-0000-0000-0000-000000000000']/alto-resourcepool:resource[alto-resourcepool:resource-id='test-model-costmap']/alto-resourcepool:context-tag[alto-resourcepool:tag='b781f0ee38e74b07b89e03a26c50ff3e']",
39-
"type":"alto-model-costmap:resource-type-costmap",
40-
"costmap-params": {
41-
"cost-type": {
42-
"cost-mode": "ordinal",
43-
"cost-metric": "routingcost"
44-
},
45-
"costmap-filter": {
46-
"pid-source": ["PID1"],
47-
"pid-destination": ["PID1","PID2","PID3"]
48-
}
49-
}
94+
"meta": {
95+
"cost-types": {}
96+
},
97+
"resources": {
98+
"igp-bgp-hopcount-costmap": {
99+
"media-type": "application/alto-costmap+json",
100+
"uri": "http://0:0:0:0:0:0:0:1:8181/alto/costmap/igp-bgp-hopcount-costmap",
101+
"uses": [
102+
"igp-bgp-networkmap"
103+
]
104+
},
105+
"igp-bgp-networkmap": {
106+
"media-type": "application/alto-networkmap+json",
107+
"uri": "http://0:0:0:0:0:0:0:1:8181/alto/networkmap/simple-bgp-networkmap"
50108
}
109+
}
51110
}
111+
```
112+
113+
You will see that two ALTO information resources have been created. You can use their `uri` to access them now.
114+
115+
``` http
116+
GET /alto/networkmap/simple-bgp-networkmap HTTP/1.1
117+
Host: localhost:8181
118+
Accepts: application/alto-networkmap+json
119+
120+
HTTP/1.1 200 OK
121+
Content-Type: application/alto-networkmap+json
52122
53-
endpointcost
54123
{
55-
"input": {
56-
"service-reference":"/alto-resourcepool:context[alto-resourcepool:context-id='00000000-0000-0000-0000-000000000000']/alto-resourcepool:resource[alto-resourcepool:resource-id='test-model-endpointcost']/alto-resourcepool:context-tag[alto-resourcepool:tag='NEED TO CHECK THE RESOURCEPOOL']",
57-
"type":"alto-model-endpointcost:resource-type-endpointcost",
58-
"endpointcost-params": {
59-
"cost-type": {
60-
"cost-mode": "ordinal",
61-
"cost-metric": "routingcost"
62-
},
63-
"endpoint-filter": {
64-
"source": [
65-
{"ipv4": "192.168.0.1"},
66-
{"ipv4": "192.168.0.2"}
67-
],
68-
"destination": [
69-
{"ipv4": "192.168.1.1"},
70-
{"ipv4": "192.168.1.2"}
71-
]
72-
}
73-
}
124+
"meta": {
125+
"vtag": {
126+
"resource-id": "simple-bgp-networkmap",
127+
"tag": "b5220086bfad4a6a9d231ae9b3370dcf"
128+
}
129+
},
130+
"network-map": {
131+
"PID0:0a0a0a01": {
132+
"ipv4": [
133+
"1.1.1.0/24"
134+
]
135+
},
136+
"PID0:0a0a0a04": {
137+
"ipv4": [
138+
"4.4.4.0/24"
139+
]
140+
},
141+
"PID0:0a0a0a05": {
142+
"ipv4": [
143+
"5.5.5.0/24"
144+
]
145+
},
146+
"PID0:0a0a0a06": {
147+
"ipv4": [
148+
"6.6.6.0/24"
149+
]
150+
},
151+
"PID0:0a0a0a08": {
152+
"ipv4": [
153+
"8.8.8.0/24"
154+
]
155+
},
156+
"PID0:0a0a0a0b": {
157+
"ipv4": [
158+
"11.11.11.0/24"
159+
]
74160
}
161+
}
75162
}
163+
```
76164

165+
``` http
166+
GET /alto/costmap/igp-bgp-hopcount-costmap HTTP/1.1
167+
Host: localhost:8181
168+
Accepts: application/alto-costmap+json
77169
78-
endpointproperty
79-
{
80-
"input": {
81-
"service-reference":"/alto-resourcepool:context[alto-resourcepool:context-id='00000000-0000-0000-0000-000000000000']/alto-resourcepool:resource[alto-resourcepool:resource-id='test-model-endpointproperty']/alto-resourcepool:context-tag[alto-resourcepool:tag='89a179d3000a4f44b423c86261ce36ff']",
82-
"type":"alto-model-endpointproperty:resource-type-endpointproperty",
83-
"endpointproperty-params": {
84-
"endpointproperty-filter": {
85-
"property-filter":[
86-
{"resource-specific-property": "my-default-networkmap.pid"},
87-
{"global-property": "priv:ietf-example-prop"}
88-
],
89-
"endpoint-filter": [
90-
{"ipv4": "192.168.0.1"},
91-
{"ipv4": "192.168.0.2"}
92-
]
93-
}
170+
HTTP/1.1 200 OK
171+
Content-Type: application/alto-costmap+json
94172
95-
}
173+
{
174+
"cost-map": {
175+
"PID0:0a0a0a01": {
176+
"PID0:0a0a0a04": "2",
177+
"PID0:0a0a0a05": "0",
178+
"PID0:0a0a0a06": "0",
179+
"PID0:0a0a0a08": "2",
180+
"PID0:0a0a0a0b": "3"
181+
},
182+
"PID0:0a0a0a04": {
183+
"PID0:0a0a0a01": "2",
184+
"PID0:0a0a0a05": "2",
185+
"PID0:0a0a0a06": "2",
186+
"PID0:0a0a0a08": "0",
187+
"PID0:0a0a0a0b": "2"
188+
},
189+
"PID0:0a0a0a05": {
190+
"PID0:0a0a0a01": "0",
191+
"PID0:0a0a0a04": "2",
192+
"PID0:0a0a0a06": "0",
193+
"PID0:0a0a0a08": "2",
194+
"PID0:0a0a0a0b": "3"
195+
},
196+
"PID0:0a0a0a06": {
197+
"PID0:0a0a0a01": "0",
198+
"PID0:0a0a0a04": "2",
199+
"PID0:0a0a0a05": "0",
200+
"PID0:0a0a0a08": "2",
201+
"PID0:0a0a0a0b": "3"
202+
},
203+
"PID0:0a0a0a08": {
204+
"PID0:0a0a0a01": "2",
205+
"PID0:0a0a0a04": "0",
206+
"PID0:0a0a0a05": "2",
207+
"PID0:0a0a0a06": "2",
208+
"PID0:0a0a0a0b": "2"
209+
},
210+
"PID0:0a0a0a0b": {
211+
"PID0:0a0a0a01": "3",
212+
"PID0:0a0a0a04": "2",
213+
"PID0:0a0a0a05": "3",
214+
"PID0:0a0a0a06": "3",
215+
"PID0:0a0a0a08": "2"
216+
}
217+
},
218+
"meta": {
219+
"cost-type": {
220+
"cost-metric": "hopcount",
221+
"cost-mode": "numerical"
222+
},
223+
"dependent-vtags": [
224+
{
225+
"resource-id": "simple-bgp-networkmap",
226+
"tag": "b5220086bfad4a6a9d231ae9b3370dcf"
227+
}
228+
],
229+
"vtag": {
230+
"resource-id": "igp-bgp-hopcount-costmap",
231+
"tag": "e22a65b220c3454aa1ac743d31c00746"
96232
}
233+
}
97234
}
235+
```
98236

237+
## Missing Features
99238

239+
Again, this plugin is still on development. The ALTO information resource generated by this plugin is incomplete:
100240

241+
- [ ] The `capabilities` field in the IRD is missing;
242+
- [ ] The filtered ALTO maps may have some issues.
101243

244+
And some ALTO mechanisms are still missing:
102245

246+
- [x] The first-hop network map MUST be generated based on the BGP-LS RIB right now. Therefore, some non-endpoint CIDRs will be included in the generated network map. We are working on generating a cleanup network map based on the BGP RIB.
247+
- [ ] The cost map may not be updated correctly when the network map changes.
103248

104-
~~~
249+
Also, we are also considering some practical concerns, which will be added in the future updates:
105250

251+
- [ ] access control (*e.g.*, authentication)
252+
- [ ] more HTTP headers and status codes (*e.g.*, HTTP 304 Not Modified)
106253

254+
We will release the new patches to complete the missing features. If you have any other questions, please feel free to let us know.

0 commit comments

Comments
 (0)