blob: 00da8c5efab7264570fc6a090da6b0f1a6bf8783 [file] [log] [blame]
pierventre3849e562016-05-11 11:47:32 +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
19
20import org.apache.karaf.shell.commands.Argument;
21import org.apache.karaf.shell.commands.Command;
22import org.onosproject.cli.AbstractShellCommand;
23import org.onosproject.sdxl2.SdxL2Service;
24
25/**
Carolina Fernandezad893432016-07-18 11:11:34 +020026 * CLI to delete a named SDX-L2 Connection Point.
pierventre3849e562016-05-11 11:47:32 +020027 */
Carolina Fernandezad893432016-07-18 11:11:34 +020028@Command(scope = "sdxl2", name = "sdxl2cp-remove", description = "Removes a named SDX-L2 Connection Point")
pierventre3849e562016-05-11 11:47:32 +020029public class SdxL2RemoveCPCommand extends AbstractShellCommand {
30
Carolina Fernandezad893432016-07-18 11:11:34 +020031 @Argument(index = 0, name = "sdxl2cpname", description = "Name of SDX-L2 Connection Point",
pierventre3849e562016-05-11 11:47:32 +020032 required = true, multiValued = false)
Carolina Fernandezad893432016-07-18 11:11:34 +020033 private String sdxl2cpname = null;
pierventre3849e562016-05-11 11:47:32 +020034
35 @Override
36 protected void execute() {
37 SdxL2Service sdxl2Service = get(SdxL2Service.class);
38 sdxl2Service.removeSdxL2ConnectionPoint(sdxl2cpname);
39 }
40
41}
42