Skip to content

Commit fa8bd60

Browse files
committed
README: Change YANG connections key to name
Connections were previously keyed based off of `to` (i.e. the remote node/network name), which is not unique in the case of parallel p2p links (managed via `remote-name`) or dummy interfaces. The key is shifted to `name`, which is guarenteed to be unique, even when implicitely set by munet. Signed-off-by: Liam Brady <lbrady@labn.net>
1 parent 8bbbd4f commit fa8bd60

File tree

2 files changed

+17
-15
lines changed

2 files changed

+17
-15
lines changed

README.org

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ module: labn-munet-config
8686
| | +--rw expects* string
8787
| | +--rw sends* string
8888
| | +--rw timeout? uint32
89-
| +--rw connections* [to]
90-
| | +--rw to string
89+
| +--rw connections* [name]
90+
| | +--rw to? string
9191
| | +--rw ip? string
9292
| | +--rw ipv6? string
93-
| | +--rw name? string
93+
| | +--rw name string
9494
| | +--rw hostintf? string
9595
| | +--rw physical? string
9696
| | +--rw remote-name? string
@@ -142,9 +142,9 @@ module: labn-munet-config
142142
| | | +--rw rate? number64
143143
| | | +--rw limit? number64
144144
| | | +--rw burst? number64
145-
| | +--rw connections* [to]
145+
| | +--rw connections* [name]
146146
| | +--rw to string
147-
| | +--rw name? string
147+
| | +--rw name string
148148
| | +--rw remote-name? string
149149
| | +--rw delay? uint64
150150
| | +--rw jitter? uint64
@@ -198,11 +198,11 @@ module: labn-munet-config
198198
| | +--rw expects* string
199199
| | +--rw sends* string
200200
| | +--rw timeout? uint32
201-
| +--rw connections* [to]
202-
| | +--rw to string
201+
| +--rw connections* [name]
202+
| | +--rw to? string
203203
| | +--rw ip? string
204204
| | +--rw ipv6? string
205-
| | +--rw name? string
205+
| | +--rw name string
206206
| | +--rw hostintf? string
207207
| | +--rw physical? string
208208
| | +--rw remote-name? string
@@ -819,7 +819,7 @@ munet>
819819
must "not(../hostnet) and not(../server)" {
820820
error-message "SSHRemote and hostnet nodes have no munet connections.";
821821
}
822-
key to;
822+
key name;
823823
description "Connections to other networks or nodes from this node";
824824

825825
leaf to {
@@ -1142,7 +1142,7 @@ munet>
11421142
uses intf-constraints;
11431143

11441144
list connections {
1145-
key to;
1145+
key name;
11461146
description
11471147
"Overriding network side configuration for connections to nodes from
11481148
this network. If the default network tc parameters are not being
@@ -1151,6 +1151,7 @@ munet>
11511151

11521152
leaf to {
11531153
type string;
1154+
mandatory true;
11541155
description "The target of this connection.";
11551156
}
11561157
leaf name {

doc/source/config.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ Tree diagram for network config::
115115
| +--rw rate? number64
116116
| +--rw limit? number64
117117
| +--rw burst? number64
118-
+--rw connections* [to]
118+
+--rw connections* [name]
119119
+--rw to string
120-
+--rw name? string
120+
+--rw name string
121121
+--rw remote-name? string
122122
+--rw delay? uint64
123123
+--rw jitter? uint64
@@ -208,10 +208,11 @@ Tree diagram for node connections::
208208

209209
+--rw topology
210210
| +--rw nodes* [name]
211-
| +--rw connections* [to]
212-
| | +--rw to string
211+
| +--rw connections* [name]
212+
| | +--rw to? string
213213
| | +--rw ip? string
214-
| | +--rw name? string
214+
| | +--rw ipv6? string
215+
| | +--rw name string
215216
| | +--rw hostintf? string
216217
| | +--rw physical? string
217218
| | +--rw remote-name? string

0 commit comments

Comments
 (0)