cloudmunch_sdk_v3 4.0.0 → 4.1.0
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1350b579eab002e917f43a9db4db5e5b248e3cce
|
4
|
+
data.tar.gz: b61ff1297886ae15feec704c77af5b078f8fc537
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfcb879fcc9fac2a588725d636fc93708df3445effa716aa9582ab5c640fcb336c9d4c5f4511493c65e456be8fd9230ed30d1036104d0fc3f19429f29d688fd9
|
7
|
+
data.tar.gz: 06d0e4fb86f98b4e492c714a5f972d95f95e41997114292c9020c4736181bd146b4e1f90a875cabcc9cbf88a45a1c31eb2dff77feaef0e9a01f2030d1c8eb298
|
@@ -85,6 +85,39 @@ class AppAbstract
|
|
85
85
|
return serviceProvider
|
86
86
|
end
|
87
87
|
|
88
|
+
def outputPipelineVariables(variablesHash)
|
89
|
+
# check if variable key is surrounded by {} and add if not present
|
90
|
+
tmp = {}
|
91
|
+
variablesHash.each do |key, value|
|
92
|
+
matches = key.scan(/^{.+}$/i)
|
93
|
+
if matches.is_a?(Array) && matches.length == 0
|
94
|
+
key = "{" + key + "}"
|
95
|
+
end
|
96
|
+
tmp[key] = value
|
97
|
+
end
|
98
|
+
|
99
|
+
variablesHash = tmp
|
100
|
+
fileLoc = @appContext.get_reports_location() + "/" + @appContext.get_step_id() + ".out"
|
101
|
+
varList = nil
|
102
|
+
|
103
|
+
if File.exist?(fileLoc)
|
104
|
+
varList = File.read(fileLoc)
|
105
|
+
end
|
106
|
+
|
107
|
+
if varList.nil? || (varList.is_a?(String) && varList.length == 0)
|
108
|
+
varList = variablesHash
|
109
|
+
varList = JSON.generate(variablesHash)
|
110
|
+
File.write(fileLoc, varList)
|
111
|
+
else
|
112
|
+
varList = JSON.parse(varList)
|
113
|
+
variablesHash.each do |key, value|
|
114
|
+
varList[key] = value
|
115
|
+
end
|
116
|
+
varList = JSON.generate(varList)
|
117
|
+
File.write(fileLoc, varList)
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
88
121
|
def initializeApp()
|
89
122
|
end
|
90
123
|
|
@@ -55,5 +55,24 @@ class AppContext
|
|
55
55
|
@AppContextParams[keyname]
|
56
56
|
end
|
57
57
|
|
58
|
+
def get_step_id()
|
59
|
+
stepDetails = get_data("stepdetails")
|
60
|
+
if stepDetails
|
61
|
+
details = JSON.parse(stepDetails)
|
62
|
+
stepID = details && details["id"] ? details["id"] : ''
|
63
|
+
return stepID
|
64
|
+
end
|
65
|
+
return ''
|
66
|
+
end
|
67
|
+
|
68
|
+
def get_reports_location()
|
69
|
+
stepDetails = get_data("stepdetails")
|
70
|
+
if stepDetails
|
71
|
+
details = JSON.parse(stepDetails)
|
72
|
+
stepID = details && details["reports_location"] ? details["reports_location"] : ''
|
73
|
+
return stepID
|
74
|
+
end
|
75
|
+
return ''
|
76
|
+
end
|
58
77
|
|
59
78
|
end
|
@@ -56,7 +56,7 @@ module CloudmunchService
|
|
56
56
|
|
57
57
|
integration = getCloudmunchData(paramHash)
|
58
58
|
|
59
|
-
log("DEBUG",integration)
|
59
|
+
# log("DEBUG",integration)
|
60
60
|
if integration.nil?
|
61
61
|
return nil
|
62
62
|
else
|
@@ -173,8 +173,8 @@ module CloudmunchService
|
|
173
173
|
requestDetails = (JSON.load(responseJson))['request']
|
174
174
|
responseData = (JSON.load(responseJson))['data']
|
175
175
|
|
176
|
-
log("DEBUG", "Response : ")
|
177
|
-
log("DEBUG", responseJson)
|
176
|
+
# log("DEBUG", "Response : ")
|
177
|
+
# log("DEBUG", responseJson)
|
178
178
|
|
179
179
|
if !requestDetails['status'].nil? && requestDetails['status'].casecmp('success') == 0
|
180
180
|
return responseData
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudmunch_sdk_v3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ganesan krishnamurthy
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: exe
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2017-02-01 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: json
|