cloudmunch_sdk_v3 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/cloudmunch_Ruby_sdk_v2/AppAbstract.rb +146 -0
- data/lib/cloudmunch_Ruby_sdk_v2/AppContext.rb +59 -0
- data/lib/cloudmunch_Ruby_sdk_v2/AssetHelper.rb +127 -0
- data/lib/cloudmunch_Ruby_sdk_v2/CloudmunchConstants.rb +24 -0
- data/lib/cloudmunch_Ruby_sdk_v2/CloudmunchService.rb +249 -0
- data/lib/cloudmunch_Ruby_sdk_v2/ElasticBeanStalkServer.rb +52 -0
- data/lib/cloudmunch_Ruby_sdk_v2/EnvironmentHelper.rb +292 -0
- data/lib/cloudmunch_Ruby_sdk_v2/InsightHelper.rb +770 -0
- data/lib/cloudmunch_Ruby_sdk_v2/IntegrationHelper.rb +69 -0
- data/lib/cloudmunch_Ruby_sdk_v2/PluginLoaderAbstract.rb +140 -0
- data/lib/cloudmunch_Ruby_sdk_v2/PluginReporterAbstract.rb +141 -0
- data/lib/cloudmunch_Ruby_sdk_v2/RoleHelper.rb +170 -0
- data/lib/cloudmunch_Ruby_sdk_v2/Server.rb +77 -0
- data/lib/cloudmunch_Ruby_sdk_v2/ServerHelper.rb +284 -0
- data/lib/cloudmunch_Ruby_sdk_v2/ServiceProvider.rb +25 -0
- data/lib/cloudmunch_Ruby_sdk_v2/Util.rb +119 -0
- data/lib/cloudmunch_Ruby_sdk_v2/doc/AppAbstract.html +1062 -0
- data/lib/cloudmunch_Ruby_sdk_v2/doc/AppContext.html +1402 -0
- data/lib/cloudmunch_Ruby_sdk_v2/doc/AssetHelper.html +694 -0
- data/lib/cloudmunch_Ruby_sdk_v2/doc/Cloudmunch.html +117 -0
- data/lib/cloudmunch_Ruby_sdk_v2/doc/CloudmunchConstants.html +184 -0
- data/lib/cloudmunch_Ruby_sdk_v2/doc/CloudmunchService.html +1195 -0
- data/lib/cloudmunch_Ruby_sdk_v2/doc/ElasticBeanStalkServer.html +1375 -0
- data/lib/cloudmunch_Ruby_sdk_v2/doc/InsightHelper.html +2889 -0
- data/lib/cloudmunch_Ruby_sdk_v2/doc/IntegrationHelper.html +400 -0
- data/lib/cloudmunch_Ruby_sdk_v2/doc/RoleHelper.html +809 -0
- data/lib/cloudmunch_Ruby_sdk_v2/doc/Server.html +2302 -0
- data/lib/cloudmunch_Ruby_sdk_v2/doc/ServerHelper.html +1181 -0
- data/lib/cloudmunch_Ruby_sdk_v2/doc/ServiceProvider.html +328 -0
- data/lib/cloudmunch_Ruby_sdk_v2/doc/Util.html +540 -0
- data/lib/cloudmunch_Ruby_sdk_v2/doc/_index.html +214 -0
- data/lib/cloudmunch_Ruby_sdk_v2/doc/class_list.html +58 -0
- data/lib/cloudmunch_Ruby_sdk_v2/doc/css/common.css +1 -0
- data/lib/cloudmunch_Ruby_sdk_v2/doc/css/full_list.css +57 -0
- data/lib/cloudmunch_Ruby_sdk_v2/doc/css/style.css +339 -0
- data/lib/cloudmunch_Ruby_sdk_v2/doc/file_list.html +57 -0
- data/lib/cloudmunch_Ruby_sdk_v2/doc/frames.html +26 -0
- data/lib/cloudmunch_Ruby_sdk_v2/doc/index.html +214 -0
- data/lib/cloudmunch_Ruby_sdk_v2/doc/js/app.js +219 -0
- data/lib/cloudmunch_Ruby_sdk_v2/doc/js/full_list.js +181 -0
- data/lib/cloudmunch_Ruby_sdk_v2/doc/js/jquery.js +4 -0
- data/lib/cloudmunch_Ruby_sdk_v2/doc/method_list.html +993 -0
- data/lib/cloudmunch_Ruby_sdk_v2/doc/top-level-namespace.html +114 -0
- data/lib/cloudmunch_Ruby_sdk_v2/version.rb +3 -0
- data/lib/cloudmunch_Ruby_sdk_v3/AppAbstract.rb +146 -0
- data/lib/cloudmunch_Ruby_sdk_v3/AppContext.rb +59 -0
- data/lib/cloudmunch_Ruby_sdk_v3/AssetHelper.rb +127 -0
- data/lib/cloudmunch_Ruby_sdk_v3/CloudmunchConstants.rb +24 -0
- data/lib/cloudmunch_Ruby_sdk_v3/CloudmunchService.rb +300 -0
- data/lib/cloudmunch_Ruby_sdk_v3/ElasticBeanStalkServer.rb +52 -0
- data/lib/cloudmunch_Ruby_sdk_v3/EnvironmentHelper.rb +292 -0
- data/lib/cloudmunch_Ruby_sdk_v3/InsightHelper.rb +770 -0
- data/lib/cloudmunch_Ruby_sdk_v3/IntegrationHelper.rb +69 -0
- data/lib/cloudmunch_Ruby_sdk_v3/PluginLoaderAbstract.rb +140 -0
- data/lib/cloudmunch_Ruby_sdk_v3/PluginReporterAbstract.rb +141 -0
- data/lib/cloudmunch_Ruby_sdk_v3/RoleHelper.rb +170 -0
- data/lib/cloudmunch_Ruby_sdk_v3/Server.rb +77 -0
- data/lib/cloudmunch_Ruby_sdk_v3/ServerHelper.rb +284 -0
- data/lib/cloudmunch_Ruby_sdk_v3/ServiceProvider.rb +25 -0
- data/lib/cloudmunch_Ruby_sdk_v3/Util.rb +119 -0
- data/lib/cloudmunch_Ruby_sdk_v3/doc/AppAbstract.html +1062 -0
- data/lib/cloudmunch_Ruby_sdk_v3/doc/AppContext.html +1402 -0
- data/lib/cloudmunch_Ruby_sdk_v3/doc/AssetHelper.html +694 -0
- data/lib/cloudmunch_Ruby_sdk_v3/doc/Cloudmunch.html +117 -0
- data/lib/cloudmunch_Ruby_sdk_v3/doc/CloudmunchConstants.html +184 -0
- data/lib/cloudmunch_Ruby_sdk_v3/doc/CloudmunchService.html +1195 -0
- data/lib/cloudmunch_Ruby_sdk_v3/doc/ElasticBeanStalkServer.html +1375 -0
- data/lib/cloudmunch_Ruby_sdk_v3/doc/InsightHelper.html +2889 -0
- data/lib/cloudmunch_Ruby_sdk_v3/doc/IntegrationHelper.html +400 -0
- data/lib/cloudmunch_Ruby_sdk_v3/doc/RoleHelper.html +809 -0
- data/lib/cloudmunch_Ruby_sdk_v3/doc/Server.html +2302 -0
- data/lib/cloudmunch_Ruby_sdk_v3/doc/ServerHelper.html +1181 -0
- data/lib/cloudmunch_Ruby_sdk_v3/doc/ServiceProvider.html +328 -0
- data/lib/cloudmunch_Ruby_sdk_v3/doc/Util.html +540 -0
- data/lib/cloudmunch_Ruby_sdk_v3/doc/_index.html +214 -0
- data/lib/cloudmunch_Ruby_sdk_v3/doc/class_list.html +58 -0
- data/lib/cloudmunch_Ruby_sdk_v3/doc/css/common.css +1 -0
- data/lib/cloudmunch_Ruby_sdk_v3/doc/css/full_list.css +57 -0
- data/lib/cloudmunch_Ruby_sdk_v3/doc/css/style.css +339 -0
- data/lib/cloudmunch_Ruby_sdk_v3/doc/file_list.html +57 -0
- data/lib/cloudmunch_Ruby_sdk_v3/doc/frames.html +26 -0
- data/lib/cloudmunch_Ruby_sdk_v3/doc/index.html +214 -0
- data/lib/cloudmunch_Ruby_sdk_v3/doc/js/app.js +219 -0
- data/lib/cloudmunch_Ruby_sdk_v3/doc/js/full_list.js +181 -0
- data/lib/cloudmunch_Ruby_sdk_v3/doc/js/jquery.js +4 -0
- data/lib/cloudmunch_Ruby_sdk_v3/doc/method_list.html +993 -0
- data/lib/cloudmunch_Ruby_sdk_v3/doc/top-level-namespace.html +114 -0
- data/lib/cloudmunch_Ruby_sdk_v3/version.rb +3 -0
- data/lib/cloudmunch_sdk.rb +5 -0
- data/lib/cloudmunch_sdk_v3.rb +5 -0
- metadata +194 -0
@@ -0,0 +1,400 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: IntegrationHelper
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '';
|
20
|
+
framesUrl = "frames.html#!IntegrationHelper.html";
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="_index.html">Index (I)</a> »
|
35
|
+
|
36
|
+
|
37
|
+
<span class="title">IntegrationHelper</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: IntegrationHelper
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">Object</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">IntegrationHelper</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
<dt class="r2">Includes:</dt>
|
94
|
+
<dd class="r2"><span class='object_link'><a href="CloudmunchService.html" title="CloudmunchService (module)">CloudmunchService</a></span>, <span class='object_link'><a href="Util.html" title="Util (module)">Util</a></span></dd>
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
<dt class="r1 last">Defined in:</dt>
|
101
|
+
<dd class="r1 last">IntegrationHelper.rb</dd>
|
102
|
+
|
103
|
+
</dl>
|
104
|
+
<div class="clear"></div>
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
<h2>
|
115
|
+
Instance Method Summary
|
116
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
117
|
+
</h2>
|
118
|
+
|
119
|
+
<ul class="summary">
|
120
|
+
|
121
|
+
<li class="public ">
|
122
|
+
<span class="summary_signature">
|
123
|
+
|
124
|
+
<a href="#getIntegration-instance_method" title="#getIntegration (instance method)">- (Object) <strong>getIntegration</strong>(jsonParams, integrationHash) </a>
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
</span>
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
139
|
+
|
140
|
+
</li>
|
141
|
+
|
142
|
+
|
143
|
+
<li class="public ">
|
144
|
+
<span class="summary_signature">
|
145
|
+
|
146
|
+
<a href="#getService-instance_method" title="#getService (instance method)">- (Object) <strong>getService</strong>(jsonParams) </a>
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
</span>
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
161
|
+
|
162
|
+
</li>
|
163
|
+
|
164
|
+
|
165
|
+
<li class="public ">
|
166
|
+
<span class="summary_signature">
|
167
|
+
|
168
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (IntegrationHelper) <strong>initialize</strong> </a>
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
</span>
|
173
|
+
|
174
|
+
|
175
|
+
<span class="note title constructor">constructor</span>
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
<span class="summary_desc"><div class='inline'>
|
185
|
+
<p>A new instance of IntegrationHelper.</p>
|
186
|
+
</div></span>
|
187
|
+
|
188
|
+
</li>
|
189
|
+
|
190
|
+
|
191
|
+
</ul>
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="Util.html" title="Util (module)">Util</a></span></h3>
|
204
|
+
<p class="inherited"><span class='object_link'><a href="Util.html#getJSONArgs-class_method" title="Util.getJSONArgs (method)">getJSONArgs</a></span>, <span class='object_link'><a href="Util.html#log-class_method" title="Util.log (method)">log</a></span>, <span class='object_link'><a href="Util.html#logClose-class_method" title="Util.logClose (method)">logClose</a></span>, <span class='object_link'><a href="Util.html#logInit-class_method" title="Util.logInit (method)">logInit</a></span>, <span class='object_link'><a href="Util.html#logIt-class_method" title="Util.logIt (method)">logIt</a></span>, <span class='object_link'><a href="Util.html#openJSONFile-class_method" title="Util.openJSONFile (method)">openJSONFile</a></span></p>
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="CloudmunchService.html" title="CloudmunchService (module)">CloudmunchService</a></span></h3>
|
215
|
+
<p class="inherited"><span class='object_link'><a href="CloudmunchService.html#deleteCloudmunchData-instance_method" title="CloudmunchService#deleteCloudmunchData (method)">#deleteCloudmunchData</a></span>, <span class='object_link'><a href="CloudmunchService.html#deleteKeys-instance_method" title="CloudmunchService#deleteKeys (method)">#deleteKeys</a></span>, <span class='object_link'><a href="CloudmunchService.html#downloadKeys-instance_method" title="CloudmunchService#downloadKeys (method)">#downloadKeys</a></span>, <span class='object_link'><a href="CloudmunchService.html#generateServerURL-instance_method" title="CloudmunchService#generateServerURL (method)">#generateServerURL</a></span>, <span class='object_link'><a href="CloudmunchService.html#getCloudmunchData-instance_method" title="CloudmunchService#getCloudmunchData (method)">#getCloudmunchData</a></span>, <span class='object_link'><a href="CloudmunchService.html#getCustomDataContext-class_method" title="CloudmunchService.getCustomDataContext (method)">getCustomDataContext</a></span>, <span class='object_link'><a href="CloudmunchService.html#getDataForContext-instance_method" title="CloudmunchService#getDataForContext (method)">#getDataForContext</a></span>, <span class='object_link'><a href="CloudmunchService.html#http_get-class_method" title="CloudmunchService.http_get (method)">http_get</a></span>, <span class='object_link'><a href="CloudmunchService.html#http_post-class_method" title="CloudmunchService.http_post (method)">http_post</a></span>, <span class='object_link'><a href="CloudmunchService.html#parseResponse-instance_method" title="CloudmunchService#parseResponse (method)">#parseResponse</a></span>, <span class='object_link'><a href="CloudmunchService.html#putCustomDataContext-class_method" title="CloudmunchService.putCustomDataContext (method)">putCustomDataContext</a></span>, <span class='object_link'><a href="CloudmunchService.html#updateCloudmunchData-instance_method" title="CloudmunchService#updateCloudmunchData (method)">#updateCloudmunchData</a></span>, <span class='object_link'><a href="CloudmunchService.html#updateDataForContext-instance_method" title="CloudmunchService#updateDataForContext (method)">#updateDataForContext</a></span></p>
|
216
|
+
<div id="constructor_details" class="method_details_list">
|
217
|
+
<h2>Constructor Details</h2>
|
218
|
+
|
219
|
+
<div class="method_details first">
|
220
|
+
<h3 class="signature first" id="initialize-instance_method">
|
221
|
+
|
222
|
+
- (<tt><span class='object_link'><a href="" title="IntegrationHelper (class)">IntegrationHelper</a></span></tt>) <strong>initialize</strong>
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
</h3><div class="docstring">
|
229
|
+
<div class="discussion">
|
230
|
+
|
231
|
+
<p>Returns a new instance of IntegrationHelper</p>
|
232
|
+
|
233
|
+
|
234
|
+
</div>
|
235
|
+
</div>
|
236
|
+
<div class="tags">
|
237
|
+
|
238
|
+
|
239
|
+
</div><table class="source_code">
|
240
|
+
<tr>
|
241
|
+
<td>
|
242
|
+
<pre class="lines">
|
243
|
+
|
244
|
+
|
245
|
+
22
|
246
|
+
23</pre>
|
247
|
+
</td>
|
248
|
+
<td>
|
249
|
+
<pre class="code"><span class="info file"># File 'IntegrationHelper.rb', line 22</span>
|
250
|
+
|
251
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
252
|
+
<span class='kw'>end</span></pre>
|
253
|
+
</td>
|
254
|
+
</tr>
|
255
|
+
</table>
|
256
|
+
</div>
|
257
|
+
|
258
|
+
</div>
|
259
|
+
|
260
|
+
|
261
|
+
<div id="instance_method_details" class="method_details_list">
|
262
|
+
<h2>Instance Method Details</h2>
|
263
|
+
|
264
|
+
|
265
|
+
<div class="method_details first">
|
266
|
+
<h3 class="signature first" id="getIntegration-instance_method">
|
267
|
+
|
268
|
+
- (<tt>Object</tt>) <strong>getIntegration</strong>(jsonParams, integrationHash)
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
</h3><table class="source_code">
|
275
|
+
<tr>
|
276
|
+
<td>
|
277
|
+
<pre class="lines">
|
278
|
+
|
279
|
+
|
280
|
+
47
|
281
|
+
48
|
282
|
+
49
|
283
|
+
50
|
284
|
+
51
|
285
|
+
52
|
286
|
+
53
|
287
|
+
54
|
288
|
+
55
|
289
|
+
56
|
290
|
+
57
|
291
|
+
58
|
292
|
+
59
|
293
|
+
60
|
294
|
+
61
|
295
|
+
62
|
296
|
+
63
|
297
|
+
64</pre>
|
298
|
+
</td>
|
299
|
+
<td>
|
300
|
+
<pre class="code"><span class="info file"># File 'IntegrationHelper.rb', line 47</span>
|
301
|
+
|
302
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_getIntegration'>getIntegration</span><span class='lparen'>(</span><span class='id identifier rubyid_jsonParams'>jsonParams</span><span class='comma'>,</span> <span class='id identifier rubyid_integrationHash'>integrationHash</span><span class='rparen'>)</span>
|
303
|
+
<span class='id identifier rubyid_providerName'>providerName</span> <span class='op'>=</span> <span class='id identifier rubyid_jsonParams'>jsonParams</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>providername</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
304
|
+
<span class='id identifier rubyid_log'>log</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>DEBUG</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Provider Name: </span><span class='tstring_end'>"</span></span> <span class='op'>+</span> <span class='id identifier rubyid_providerName'>providerName</span><span class='rparen'>)</span>
|
305
|
+
<span class='id identifier rubyid_integrationDetailsHash'>integrationDetailsHash</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
306
|
+
|
307
|
+
<span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_providerName'>providerName</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>&&</span> <span class='id identifier rubyid_providerName'>providerName</span><span class='period'>.</span><span class='id identifier rubyid_chop'>chop</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>></span> <span class='int'>0</span> <span class='kw'>then</span>
|
308
|
+
<span class='id identifier rubyid_regFields'>regFields</span> <span class='op'>=</span> <span class='id identifier rubyid_integrationHash'>integrationHash</span><span class='lbracket'>[</span><span class='id identifier rubyid_providerName'>providerName</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>configuration</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
309
|
+
|
310
|
+
<span class='id identifier rubyid_integrationDetailsHash'>integrationDetailsHash</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
311
|
+
<span class='id identifier rubyid_regFields'>regFields</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span><span class='id identifier rubyid_v'>v</span><span class='op'>|</span>
|
312
|
+
<span class='id identifier rubyid_integrationDetailsHash'>integrationDetailsHash</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_v'>v</span>
|
313
|
+
<span class='kw'>end</span>
|
314
|
+
|
315
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_integrationDetailsHash'>integrationDetailsHash</span>
|
316
|
+
<span class='kw'>else</span>
|
317
|
+
<span class='kw'>return</span> <span class='kw'>nil</span>
|
318
|
+
<span class='kw'>end</span>
|
319
|
+
<span class='kw'>end</span></pre>
|
320
|
+
</td>
|
321
|
+
</tr>
|
322
|
+
</table>
|
323
|
+
</div>
|
324
|
+
|
325
|
+
<div class="method_details ">
|
326
|
+
<h3 class="signature " id="getService-instance_method">
|
327
|
+
|
328
|
+
- (<tt>Object</tt>) <strong>getService</strong>(jsonParams)
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
</h3><table class="source_code">
|
335
|
+
<tr>
|
336
|
+
<td>
|
337
|
+
<pre class="lines">
|
338
|
+
|
339
|
+
|
340
|
+
25
|
341
|
+
26
|
342
|
+
27
|
343
|
+
28
|
344
|
+
29
|
345
|
+
30
|
346
|
+
31
|
347
|
+
32
|
348
|
+
33
|
349
|
+
34
|
350
|
+
35
|
351
|
+
36
|
352
|
+
37
|
353
|
+
38
|
354
|
+
39
|
355
|
+
40
|
356
|
+
41
|
357
|
+
42
|
358
|
+
43
|
359
|
+
44</pre>
|
360
|
+
</td>
|
361
|
+
<td>
|
362
|
+
<pre class="code"><span class="info file"># File 'IntegrationHelper.rb', line 25</span>
|
363
|
+
|
364
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_getService'>getService</span><span class='lparen'>(</span><span class='id identifier rubyid_jsonParams'>jsonParams</span><span class='rparen'>)</span>
|
365
|
+
<span class='id identifier rubyid_cloudproviders'>cloudproviders</span> <span class='op'>=</span> <span class='id identifier rubyid_jsonParams'>jsonParams</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>cloudproviders</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
366
|
+
<span class='id identifier rubyid_cloudproviders'>cloudproviders</span> <span class='op'>=</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_cloudproviders'>cloudproviders</span><span class='rparen'>)</span>
|
367
|
+
<span class='id identifier rubyid_providerName'>providerName</span> <span class='op'>=</span> <span class='id identifier rubyid_jsonParams'>jsonParams</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>providername</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
368
|
+
<span class='id identifier rubyid_log'>log</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>DEBUG</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Provider Name: </span><span class='tstring_end'>"</span></span> <span class='op'>+</span> <span class='id identifier rubyid_providerName'>providerName</span><span class='rparen'>)</span>
|
369
|
+
<span class='id identifier rubyid_integrationDetailsHash'>integrationDetailsHash</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
370
|
+
|
371
|
+
<span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_providerName'>providerName</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>&&</span> <span class='id identifier rubyid_providerName'>providerName</span><span class='period'>.</span><span class='id identifier rubyid_chop'>chop</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>></span> <span class='int'>0</span> <span class='kw'>then</span>
|
372
|
+
<span class='id identifier rubyid_regFields'>regFields</span> <span class='op'>=</span> <span class='id identifier rubyid_cloudproviders'>cloudproviders</span><span class='lbracket'>[</span><span class='id identifier rubyid_providerName'>providerName</span><span class='rbracket'>]</span>
|
373
|
+
|
374
|
+
<span class='id identifier rubyid_integrationDetailsHash'>integrationDetailsHash</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
375
|
+
<span class='id identifier rubyid_regFields'>regFields</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span><span class='id identifier rubyid_v'>v</span><span class='op'>|</span>
|
376
|
+
<span class='id identifier rubyid_integrationDetailsHash'>integrationDetailsHash</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_v'>v</span>
|
377
|
+
<span class='kw'>end</span>
|
378
|
+
|
379
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_integrationDetailsHash'>integrationDetailsHash</span>
|
380
|
+
<span class='kw'>else</span>
|
381
|
+
<span class='kw'>return</span> <span class='kw'>nil</span>
|
382
|
+
<span class='kw'>end</span>
|
383
|
+
<span class='kw'>end</span></pre>
|
384
|
+
</td>
|
385
|
+
</tr>
|
386
|
+
</table>
|
387
|
+
</div>
|
388
|
+
|
389
|
+
</div>
|
390
|
+
|
391
|
+
</div>
|
392
|
+
|
393
|
+
<div id="footer">
|
394
|
+
Generated on Mon Jan 11 14:09:53 2016 by
|
395
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
396
|
+
0.8.7.6 (ruby-2.0.0).
|
397
|
+
</div>
|
398
|
+
|
399
|
+
</body>
|
400
|
+
</html>
|
@@ -0,0 +1,809 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: RoleHelper
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '';
|
20
|
+
framesUrl = "frames.html#!RoleHelper.html";
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="_index.html">Index (R)</a> »
|
35
|
+
|
36
|
+
|
37
|
+
<span class="title">RoleHelper</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: RoleHelper
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">Object</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">RoleHelper</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
<dt class="r2">Includes:</dt>
|
94
|
+
<dd class="r2"><span class='object_link'><a href="CloudmunchService.html" title="CloudmunchService (module)">CloudmunchService</a></span>, <span class='object_link'><a href="Util.html" title="Util (module)">Util</a></span></dd>
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
<dt class="r1 last">Defined in:</dt>
|
101
|
+
<dd class="r1 last">RoleHelper.rb</dd>
|
102
|
+
|
103
|
+
</dl>
|
104
|
+
<div class="clear"></div>
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
<h2>
|
115
|
+
Instance Method Summary
|
116
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
117
|
+
</h2>
|
118
|
+
|
119
|
+
<ul class="summary">
|
120
|
+
|
121
|
+
<li class="public ">
|
122
|
+
<span class="summary_signature">
|
123
|
+
|
124
|
+
<a href="#addRole-instance_method" title="#addRole (instance method)">- (Object) <strong>addRole</strong>(roleName, roleData) </a>
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
</span>
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
<span class="summary_desc"><div class='inline'>
|
139
|
+
<p>/** * * @param string $roleName Name of the role * @param string
|
140
|
+
$role_status Role status ,valid values are success,failed,in-progress *
|
141
|
+
@param array $roleData Array of role properties */.</p>
|
142
|
+
</div></span>
|
143
|
+
|
144
|
+
</li>
|
145
|
+
|
146
|
+
|
147
|
+
<li class="public ">
|
148
|
+
<span class="summary_signature">
|
149
|
+
|
150
|
+
<a href="#checkIfRoleExists-instance_method" title="#checkIfRoleExists (instance method)">- (Object) <strong>checkIfRoleExists</strong>(roleID) </a>
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
</span>
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
<span class="summary_desc"><div class='inline'>
|
165
|
+
<p>### ### Checks if Role exists in cloudmunch.</p>
|
166
|
+
</div></span>
|
167
|
+
|
168
|
+
</li>
|
169
|
+
|
170
|
+
|
171
|
+
<li class="public ">
|
172
|
+
<span class="summary_signature">
|
173
|
+
|
174
|
+
<a href="#getExistingRoles-instance_method" title="#getExistingRoles (instance method)">- (Object) <strong>getExistingRoles</strong>(filterData) </a>
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
</span>
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
<span class="summary_desc"><div class='inline'>
|
189
|
+
<p>### ### ### @param Json Object $filterdata In the format
|
190
|
+
“filterfield”:“=value” ### @return json object roledetails ### ###.</p>
|
191
|
+
</div></span>
|
192
|
+
|
193
|
+
</li>
|
194
|
+
|
195
|
+
|
196
|
+
<li class="public ">
|
197
|
+
<span class="summary_signature">
|
198
|
+
|
199
|
+
<a href="#getRole-instance_method" title="#getRole (instance method)">- (Object) <strong>getRole</strong>(roleID, filterData) </a>
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
</span>
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
<span class="summary_desc"><div class='inline'>
|
214
|
+
<p>### ### ### @param String $roleID ### @param Json Object $filterdata In
|
215
|
+
the format “filterfield”:“=value” ### @return json object roledetails ###
|
216
|
+
###.</p>
|
217
|
+
</div></span>
|
218
|
+
|
219
|
+
</li>
|
220
|
+
|
221
|
+
|
222
|
+
<li class="public ">
|
223
|
+
<span class="summary_signature">
|
224
|
+
|
225
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (RoleHelper) <strong>initialize</strong>(appContext) </a>
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
</span>
|
230
|
+
|
231
|
+
|
232
|
+
<span class="note title constructor">constructor</span>
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
<span class="summary_desc"><div class='inline'>
|
242
|
+
<p>A new instance of RoleHelper.</p>
|
243
|
+
</div></span>
|
244
|
+
|
245
|
+
</li>
|
246
|
+
|
247
|
+
|
248
|
+
<li class="public ">
|
249
|
+
<span class="summary_signature">
|
250
|
+
|
251
|
+
<a href="#isRoleNameUnique-instance_method" title="#isRoleNameUnique (instance method)">- (Object) <strong>isRoleNameUnique</strong>(existingRoles, roleName) </a>
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
</span>
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
<span class="summary_desc"><div class='inline'>
|
266
|
+
<p>### ### Check if given name of the role is unique with existing ones ###
|
267
|
+
@param string roleName : name of the environment name to be
|
268
|
+
created ### @param string existingRoles : list of existing
|
269
|
+
environments ### @return boolean true if name is unique ###.</p>
|
270
|
+
</div></span>
|
271
|
+
|
272
|
+
</li>
|
273
|
+
|
274
|
+
|
275
|
+
<li class="public ">
|
276
|
+
<span class="summary_signature">
|
277
|
+
|
278
|
+
<a href="#updateRole-instance_method" title="#updateRole (instance method)">- (Object) <strong>updateRole</strong>(roleID, roleData) </a>
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
</span>
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
<span class="summary_desc"><div class='inline'>
|
293
|
+
<p>### ### ### @param String Role ID ### @param JsonObject Role Data ###.</p>
|
294
|
+
</div></span>
|
295
|
+
|
296
|
+
</li>
|
297
|
+
|
298
|
+
|
299
|
+
</ul>
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="Util.html" title="Util (module)">Util</a></span></h3>
|
312
|
+
<p class="inherited"><span class='object_link'><a href="Util.html#getJSONArgs-class_method" title="Util.getJSONArgs (method)">getJSONArgs</a></span>, <span class='object_link'><a href="Util.html#log-class_method" title="Util.log (method)">log</a></span>, <span class='object_link'><a href="Util.html#logClose-class_method" title="Util.logClose (method)">logClose</a></span>, <span class='object_link'><a href="Util.html#logInit-class_method" title="Util.logInit (method)">logInit</a></span>, <span class='object_link'><a href="Util.html#logIt-class_method" title="Util.logIt (method)">logIt</a></span>, <span class='object_link'><a href="Util.html#openJSONFile-class_method" title="Util.openJSONFile (method)">openJSONFile</a></span></p>
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="CloudmunchService.html" title="CloudmunchService (module)">CloudmunchService</a></span></h3>
|
323
|
+
<p class="inherited"><span class='object_link'><a href="CloudmunchService.html#deleteCloudmunchData-instance_method" title="CloudmunchService#deleteCloudmunchData (method)">#deleteCloudmunchData</a></span>, <span class='object_link'><a href="CloudmunchService.html#deleteKeys-instance_method" title="CloudmunchService#deleteKeys (method)">#deleteKeys</a></span>, <span class='object_link'><a href="CloudmunchService.html#downloadKeys-instance_method" title="CloudmunchService#downloadKeys (method)">#downloadKeys</a></span>, <span class='object_link'><a href="CloudmunchService.html#generateServerURL-instance_method" title="CloudmunchService#generateServerURL (method)">#generateServerURL</a></span>, <span class='object_link'><a href="CloudmunchService.html#getCloudmunchData-instance_method" title="CloudmunchService#getCloudmunchData (method)">#getCloudmunchData</a></span>, <span class='object_link'><a href="CloudmunchService.html#getCustomDataContext-class_method" title="CloudmunchService.getCustomDataContext (method)">getCustomDataContext</a></span>, <span class='object_link'><a href="CloudmunchService.html#getDataForContext-instance_method" title="CloudmunchService#getDataForContext (method)">#getDataForContext</a></span>, <span class='object_link'><a href="CloudmunchService.html#http_get-class_method" title="CloudmunchService.http_get (method)">http_get</a></span>, <span class='object_link'><a href="CloudmunchService.html#http_post-class_method" title="CloudmunchService.http_post (method)">http_post</a></span>, <span class='object_link'><a href="CloudmunchService.html#parseResponse-instance_method" title="CloudmunchService#parseResponse (method)">#parseResponse</a></span>, <span class='object_link'><a href="CloudmunchService.html#putCustomDataContext-class_method" title="CloudmunchService.putCustomDataContext (method)">putCustomDataContext</a></span>, <span class='object_link'><a href="CloudmunchService.html#updateCloudmunchData-instance_method" title="CloudmunchService#updateCloudmunchData (method)">#updateCloudmunchData</a></span>, <span class='object_link'><a href="CloudmunchService.html#updateDataForContext-instance_method" title="CloudmunchService#updateDataForContext (method)">#updateDataForContext</a></span></p>
|
324
|
+
<div id="constructor_details" class="method_details_list">
|
325
|
+
<h2>Constructor Details</h2>
|
326
|
+
|
327
|
+
<div class="method_details first">
|
328
|
+
<h3 class="signature first" id="initialize-instance_method">
|
329
|
+
|
330
|
+
- (<tt><span class='object_link'><a href="" title="RoleHelper (class)">RoleHelper</a></span></tt>) <strong>initialize</strong>(appContext)
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
</h3><div class="docstring">
|
337
|
+
<div class="discussion">
|
338
|
+
|
339
|
+
<p>Returns a new instance of RoleHelper</p>
|
340
|
+
|
341
|
+
|
342
|
+
</div>
|
343
|
+
</div>
|
344
|
+
<div class="tags">
|
345
|
+
|
346
|
+
|
347
|
+
</div><table class="source_code">
|
348
|
+
<tr>
|
349
|
+
<td>
|
350
|
+
<pre class="lines">
|
351
|
+
|
352
|
+
|
353
|
+
23
|
354
|
+
24
|
355
|
+
25
|
356
|
+
26</pre>
|
357
|
+
</td>
|
358
|
+
<td>
|
359
|
+
<pre class="code"><span class="info file"># File 'RoleHelper.rb', line 23</span>
|
360
|
+
|
361
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_appContext'>appContext</span><span class='rparen'>)</span>
|
362
|
+
<span class='ivar'>@appContext</span> <span class='op'>=</span> <span class='id identifier rubyid_appContext'>appContext</span>
|
363
|
+
<span class='ivar'>@cloudmunchDataService</span> <span class='op'>=</span> <span class='const'>CloudmunchService</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
364
|
+
<span class='kw'>end</span></pre>
|
365
|
+
</td>
|
366
|
+
</tr>
|
367
|
+
</table>
|
368
|
+
</div>
|
369
|
+
|
370
|
+
</div>
|
371
|
+
|
372
|
+
|
373
|
+
<div id="instance_method_details" class="method_details_list">
|
374
|
+
<h2>Instance Method Details</h2>
|
375
|
+
|
376
|
+
|
377
|
+
<div class="method_details first">
|
378
|
+
<h3 class="signature first" id="addRole-instance_method">
|
379
|
+
|
380
|
+
- (<tt>Object</tt>) <strong>addRole</strong>(roleName, roleData)
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
</h3><div class="docstring">
|
387
|
+
<div class="discussion">
|
388
|
+
|
389
|
+
<p>/**</p>
|
390
|
+
|
391
|
+
<pre class="code ruby"><code class="ruby">*
|
392
|
+
* @param string $roleName Name of the role
|
393
|
+
* @param string $role_status Role status ,valid values are success,failed,in-progress
|
394
|
+
* @param array $roleData Array of role properties
|
395
|
+
*/</code></pre>
|
396
|
+
|
397
|
+
|
398
|
+
</div>
|
399
|
+
</div>
|
400
|
+
<div class="tags">
|
401
|
+
|
402
|
+
|
403
|
+
</div><table class="source_code">
|
404
|
+
<tr>
|
405
|
+
<td>
|
406
|
+
<pre class="lines">
|
407
|
+
|
408
|
+
|
409
|
+
110
|
410
|
+
111
|
411
|
+
112
|
412
|
+
113
|
413
|
+
114
|
414
|
+
115
|
415
|
+
116
|
416
|
+
117
|
417
|
+
118
|
418
|
+
119
|
419
|
+
120
|
420
|
+
121
|
421
|
+
122
|
422
|
+
123
|
423
|
+
124
|
424
|
+
125
|
425
|
+
126
|
426
|
+
127
|
427
|
+
128
|
428
|
+
129
|
429
|
+
130
|
430
|
+
131
|
431
|
+
132
|
432
|
+
133</pre>
|
433
|
+
</td>
|
434
|
+
<td>
|
435
|
+
<pre class="code"><span class="info file"># File 'RoleHelper.rb', line 110</span>
|
436
|
+
|
437
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_addRole'>addRole</span><span class='lparen'>(</span><span class='id identifier rubyid_roleName'>roleName</span><span class='comma'>,</span> <span class='id identifier rubyid_roleData'>roleData</span><span class='rparen'>)</span>
|
438
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_roleName'>roleName</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='kw'>then</span>
|
439
|
+
<span class='id identifier rubyid_log'>log</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>ERROR</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Role name need to be provided</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
440
|
+
<span class='kw'>return</span> <span class='kw'>false</span>
|
441
|
+
<span class='kw'>end</span>
|
442
|
+
|
443
|
+
<span class='id identifier rubyid_roleData'>roleData</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>name</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_roleName'>roleName</span>
|
444
|
+
|
445
|
+
<span class='id identifier rubyid_serverUrl'>serverUrl</span> <span class='op'>=</span> <span class='ivar'>@appContext</span><span class='period'>.</span><span class='id identifier rubyid_getMasterURL'>getMasterURL</span><span class='lparen'>(</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/applications/</span><span class='tstring_end'>"</span></span> <span class='op'>+</span> <span class='ivar'>@appContext</span><span class='period'>.</span><span class='id identifier rubyid_getProject'>getProject</span><span class='lparen'>(</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/tiers/</span><span class='tstring_end'>"</span></span>
|
446
|
+
<span class='id identifier rubyid_retResult'>retResult</span> <span class='op'>=</span> <span class='ivar'>@cloudmunchDataService</span><span class='period'>.</span><span class='id identifier rubyid_updateDataForContext'>updateDataForContext</span><span class='lparen'>(</span><span class='id identifier rubyid_serverUrl'>serverUrl</span><span class='comma'>,</span> <span class='ivar'>@appContext</span><span class='period'>.</span><span class='id identifier rubyid_getAPIKey'>getAPIKey</span><span class='lparen'>(</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_roleData'>roleData</span><span class='rparen'>)</span>
|
447
|
+
|
448
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_retResult'>retResult</span> <span class='op'>==</span> <span class='kw'>nil</span> <span class='kw'>then</span>
|
449
|
+
<span class='kw'>return</span> <span class='kw'>nil</span>
|
450
|
+
<span class='kw'>else</span>
|
451
|
+
<span class='id identifier rubyid_retResult'>retResult</span> <span class='op'>=</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_retResult'>retResult</span><span class='rparen'>)</span>
|
452
|
+
<span class='id identifier rubyid_retData'>retData</span> <span class='op'>=</span> <span class='id identifier rubyid_retResult'>retResult</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>data</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
453
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_retData'>retData</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>then</span>
|
454
|
+
<span class='kw'>return</span> <span class='kw'>nil</span>
|
455
|
+
<span class='kw'>else</span>
|
456
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_retData'>retData</span>
|
457
|
+
<span class='kw'>end</span>
|
458
|
+
<span class='kw'>end</span>
|
459
|
+
|
460
|
+
<span class='kw'>end</span></pre>
|
461
|
+
</td>
|
462
|
+
</tr>
|
463
|
+
</table>
|
464
|
+
</div>
|
465
|
+
|
466
|
+
<div class="method_details ">
|
467
|
+
<h3 class="signature " id="checkIfRoleExists-instance_method">
|
468
|
+
|
469
|
+
- (<tt>Object</tt>) <strong>checkIfRoleExists</strong>(roleID)
|
470
|
+
|
471
|
+
|
472
|
+
|
473
|
+
|
474
|
+
|
475
|
+
</h3><div class="docstring">
|
476
|
+
<div class="discussion">
|
477
|
+
|
478
|
+
<p>### ### Checks if Role exists in cloudmunch. ### @param string $roleID ###
|
479
|
+
@return boolean ###</p>
|
480
|
+
|
481
|
+
|
482
|
+
</div>
|
483
|
+
</div>
|
484
|
+
<div class="tags">
|
485
|
+
|
486
|
+
|
487
|
+
</div><table class="source_code">
|
488
|
+
<tr>
|
489
|
+
<td>
|
490
|
+
<pre class="lines">
|
491
|
+
|
492
|
+
|
493
|
+
150
|
494
|
+
151
|
495
|
+
152
|
496
|
+
153
|
497
|
+
154
|
498
|
+
155
|
499
|
+
156
|
500
|
+
157
|
501
|
+
158
|
502
|
+
159
|
503
|
+
160
|
504
|
+
161
|
505
|
+
162
|
506
|
+
163
|
507
|
+
164
|
508
|
+
165
|
509
|
+
166</pre>
|
510
|
+
</td>
|
511
|
+
<td>
|
512
|
+
<pre class="code"><span class="info file"># File 'RoleHelper.rb', line 150</span>
|
513
|
+
|
514
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_checkIfRoleExists'>checkIfRoleExists</span><span class='lparen'>(</span><span class='id identifier rubyid_roleID'>roleID</span><span class='rparen'>)</span>
|
515
|
+
<span class='id identifier rubyid_serverUrl'>serverUrl</span> <span class='op'>=</span> <span class='ivar'>@appContext</span><span class='period'>.</span><span class='id identifier rubyid_getMasterURL'>getMasterURL</span><span class='lparen'>(</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/applications/</span><span class='tstring_end'>"</span></span> <span class='op'>+</span> <span class='ivar'>@appContext</span><span class='period'>.</span><span class='id identifier rubyid_getProject'>getProject</span><span class='lparen'>(</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/tiers/</span><span class='tstring_end'>"</span></span> <span class='op'>+</span> <span class='id identifier rubyid_roleID'>roleID</span>
|
516
|
+
|
517
|
+
<span class='id identifier rubyid_roleResult'>roleResult</span> <span class='op'>=</span> <span class='ivar'>@cloudmunchDataService</span><span class='period'>.</span><span class='id identifier rubyid_getDataForContext'>getDataForContext</span><span class='lparen'>(</span><span class='id identifier rubyid_serverUrl'>serverUrl</span><span class='comma'>,</span> <span class='ivar'>@appContext</span><span class='period'>.</span><span class='id identifier rubyid_getAPIKey'>getAPIKey</span><span class='lparen'>(</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
518
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_roleResult'>roleResult</span> <span class='op'>==</span> <span class='kw'>nil</span> <span class='kw'>then</span>
|
519
|
+
<span class='kw'>return</span> <span class='kw'>nil</span>
|
520
|
+
<span class='kw'>else</span>
|
521
|
+
<span class='id identifier rubyid_roleResult'>roleResult</span> <span class='op'>=</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_roleResult'>roleResult</span><span class='rparen'>)</span>
|
522
|
+
<span class='id identifier rubyid_roleData'>roleData</span> <span class='op'>=</span> <span class='id identifier rubyid_roleResult'>roleResult</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>data</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
523
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_roleData'>roleData</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>then</span>
|
524
|
+
<span class='id identifier rubyid_log'>log</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>ERROR</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Role does not exist</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
525
|
+
<span class='kw'>return</span> <span class='kw'>false</span>
|
526
|
+
<span class='kw'>else</span>
|
527
|
+
<span class='kw'>return</span> <span class='kw'>true</span>
|
528
|
+
<span class='kw'>end</span>
|
529
|
+
<span class='kw'>end</span>
|
530
|
+
<span class='kw'>end</span></pre>
|
531
|
+
</td>
|
532
|
+
</tr>
|
533
|
+
</table>
|
534
|
+
</div>
|
535
|
+
|
536
|
+
<div class="method_details ">
|
537
|
+
<h3 class="signature " id="getExistingRoles-instance_method">
|
538
|
+
|
539
|
+
- (<tt>Object</tt>) <strong>getExistingRoles</strong>(filterData)
|
540
|
+
|
541
|
+
|
542
|
+
|
543
|
+
|
544
|
+
|
545
|
+
</h3><div class="docstring">
|
546
|
+
<div class="discussion">
|
547
|
+
|
548
|
+
<p>### ### ### @param Json Object $filterdata In the format
|
549
|
+
“filterfield”:“=value” ### @return json object roledetails ### ###</p>
|
550
|
+
|
551
|
+
|
552
|
+
</div>
|
553
|
+
</div>
|
554
|
+
<div class="tags">
|
555
|
+
|
556
|
+
|
557
|
+
</div><table class="source_code">
|
558
|
+
<tr>
|
559
|
+
<td>
|
560
|
+
<pre class="lines">
|
561
|
+
|
562
|
+
|
563
|
+
49
|
564
|
+
50
|
565
|
+
51
|
566
|
+
52
|
567
|
+
53
|
568
|
+
54
|
569
|
+
55
|
570
|
+
56
|
571
|
+
57
|
572
|
+
58
|
573
|
+
59
|
574
|
+
60
|
575
|
+
61
|
576
|
+
62
|
577
|
+
63
|
578
|
+
64
|
579
|
+
65
|
580
|
+
66
|
581
|
+
67
|
582
|
+
68
|
583
|
+
69
|
584
|
+
70
|
585
|
+
71</pre>
|
586
|
+
</td>
|
587
|
+
<td>
|
588
|
+
<pre class="code"><span class="info file"># File 'RoleHelper.rb', line 49</span>
|
589
|
+
|
590
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_getExistingRoles'>getExistingRoles</span><span class='lparen'>(</span><span class='id identifier rubyid_filterData'>filterData</span><span class='rparen'>)</span>
|
591
|
+
<span class='id identifier rubyid_paramHash'>paramHash</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
592
|
+
<span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_filterData'>filterData</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
593
|
+
<span class='id identifier rubyid_paramHash'>paramHash</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>filter</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_filterData'>filterData</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span>
|
594
|
+
<span class='kw'>end</span>
|
595
|
+
|
596
|
+
<span class='id identifier rubyid_serverUrl'>serverUrl</span> <span class='op'>=</span> <span class='ivar'>@appContext</span><span class='period'>.</span><span class='id identifier rubyid_getMasterURL'>getMasterURL</span><span class='lparen'>(</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/applications/</span><span class='tstring_end'>"</span></span> <span class='op'>+</span> <span class='ivar'>@appContext</span><span class='period'>.</span><span class='id identifier rubyid_getProject'>getProject</span><span class='lparen'>(</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/tiers</span><span class='tstring_end'>"</span></span>
|
597
|
+
<span class='id identifier rubyid_roleResult'>roleResult</span> <span class='op'>=</span> <span class='ivar'>@cloudmunchDataService</span><span class='period'>.</span><span class='id identifier rubyid_getDataForContext'>getDataForContext</span><span class='lparen'>(</span><span class='id identifier rubyid_serverUrl'>serverUrl</span><span class='comma'>,</span> <span class='ivar'>@appContext</span><span class='period'>.</span><span class='id identifier rubyid_getAPIKey'>getAPIKey</span><span class='lparen'>(</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_paramHash'>paramHash</span><span class='rparen'>)</span>
|
598
|
+
|
599
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_roleResult'>roleResult</span> <span class='op'>==</span> <span class='kw'>nil</span> <span class='kw'>then</span>
|
600
|
+
<span class='id identifier rubyid_log'>log</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>ERROR</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Unable to get data from cloudmunch</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
601
|
+
<span class='kw'>return</span> <span class='kw'>nil</span>
|
602
|
+
<span class='kw'>else</span>
|
603
|
+
<span class='id identifier rubyid_roleResult'>roleResult</span> <span class='op'>=</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_roleResult'>roleResult</span><span class='rparen'>)</span>
|
604
|
+
<span class='id identifier rubyid_roleData'>roleData</span> <span class='op'>=</span> <span class='id identifier rubyid_roleResult'>roleResult</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>data</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
605
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_roleData'>roleData</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>then</span>
|
606
|
+
<span class='id identifier rubyid_log'>log</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>ERROR</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Role does not exist</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
607
|
+
<span class='kw'>return</span> <span class='kw'>nil</span>
|
608
|
+
<span class='kw'>else</span>
|
609
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_roleData'>roleData</span>
|
610
|
+
<span class='kw'>end</span>
|
611
|
+
<span class='kw'>end</span>
|
612
|
+
<span class='kw'>end</span></pre>
|
613
|
+
</td>
|
614
|
+
</tr>
|
615
|
+
</table>
|
616
|
+
</div>
|
617
|
+
|
618
|
+
<div class="method_details ">
|
619
|
+
<h3 class="signature " id="getRole-instance_method">
|
620
|
+
|
621
|
+
- (<tt>Object</tt>) <strong>getRole</strong>(roleID, filterData)
|
622
|
+
|
623
|
+
|
624
|
+
|
625
|
+
|
626
|
+
|
627
|
+
</h3><div class="docstring">
|
628
|
+
<div class="discussion">
|
629
|
+
|
630
|
+
<p>### ### ### @param String $roleID ### @param Json Object $filterdata In
|
631
|
+
the format “filterfield”:“=value” ### @return json object roledetails ###
|
632
|
+
###</p>
|
633
|
+
|
634
|
+
|
635
|
+
</div>
|
636
|
+
</div>
|
637
|
+
<div class="tags">
|
638
|
+
|
639
|
+
|
640
|
+
</div><table class="source_code">
|
641
|
+
<tr>
|
642
|
+
<td>
|
643
|
+
<pre class="lines">
|
644
|
+
|
645
|
+
|
646
|
+
80
|
647
|
+
81
|
648
|
+
82
|
649
|
+
83
|
650
|
+
84
|
651
|
+
85
|
652
|
+
86
|
653
|
+
87
|
654
|
+
88
|
655
|
+
89
|
656
|
+
90
|
657
|
+
91
|
658
|
+
92
|
659
|
+
93
|
660
|
+
94
|
661
|
+
95
|
662
|
+
96
|
663
|
+
97
|
664
|
+
98
|
665
|
+
99
|
666
|
+
100
|
667
|
+
101
|
668
|
+
102</pre>
|
669
|
+
</td>
|
670
|
+
<td>
|
671
|
+
<pre class="code"><span class="info file"># File 'RoleHelper.rb', line 80</span>
|
672
|
+
|
673
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_getRole'>getRole</span><span class='lparen'>(</span><span class='id identifier rubyid_roleID'>roleID</span><span class='comma'>,</span> <span class='id identifier rubyid_filterData'>filterData</span><span class='rparen'>)</span>
|
674
|
+
<span class='id identifier rubyid_paramHash'>paramHash</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
675
|
+
<span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_filterData'>filterData</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
676
|
+
<span class='id identifier rubyid_paramHash'>paramHash</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>filter</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_filterData'>filterData</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span>
|
677
|
+
<span class='kw'>end</span>
|
678
|
+
|
679
|
+
<span class='id identifier rubyid_serverUrl'>serverUrl</span> <span class='op'>=</span> <span class='ivar'>@appContext</span><span class='period'>.</span><span class='id identifier rubyid_getMasterURL'>getMasterURL</span><span class='lparen'>(</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/applications/</span><span class='tstring_end'>"</span></span> <span class='op'>+</span> <span class='ivar'>@appContext</span><span class='period'>.</span><span class='id identifier rubyid_getProject'>getProject</span><span class='lparen'>(</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/tiers/</span><span class='tstring_end'>"</span></span> <span class='op'>+</span> <span class='id identifier rubyid_roleID'>roleID</span>
|
680
|
+
<span class='id identifier rubyid_roleResult'>roleResult</span> <span class='op'>=</span> <span class='ivar'>@cloudmunchDataService</span><span class='period'>.</span><span class='id identifier rubyid_getDataForContext'>getDataForContext</span><span class='lparen'>(</span><span class='id identifier rubyid_serverUrl'>serverUrl</span><span class='comma'>,</span> <span class='ivar'>@appContext</span><span class='period'>.</span><span class='id identifier rubyid_getAPIKey'>getAPIKey</span><span class='lparen'>(</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_paramHash'>paramHash</span><span class='rparen'>)</span>
|
681
|
+
|
682
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_roleResult'>roleResult</span> <span class='op'>==</span> <span class='kw'>nil</span> <span class='kw'>then</span>
|
683
|
+
<span class='id identifier rubyid_log'>log</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>ERROR</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Unable to get data from cloudmunch</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
684
|
+
<span class='kw'>return</span> <span class='kw'>nil</span>
|
685
|
+
<span class='kw'>else</span>
|
686
|
+
<span class='id identifier rubyid_roleResult'>roleResult</span> <span class='op'>=</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_roleResult'>roleResult</span><span class='rparen'>)</span>
|
687
|
+
<span class='id identifier rubyid_roleData'>roleData</span> <span class='op'>=</span> <span class='id identifier rubyid_roleResult'>roleResult</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>data</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
688
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_roleData'>roleData</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>then</span>
|
689
|
+
<span class='id identifier rubyid_log'>log</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>ERROR</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Role does not exist</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
690
|
+
<span class='kw'>return</span> <span class='kw'>nil</span>
|
691
|
+
<span class='kw'>else</span>
|
692
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_roleData'>roleData</span>
|
693
|
+
<span class='kw'>end</span>
|
694
|
+
<span class='kw'>end</span>
|
695
|
+
<span class='kw'>end</span></pre>
|
696
|
+
</td>
|
697
|
+
</tr>
|
698
|
+
</table>
|
699
|
+
</div>
|
700
|
+
|
701
|
+
<div class="method_details ">
|
702
|
+
<h3 class="signature " id="isRoleNameUnique-instance_method">
|
703
|
+
|
704
|
+
- (<tt>Object</tt>) <strong>isRoleNameUnique</strong>(existingRoles, roleName)
|
705
|
+
|
706
|
+
|
707
|
+
|
708
|
+
|
709
|
+
|
710
|
+
</h3><div class="docstring">
|
711
|
+
<div class="discussion">
|
712
|
+
|
713
|
+
<p>### ### Check if given name of the role is unique with existing ones ###
|
714
|
+
@param string roleName : name of the environment name to be
|
715
|
+
created ### @param string existingRoles : list of existing
|
716
|
+
environments ### @return boolean true if name is unique ###</p>
|
717
|
+
|
718
|
+
|
719
|
+
</div>
|
720
|
+
</div>
|
721
|
+
<div class="tags">
|
722
|
+
|
723
|
+
|
724
|
+
</div><table class="source_code">
|
725
|
+
<tr>
|
726
|
+
<td>
|
727
|
+
<pre class="lines">
|
728
|
+
|
729
|
+
|
730
|
+
34
|
731
|
+
35
|
732
|
+
36
|
733
|
+
37
|
734
|
+
38
|
735
|
+
39
|
736
|
+
40
|
737
|
+
41</pre>
|
738
|
+
</td>
|
739
|
+
<td>
|
740
|
+
<pre class="code"><span class="info file"># File 'RoleHelper.rb', line 34</span>
|
741
|
+
|
742
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_isRoleNameUnique'>isRoleNameUnique</span><span class='lparen'>(</span><span class='id identifier rubyid_existingRoles'>existingRoles</span><span class='comma'>,</span> <span class='id identifier rubyid_roleName'>roleName</span><span class='rparen'>)</span>
|
743
|
+
<span class='id identifier rubyid_existingRoles'>existingRoles</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span><span class='id identifier rubyid_v'>v</span><span class='op'>|</span>
|
744
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_v'>v</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>name</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='id identifier rubyid_roleName'>roleName</span> <span class='kw'>then</span>
|
745
|
+
<span class='kw'>return</span> <span class='kw'>false</span>
|
746
|
+
<span class='kw'>end</span>
|
747
|
+
<span class='kw'>end</span>
|
748
|
+
<span class='kw'>return</span> <span class='kw'>true</span>
|
749
|
+
<span class='kw'>end</span></pre>
|
750
|
+
</td>
|
751
|
+
</tr>
|
752
|
+
</table>
|
753
|
+
</div>
|
754
|
+
|
755
|
+
<div class="method_details ">
|
756
|
+
<h3 class="signature " id="updateRole-instance_method">
|
757
|
+
|
758
|
+
- (<tt>Object</tt>) <strong>updateRole</strong>(roleID, roleData)
|
759
|
+
|
760
|
+
|
761
|
+
|
762
|
+
|
763
|
+
|
764
|
+
</h3><div class="docstring">
|
765
|
+
<div class="discussion">
|
766
|
+
|
767
|
+
<p>### ### ### @param String Role ID ### @param JsonObject Role Data ###</p>
|
768
|
+
|
769
|
+
|
770
|
+
</div>
|
771
|
+
</div>
|
772
|
+
<div class="tags">
|
773
|
+
|
774
|
+
|
775
|
+
</div><table class="source_code">
|
776
|
+
<tr>
|
777
|
+
<td>
|
778
|
+
<pre class="lines">
|
779
|
+
|
780
|
+
|
781
|
+
140
|
782
|
+
141
|
783
|
+
142
|
784
|
+
143</pre>
|
785
|
+
</td>
|
786
|
+
<td>
|
787
|
+
<pre class="code"><span class="info file"># File 'RoleHelper.rb', line 140</span>
|
788
|
+
|
789
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_updateRole'>updateRole</span><span class='lparen'>(</span><span class='id identifier rubyid_roleID'>roleID</span><span class='comma'>,</span> <span class='id identifier rubyid_roleData'>roleData</span><span class='rparen'>)</span>
|
790
|
+
<span class='id identifier rubyid_serverUrl'>serverUrl</span> <span class='op'>=</span> <span class='ivar'>@appContext</span><span class='period'>.</span><span class='id identifier rubyid_getMasterURL'>getMasterURL</span><span class='lparen'>(</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/applications/</span><span class='tstring_end'>"</span></span> <span class='op'>+</span> <span class='ivar'>@appContext</span><span class='period'>.</span><span class='id identifier rubyid_getProject'>getProject</span><span class='lparen'>(</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/tiers/</span><span class='tstring_end'>"</span></span> <span class='op'>+</span> <span class='id identifier rubyid_roleID'>roleID</span>
|
791
|
+
<span class='ivar'>@cloudmunchDataService</span><span class='period'>.</span><span class='id identifier rubyid_updateDataForContext'>updateDataForContext</span><span class='lparen'>(</span><span class='id identifier rubyid_serverUrl'>serverUrl</span><span class='comma'>,</span> <span class='ivar'>@appContext</span><span class='period'>.</span><span class='id identifier rubyid_getAPIKey'>getAPIKey</span><span class='lparen'>(</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_roleData'>roleData</span><span class='rparen'>)</span>
|
792
|
+
<span class='kw'>end</span></pre>
|
793
|
+
</td>
|
794
|
+
</tr>
|
795
|
+
</table>
|
796
|
+
</div>
|
797
|
+
|
798
|
+
</div>
|
799
|
+
|
800
|
+
</div>
|
801
|
+
|
802
|
+
<div id="footer">
|
803
|
+
Generated on Mon Jan 11 14:09:53 2016 by
|
804
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
805
|
+
0.8.7.6 (ruby-2.0.0).
|
806
|
+
</div>
|
807
|
+
|
808
|
+
</body>
|
809
|
+
</html>
|