cpee 1.3.208 → 1.3.209

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: 5453f81e3a3bda812e94981852ad22da749cb603
4
- data.tar.gz: d5708c8da1f13063648a41d12d5cd67419b1c5d4
3
+ metadata.gz: a77dac895eb3b43e3a4ff6003396bcfb96891dd7
4
+ data.tar.gz: 6ad70edf841754df24eb208b3a6566bdba9b4ec5
5
5
  SHA512:
6
- metadata.gz: d0dd5a928797f51e4672f2e5b7baf6c368abc146b24811946927677a59336be623dd03947b0b46f7e3b5eb5a5b95d105ce9e9170d07a9e533e1fb5635a7eb488
7
- data.tar.gz: c8e2db4b9faefbf84ba5dda344b1a3a4141cc2f792b65ef47fb7f0f52d18715e7e9668aa22bb7af038143b8f8091033e9d4722dba046cdee94d8c1f90db50cb0
6
+ metadata.gz: 1f39786faa2ebe4521088503fc27596d9ae59bf3d732704102e6dd42e2c2852142bb6cdb8e94eec546d98ea95def01b4c101235a976d22eef06468b8c5c0467e
7
+ data.tar.gz: 6bf701d6ec695824c3019ee40ef80e7d781d3e23c64b3ad1b728409f924da0e59f572a737a708f68306907309f8c1833e66a6c2d4b5a62e5a1c78828d376e07b
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee"
3
- s.version = "1.3.208"
3
+ s.version = "1.3.209"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3.0"
6
6
  s.summary = "Preliminary release of cloud process execution engine (cpee). If you just need workflow execution, without a rest/xmpp service exposing it, then use WEEL"
@@ -109,6 +109,10 @@ module CPEE
109
109
  attr_reader :attributes
110
110
  attr_reader :uuid
111
111
 
112
+ def console(cmd)
113
+ eval(cmd).pretty_inspect
114
+ end
115
+
112
116
  def base_url
113
117
  @opts[:url]
114
118
  end
@@ -80,6 +80,9 @@ module CPEE
80
80
  on resource do |r|
81
81
  run CPEE::Info, controller if get
82
82
  run CPEE::DeleteInstance, controller, opts if delete
83
+ on resource 'console' do
84
+ run CPEE::Console, controller if get 'cmdin'
85
+ end
83
86
  on resource 'callbacks' do
84
87
  run CPEE::Callbacks, controller, opts if get
85
88
  on resource do
@@ -186,6 +189,20 @@ module CPEE
186
189
  end
187
190
  end #}}}
188
191
 
192
+ class Console < Riddl::Implementation #{{{
193
+ def response
194
+ controller = @a[0]
195
+ id = @r[0].to_i
196
+ unless controller[id]
197
+ @status = 400
198
+ return
199
+ end
200
+ Riddl::Parameter::Complex.new("res","text/plain") do
201
+ controller[id].console(@p[0].value)
202
+ end
203
+ end
204
+ end #}}}
205
+
189
206
  class DeleteInstance < Riddl::Implementation #{{{
190
207
  def response
191
208
  controller = @a[0]
@@ -45,13 +45,20 @@
45
45
  <parameter name="xsl" mimetype="application/xml"/>
46
46
  </message>
47
47
 
48
+ <message name="cmdin">
49
+ <parameter name="cmd" type="string"/>
50
+ </message>
51
+ <message name="cmdout">
52
+ <parameter name="res" mimetype="text/plain"/>
53
+ </message>
54
+
48
55
  <message name="message">
49
56
  <parameter name="type" type="integer"/>
50
57
  <parameter name="message" type="string"/>
51
58
  <optional>
52
59
  <parameter name="details" mimetype="text/xml"/>
53
60
  <parameter name="details" mimetype="text/yaml"/>
54
- </optional>
61
+ </optional>
55
62
  </message>
56
63
 
57
64
  <resource>
@@ -63,6 +70,9 @@
63
70
  <resource>
64
71
  <get in="*" out="instance-info"/>
65
72
  <delete in="*"/>
73
+ <resource relative="console">
74
+ <get in="cmdin" out="cmdout"/>
75
+ </resource>
66
76
  <resource relative="callbacks">
67
77
  <doc:documentation>xb</doc:documentation>
68
78
  <get in="*" out="callbacks"/>
@@ -15,7 +15,7 @@
15
15
  # <http://www.gnu.org/licenses/>.
16
16
 
17
17
  require 'rubygems'
18
- gem 'nokogiri'#, '~> 1.6.6'
18
+ gem 'nokogiri'
19
19
  require File.expand_path(File.dirname(__FILE__) + '/../lib/cpee/implementation')
20
20
 
21
21
  Riddl::Server.new(CPEE::SERVER, :port => 9298) do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cpee
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.208
4
+ version: 1.3.209
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler