use of org.onosproject.openstackvtap.api.OpenstackVtap in project onos by opennetworkinglab.
the class OpenstackVtapAddCommand method doExecute.
@Override
protected void doExecute() {
OpenstackVtapCriterion criterion = makeVtapCriterion(srcIp, dstIp, ipProto, srcTpPort, dstTpPort);
OpenstackVtap.Type type = getVtapTypeFromString(vtapTypeStr);
if (type == null) {
print("Invalid vtap type");
return;
}
OpenstackVtap vtap = vtapService.createVtap(type, criterion);
if (vtap != null) {
print("Created OpenstackVtap with id { %s }", vtap.id().toString());
} else {
print("Failed to create OpenstackVtap");
}
}
Aggregations