mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-08 05:46:10 +02:00
of_config_cli: add delete_config and copy_config
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
abfc1bd729
commit
c5a3642464
@ -171,6 +171,36 @@ class Cmd(cmd.Cmd):
|
||||
|
||||
self._request(line, f)
|
||||
|
||||
def do_delete_config(self, line):
|
||||
"""delete_config <peer> <source>
|
||||
eg. delete_config sw1 startup
|
||||
"""
|
||||
|
||||
def f(p, args):
|
||||
try:
|
||||
source = args[0]
|
||||
except:
|
||||
print "argument error"
|
||||
return
|
||||
print p.delete_config(source)
|
||||
|
||||
self._request(line, f)
|
||||
|
||||
def do_copy_config(self, line):
|
||||
"""copy_config <peer> <source> <target>
|
||||
eg. copy_config sw1 running startup
|
||||
"""
|
||||
|
||||
def f(p, args):
|
||||
try:
|
||||
source, target = args
|
||||
except:
|
||||
print "argument error"
|
||||
return
|
||||
print p.copy_config(source, target)
|
||||
|
||||
self._request(line, f)
|
||||
|
||||
def do_list_port(self, line):
|
||||
"""list_port <peer>
|
||||
"""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user