Commit eb6dbaa1 authored by Jonathon Duerig's avatar Jonathon Duerig

Tweak stitching capacities because the default unit is now kb not b

parent 8a1052f4
......@@ -2837,29 +2837,27 @@ sub print_stitch_node
my $node_urn = GeniHRN::Generate($OURDOMAIN, "node", $node);
my $port_urn = GeniHRN::Generate($OURDOMAIN, "stitchport",
$node . "//" . $iface);
# Capacity is in kilobits/sec but needs to be converted to bits/sec
my $bits = $capacity * 1000;
my $vlan_translate = "false";
if ($vlan_will_translate) {
$vlan_translate = "true";
}
print "<node id=\"$node_urn\">\n";
print " <port id=\"$port_urn\">\n";
print " <capacity>$bits</capacity>\n";
print " <maximumReservableCapacity>$bits".
print " <capacity>$capacity</capacity>\n";
print " <maximumReservableCapacity>$capacity".
"</maximumReservableCapacity>\n";
print " <minimumReservableCapacity>1000000".
print " <minimumReservableCapacity>1000".
"</minimumReservableCapacity>\n";
print " <granularity>1000000</granularity>\n";
print " <granularity>1</granularity>\n";
print " <link id=\"$iface_urn\">\n";
print " <remoteLinkId>$remote_iface_urn</remoteLinkId>\n";
print " <trafficEngineeringMetric>10</trafficEngineeringMetric>\n";
print " <capacity>$bits</capacity>\n";
print " <maximumReservableCapacity>$bits".
print " <capacity>$capacity</capacity>\n";
print " <maximumReservableCapacity>$capacity".
"</maximumReservableCapacity>\n";
print " <minimumReservableCapacity>1000000".
print " <minimumReservableCapacity>1000".
"</minimumReservableCapacity>\n";
print " <granularity>1000000</granularity>\n";
print " <granularity>1</granularity>\n";
print " <switchingCapabilityDescriptor>\n";
print " <switchingcapType>l2sc</switchingcapType>\n";
print " <encodingType>ethernet</encodingType>\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment