<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hey,<br>
<br>
On 11/19/2014 12:24 PM, Henning Rogge wrote:<br>
</div>
<blockquote
cite="mid:CAGnRvuqkHKyJTPCCpi0YCGWqsX7DaX6uQFSBRBPKmY0rDX2jxQ@mail.gmail.com"
type="cite">
<pre wrap="">If you run different metrics, you create multiple routes. Maybe we
need to add the routing table to the tuple.
the "cost" value should contain the metric as a dimensionless value,
so external code can judge if one route is better than another one
without knowing the metric type. But we could add a "cost_type" as a
free-text field that describes the content of the cost field.
{
"route" : [
{
"destination": "<ip/prefix>",
"source": "<ip/prefix>",
"next" : "<ip>",
"device": "<dev>",
"table": <routing-table>
"cost": "<value>",
"cost_type": "<name of cost algorithm>"
}
]
}
"cost_type" value could be things like ETX, ETT or "BATMAN metric xyz"
or whatever.</pre>
</blockquote>
<br>
Thanks for the input.<br>
<br>
I got some feedback from Antonio Quartulli (batman-adv) to see how
that would fit for batman-adv.<br>
<br>
He told me that "source" doesn't apply for batman-adv and should be
omitted if "type" is "batman-adv".<br>
<br>
We also reasoned about "cost" and "cost_type". The word "cost"
implies that is better to have a lower cost, while some algorithms
might do it differently.<br>
So peraphs using "metric" and "metric_name" would be more generic.<br>
<br>
I also added a "meta" section (which I think we should have in the
network-device-config-json too) and renamed "type" to
"routing_protocol" to follow the verbose and self documenting
approach that Mitar suggested previously.<br>
<br>
This is the result:<br>
<a class="moz-txt-link-freetext" href="https://github.com/interop-dev/network-device-schema/compare/f41a1561bd...1cba66c3c5c">https://github.com/interop-dev/network-device-schema/compare/f41a1561bd...1cba66c3c5c</a><br>
<br>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<span style="color: rgb(0, 0, 0); font-family: 'Times New Roman';
font-size: medium; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline
!important; float: none;">{</span>
<ul class="obj collapsible" style="list-style-type: none; padding:
0px; margin: 0px 0px 0px 26px; color: rgb(0, 0, 0); font-family:
'Times New Roman'; font-size: medium; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: normal; orphans: auto; text-align: start;
text-indent: 0px; text-transform: none; white-space: normal;
widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
<li style="position: relative;">
<div class="hoverable" style="-webkit-transition:
background-color 0.2s ease-out 0s; transition:
background-color 0.2s ease-out 0s; display: inline-block;"><span
class="property">meta</span>:<span
class="Apple-converted-space"> </span>{
<ul class="obj collapsible" style="list-style-type: none;
padding: 0px; margin: 0px 0px 0px 26px;">
<li style="position: relative;">
<div class="hoverable" style="-webkit-transition:
background-color 0.2s ease-out 0s; transition:
background-color 0.2s ease-out 0s; display:
inline-block;"><span class="property">type</span>:<span
class="Apple-converted-space"> </span><span
class="type-string">"topology"</span>,</div>
</li>
<li style="position: relative;">
<div class="hoverable" style="-webkit-transition:
background-color 0.2s ease-out 0s; transition:
background-color 0.2s ease-out 0s; display:
inline-block;"><span class="property">version</span>:<span
class="Apple-converted-space"> </span><span
class="type-number">0</span></div>
</li>
</ul>
},</div>
</li>
<li style="position: relative;">
<div class="hoverable" style="-webkit-transition:
background-color 0.2s ease-out 0s; transition:
background-color 0.2s ease-out 0s; display: inline-block;"><span
class="property">routing_protocol</span>:<span
class="Apple-converted-space"> </span><span
class="type-string">"<routing protocol name>"</span>,</div>
</li>
<li style="position: relative;">
<div class="hoverable selected" style="-webkit-transition:
background-color 0.2s ease-out 0s; transition:
background-color 0.2s ease-out 0s; display: inline-block;
outline-width: 1px; outline-style: dotted;"><span
class="property">routes</span>:<span
class="Apple-converted-space"> </span>[
<ul class="array collapsible" style="list-style-type: none;
padding: 0px; margin: 0px 0px 0px 26px;">
<li style="position: relative;">
<div class="hoverable" style="-webkit-transition:
background-color 0.2s ease-out 0s; transition:
background-color 0.2s ease-out 0s; display:
inline-block;">{
<ul class="obj collapsible" style="list-style-type:
none; padding: 0px; margin: 0px 0px 0px 26px;">
<li style="position: relative;">
<div class="hoverable" style="-webkit-transition:
background-color 0.2s ease-out 0s; transition:
background-color 0.2s ease-out 0s; display:
inline-block;"><span class="property">destination</span>:<span
class="Apple-converted-space"> </span><span
class="type-string">"<id>"</span>,</div>
</li>
<li style="position: relative;">
<div class="hoverable" style="-webkit-transition:
background-color 0.2s ease-out 0s; transition:
background-color 0.2s ease-out 0s; display:
inline-block;"><span class="property">source</span>:<span
class="Apple-converted-space"> </span><span
class="type-string">"<id>"</span>,</div>
</li>
<li style="position: relative;">
<div class="hoverable" style="-webkit-transition:
background-color 0.2s ease-out 0s; transition:
background-color 0.2s ease-out 0s; display:
inline-block;"><span class="property">next</span>:<span
class="Apple-converted-space"> </span><span
class="type-string">"<id>"</span>,</div>
</li>
<li style="position: relative;">
<div class="hoverable" style="-webkit-transition:
background-color 0.2s ease-out 0s; transition:
background-color 0.2s ease-out 0s; display:
inline-block;"><span class="property">device</span>:<span
class="Apple-converted-space"> </span><span
class="type-string">"<device>"</span>,</div>
</li>
<li style="position: relative;">
<div class="hoverable" style="-webkit-transition:
background-color 0.2s ease-out 0s; transition:
background-color 0.2s ease-out 0s; display:
inline-block;"><span class="property">table</span>:<span
class="Apple-converted-space"> </span><span
class="type-string">"<routing table>"</span>,</div>
</li>
<li style="position: relative;">
<div class="hoverable" style="-webkit-transition:
background-color 0.2s ease-out 0s; transition:
background-color 0.2s ease-out 0s; display:
inline-block;"><span class="property">metric</span>:<span
class="Apple-converted-space"> </span><span
class="type-string">"<metric value>"</span>,</div>
</li>
<li style="position: relative;">
<div class="hoverable" style="-webkit-transition:
background-color 0.2s ease-out 0s; transition:
background-color 0.2s ease-out 0s; display:
inline-block;"><span class="property">metric_name</span>:<span
class="Apple-converted-space"> </span><span
class="type-string">"<name of algorithm>"</span></div>
</li>
</ul>
}</div>
</li>
</ul>
]</div>
</li>
</ul>
<span style="color: rgb(0, 0, 0); font-family: 'Times New Roman';
font-size: medium; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline
!important; float: none;">}</span><br>
<br>
Whatcha think?<br>
</body>
</html>