commit | 7d39a74a135a0c29c24ca4ad2b1ff3abcd3748f4 | [log] [tgz] |
---|---|---|
author | papazois <andreas.papazois@gmail.com> | Wed Oct 14 10:15:56 2015 +0300 |
committer | Gerrit Code Review <gerrit@onlab.us> | Thu Nov 12 02:22:43 2015 +0000 |
tree | d1c2ceef33c8a431b0a44141578a92e6d06eedcb | |
parent | ec0425c18cbe49d368c600160f033acf9fe344ca [diff] |
[GEANT] Add/remove-bgp-speaker/peer commands. Change-Id: Iad8001095cc81be0c34c976adfa32ef9c7eff685
diff --git a/apps/routing/src/main/java/org/onosproject/routing/cli/BgpSpeakersListCommand.java b/apps/routing/src/main/java/org/onosproject/routing/cli/BgpSpeakersListCommand.java index 23d7086..064080f 100644 --- a/apps/routing/src/main/java/org/onosproject/routing/cli/BgpSpeakersListCommand.java +++ b/apps/routing/src/main/java/org/onosproject/routing/cli/BgpSpeakersListCommand.java
@@ -50,13 +50,17 @@ ApplicationId appId = coreService.getAppId(RoutingService.ROUTER_APP_ID); BgpConfig config = configService.getConfig(appId, BgpConfig.class); + if (config == null) { + print("No speakers configured"); + return; + } List<BgpConfig.BgpSpeakerConfig> bgpSpeakers = Lists.newArrayList(config.bgpSpeakers()); Collections.sort(bgpSpeakers, SPEAKERS_COMPARATOR); - if (config == null || config.bgpSpeakers().isEmpty()) { + if (config.bgpSpeakers().isEmpty()) { print("No speakers configured"); } else { bgpSpeakers.forEach(