blob: d4b8d254a4d3182feff159ec9db5203bba805ebb [file] [log] [blame]
Carolina Fernandezad893432016-07-18 11:11:34 +02001/*
2 * Copyright 2016-present Open Networking Laboratory
3 *
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 */
16
17package org.onosproject.sdxl2.cli;
18
19import org.apache.karaf.shell.commands.Argument;
20import org.apache.karaf.shell.commands.Command;
21import org.onosproject.cli.AbstractShellCommand;
22import org.onosproject.sdxl2.SdxL2Service;
23
24/**
25 * CLI to delete a named Virtual Circuit in an SDX-L2.
26 */
27@Command(scope = "sdxl2", name = "sdxl2vc-remove", description = "Removes a named Virtual Circuit")
28public class SdxL2RemoveVCCommand extends AbstractShellCommand {
29
30 @Argument(index = 0, name = "sdxl2vcname", description = "Name of SDX-L2 Virtual Circuit",
31 required = true, multiValued = false)
32 private String sdxL2VCname = null;
33
34 @Override
35 protected void execute() {
36 SdxL2Service sdxl2Service = get(SdxL2Service.class);
37 sdxl2Service.removeVC(sdxL2VCname);
38 }
39
40}
41