iibee 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/iibee/application.rb +36 -11
- data/lib/iibee/broker.rb +0 -1
- data/lib/iibee/execution_group.rb +24 -11
- data/lib/iibee/service.rb +35 -20
- data/lib/iibee/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0079f49da198c801a90b7bd74eec535e47e54734
|
4
|
+
data.tar.gz: 363dd5ad483d62664fc9a55c03d541ef0fa1c6b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3058871b52f739edb857dfe2181986c3930367780cd0d55846e665cd85bbeffe30da8035e603e1958d71564e128ea3e23e90facee86a75e0742a999f551b05b6
|
7
|
+
data.tar.gz: 8060ccc48bd62494265b9c98d634b91eb0caf2768184fd38679019ccf3bd7225190b15a54be3269cf46882b97e215a38630bcc32fa47b2f11c8f21b6c5e3629d
|
data/lib/iibee/application.rb
CHANGED
@@ -4,24 +4,27 @@ require 'oga'
|
|
4
4
|
module Iibee
|
5
5
|
class Application
|
6
6
|
class Properties
|
7
|
-
attr_reader :
|
7
|
+
attr_reader :label, :runMode, :uuid, :isRunning, :shortDesc, :longDesc, :processId, :traceLevel, :soapNodesUseEmbeddedListener,
|
8
|
+
:compiledXPathCacheSizeEntries, :consoleMode, :httpNodesUseEmbeddedListener, :inactiveUserExitList, :activeUserExitList,
|
9
|
+
:traceNodeLevel, :userTraceLevel, :modifyTime, :deployTime, :barFileName
|
8
10
|
def initialize(document)
|
9
|
-
document.xpath('properties
|
11
|
+
document.xpath('properties/*/property').each do |property|
|
10
12
|
|
11
|
-
propertyName =
|
12
|
-
propertyValue =
|
13
|
+
propertyName = property.get('name')
|
14
|
+
propertyValue = property.get('value')
|
13
15
|
instance_variable_set("@#{propertyName}", propertyValue)
|
14
|
-
end
|
16
|
+
end
|
15
17
|
end
|
16
18
|
end
|
17
19
|
CONTEXT_PATH = "apiv1/executiongroups"
|
18
20
|
|
19
|
-
attr_reader :type, :isRunning, :runMode, :startMode, :hasChildren, :uuid, :name, :propertiesUri
|
21
|
+
attr_reader :type, :isRunning, :runMode, :startMode, :hasChildren, :uuid, :name, :propertiesUri, :egName
|
20
22
|
|
21
23
|
def initialize(document)
|
22
|
-
document.xpath('
|
24
|
+
document.xpath('@*').each do |attribute|
|
23
25
|
instance_variable_set("@#{attribute.name}", attribute.value)
|
24
26
|
end
|
27
|
+
@executionGroupName = executionGroupName
|
25
28
|
end
|
26
29
|
|
27
30
|
def properties
|
@@ -34,15 +37,37 @@ module Iibee
|
|
34
37
|
applications = []
|
35
38
|
response = Faraday.get("#{Iibee.configuration.base_url}/#{CONTEXT_PATH}/#{egName}/applications/")
|
36
39
|
document = Oga.parse_xml(response.body)
|
40
|
+
p document.xpath('applications/application')
|
37
41
|
document.xpath('applications/application').each do |application|
|
38
|
-
|
42
|
+
applications << new(application)
|
39
43
|
end
|
40
44
|
end
|
41
45
|
|
42
|
-
def self.
|
43
|
-
|
46
|
+
def self.find_by(egName: nil, name: nil)
|
47
|
+
where(executionGroupName: egName, name: name).first
|
48
|
+
end
|
49
|
+
|
50
|
+
def self.where(executionGroupName: nil, name: nil)
|
51
|
+
applications = []
|
52
|
+
|
53
|
+
unless executionGroupName.nil?
|
54
|
+
application_url = "#{Iibee.configuration.base_url}/#{CONTEXT_PATH}/#{executionGroupName}/?depth=2"
|
55
|
+
else
|
56
|
+
application_url = "#{Iibee.configuration.base_url}/#{CONTEXT_PATH}/?depth=3"
|
57
|
+
end
|
58
|
+
|
59
|
+
response = Faraday.get(application_url)
|
44
60
|
document = Oga.parse_xml(response.body)
|
45
|
-
|
61
|
+
|
62
|
+
document.xpath("//application[@name='#{name}']").each do |application|
|
63
|
+
applications << new(application, document.at_xpath("//executionGroup[applications/application/@uuid = '#{application.get('uuid')}']").get('name'))
|
64
|
+
end
|
65
|
+
|
66
|
+
return applications
|
67
|
+
end
|
68
|
+
|
69
|
+
def executionGroup
|
70
|
+
Iibee::ExecutionGroup.find_by(name: executionGroupName)
|
46
71
|
end
|
47
72
|
end
|
48
73
|
end
|
data/lib/iibee/broker.rb
CHANGED
@@ -4,12 +4,14 @@ require 'oga'
|
|
4
4
|
module Iibee
|
5
5
|
class ExecutionGroup
|
6
6
|
class Properties
|
7
|
-
attr_reader :
|
7
|
+
attr_reader :label, :runMode, :uuid, :isRunning, :shortDesc, :longDesc, :processId, :traceLevel, :soapNodesUseEmbeddedListener,
|
8
|
+
:compiledXPathCacheSizeEntries, :consoleMode, :httpNodesUseEmbeddedListener, :inactiveUserExitList, :activeUserExitList,
|
9
|
+
:traceNodeLevel, :userTraceLevel, :modifyTime, :deployTime, :barFileName
|
8
10
|
def initialize(document)
|
9
|
-
document.xpath('properties
|
11
|
+
document.xpath('properties/*/property').each do |property|
|
10
12
|
|
11
|
-
propertyName =
|
12
|
-
propertyValue =
|
13
|
+
propertyName = property.get('name')
|
14
|
+
propertyValue = property.get('value')
|
13
15
|
instance_variable_set("@#{propertyName}", propertyValue)
|
14
16
|
end
|
15
17
|
end
|
@@ -17,10 +19,10 @@ module Iibee
|
|
17
19
|
|
18
20
|
CONTEXT_PATH = "/apiv1/executiongroups/"
|
19
21
|
|
20
|
-
attr_reader :isRunning, :runMode, :isRestricted, :hasChildren, :uri, :propertiesUri, :uuid, :name
|
22
|
+
attr_reader :isRunning, :runMode, :isRestricted, :hasChildren, :uri, :propertiesUri, :uuid, :name
|
21
23
|
|
22
24
|
def initialize(document)
|
23
|
-
document.xpath('
|
25
|
+
document.xpath('@*').each do |attribute|
|
24
26
|
instance_variable_set("@#{attribute.name}", cast_value(attribute.name, attribute.value))
|
25
27
|
end
|
26
28
|
end
|
@@ -36,14 +38,25 @@ module Iibee
|
|
36
38
|
response = Faraday.get("#{Iibee.configuration.base_url}/#{CONTEXT_PATH}/")
|
37
39
|
document = Oga.parse_xml(response.body)
|
38
40
|
document.xpath('executionGroups/executionGroup').each do |eg|
|
39
|
-
|
41
|
+
egs << new(eg)
|
40
42
|
end
|
43
|
+
return egs
|
41
44
|
end
|
42
45
|
|
43
|
-
def self.
|
44
|
-
|
45
|
-
|
46
|
-
|
46
|
+
def self.find_by(name: nil)
|
47
|
+
where(name: name).first
|
48
|
+
end
|
49
|
+
|
50
|
+
def self.where(name: nil)
|
51
|
+
egs = []
|
52
|
+
unless name.nil?
|
53
|
+
response = Faraday.get("#{Iibee.configuration.base_url}/#{CONTEXT_PATH}/#{name}")
|
54
|
+
document = Oga.parse_xml(response.body)
|
55
|
+
document.xpath("//executionGroup[@name='#{name}']").each do |eg|
|
56
|
+
egs << new(eg)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
return egs
|
47
60
|
end
|
48
61
|
|
49
62
|
protected
|
data/lib/iibee/service.rb
CHANGED
@@ -4,24 +4,32 @@ require 'oga'
|
|
4
4
|
module Iibee
|
5
5
|
class Service
|
6
6
|
class Properties
|
7
|
-
attr_reader :
|
8
|
-
|
9
|
-
|
7
|
+
attr_reader :label, :runMode, :uuid, :isRunning, :shortDesc, :longDesc, :processId, :traceLevel, :soapNodesUseEmbeddedListener,
|
8
|
+
:compiledXPathCacheSizeEntries, :consoleMode, :httpNodesUseEmbeddedListener, :inactiveUserExitList, :activeUserExitList,
|
9
|
+
:traceNodeLevel, :userTraceLevel, :modifyTime, :deployTime, :barFileName
|
10
|
+
def initialize(document)
|
11
|
+
document.xpath('properties/*/property').each do |property|
|
10
12
|
|
11
|
-
propertyName =
|
12
|
-
propertyValue =
|
13
|
+
propertyName = property.get('name')
|
14
|
+
propertyValue = property.get('value')
|
13
15
|
instance_variable_set("@#{propertyName}", propertyValue)
|
14
|
-
end
|
16
|
+
end
|
15
17
|
end
|
16
18
|
end
|
17
19
|
CONTEXT_PATH = "apiv1/executiongroups"
|
18
20
|
|
19
|
-
attr_reader :type, :isRunning, :runMode, :startMode, :hasChildren, :uuid, :name, :propertiesUri
|
21
|
+
attr_reader :type, :isRunning, :runMode, :startMode, :hasChildren, :uuid, :name, :propertiesUri, :executionGroupName
|
22
|
+
attr_accessor :uuid, :name
|
20
23
|
|
21
|
-
def initialize(document)
|
22
|
-
document.xpath('
|
24
|
+
def initialize(document, executionGroupName)
|
25
|
+
document.xpath('@*').each do |attribute|
|
23
26
|
instance_variable_set("@#{attribute.name}", attribute.value)
|
24
27
|
end
|
28
|
+
@executionGroupName = executionGroupName
|
29
|
+
end
|
30
|
+
|
31
|
+
def executionGroup
|
32
|
+
Iibee::ExecutionGroup.find_by(name: executionGroupName)
|
25
33
|
end
|
26
34
|
|
27
35
|
def properties
|
@@ -30,20 +38,27 @@ module Iibee
|
|
30
38
|
@properties = Iibee::Service::Properties.new(document)
|
31
39
|
end
|
32
40
|
|
33
|
-
def self.
|
34
|
-
|
35
|
-
response = Faraday.get("#{Iibee.configuration.base_url}/#{CONTEXT_PATH}/#{egName}/services/")
|
36
|
-
p "#{Iibee.configuration.base_url}/#{CONTEXT_PATH}/#{egName}/services/"
|
37
|
-
document = Oga.parse_xml(response.body)
|
38
|
-
document.xpath('services/service').each do |service|
|
39
|
-
services << new(document)
|
40
|
-
end
|
41
|
+
def self.find_by(executionGroupName: nil, name: nil)
|
42
|
+
where(executionGroupName: executionGroupName, name: name).first
|
41
43
|
end
|
42
44
|
|
43
|
-
def self.
|
44
|
-
|
45
|
+
def self.where(executionGroupName: nil, name: nil)
|
46
|
+
services = []
|
47
|
+
|
48
|
+
unless executionGroupName.nil?
|
49
|
+
service_url = "#{Iibee.configuration.base_url}/#{CONTEXT_PATH}/#{executionGroupName}/?depth=2"
|
50
|
+
else
|
51
|
+
service_url = "#{Iibee.configuration.base_url}/#{CONTEXT_PATH}/?depth=3"
|
52
|
+
end
|
53
|
+
|
54
|
+
response = Faraday.get(service_url)
|
45
55
|
document = Oga.parse_xml(response.body)
|
46
|
-
|
56
|
+
|
57
|
+
document.xpath("//service[@name='#{name}']").each do |service|
|
58
|
+
services << new(service, document.at_xpath("//executionGroup[services/service/@uuid = '#{service.get('uuid')}']").get('name'))
|
59
|
+
end
|
60
|
+
|
61
|
+
return services
|
47
62
|
end
|
48
63
|
end
|
49
64
|
end
|
data/lib/iibee/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iibee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- akil
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|