Project

General

Profile

StrategyChoice » History » Version 4

Junxiao Shi, 03/18/2014 11:35 AM

1 4 Junxiao Shi
# Strategy Choice Management
2 1 Junxiao Shi
3 4 Junxiao Shi
**Strategy Choice Management** is a module of [[Management|NFD Management protocol]].
4
It provides:
5 1 Junxiao Shi
6 4 Junxiao Shi
* commands to choose the forwarding strategy for a namespace
7 1 Junxiao Shi
8 4 Junxiao Shi
Strategy Choice Management commands are published in namespace `ndn:/localhost/nfd/strategy-choice`.
9 1 Junxiao Shi
10
11
12 4 Junxiao Shi
## Strategy
13 1 Junxiao Shi
14 4 Junxiao Shi
A strategy is represented by a Name.
15 1 Junxiao Shi
16 4 Junxiao Shi
NFD currently supports builtin strategies only. The following strategies are available:
17 1 Junxiao Shi
18 4 Junxiao Shi
* ndn:/localhost/nfd/strategy/best-route
19
* ndn:/localhost/nfd/strategy/broadcast
20
* ndn:/localhost/nfd/strategy/client-control
21
* ndn:/localhost/nfd/strategy/ncc
22 1 Junxiao Shi
23
24
25 4 Junxiao Shi
## Control Commands
26 1 Junxiao Shi
27 4 Junxiao Shi
[[ControlCommand]] **management-module**: `strategy-choice`
28 3 Junxiao Shi
29 4 Junxiao Shi
### Set the strategy for a namespace
30 1 Junxiao Shi
31 4 Junxiao Shi
**command-verb**: `set`
32 1 Junxiao Shi
33 4 Junxiao Shi
ControlParameters fields:
34 1 Junxiao Shi
35 4 Junxiao Shi
* Name (required)
36
* Strategy (required)
37 1 Junxiao Shi
38 4 Junxiao Shi
Strategy must be a `Name` that represents a builtin strategy.  
39
If Strategy does not match any builtin strategy, the command fails with code 504.
40 1 Junxiao Shi
41 4 Junxiao Shi
### Unset the strategy for a namespace
42 1 Junxiao Shi
43 4 Junxiao Shi
**command-verb**: `unset`
44 1 Junxiao Shi
45 4 Junxiao Shi
ControlParameters fields:
46 1 Junxiao Shi
47 4 Junxiao Shi
* Name (required)
48 1 Junxiao Shi
49 4 Junxiao Shi
After this operation, the effective strategy at Name is inherited from the parent.  
50 1 Junxiao Shi
If there is no strategy defined at Name, this command does nothing, but is still considered successful.
51 2 Alex Afanasyev
52 4 Junxiao Shi
Name must not be `ndn:/`, otherwise the command fails with code 403.