diff options
author | YAMAMOTO Takashi <yamamoto@valinux.co.jp> | 2013-12-19 16:17:58 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2013-12-25 12:13:01 +0900 |
commit | c5a36424640f9d3214ad86768bca92cc0cbc39b1 (patch) | |
tree | 8219b183fd8435d9380a76b533bc9d8109db0def | |
parent | abfc1bd7292bf79ee5096f76d48792823d941006 (diff) |
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>
-rwxr-xr-x | ryu/cmd/of_config_cli.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/ryu/cmd/of_config_cli.py b/ryu/cmd/of_config_cli.py index 18038490..69b6c02c 100755 --- a/ryu/cmd/of_config_cli.py +++ b/ryu/cmd/of_config_cli.py @@ -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> """ |