torque_rm 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.document +5 -0
- data/.rspec +1 -0
- data/Gemfile +25 -0
- data/LICENSE.txt +20 -0
- data/README.html +230 -0
- data/README.md +231 -0
- data/Rakefile +52 -0
- data/VERSION +1 -0
- data/bin/torque_rm_rest +147 -0
- data/features/step_definitions/common_steps.rb +21 -0
- data/features/step_definitions/qsub_steps.rb +47 -0
- data/features/step_definitions/torque_rm_steps.rb +0 -0
- data/features/support/env.rb +13 -0
- data/features/torque_rm.feature +9 -0
- data/features/torque_rm/common.feature +22 -0
- data/features/torque_rm/qsub.feature +52 -0
- data/lib/torque_rm.rb +11 -0
- data/lib/torque_rm/common.rb +74 -0
- data/lib/torque_rm/qdel.rb +13 -0
- data/lib/torque_rm/qstat.rb +308 -0
- data/lib/torque_rm/qsub.rb +342 -0
- data/spec/spec_helper.rb +12 -0
- data/spec/torque_rm_spec.rb +7 -0
- data/torque_rm.gemspec +106 -0
- data/web/helpers/qstat.rb +19 -0
- data/web/views/qstat.haml +19 -0
- data/web/views/qstat_job.haml +14 -0
- metadata +271 -0
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
3
|
+
require 'rspec'
|
4
|
+
require 'torque_rm'
|
5
|
+
|
6
|
+
# Requires supporting files with custom matchers and macros, etc,
|
7
|
+
# in ./support/ and its subdirectories.
|
8
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
9
|
+
|
10
|
+
RSpec.configure do |config|
|
11
|
+
|
12
|
+
end
|
data/torque_rm.gemspec
ADDED
@@ -0,0 +1,106 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "torque_rm"
|
8
|
+
s.version = "0.1.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Raoul Jean Pierre Bonnal"]
|
12
|
+
s.date = "2013-09-12"
|
13
|
+
s.description = "TORQUE Resource Manager for Ruby. Submit, check and control your job directly from Ruby."
|
14
|
+
s.email = "ilpuccio.febo@gmail.com"
|
15
|
+
s.executables = ["torque_rm_rest"]
|
16
|
+
s.extra_rdoc_files = [
|
17
|
+
"LICENSE.txt",
|
18
|
+
"README.html",
|
19
|
+
"README.md"
|
20
|
+
]
|
21
|
+
s.files = [
|
22
|
+
".document",
|
23
|
+
".rspec",
|
24
|
+
"Gemfile",
|
25
|
+
"LICENSE.txt",
|
26
|
+
"README.md",
|
27
|
+
"Rakefile",
|
28
|
+
"VERSION",
|
29
|
+
"bin/torque_rm_rest",
|
30
|
+
"features/step_definitions/common_steps.rb",
|
31
|
+
"features/step_definitions/qsub_steps.rb",
|
32
|
+
"features/step_definitions/torque_rm_steps.rb",
|
33
|
+
"features/support/env.rb",
|
34
|
+
"features/torque_rm.feature",
|
35
|
+
"features/torque_rm/common.feature",
|
36
|
+
"features/torque_rm/qsub.feature",
|
37
|
+
"lib/torque_rm.rb",
|
38
|
+
"lib/torque_rm/common.rb",
|
39
|
+
"lib/torque_rm/qdel.rb",
|
40
|
+
"lib/torque_rm/qstat.rb",
|
41
|
+
"lib/torque_rm/qsub.rb",
|
42
|
+
"spec/spec_helper.rb",
|
43
|
+
"spec/torque_rm_spec.rb",
|
44
|
+
"torque_rm.gemspec",
|
45
|
+
"web/helpers/qstat.rb",
|
46
|
+
"web/views/qstat.haml",
|
47
|
+
"web/views/qstat_job.haml"
|
48
|
+
]
|
49
|
+
s.homepage = "http://github.com/helios/torque_rm"
|
50
|
+
s.licenses = ["MIT"]
|
51
|
+
s.require_paths = ["lib"]
|
52
|
+
s.rubygems_version = "2.0.6"
|
53
|
+
s.summary = "TORQUE Resource Manager wrapper for Ruby"
|
54
|
+
|
55
|
+
if s.respond_to? :specification_version then
|
56
|
+
s.specification_version = 4
|
57
|
+
|
58
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
59
|
+
s.add_runtime_dependency(%q<rye>, [">= 0"])
|
60
|
+
s.add_runtime_dependency(%q<parslet>, [">= 0"])
|
61
|
+
s.add_runtime_dependency(%q<colorize>, [">= 0"])
|
62
|
+
s.add_runtime_dependency(%q<terminal-table>, [">= 0"])
|
63
|
+
s.add_runtime_dependency(%q<sinatra>, [">= 0"])
|
64
|
+
s.add_runtime_dependency(%q<sinatra-contrib>, [">= 0"])
|
65
|
+
s.add_runtime_dependency(%q<shotgun>, [">= 0"])
|
66
|
+
s.add_runtime_dependency(%q<haml>, [">= 0"])
|
67
|
+
s.add_runtime_dependency(%q<sinatra-twitter-bootstrap>, [">= 0"])
|
68
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.8.0"])
|
69
|
+
s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
|
70
|
+
s.add_development_dependency(%q<cucumber>, [">= 0"])
|
71
|
+
s.add_development_dependency(%q<bundler>, ["> 1.0.0"])
|
72
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
|
73
|
+
else
|
74
|
+
s.add_dependency(%q<rye>, [">= 0"])
|
75
|
+
s.add_dependency(%q<parslet>, [">= 0"])
|
76
|
+
s.add_dependency(%q<colorize>, [">= 0"])
|
77
|
+
s.add_dependency(%q<terminal-table>, [">= 0"])
|
78
|
+
s.add_dependency(%q<sinatra>, [">= 0"])
|
79
|
+
s.add_dependency(%q<sinatra-contrib>, [">= 0"])
|
80
|
+
s.add_dependency(%q<shotgun>, [">= 0"])
|
81
|
+
s.add_dependency(%q<haml>, [">= 0"])
|
82
|
+
s.add_dependency(%q<sinatra-twitter-bootstrap>, [">= 0"])
|
83
|
+
s.add_dependency(%q<rspec>, ["~> 2.8.0"])
|
84
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
85
|
+
s.add_dependency(%q<cucumber>, [">= 0"])
|
86
|
+
s.add_dependency(%q<bundler>, ["> 1.0.0"])
|
87
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
|
88
|
+
end
|
89
|
+
else
|
90
|
+
s.add_dependency(%q<rye>, [">= 0"])
|
91
|
+
s.add_dependency(%q<parslet>, [">= 0"])
|
92
|
+
s.add_dependency(%q<colorize>, [">= 0"])
|
93
|
+
s.add_dependency(%q<terminal-table>, [">= 0"])
|
94
|
+
s.add_dependency(%q<sinatra>, [">= 0"])
|
95
|
+
s.add_dependency(%q<sinatra-contrib>, [">= 0"])
|
96
|
+
s.add_dependency(%q<shotgun>, [">= 0"])
|
97
|
+
s.add_dependency(%q<haml>, [">= 0"])
|
98
|
+
s.add_dependency(%q<sinatra-twitter-bootstrap>, [">= 0"])
|
99
|
+
s.add_dependency(%q<rspec>, ["~> 2.8.0"])
|
100
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
101
|
+
s.add_dependency(%q<cucumber>, [">= 0"])
|
102
|
+
s.add_dependency(%q<bundler>, ["> 1.0.0"])
|
103
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module TORQUE
|
2
|
+
class Qstat
|
3
|
+
module Sinatra
|
4
|
+
module Helpers
|
5
|
+
def job_line_color(job)
|
6
|
+
if job.completed?
|
7
|
+
{class: "succes"}
|
8
|
+
elsif job.queued?
|
9
|
+
{class: "info"}
|
10
|
+
elsif job.running?
|
11
|
+
{class: "warning"}
|
12
|
+
elsif job.exited?
|
13
|
+
{class: "error"}
|
14
|
+
end
|
15
|
+
end #job_line_color
|
16
|
+
end #Helpers
|
17
|
+
end #Sinatra
|
18
|
+
end #Qstat
|
19
|
+
end #TORQUE
|
@@ -0,0 +1,19 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
|
4
|
+
%table{class: "table table-striped table-bordered"}
|
5
|
+
%tbody
|
6
|
+
- jobs.each do |job|
|
7
|
+
%tr{job_line_color(job)}
|
8
|
+
%td= job.job_id.split(".").first
|
9
|
+
%td= job.job_name
|
10
|
+
%td= job.node
|
11
|
+
%td= "#{job.memory} mb"
|
12
|
+
%td= "#{job.time} sec."
|
13
|
+
%td= job.queue
|
14
|
+
%td= job.job_state
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
.row-fluid
|
2
|
+
.span4 ID: #{job.job_id}
|
3
|
+
.span4 Name: #{job.job_name}
|
4
|
+
.span4 User: #{job.job_owner}
|
5
|
+
.row-fluid
|
6
|
+
.span4 Queue: #{job.queue}
|
7
|
+
.span4 Server: #{job.server}
|
8
|
+
.span4 State: #{job.job_state}
|
9
|
+
.row-fluid
|
10
|
+
.span4 SubmitHost: #{job.submit_host}
|
11
|
+
.span4 Server: #{job.server}
|
12
|
+
.span4 State: #{job.job_state}
|
13
|
+
|
14
|
+
|
metadata
ADDED
@@ -0,0 +1,271 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: torque_rm
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Raoul Jean Pierre Bonnal
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-09-12 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rye
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: parslet
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: colorize
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: terminal-table
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: sinatra
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: sinatra-contrib
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: shotgun
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: haml
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: sinatra-twitter-bootstrap
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - '>='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - '>='
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rspec
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ~>
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 2.8.0
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ~>
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 2.8.0
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rdoc
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ~>
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '3.12'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ~>
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '3.12'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: cucumber
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - '>='
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - '>='
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: bundler
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - '>'
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: 1.0.0
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - '>'
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: 1.0.0
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: jeweler
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - ~>
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: 1.8.4
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ~>
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: 1.8.4
|
209
|
+
description: TORQUE Resource Manager for Ruby. Submit, check and control your job
|
210
|
+
directly from Ruby.
|
211
|
+
email: ilpuccio.febo@gmail.com
|
212
|
+
executables:
|
213
|
+
- torque_rm_rest
|
214
|
+
extensions: []
|
215
|
+
extra_rdoc_files:
|
216
|
+
- LICENSE.txt
|
217
|
+
- README.html
|
218
|
+
- README.md
|
219
|
+
files:
|
220
|
+
- .document
|
221
|
+
- .rspec
|
222
|
+
- Gemfile
|
223
|
+
- LICENSE.txt
|
224
|
+
- README.md
|
225
|
+
- Rakefile
|
226
|
+
- VERSION
|
227
|
+
- bin/torque_rm_rest
|
228
|
+
- features/step_definitions/common_steps.rb
|
229
|
+
- features/step_definitions/qsub_steps.rb
|
230
|
+
- features/step_definitions/torque_rm_steps.rb
|
231
|
+
- features/support/env.rb
|
232
|
+
- features/torque_rm.feature
|
233
|
+
- features/torque_rm/common.feature
|
234
|
+
- features/torque_rm/qsub.feature
|
235
|
+
- lib/torque_rm.rb
|
236
|
+
- lib/torque_rm/common.rb
|
237
|
+
- lib/torque_rm/qdel.rb
|
238
|
+
- lib/torque_rm/qstat.rb
|
239
|
+
- lib/torque_rm/qsub.rb
|
240
|
+
- spec/spec_helper.rb
|
241
|
+
- spec/torque_rm_spec.rb
|
242
|
+
- torque_rm.gemspec
|
243
|
+
- web/helpers/qstat.rb
|
244
|
+
- web/views/qstat.haml
|
245
|
+
- web/views/qstat_job.haml
|
246
|
+
- README.html
|
247
|
+
homepage: http://github.com/helios/torque_rm
|
248
|
+
licenses:
|
249
|
+
- MIT
|
250
|
+
metadata: {}
|
251
|
+
post_install_message:
|
252
|
+
rdoc_options: []
|
253
|
+
require_paths:
|
254
|
+
- lib
|
255
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
256
|
+
requirements:
|
257
|
+
- - '>='
|
258
|
+
- !ruby/object:Gem::Version
|
259
|
+
version: '0'
|
260
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
261
|
+
requirements:
|
262
|
+
- - '>='
|
263
|
+
- !ruby/object:Gem::Version
|
264
|
+
version: '0'
|
265
|
+
requirements: []
|
266
|
+
rubyforge_project:
|
267
|
+
rubygems_version: 2.0.6
|
268
|
+
signing_key:
|
269
|
+
specification_version: 4
|
270
|
+
summary: TORQUE Resource Manager wrapper for Ruby
|
271
|
+
test_files: []
|