Usages of

org.onosproject.net.host.HostService.getHostCount()
protected final HostService hostService; // code omitted ... // Returns summary response. protected ObjectNode summmaryMessage(long sid) { Topology topology = topologyService.currentTopology(); //hlk return envelope("showSummary", sid, json("ONOS Summary", "node", new Prop("Devices", format(topology.deviceCount())), new Prop("Links", format(topology.linkCount())), new Prop("Hosts", format(hostService.getHostCount())), new Prop("Topology SCCs", format(topology.clusterCount())), //new Prop("Paths", format(topology.pathCount())), new Separator(), new Prop("Intents", format(intentService.getIntentCount())), new Prop("Flows", format(flowService.getFlowRuleCount())), new Prop("Version", version))); }
protected HostService hostService; // code omitted ... // Returns summary response. protected PropertyPanel summmaryMessage(long sid) { Topology topology = topologyService.currentTopology(); PropertyPanel pp = new PropertyPanel("ONOS Summary", "node") .add(new PropertyPanel.Prop("Devices", format(topology.deviceCount()))) .add(new PropertyPanel.Prop("Links", format(topology.linkCount()))) .add(new PropertyPanel.Prop("Hosts", format(hostService.getHostCount()))) .add(new PropertyPanel.Prop("Topology SCCs", format(topology.clusterCount()))) .add(new PropertyPanel.Separator()) .add(new PropertyPanel.Prop("Intents", format(intentService.getIntentCount()))) .add(new PropertyPanel.Prop("Tunnels", format(tunnelService.tunnelCount()))) .add(new PropertyPanel.Prop("Flows", format(flowService.getFlowRuleCount()))) .add(new PropertyPanel.Prop("Version", version)); return pp; }
protected HostService hostService; // code omitted ... // Returns property panel model for summary response. protected PropertyPanel summmaryMessage(long sid) { Topology topology = topologyService.currentTopology(); return new PropertyPanel("ONOS Summary", "node") .addProp(Properties.DEVICES, topology.deviceCount()) .addProp(Properties.LINKS, topology.linkCount()) .addProp(Properties.HOSTS, hostService.getHostCount()) .addProp(Properties.TOPOLOGY_SSCS, topology.clusterCount()) .addSeparator() .addProp(Properties.INTENTS, intentService.getIntentCount()) .addProp(Properties.TUNNELS, tunnelService.tunnelCount()) .addProp(Properties.FLOWS, flowService.getFlowRuleCount()) .addProp(Properties.VERSION, version); }
protected final HostService hostService; // code omitted ... // Returns summary response. protected ObjectNode summmaryMessage(long sid) { Topology topology = topologyService.currentTopology(); return envelope("showSummary", sid, json("ONOS Summary", "node", new Prop("Devices", format(topology.deviceCount())), new Prop("Links", format(topology.linkCount())), new Prop("Hosts", format(hostService.getHostCount())), new Prop("Topology SCCs", format(topology.clusterCount())), new Prop("Paths", format(topology.pathCount())), new Separator(), new Prop("Intents", format(intentService.getIntentCount())), new Prop("Flows", format(flowService.getFlowRuleCount())), new Prop("Version", version))); }
protected final HostService hostService; // code omitted ... // Returns summary response. protected ObjectNode summmaryMessage(long sid) { Topology topology = topologyService.currentTopology(); return envelope("showSummary", sid, json("ONOS Summary", "node", new Prop("Devices", format(topology.deviceCount())), new Prop("Links", format(topology.linkCount())), new Prop("Hosts", format(hostService.getHostCount())), new Prop("Topology SCCs", format(topology.clusterCount())), new Separator(), new Prop("Intents", format(intentService.getIntentCount())), new Prop("Flows", format(flowService.getFlowRuleCount())), new Prop("Version", version))); }
protected HostService hostService; // code omitted ... // Returns property panel model for summary response. protected PropertyPanel summmaryMessage() { Topology topology = topologyService.currentTopology(); return new PropertyPanel("ONOS Summary", "node") .addProp(Properties.VERSION, version) .addSeparator() .addProp(Properties.DEVICES, deviceService.getDeviceCount()) .addProp(Properties.LINKS, topology.linkCount()) .addProp(Properties.HOSTS, hostService.getHostCount()) .addProp(Properties.TOPOLOGY_SSCS, topology.clusterCount()) .addSeparator() .addProp(Properties.INTENTS, intentService.getIntentCount()) .addProp(Properties.TUNNELS, tunnelService.tunnelCount()) .addProp(Properties.FLOWS, flowService.getFlowRuleCount()); }
protected HostService hostService; // code omitted ... // Returns property panel model for summary response. protected PropertyPanel summmaryMessage(long sid) { Topology topology = topologyService.currentTopology(); return new PropertyPanel("ONOS Summary", "node") .addProp(Properties.VERSION, version) .addSeparator() .addProp(Properties.DEVICES, deviceService.getDeviceCount()) .addProp(Properties.LINKS, topology.linkCount()) .addProp(Properties.HOSTS, hostService.getHostCount()) .addProp(Properties.TOPOLOGY_SSCS, topology.clusterCount()) .addSeparator() .addProp(Properties.INTENTS, intentService.getIntentCount()) .addProp(Properties.TUNNELS, tunnelService.tunnelCount()) .addProp(Properties.FLOWS, flowService.getFlowRuleCount()); }
protected HostService hostService; // code omitted ... // Returns summary response. protected ObjectNode summmaryMessage(long sid) { Topology topology = topologyService.currentTopology(); return JsonUtils.envelope("showSummary", sid, json("ONOS Summary", "node", new Prop("Devices", format(topology.deviceCount())), new Prop("Links", format(topology.linkCount())), new Prop("Hosts", format(hostService.getHostCount())), new Prop("Topology SCCs", format(topology.clusterCount())), new Separator(), new Prop("Intents", format(intentService.getIntentCount())), new Prop("Tunnels", format(tunnelService.tunnelCount())), new Prop("Flows", format(flowService.getFlowRuleCount())), new Prop("Version", version))); }
protected HostService hostService; // code omitted ... // Returns property panel model for summary response. protected PropertyPanel summmaryMessage(long sid) { Topology topology = topologyService.currentTopology(); return new PropertyPanel("SPN-OS Summary", "node") .addProp(Properties.VERSION, version) .addSeparator() .addProp(Properties.DEVICES, deviceService.getDeviceCount()) .addProp(Properties.LINKS, topology.linkCount()) .addProp(Properties.HOSTS, hostService.getHostCount()) .addProp(Properties.TOPOLOGY_SSCS, topology.clusterCount()) .addSeparator() .addProp(Properties.INTENTS, intentService.getIntentCount()) .addProp(Properties.TUNNELS, tunnelService.tunnelCount()) .addProp(Properties.FLOWS, flowService.getFlowRuleCount()); }
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) protected HostService hostService; // code omitted ... @Override public int hostCount() { return hostService.getHostCount(); }
Usage snippet has been bookmarked! Review your bookmarks
Thank you! Review your likes