blob: 012fd28a257858bd0587e1b853db8793be29c9c4 [file] [log] [blame]
Mahesh Poojary Sd7a36922016-04-01 16:11:14 +05301/*
2 * Copyright 2016 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 */
16package org.onosproject.pce.cli;
17
18import static org.slf4j.LoggerFactory.getLogger;
19
20import org.apache.karaf.shell.commands.Argument;
21import org.apache.karaf.shell.commands.Command;
22
23import org.onosproject.cli.AbstractShellCommand;
24import org.onosproject.pce.pceservice.api.PceService;
25
26import org.slf4j.Logger;
27
28/**
29 * Supports deleting pce path.
30 */
31@Command(scope = "onos", name = "pce-delete-path", description = "Supports deleting pce path.")
32public class PceDeletePathCommand extends AbstractShellCommand {
33 private final Logger log = getLogger(getClass());
34
35 @Argument(index = 0, name = "id", description = "Path Id.", required = true, multiValued = false)
36 String id = null;
37
38 @Override
39 protected void execute() {
40 log.info("executing pce-delete-path");
41
42 PceService service = get(PceService.class);
43
44 //TODO: need to uncomment below lines once releasePath method is added to PceService
45 //if (!service.releasePath(PcePathId.of(id))) {
46 // error("Path deletion failed.");
47 // return;
48 //}
49 }
50}