import org.apache.karaf.shell.commands.Argument;
import org.apache.karaf.shell.commands.Command;
import org.apache.karaf.shell.console.OsgiCommandSupport;
+import org.eclipse.jdt.annotation.Nullable;
import org.opendaylight.genius.interfacemanager.globals.InterfaceInfo;
import org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager;
import org.opendaylight.netvirt.elan.utils.ElanCLIUtils;
}
@Override
+ @Nullable
protected Object doExecute() {
- LOG.debug("Executing Get EtreeInterface command for the corresponding Etree Instance" + "\t" + etreeName
- + "\t");
+ LOG.debug("Executing Get EtreeInterface command for the corresponding Etree Instance {}", etreeName);
if (etreeName != null) {
ElanInstance elanInstance = elanProvider.getElanInstance(etreeName);
- if (elanInstance == null || elanInstance.getAugmentation(EtreeInstance.class) == null) {
+ if (elanInstance == null || elanInstance.augmentation(EtreeInstance.class) == null) {
session.getConsole().println("Etree instance doesn't exist or isn't configured as etree: " + etreeName);
return null;
}
return null;
}
- private Object getEtreeInterfaceHeaderOutput() {
+ private static Object getEtreeInterfaceHeaderOutput() {
StringBuilder headerBuilder = new StringBuilder();
headerBuilder.append(String.format(ElanCLIUtils.ETREE_INTERFACE_CLI_FORMAT, "EtreeInstance/Tag",
"EtreeInterface/Tag", "OpState", "AdminState", "Root/Leaf"));