finalize alto-manager and add README.md file
[alto.git] / alto-manager / README.md
1 #Alto-Manager
2
3 ======
4
5 Alto-manager provides extends karaf shell interface for you to create and delete maps and set properties for odl datastore. All functions are implemented by restconf in the backend.
6
7 Alto-Manager supports three different commands.
8
9 ##alto:create
10 Load maps from file and put them into odl datastore
11
12 #####Command:
13
14 ```
15 alto:create <map-type> <file-path>
16 ```
17 alto:create command supports three different map types, `network-map, cost-map and endpoint-property-map`.
18
19 #####File Format:
20 * **network-map**: JSON Array of RFC formatted network maps.
21 * **cost-map**: JSON Array of RFC formatted cost maps.
22 * **endpoint-property-map**: Single RFC formatted endpoint property map
23
24 File examples can be found at ./alto-manager/examples/.
25
26 #####Note:
27 Exceptions will be thrown if you try to:
28
29 * Sepecify wrong map-type
30
31 #####Example:
32 ```
33 alto:create network-map ./examples/network-map-rfc
34 alto:create cost-map ./examples/cost-map-rfc
35 alto:create endpoint-property-map ./examples/cost-map-rfc
36 ```
37
38
39 ##alto:delete
40 Delete map from odl datastore.
41
42 #####Command:
43
44 ```
45 alto:delete <map-type> <resource-id or null>
46 ```
47 alto:delete command supports three different map types, `network-map, cost-map and endpoint-property-map`.
48
49 If you are going to delete a network map or cost map, the second option should be set to resource id of the map. If you are going to delete endpoint-property-map, the second option should not be set.
50
51 #####Note:
52 Exceptions will be thrown if you try to:
53
54 * Sepecify unsupported map type
55 * Delete a map which does not exist
56 * Delete the default network map
57 * Delete a cost map or network map without specifying the resource id
58 * Delete the endpoint propery map with a resource id
59
60 #####Example:
61 ```
62 alto:delete network-map my-default-network-map
63 alto:create cost-map new-network-map-routingcost-numerical
64 alto:create endpoint-property-map
65 ```
66
67 ##alto:set
68 Set specific field for old datastore. **Currently only "default-network-map" field for IRD resource is supported.**
69
70 #####Command:
71
72 ```
73 alto:set <propety-name> <property-value>
74 ```
75
76 #####Note:
77 Exceptions will be thrown if you try to:
78
79 * Sepecify unsupported map type
80 * Network map specified by resource id does not exist
81
82 #####Example:
83 ```
84 alto:set default-network-map <network-map-resource-id>
85 ```
86
87 ##TODO
88 * Support URI for alto:create