use of org.onosproject.openstackvtap.api.OpenstackVtapService in project onos by opennetworkinglab.
the class VtapIdCompleter method complete.
@Override
public int complete(Session session, CommandLine commandLine, List<String> candidates) {
OpenstackVtap.Type type = getVtapTypeFromString(VTAP_TYPE);
// Delegate string completer
StringsCompleter delegate = new StringsCompleter();
SortedSet<String> strings = delegate.getStrings();
OpenstackVtapService service = AbstractShellCommand.get(OpenstackVtapService.class);
service.getVtaps(type).forEach(t -> {
strings.add(t.id().toString());
});
return delegate.complete(session, commandLine, candidates);
}
Aggregations