blob: 0c44eb5c1cf1bd4beea19b1c21f9125a8cfe30d0 [file] [log] [blame]
Ray Milkey140e4782015-04-24 11:25:13 -07001/*
2 * Copyright 2015 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.xosintegration.cli;
17
18import org.apache.karaf.shell.commands.Argument;
19import org.apache.karaf.shell.commands.Command;
20import org.onosproject.cli.AbstractShellCommand;
21import org.onosproject.xosintegration.VoltTenantService;
22
23/**
24 * CLI command to remove an existing tenant from the system.
25 */
26@Command(scope = "onos", name = "remove-tenant",
27 description = "Removes a tenant")
28public class VoltRemoveTenantCommand extends AbstractShellCommand {
29
30 @Argument(index = 0, name = "tenant",
31 description = "Tenant ID",
32 required = true, multiValued = false)
33 String tenantIdString = null;
34
35 @Override
36 protected void execute() {
37 VoltTenantService service = get(VoltTenantService.class);
38
39 service.removeTenant(Long.parseLong(tenantIdString));
40 }
41}