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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f74e50e943f426a39779802e1598be2a3ec7e718
4
- data.tar.gz: 5bf304ebd253f6dc4978b92db08b4468c0c433f8
3
+ metadata.gz: 0f323d90de4dfaf720718bb8904af5b95571c931
4
+ data.tar.gz: 994e945b22f8d1a1068b3aa849851de985794e3e
5
5
  SHA512:
6
- metadata.gz: ac6728d86881f6aaad177fc65ba88d96b7dc7490cce185f35f13d4c46ee46f70a15cf5c535892f67e4b027ec4b218f7b9ba7aa437ecf751001faa2c4c86c3a2f
7
- data.tar.gz: 510b7f3df83fc98ed7dbb137f5e8f68278e6b1a2ebf58954624db81c5a4ae1efba98e0d125cd2140abcfbcefb593c0a404d9260164b5945825bfd212ea2c914c
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
- init_form = ctl.logger.formatter
78
- ctl.logger.formatter = proc do |severity, datetime, progname, msg|
79
- buf = PROMPT + Readline::line_buffer
80
- "\r" + ' ' * buf.length + "\r" +
81
- init_form.call(severity, datetime, progname, msg).blue +
82
- buf
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
- CLI.run_cli ctl
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
@@ -1,5 +1,5 @@
1
1
  module OpenFlow
2
2
  module Controller
3
- VERSION = '0.1.10'
3
+ VERSION = '0.1.11'
4
4
  end
5
5
  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.10
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-01-18 00:00:00.000000000 Z
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: '0'
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: '0'
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