blob: 925f0f1dcb7bf7ea1a839e25ed128f9b951cf92c [file] [log] [blame]
jccde3e92e2015-03-28 01:40:44 -07001package org.onosproject.cli.net;
2
3import org.apache.karaf.shell.commands.Argument;
4import org.apache.karaf.shell.commands.Command;
5import org.onosproject.cli.AbstractShellCommand;
6import org.onosproject.net.DeviceId;
Brian O'Connor6de2e202015-05-21 14:30:41 -07007import org.onosproject.incubator.net.resource.label.LabelResourceAdminService;
jccde3e92e2015-03-28 01:40:44 -07008
9@Command(scope = "onos", name = "destroy-label-resource-pool",
10 description = "Destroys label resource pool by a specific device id")
11public class DestroyLabelResourcePoolCommand extends AbstractShellCommand {
12 @Argument(index = 0, name = "deviceId", description = "Device identity", required = true, multiValued = false)
13 String deviceId = null;
14
15 @Override
16 protected void execute() {
17 LabelResourceAdminService lrs = get(LabelResourceAdminService.class);
18 lrs.destroyDevicePool(DeviceId.deviceId(deviceId));
19 }
20
21}