use of org.onosproject.openstacktelemetry.api.StatsFlowRuleAdminService in project onos by opennetworkinglab.
the class TelemetryVflowAddCommand method doExecute.
@Override
protected void doExecute() {
StatsFlowRuleAdminService statsService = get(StatsFlowRuleAdminService.class);
StatsFlowRule statsFlowRule = DefaultStatsFlowRule.builder().srcIpPrefix(IpPrefix.valueOf(srcIp)).dstIpPrefix(IpPrefix.valueOf(dstIp)).srcTpPort(TpPort.tpPort(Integer.valueOf(srcTpPort))).dstTpPort(TpPort.tpPort(Integer.valueOf(dstTpPort))).ipProtocol(getProtocolTypeFromString(ipProto)).build();
statsService.createStatFlowRule(statsFlowRule);
print("Added the stat flow rule.");
}
use of org.onosproject.openstacktelemetry.api.StatsFlowRuleAdminService in project onos by opennetworkinglab.
the class TelemetryVflowDeleteCommand method doExecute.
@Override
protected void doExecute() {
StatsFlowRuleAdminService statsService = get(StatsFlowRuleAdminService.class);
StatsFlowRule statsFlowRule = DefaultStatsFlowRule.builder().srcIpPrefix(IpPrefix.valueOf(srcIp)).dstIpPrefix(IpPrefix.valueOf(dstIp)).srcTpPort(TpPort.tpPort(Integer.valueOf(srcTpPort))).dstTpPort(TpPort.tpPort(Integer.valueOf(dstTpPort))).ipProtocol(getProtocolTypeFromString(ipProto)).build();
statsService.deleteStatFlowRule(statsFlowRule);
print("Removed the stat flow rule.");
}
Aggregations