Saurav Das | 59232cf | 2016-04-27 18:35:50 -0700 | [diff] [blame] | 1 | package org.onosproject.segmentrouting.cli; |
| 2 | |
| 3 | |
| 4 | import org.apache.karaf.shell.commands.Command; |
| 5 | import org.onosproject.cli.AbstractShellCommand; |
| 6 | import org.onosproject.segmentrouting.SegmentRoutingService; |
| 7 | |
| 8 | /** |
| 9 | * Command to manually trigger routing and rule-population in the network. |
| 10 | * |
| 11 | */ |
| 12 | @Command(scope = "onos", name = "sr-reroute-network", |
| 13 | description = "Repopulate routing rules given current network state") |
| 14 | public class RerouteNetworkCommand extends AbstractShellCommand { |
| 15 | |
| 16 | @Override |
| 17 | protected void execute() { |
| 18 | SegmentRoutingService srService = |
| 19 | AbstractShellCommand.get(SegmentRoutingService.class); |
| 20 | srService.rerouteNetwork(); |
| 21 | } |
| 22 | |
| 23 | } |