cpee-instantiation 1.0 → 1.0.1
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 +4 -4
- data/README.md +3 -3
- data/cpee-instantiation.gemspec +1 -1
- data/lib/cpee-instantiation/instantiation.rb +7 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8179be00caf9485a82cc72f3180439fa8db27a45ee8ff58b7e642534e7397aa
|
4
|
+
data.tar.gz: 1d9b5a792f4a95a35c5368c78ba03134ed84a751e873c10751771297998aaf2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 852d8a607287b4dfd197c45386ebc9d83bdead3428e454736341586a7166088ac12044000714e91f181c286d8d282c86908b089e9a8a047a2be580f071a29616
|
7
|
+
data.tar.gz: 60982f32ca0a4ebef7628de4b8f444022071ae437b8494e6bef310c6e2bf7a1c70fe65fb527fe1ce444a7e40e67228b6440c89f5c9da58d7a62fc083253fa87e
|
data/README.md
CHANGED
@@ -7,9 +7,9 @@ To install the instatiation service go to the commandline
|
|
7
7
|
cpee-instantiation instantiation
|
8
8
|
cd instantiation
|
9
9
|
./instantiation start
|
10
|
-
```
|
10
|
+
```
|
11
11
|
|
12
|
-
|
12
|
+
The service is running under port 9296. If this port has to be changed (or the
|
13
13
|
host, or local-only access, ...), create a file instatiation.conf and add one
|
14
14
|
or many of the following yaml keys:
|
15
15
|
|
@@ -28,7 +28,7 @@ To use the service try one of the following:
|
|
28
28
|
curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d "behavior=wait_running&url=http%3A%2F%2Flink%2Fto%2Ftestset.xml" http://localhost:9296/url
|
29
29
|
curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d "behavior=fork_running&url=http%3A%2F%2Flink%2Fto%2Ftestset.xml&init=%7B%20%22a%22%3A%2037%2C%20%22b%22%3A%20%22test%22%20%7D" http://localhost:9296/url
|
30
30
|
curl -X POST -F "behavior=wait_running" -F "xml=@testset.xml" http://localhost:9296/xml
|
31
|
-
```
|
31
|
+
```
|
32
32
|
|
33
33
|
The behavior can be either: the process parent process is waiting (wait_) or is
|
34
34
|
running in parallel (fork_), the subprocesss is either immediately starting
|
data/cpee-instantiation.gemspec
CHANGED
@@ -37,7 +37,7 @@ module CPEE
|
|
37
37
|
doc.register_namespace 'desc', 'http://cpee.org/ns/description/1.0'
|
38
38
|
doc.register_namespace 'prop', 'http://cpee.org/ns/properties/2.0'
|
39
39
|
|
40
|
-
srv = Riddl::Client.new(cpee, cpee
|
40
|
+
srv = Riddl::Client.new(cpee, File.join(cpee,'?riddl-description'))
|
41
41
|
res = srv.resource('/')
|
42
42
|
if name
|
43
43
|
doc.find('/*/prop:attributes/prop:info').each do |e|
|
@@ -101,7 +101,7 @@ module CPEE
|
|
101
101
|
|
102
102
|
if cb
|
103
103
|
cbk = SecureRandom.uuid
|
104
|
-
srv = Riddl::Client.new(cpee, cpee
|
104
|
+
srv = Riddl::Client.new(cpee, File.join(cpee,'?riddl-description'))
|
105
105
|
status, response = srv.resource("/#{instance}/notifications/subscriptions/").post [
|
106
106
|
Riddl::Parameter::Simple.new('url',File.join(selfurl,'callback',cbk)),
|
107
107
|
Riddl::Parameter::Simple.new('topic','state'),
|
@@ -118,7 +118,7 @@ module CPEE
|
|
118
118
|
private :handle_waiting
|
119
119
|
def handle_starting(cpee,instance,behavior) #{{{
|
120
120
|
if behavior =~ /_running$/
|
121
|
-
srv = Riddl::Client.new(cpee, cpee
|
121
|
+
srv = Riddl::Client.new(cpee, File.join(cpee,'?riddl-description'))
|
122
122
|
res = srv.resource("/#{instance}/properties/state")
|
123
123
|
status, response = res.put [
|
124
124
|
Riddl::Parameter::Simple.new('value','running')
|
@@ -132,7 +132,7 @@ module CPEE
|
|
132
132
|
JSON::parse(data).each do |k,v|
|
133
133
|
content.root.add(k,v)
|
134
134
|
end
|
135
|
-
srv = Riddl::Client.new(cpee, cpee
|
135
|
+
srv = Riddl::Client.new(cpee, File.join(cpee,'?riddl-description'))
|
136
136
|
res = srv.resource("/#{instance}/properties/dataelements/")
|
137
137
|
status, response = res.patch [
|
138
138
|
Riddl::Parameter::Complex.new('dataelements','text/xml',content.to_s)
|
@@ -145,7 +145,7 @@ module CPEE
|
|
145
145
|
JSON::parse(data).each do |k,v|
|
146
146
|
content.root.add(k,v)
|
147
147
|
end
|
148
|
-
srv = Riddl::Client.new(cpee, cpee
|
148
|
+
srv = Riddl::Client.new(cpee, File.join(cpee,'?riddl-description'))
|
149
149
|
res = srv.resource("/#{instance}/properties/endpoints/")
|
150
150
|
status, response = res.patch [
|
151
151
|
Riddl::Parameter::Complex.new('endpoints','text/xml',content.to_s)
|
@@ -271,7 +271,7 @@ module CPEE
|
|
271
271
|
cblist = @a[2]
|
272
272
|
instance = @p[1].value
|
273
273
|
|
274
|
-
srv = Riddl::Client.new(cpee, cpee
|
274
|
+
srv = Riddl::Client.new(cpee, File.join(cpee,'?riddl-description'))
|
275
275
|
res = srv.resource("/#{instance}/properties/attributes/uuid")
|
276
276
|
status, response = res.get
|
277
277
|
|
@@ -310,7 +310,7 @@ module CPEE
|
|
310
310
|
|
311
311
|
if notification['content']['state'] == condition
|
312
312
|
cblist.del(key)
|
313
|
-
srv = Riddl::Client.new(cpee, cpee
|
313
|
+
srv = Riddl::Client.new(cpee, File.join(cpee,'?riddl-description'))
|
314
314
|
res = srv.resource("/#{instance}/properties/dataelements")
|
315
315
|
status, response = res.get
|
316
316
|
if status >= 200 && status < 300
|
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:
|
4
|
+
version: 1.0.1
|
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: 2020-
|
11
|
+
date: 2020-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: riddl
|