openflow-controller 0.1.10 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/openflow-controller/cli.rb +14 -7
- data/lib/openflow-controller/version.rb +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f323d90de4dfaf720718bb8904af5b95571c931
|
4
|
+
data.tar.gz: 994e945b22f8d1a1068b3aa849851de985794e3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25a8fd024e102a560db26d581e5018f5cf4d78e037d7189c4d184e800ac8df2431a30a7358e9393ef9a5bfce7f3ec6408236ca3c718ddae7e3ce8e2c02947e38
|
7
|
+
data.tar.gz: 51e8ad3d01e1a989ab1f7bad9e24a4c7a60300f18559f99fb2d0752e53268303444ce782f909e8c947ccc97187fc23f1303d4f161f4e2748d565f1628c8cb8ff
|
@@ -63,6 +63,7 @@ module OpenFlow
|
|
63
63
|
exit 0
|
64
64
|
end
|
65
65
|
flag :d, :debug, 'run controller in debug mode'
|
66
|
+
flag :n, :no_prompt, 'no prompt'
|
66
67
|
|
67
68
|
option :i, :ip, 'IP address of the controller', argument: :optional
|
68
69
|
option :p, :port, 'port number of the controller', argument: :optional
|
@@ -74,19 +75,25 @@ module OpenFlow
|
|
74
75
|
ctl = Controller.create
|
75
76
|
ctl.set_debug if opts[:debug]
|
76
77
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
78
|
+
unless opts[:no_prompt]
|
79
|
+
init_form = ctl.logger.formatter
|
80
|
+
ctl.logger.formatter = proc do |severity, datetime, progname, msg|
|
81
|
+
buf = PROMPT + Readline::line_buffer
|
82
|
+
"\r" + ' ' * buf.length + "\r" +
|
83
|
+
init_form.call(severity, datetime, progname, msg).blue +
|
84
|
+
buf
|
85
|
+
end
|
83
86
|
end
|
84
87
|
|
85
88
|
ip = opts[:ip] || Controller::DEFAULT_IP_ADDRESS
|
86
89
|
port = opts[:port] || Controller::DEFAULT_TCP_PORT
|
87
90
|
|
88
91
|
CLI.run_controller_on_thread ctl, ip, port, args
|
89
|
-
|
92
|
+
if opts[:no_prompt]
|
93
|
+
loop {}
|
94
|
+
else
|
95
|
+
CLI.run_cli ctl
|
96
|
+
end
|
90
97
|
end
|
91
98
|
end
|
92
99
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openflow-controller
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jérémy Pagé
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: openflow-protocol
|
@@ -56,16 +56,16 @@ dependencies:
|
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '11.1'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '11.1'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -84,16 +84,16 @@ dependencies:
|
|
84
84
|
name: coveralls
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
89
|
+
version: '0.8'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
96
|
+
version: '0.8'
|
97
97
|
description: An OpenFlow Controller.
|
98
98
|
email:
|
99
99
|
- contact@jeremypage.me
|