Priyanka B

[ONOS-4671]PCECC defect fix , regarding bandwidth and CLI

Change-Id: I31c1d3fe017ae06dd6626ef11073891c20d126ef
......@@ -35,6 +35,7 @@ import org.slf4j.Logger;
description = "Supports querying PCE path.")
public class PceQueryPathCommand extends AbstractShellCommand {
private final Logger log = getLogger(getClass());
public static final String COST_TYPE = "costType";
@Option(name = "-i", aliases = "--id", description = "path-id", required = false,
multiValued = false)
......@@ -71,16 +72,16 @@ public class PceQueryPathCommand extends AbstractShellCommand {
* @param tunnel pce tunnel
*/
void display(Tunnel tunnel) {
print("\npath-id : %d \n" +
print("\npath-id : %s \n" +
"source : %s \n" +
"destination : %s \n" +
"path-type : %d \n" +
"path-type : %s \n" +
"symbolic-path-name : %s \n" +
"constraints: \n" +
" cost : %d \n" +
" bandwidth : %.2f",
" cost : %s \n" +
" bandwidth : %s",
tunnel.tunnelId().id(), tunnel.src().toString(), tunnel.dst().toString(),
tunnel.type(), tunnel.tunnelName(), tunnel.path().cost(),
tunnel.type().name(), tunnel.tunnelName(), tunnel.annotations().value(COST_TYPE),
tunnel.annotations().value(AnnotationKeys.BANDWIDTH));
}
}
......
......@@ -86,9 +86,10 @@ public class PceSetupPathCommand extends AbstractShellCommand {
LspType lspType = LspType.values()[type];
// Add bandwidth
// bandwidth default data rate unit is in BPS
// bandwidth default data rate unit is in MBPS, since bandwidth value in network config
//stored in MPBS
if (bandwidth != 0.0) {
listConstrnt.add(BandwidthConstraint.of(bandwidth, DataRateUnit.valueOf("BPS")));
listConstrnt.add(BandwidthConstraint.of(bandwidth, DataRateUnit.valueOf("MBPS")));
}
// Add cost
......
......@@ -31,6 +31,7 @@
<artifact>mvn:${project.groupId}/onos-pcep-provider-topology/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-pcep-provider-tunnel/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-pcep-provider-packet/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-pce/${project.version}</artifact>b
<artifact>mvn:${project.groupId}/onos-bgpcep-provider-flow/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-pce/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-pceweb/${project.version}</artifact>
</app>
......
......@@ -32,5 +32,6 @@
<bundle>mvn:${project.groupId}/onos-app-pce/${project.version}</bundle>
<bundle>mvn:${project.groupId}/onos-app-pceweb/${project.version}</bundle>
<bundle>mvn:${project.groupId}/onos-pcep-provider-packet/${project.version}</bundle>
<bundle>mvn:${project.groupId}/onos-bgpcep-provider-flow/${project.version}</bundle>
</feature>
</features>
......
......@@ -99,5 +99,10 @@
<artifactId>onos-pcep-provider-packet</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.onosproject</groupId>
<artifactId>onos-bgpcep-provider-flow</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
......