blob: ae5d9e933d1ab9c9cad7134bf791666b86270709 [file] [log] [blame]
alshabibeff00542015-09-23 13:22:33 -07001/*
Rusty Eddyc0e3fea2015-09-28 21:20:41 +00002 * Copyright 2015 Open Networking Laboratory
alshabibeff00542015-09-23 13:22:33 -07003 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onosproject.mfwd.cli;
17
18import org.apache.karaf.shell.commands.Argument;
19import org.apache.karaf.shell.commands.Command;
20import org.onosproject.cli.AbstractShellCommand;
alshabibeff00542015-09-23 13:22:33 -070021import org.onosproject.mfwd.impl.McastRouteTable;
22
23/**
Rusty Eddyc0e3fea2015-09-28 21:20:41 +000024 * Deletes a multicast route.
alshabibeff00542015-09-23 13:22:33 -070025 */
26@Command(scope = "onos", name = "mcast-delete",
27 description = "Delete a multicast route flow")
28public class McastDeleteCommand extends AbstractShellCommand {
29
30 @Argument(index = 0, name = "sAddr",
31 description = "IP Address of the multicast source. '*' can be used for any source (*, G) entry",
32 required = true, multiValued = false)
33 String sAddr = null;
34
35 @Argument(index = 1, name = "gAddr",
36 description = "IP Address of the multicast group",
37 required = true, multiValued = false)
38 String gAddr = null;
39
40 @Override
41 protected void execute() {
42 McastRouteTable mrib = McastRouteTable.getInstance();
43 mrib.removeRoute(sAddr, gAddr);
44 }
Rusty Eddyc0e3fea2015-09-28 21:20:41 +000045}