use of org.onosproject.vpls.cli.VplsCommandEnum in project onos by opennetworkinglab.
the class VplsOptArgCompleter method choices.
@Override
public List<String> choices() {
if (vpls == null) {
vpls = get(Vpls.class);
}
String[] argList = commandLine.getArguments();
if (argList == null) {
return Collections.emptyList();
}
String argOne = argList[1];
VplsCommandEnum vplsCommandEnum = VplsCommandEnum.enumFromString(argOne);
if (vplsCommandEnum != null) {
switch(vplsCommandEnum) {
case ADD_IFACE:
return availableIfaces();
case SET_ENCAP:
return encap();
case REMOVE_IFACE:
return vplsIfaces();
default:
return Collections.emptyList();
}
}
return Collections.emptyList();
}
use of org.onosproject.vpls.cli.VplsCommandEnum in project onos by opennetworkinglab.
the class VplsCommandCompleter method choices.
@Override
public List<String> choices() {
if (commandLine.getArguments() == null) {
return Collections.emptyList();
}
List<String> argList = Lists.newArrayList();
String argOne = null;
if (argList.size() > 1) {
argOne = argList.get(1);
}
VplsCommandEnum vplsCommandEnum = VplsCommandEnum.enumFromString(argOne);
if (vplsCommandEnum != null) {
switch(vplsCommandEnum) {
case CREATE:
case LIST:
return Collections.emptyList();
default:
VplsCommandEnum.toStringList();
}
}
return VplsCommandEnum.toStringList();
}
Aggregations