blob: 8607a48e5e1bbefcd0ba187d35f2f8560a461939 [file] [log] [blame]
lishuai74f2d532015-12-10 17:03:34 +08001/*
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.vtn.cli;
17
18import org.apache.karaf.shell.commands.Command;
19import org.apache.karaf.shell.commands.Option;
20import org.onosproject.cli.AbstractShellCommand;
Jonathan Hart51539b82015-10-29 09:53:04 -070021import org.onosproject.vtn.manager.impl.VtnManager;
lishuai74f2d532015-12-10 17:03:34 +080022
23/**
24 * Supports for updating the external gateway virtualPort.
25 */
26@Command(scope = "onos", name = "externalportname-set",
27 description = "Supports for setting the external port name.")
28public class VtnCommand extends AbstractShellCommand {
29
30 @Option(name = "-n", aliases = "--name", description = "external port name.", required = true,
31 multiValued = false)
32 String exPortName = "";
33
34 @Override
35 protected void execute() {
Jonathan Hart51539b82015-10-29 09:53:04 -070036 VtnManager.setExPortName(exPortName);
lishuai74f2d532015-12-10 17:03:34 +080037 }
38}