cpee-instantiation 1.0.13 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3fe76889766f1a2333a1cf46f15b9edc35742ff55f2abbc5afadf59e4222ee00
|
4
|
+
data.tar.gz: 4e92630e731a9b196415c69dbd647145fda7a76873e6c8f8a7afb738cb563692
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 551718de37d55ab2795370c873d310067e010877cfd915554cd34470fdcbd710c01b0afca5d50827e0098e33037bc3dc7f30147b6413c266932b189eaf31ccae
|
7
|
+
data.tar.gz: 01c916c086d25d62e1ce5c0e63d2455d082dc8da74c3ec000a66c1c915f9dd47b0db0499effc1bc306ac411f9e8dfc969e7bb2307d47ebc63101e06a48d6f0f1
|
data/cpee-instantiation.gemspec
CHANGED
@@ -158,6 +158,19 @@ module CPEE
|
|
158
158
|
]
|
159
159
|
end rescue nil
|
160
160
|
end #}}}
|
161
|
+
def handle_attributes(cpee,instance,data) #{{{
|
162
|
+
if data && !data.empty?
|
163
|
+
content = XML::Smart.string('<attributes xmlns="http://cpee.org/ns/properties/2.0"/>')
|
164
|
+
JSON::parse(data).each do |k,v|
|
165
|
+
content.root.add(k,v)
|
166
|
+
end
|
167
|
+
srv = Riddl::Client.new(cpee, File.join(cpee,'?riddl-description'))
|
168
|
+
res = srv.resource("/#{instance}/properties/attributes/")
|
169
|
+
status, response = res.patch [
|
170
|
+
Riddl::Parameter::Complex.new('attributes','text/xml',content.to_s)
|
171
|
+
]
|
172
|
+
end rescue nil
|
173
|
+
end #}}}
|
161
174
|
end #}}}
|
162
175
|
|
163
176
|
class InstantiateGit < Riddl::Implementation #{{{
|
@@ -179,9 +192,15 @@ module CPEE
|
|
179
192
|
@status = 500
|
180
193
|
else
|
181
194
|
EM.defer do
|
182
|
-
|
183
|
-
|
184
|
-
|
195
|
+
if x = @p.find{ |e| e.name == 'init' }&.value
|
196
|
+
handle_data cpee, instance, x
|
197
|
+
end
|
198
|
+
if x = @p.find{ |e| e.name == 'endpoints' }&.value
|
199
|
+
handle_endpoints cpee, instance, x
|
200
|
+
end
|
201
|
+
if x = @p.find{ |e| e.name == 'attributes' }&.value
|
202
|
+
handle_attributes cpee, instance, x
|
203
|
+
end
|
185
204
|
|
186
205
|
handle_waiting cpee, instance, uuid, @p[0].value, selfurl, cblist
|
187
206
|
handle_starting cpee, instance, @p[0].value
|
@@ -222,9 +241,15 @@ module CPEE
|
|
222
241
|
@status = 500
|
223
242
|
else
|
224
243
|
EM.defer do
|
225
|
-
|
226
|
-
|
227
|
-
|
244
|
+
if x = @p.find{ |e| e.name == 'init' }&.value
|
245
|
+
handle_data cpee, instance, x
|
246
|
+
end
|
247
|
+
if x = @p.find{ |e| e.name == 'endpoints' }&.value
|
248
|
+
handle_endpoints cpee, instance, x
|
249
|
+
end
|
250
|
+
if x = @p.find{ |e| e.name == 'attributes' }&.value
|
251
|
+
handle_attributes cpee, instance, x
|
252
|
+
end
|
228
253
|
|
229
254
|
handle_waiting cpee, instance, uuid, @p[0].value, selfurl, cblist
|
230
255
|
handle_starting cpee, instance, @p[0].value
|
@@ -33,6 +33,9 @@
|
|
33
33
|
<optional>
|
34
34
|
<parameter name="endpoints" type="string"/>
|
35
35
|
</optional>
|
36
|
+
<optional>
|
37
|
+
<parameter name="attributes" type="string"/>
|
38
|
+
</optional>
|
36
39
|
<optional>
|
37
40
|
<parameter name="customization" type="string"/>
|
38
41
|
</optional>
|
@@ -53,6 +56,9 @@
|
|
53
56
|
<optional>
|
54
57
|
<parameter name="endpoints" type="string"/>
|
55
58
|
</optional>
|
59
|
+
<optional>
|
60
|
+
<parameter name="attributes" type="string"/>
|
61
|
+
</optional>
|
56
62
|
<optional>
|
57
63
|
<parameter name="customization" type="string"/>
|
58
64
|
</optional>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cpee-instantiation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juergen eTM Mangler
|
8
8
|
autorequire:
|
9
9
|
bindir: tools
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: riddl
|
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
|
-
rubygems_version: 3.
|
111
|
+
rubygems_version: 3.3.7
|
112
112
|
signing_key:
|
113
113
|
specification_version: 4
|
114
114
|
summary: Subprocess instantiation service for the cloud process execution engine (cpee.org)
|