boris 1.0.0.beta.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.
- data/LICENSE.md +9 -0
- data/README.md +94 -0
- data/boris.gemspec +28 -0
- data/doc/Array.html +437 -0
- data/doc/Boris.html +230 -0
- data/doc/Boris/ConnectionAlreadyActive.html +123 -0
- data/doc/Boris/ConnectionFailed.html +127 -0
- data/doc/Boris/Connector.html +794 -0
- data/doc/Boris/InvalidCredentials.html +131 -0
- data/doc/Boris/InvalidOption.html +123 -0
- data/doc/Boris/InvalidTargetName.html +123 -0
- data/doc/Boris/Lumberjack.html +466 -0
- data/doc/Boris/MissingCredentials.html +123 -0
- data/doc/Boris/NoActiveConnection.html +123 -0
- data/doc/Boris/NoProfileDetected.html +123 -0
- data/doc/Boris/Options.html +783 -0
- data/doc/Boris/Profiles.html +117 -0
- data/doc/Boris/Profiles/Linux.html +1151 -0
- data/doc/Boris/Profiles/RedHat.html +875 -0
- data/doc/Boris/Profiles/Solaris.html +1230 -0
- data/doc/Boris/Profiles/Structure.html +2050 -0
- data/doc/Boris/Profiles/UNIX.html +893 -0
- data/doc/Boris/Profiles/Windows.html +1846 -0
- data/doc/Boris/Profiles/Windows/Windows2003.html +304 -0
- data/doc/Boris/Profiles/Windows/Windows2008.html +379 -0
- data/doc/Boris/Profiles/Windows/Windows2012.html +304 -0
- data/doc/Boris/SNMPConnector.html +512 -0
- data/doc/Boris/SSHConnector.html +633 -0
- data/doc/Boris/Target.html +2002 -0
- data/doc/Boris/WMIConnector.html +1134 -0
- data/doc/BorisLogger.html +217 -0
- data/doc/Hash.html +195 -0
- data/doc/String.html +1246 -0
- data/doc/_index.html +420 -0
- data/doc/class_list.html +53 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +328 -0
- data/doc/file.README.html +183 -0
- data/doc/file_list.html +55 -0
- data/doc/frames.html +28 -0
- data/doc/index.html +183 -0
- data/doc/js/app.js +214 -0
- data/doc/js/full_list.js +173 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +1468 -0
- data/doc/top-level-namespace.html +126 -0
- data/lib/boris.rb +30 -0
- data/lib/boris/connectors.rb +47 -0
- data/lib/boris/connectors/snmp.rb +56 -0
- data/lib/boris/connectors/ssh.rb +110 -0
- data/lib/boris/connectors/wmi.rb +186 -0
- data/lib/boris/errors.rb +17 -0
- data/lib/boris/helpers/array.rb +63 -0
- data/lib/boris/helpers/constants.rb +20 -0
- data/lib/boris/helpers/hash.rb +8 -0
- data/lib/boris/helpers/scrubber.rb +51 -0
- data/lib/boris/helpers/string.rb +130 -0
- data/lib/boris/lumberjack.rb +47 -0
- data/lib/boris/options.rb +86 -0
- data/lib/boris/profiles/linux/redhat.rb +77 -0
- data/lib/boris/profiles/linux_core.rb +216 -0
- data/lib/boris/profiles/unix/solaris.rb +307 -0
- data/lib/boris/profiles/unix_core.rb +85 -0
- data/lib/boris/profiles/windows/windows2003.rb +15 -0
- data/lib/boris/profiles/windows/windows2008.rb +23 -0
- data/lib/boris/profiles/windows/windows2012.rb +15 -0
- data/lib/boris/profiles/windows_core.rb +530 -0
- data/lib/boris/structure.rb +167 -0
- data/lib/boris/target.rb +340 -0
- data/test/connector_tests/test_snmp.rb +35 -0
- data/test/connector_tests/test_ssh.rb +51 -0
- data/test/connector_tests/test_wmi.rb +129 -0
- data/test/helper_tests/test_array.rb +25 -0
- data/test/helper_tests/test_hash.rb +10 -0
- data/test/helper_tests/test_string.rb +136 -0
- data/test/profile_tests/test_core_skeleton +107 -0
- data/test/profile_tests/test_linux_core.rb +331 -0
- data/test/profile_tests/test_redhat.rb +134 -0
- data/test/profile_tests/test_solaris.rb +523 -0
- data/test/profile_tests/test_unix_core.rb +117 -0
- data/test/profile_tests/test_windows.rb +536 -0
- data/test/setup_tests.rb +14 -0
- data/test/test_all.rb +8 -0
- data/test/test_options.rb +44 -0
- data/test/test_structure.rb +136 -0
- data/test/test_target.rb +146 -0
- metadata +241 -0
@@ -0,0 +1,304 @@
|
|
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
|
+
Module: Boris::Profiles::Windows::Windows2012
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.3
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../../../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../../../css/common.css" type="text/css" media="screen" 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#!" + escape(window.location.href);
|
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 (W)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../../../Boris.html" title="Boris (module)">Boris</a></span></span> » <span class='title'><span class='object_link'><a href="../../Profiles.html" title="Boris::Profiles (module)">Profiles</a></span></span> » <span class='title'><span class='object_link'><a href="../Windows.html" title="Boris::Profiles::Windows (module)">Windows</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">Windows2012</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>Module: Boris::Profiles::Windows::Windows2012
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
<dt class="r1">Includes:</dt>
|
79
|
+
<dd class="r1"><span class='object_link'><a href="../Windows.html" title="Boris::Profiles::Windows (module)">Boris::Profiles::Windows</a></span></dd>
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
<dt class="r2 last">Defined in:</dt>
|
86
|
+
<dd class="r2 last">lib/boris/profiles/windows/windows2012.rb</dd>
|
87
|
+
|
88
|
+
</dl>
|
89
|
+
<div class="clear"></div>
|
90
|
+
|
91
|
+
|
92
|
+
<h2>Constant Summary</h2>
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
<h2>Constant Summary</h2>
|
98
|
+
|
99
|
+
<h3 class="inherited">Constants included
|
100
|
+
from <span class='object_link'><a href="../Windows.html" title="Boris::Profiles::Windows (module)">Boris::Profiles::Windows</a></span></h3>
|
101
|
+
<p class="inherited"><span class='object_link'><a href="../Windows.html#APP32_KEYPATH-constant" title="Boris::Profiles::Windows::APP32_KEYPATH (constant)">APP32_KEYPATH</a></span>, <span class='object_link'><a href="../Windows.html#APP64_KEYPATH-constant" title="Boris::Profiles::Windows::APP64_KEYPATH (constant)">APP64_KEYPATH</a></span>, <span class='object_link'><a href="../Windows.html#DUPLEX_REG_VALS-constant" title="Boris::Profiles::Windows::DUPLEX_REG_VALS (constant)">DUPLEX_REG_VALS</a></span>, <span class='object_link'><a href="../Windows.html#IIS_KEYPATH-constant" title="Boris::Profiles::Windows::IIS_KEYPATH (constant)">IIS_KEYPATH</a></span>, <span class='object_link'><a href="../Windows.html#NIC_CFG_KEYPATH-constant" title="Boris::Profiles::Windows::NIC_CFG_KEYPATH (constant)">NIC_CFG_KEYPATH</a></span>, <span class='object_link'><a href="../Windows.html#ORACLE_KEYPATH-constant" title="Boris::Profiles::Windows::ORACLE_KEYPATH (constant)">ORACLE_KEYPATH</a></span>, <span class='object_link'><a href="../Windows.html#TCPIP_CFG_KEYPATH-constant" title="Boris::Profiles::Windows::TCPIP_CFG_KEYPATH (constant)">TCPIP_CFG_KEYPATH</a></span></p>
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
<h2>Instance Attribute Summary</h2>
|
107
|
+
|
108
|
+
<h3 class="inherited">Attributes included from <span class='object_link'><a href="../Structure.html" title="Boris::Profiles::Structure (module)">Structure</a></span></h3>
|
109
|
+
<p class="inherited"><span class='object_link'><a href="../Structure.html#file_systems-instance_method" title="Boris::Profiles::Structure#file_systems (method)">#file_systems</a></span>, <span class='object_link'><a href="../Structure.html#hardware-instance_method" title="Boris::Profiles::Structure#hardware (method)">#hardware</a></span>, <span class='object_link'><a href="../Structure.html#hosted_shares-instance_method" title="Boris::Profiles::Structure#hosted_shares (method)">#hosted_shares</a></span>, <span class='object_link'><a href="../Structure.html#installed_applications-instance_method" title="Boris::Profiles::Structure#installed_applications (method)">#installed_applications</a></span>, <span class='object_link'><a href="../Structure.html#installed_patches-instance_method" title="Boris::Profiles::Structure#installed_patches (method)">#installed_patches</a></span>, <span class='object_link'><a href="../Structure.html#installed_services-instance_method" title="Boris::Profiles::Structure#installed_services (method)">#installed_services</a></span>, <span class='object_link'><a href="../Structure.html#local_user_groups-instance_method" title="Boris::Profiles::Structure#local_user_groups (method)">#local_user_groups</a></span>, <span class='object_link'><a href="../Structure.html#network_id-instance_method" title="Boris::Profiles::Structure#network_id (method)">#network_id</a></span>, <span class='object_link'><a href="../Structure.html#network_interfaces-instance_method" title="Boris::Profiles::Structure#network_interfaces (method)">#network_interfaces</a></span>, <span class='object_link'><a href="../Structure.html#operating_system-instance_method" title="Boris::Profiles::Structure#operating_system (method)">#operating_system</a></span></p>
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
<h3 class="inherited">Attributes included from <span class='object_link'><a href="../../Lumberjack.html" title="Boris::Lumberjack (module)">Lumberjack</a></span></h3>
|
114
|
+
<p class="inherited"><span class='object_link'><a href="../../Lumberjack.html#logger-instance_method" title="Boris::Lumberjack#logger (method)">#logger</a></span></p>
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
<h2>
|
119
|
+
Class Method Summary
|
120
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
121
|
+
</h2>
|
122
|
+
|
123
|
+
<ul class="summary">
|
124
|
+
|
125
|
+
<li class="public ">
|
126
|
+
<span class="summary_signature">
|
127
|
+
|
128
|
+
<a href="#connection_type-class_method" title="connection_type (class method)">+ (Object) <strong>connection_type</strong> </a>
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
</span>
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
143
|
+
|
144
|
+
</li>
|
145
|
+
|
146
|
+
|
147
|
+
<li class="public ">
|
148
|
+
<span class="summary_signature">
|
149
|
+
|
150
|
+
<a href="#matches_target%3F-class_method" title="matches_target? (class method)">+ (Boolean) <strong>matches_target?</strong>(connector) </a>
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
</span>
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
165
|
+
|
166
|
+
</li>
|
167
|
+
|
168
|
+
|
169
|
+
</ul>
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="../Windows.html" title="Boris::Profiles::Windows (module)">Boris::Profiles::Windows</a></span></h3>
|
182
|
+
<p class="inherited"><span class='object_link'><a href="../Windows.html#get_file_systems-instance_method" title="Boris::Profiles::Windows#get_file_systems (method)">#get_file_systems</a></span>, <span class='object_link'><a href="../Windows.html#get_hardware-instance_method" title="Boris::Profiles::Windows#get_hardware (method)">#get_hardware</a></span>, <span class='object_link'><a href="../Windows.html#get_hosted_shares-instance_method" title="Boris::Profiles::Windows#get_hosted_shares (method)">#get_hosted_shares</a></span>, <span class='object_link'><a href="../Windows.html#get_installed_applications-instance_method" title="Boris::Profiles::Windows#get_installed_applications (method)">#get_installed_applications</a></span>, <span class='object_link'><a href="../Windows.html#get_installed_patches-instance_method" title="Boris::Profiles::Windows#get_installed_patches (method)">#get_installed_patches</a></span>, <span class='object_link'><a href="../Windows.html#get_installed_services-instance_method" title="Boris::Profiles::Windows#get_installed_services (method)">#get_installed_services</a></span>, <span class='object_link'><a href="../Windows.html#get_local_user_groups-instance_method" title="Boris::Profiles::Windows#get_local_user_groups (method)">#get_local_user_groups</a></span>, <span class='object_link'><a href="../Windows.html#get_network_id-instance_method" title="Boris::Profiles::Windows#get_network_id (method)">#get_network_id</a></span>, <span class='object_link'><a href="../Windows.html#get_network_interfaces-instance_method" title="Boris::Profiles::Windows#get_network_interfaces (method)">#get_network_interfaces</a></span>, <span class='object_link'><a href="../Windows.html#get_operating_system-instance_method" title="Boris::Profiles::Windows#get_operating_system (method)">#get_operating_system</a></span>, <span class='object_link'><a href="../Windows.html#get_product_key-instance_method" title="Boris::Profiles::Windows#get_product_key (method)">#get_product_key</a></span>, <span class='object_link'><a href="../Windows.html#get_username-instance_method" title="Boris::Profiles::Windows#get_username (method)">#get_username</a></span></p>
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="../Structure.html" title="Boris::Profiles::Structure (module)">Structure</a></span></h3>
|
193
|
+
<p class="inherited"><span class='object_link'><a href="../Structure.html#file_system_template-instance_method" title="Boris::Profiles::Structure#file_system_template (method)">#file_system_template</a></span>, <span class='object_link'><a href="../Structure.html#get_file_systems-instance_method" title="Boris::Profiles::Structure#get_file_systems (method)">#get_file_systems</a></span>, <span class='object_link'><a href="../Structure.html#get_hardware-instance_method" title="Boris::Profiles::Structure#get_hardware (method)">#get_hardware</a></span>, <span class='object_link'><a href="../Structure.html#get_hosted_shares-instance_method" title="Boris::Profiles::Structure#get_hosted_shares (method)">#get_hosted_shares</a></span>, <span class='object_link'><a href="../Structure.html#get_installed_applications-instance_method" title="Boris::Profiles::Structure#get_installed_applications (method)">#get_installed_applications</a></span>, <span class='object_link'><a href="../Structure.html#get_installed_patches-instance_method" title="Boris::Profiles::Structure#get_installed_patches (method)">#get_installed_patches</a></span>, <span class='object_link'><a href="../Structure.html#get_installed_services-instance_method" title="Boris::Profiles::Structure#get_installed_services (method)">#get_installed_services</a></span>, <span class='object_link'><a href="../Structure.html#get_local_user_groups-instance_method" title="Boris::Profiles::Structure#get_local_user_groups (method)">#get_local_user_groups</a></span>, <span class='object_link'><a href="../Structure.html#get_network_id-instance_method" title="Boris::Profiles::Structure#get_network_id (method)">#get_network_id</a></span>, <span class='object_link'><a href="../Structure.html#get_network_interfaces-instance_method" title="Boris::Profiles::Structure#get_network_interfaces (method)">#get_network_interfaces</a></span>, <span class='object_link'><a href="../Structure.html#get_operating_system-instance_method" title="Boris::Profiles::Structure#get_operating_system (method)">#get_operating_system</a></span>, <span class='object_link'><a href="../Structure.html#hosted_share_template-instance_method" title="Boris::Profiles::Structure#hosted_share_template (method)">#hosted_share_template</a></span>, <span class='object_link'><a href="../Structure.html#installed_application_template-instance_method" title="Boris::Profiles::Structure#installed_application_template (method)">#installed_application_template</a></span>, <span class='object_link'><a href="../Structure.html#installed_patch_template-instance_method" title="Boris::Profiles::Structure#installed_patch_template (method)">#installed_patch_template</a></span>, <span class='object_link'><a href="../Structure.html#installed_service_template-instance_method" title="Boris::Profiles::Structure#installed_service_template (method)">#installed_service_template</a></span>, <span class='object_link'><a href="../Structure.html#local_user_groups_template-instance_method" title="Boris::Profiles::Structure#local_user_groups_template (method)">#local_user_groups_template</a></span>, <span class='object_link'><a href="../Structure.html#network_interface_template-instance_method" title="Boris::Profiles::Structure#network_interface_template (method)">#network_interface_template</a></span>, <span class='object_link'><a href="../Structure.html#scrub_data%21-instance_method" title="Boris::Profiles::Structure#scrub_data! (method)">#scrub_data!</a></span></p>
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="../../Lumberjack.html" title="Boris::Lumberjack (module)">Lumberjack</a></span></h3>
|
204
|
+
<p class="inherited"><span class='object_link'><a href="../../Lumberjack.html#debug-instance_method" title="Boris::Lumberjack#debug (method)">#debug</a></span>, <span class='object_link'><a href="../../Lumberjack.html#error-instance_method" title="Boris::Lumberjack#error (method)">#error</a></span>, <span class='object_link'><a href="../../Lumberjack.html#fatal-instance_method" title="Boris::Lumberjack#fatal (method)">#fatal</a></span>, <span class='object_link'><a href="../../Lumberjack.html#info-instance_method" title="Boris::Lumberjack#info (method)">#info</a></span>, <span class='object_link'><a href="../../Lumberjack.html#warn-instance_method" title="Boris::Lumberjack#warn (method)">#warn</a></span></p>
|
205
|
+
|
206
|
+
|
207
|
+
<div id="class_method_details" class="method_details_list">
|
208
|
+
<h2>Class Method Details</h2>
|
209
|
+
|
210
|
+
|
211
|
+
<div class="method_details first">
|
212
|
+
<h3 class="signature first" id="connection_type-class_method">
|
213
|
+
|
214
|
+
+ (<tt>Object</tt>) <strong>connection_type</strong>
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
</h3><table class="source_code">
|
221
|
+
<tr>
|
222
|
+
<td>
|
223
|
+
<pre class="lines">
|
224
|
+
|
225
|
+
|
226
|
+
7
|
227
|
+
8
|
228
|
+
9</pre>
|
229
|
+
</td>
|
230
|
+
<td>
|
231
|
+
<pre class="code"><span class="info file"># File 'lib/boris/profiles/windows/windows2012.rb', line 7</span>
|
232
|
+
|
233
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_connection_type'>connection_type</span>
|
234
|
+
<span class='const'>Windows</span><span class='period'>.</span><span class='id identifier rubyid_connection_type'>connection_type</span>
|
235
|
+
<span class='kw'>end</span></pre>
|
236
|
+
</td>
|
237
|
+
</tr>
|
238
|
+
</table>
|
239
|
+
</div>
|
240
|
+
|
241
|
+
<div class="method_details ">
|
242
|
+
<h3 class="signature " id="matches_target?-class_method">
|
243
|
+
|
244
|
+
+ (<tt>Boolean</tt>) <strong>matches_target?</strong>(connector)
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
</h3><div class="docstring">
|
251
|
+
<div class="discussion">
|
252
|
+
|
253
|
+
|
254
|
+
</div>
|
255
|
+
</div>
|
256
|
+
<div class="tags">
|
257
|
+
|
258
|
+
<p class="tag_title">Returns:</p>
|
259
|
+
<ul class="return">
|
260
|
+
|
261
|
+
<li>
|
262
|
+
|
263
|
+
|
264
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
</li>
|
269
|
+
|
270
|
+
</ul>
|
271
|
+
|
272
|
+
</div><table class="source_code">
|
273
|
+
<tr>
|
274
|
+
<td>
|
275
|
+
<pre class="lines">
|
276
|
+
|
277
|
+
|
278
|
+
11
|
279
|
+
12
|
280
|
+
13</pre>
|
281
|
+
</td>
|
282
|
+
<td>
|
283
|
+
<pre class="code"><span class="info file"># File 'lib/boris/profiles/windows/windows2012.rb', line 11</span>
|
284
|
+
|
285
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_matches_target?'>matches_target?</span><span class='lparen'>(</span><span class='id identifier rubyid_connector'>connector</span><span class='rparen'>)</span>
|
286
|
+
<span class='kw'>return</span> <span class='kw'>true</span> <span class='kw'>if</span> <span class='id identifier rubyid_connector'>connector</span><span class='period'>.</span><span class='id identifier rubyid_value_at'>value_at</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>SELECT Name FROM Win32_OperatingSystem</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>2012</span><span class='regexp_end'>/</span></span>
|
287
|
+
<span class='kw'>end</span></pre>
|
288
|
+
</td>
|
289
|
+
</tr>
|
290
|
+
</table>
|
291
|
+
</div>
|
292
|
+
|
293
|
+
</div>
|
294
|
+
|
295
|
+
</div>
|
296
|
+
|
297
|
+
<div id="footer">
|
298
|
+
Generated on Sun Feb 3 16:32:42 2013 by
|
299
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
300
|
+
0.8.3 (ruby-1.9.3).
|
301
|
+
</div>
|
302
|
+
|
303
|
+
</body>
|
304
|
+
</html>
|
@@ -0,0 +1,512 @@
|
|
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: Boris::SNMPConnector
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.3
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" 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#!" + escape(window.location.href);
|
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 (S)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../Boris.html" title="Boris (module)">Boris</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">SNMPConnector</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: Boris::SNMPConnector
|
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"><span class='object_link'><a href="Connector.html" title="Boris::Connector (class)">Connector</a></span></span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next"><span class='object_link'><a href="Connector.html" title="Boris::Connector (class)">Connector</a></span></li>
|
82
|
+
|
83
|
+
<li class="next">Boris::SNMPConnector</li>
|
84
|
+
|
85
|
+
</ul>
|
86
|
+
<a href="#" class="inheritanceTree">show all</a>
|
87
|
+
|
88
|
+
</dd>
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
<dt class="r2 last">Defined in:</dt>
|
99
|
+
<dd class="r2 last">lib/boris/connectors/snmp.rb</dd>
|
100
|
+
|
101
|
+
</dl>
|
102
|
+
<div class="clear"></div>
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
<h2>Instance Attribute Summary</h2>
|
111
|
+
|
112
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Connector.html" title="Boris::Connector (class)">Connector</a></span></h3>
|
113
|
+
<p class="inherited"><span class='object_link'><a href="Connector.html#connected-instance_method" title="Boris::Connector#connected (method)">#connected</a></span>, <span class='object_link'><a href="Connector.html#host-instance_method" title="Boris::Connector#host (method)">#host</a></span>, <span class='object_link'><a href="Connector.html#options-instance_method" title="Boris::Connector#options (method)">#options</a></span>, <span class='object_link'><a href="Connector.html#reconnectable-instance_method" title="Boris::Connector#reconnectable (method)">#reconnectable</a></span></p>
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
<h3 class="inherited">Attributes included from <span class='object_link'><a href="Lumberjack.html" title="Boris::Lumberjack (module)">Lumberjack</a></span></h3>
|
118
|
+
<p class="inherited"><span class='object_link'><a href="Lumberjack.html#logger-instance_method" title="Boris::Lumberjack#logger (method)">#logger</a></span></p>
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
<h2>
|
123
|
+
Instance Method Summary
|
124
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
125
|
+
</h2>
|
126
|
+
|
127
|
+
<ul class="summary">
|
128
|
+
|
129
|
+
<li class="public ">
|
130
|
+
<span class="summary_signature">
|
131
|
+
|
132
|
+
<a href="#disconnect-instance_method" title="#disconnect (instance method)">- (Object) <strong>disconnect</strong> </a>
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
</span>
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
147
|
+
|
148
|
+
</li>
|
149
|
+
|
150
|
+
|
151
|
+
<li class="public ">
|
152
|
+
<span class="summary_signature">
|
153
|
+
|
154
|
+
<a href="#establish_connection-instance_method" title="#establish_connection (instance method)">- (Object) <strong>establish_connection</strong> </a>
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
</span>
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
169
|
+
|
170
|
+
</li>
|
171
|
+
|
172
|
+
|
173
|
+
<li class="public ">
|
174
|
+
<span class="summary_signature">
|
175
|
+
|
176
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (SNMPConnector) <strong>initialize</strong>(host, cred, options, logger = nil) </a>
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
</span>
|
181
|
+
|
182
|
+
|
183
|
+
<span class="note title constructor">constructor</span>
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
<span class="summary_desc"><div class='inline'>
|
193
|
+
<p>A new instance of SNMPConnector.</p>
|
194
|
+
</div></span>
|
195
|
+
|
196
|
+
</li>
|
197
|
+
|
198
|
+
|
199
|
+
<li class="public ">
|
200
|
+
<span class="summary_signature">
|
201
|
+
|
202
|
+
<a href="#value_at-instance_method" title="#value_at (instance method)">- (Object) <strong>value_at</strong>(request) </a>
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
</span>
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
217
|
+
|
218
|
+
</li>
|
219
|
+
|
220
|
+
|
221
|
+
<li class="public ">
|
222
|
+
<span class="summary_signature">
|
223
|
+
|
224
|
+
<a href="#values_at-instance_method" title="#values_at (instance method)">- (Object) <strong>values_at</strong>(request, limit = nil) </a>
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
</span>
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
239
|
+
|
240
|
+
</li>
|
241
|
+
|
242
|
+
|
243
|
+
</ul>
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Connector.html" title="Boris::Connector (class)">Connector</a></span></h3>
|
256
|
+
<p class="inherited"><span class='object_link'><a href="Connector.html#connected%3F-instance_method" title="Boris::Connector#connected? (method)">#connected?</a></span></p>
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="Lumberjack.html" title="Boris::Lumberjack (module)">Lumberjack</a></span></h3>
|
267
|
+
<p class="inherited"><span class='object_link'><a href="Lumberjack.html#debug-instance_method" title="Boris::Lumberjack#debug (method)">#debug</a></span>, <span class='object_link'><a href="Lumberjack.html#error-instance_method" title="Boris::Lumberjack#error (method)">#error</a></span>, <span class='object_link'><a href="Lumberjack.html#fatal-instance_method" title="Boris::Lumberjack#fatal (method)">#fatal</a></span>, <span class='object_link'><a href="Lumberjack.html#info-instance_method" title="Boris::Lumberjack#info (method)">#info</a></span>, <span class='object_link'><a href="Lumberjack.html#warn-instance_method" title="Boris::Lumberjack#warn (method)">#warn</a></span></p>
|
268
|
+
<div id="constructor_details" class="method_details_list">
|
269
|
+
<h2>Constructor Details</h2>
|
270
|
+
|
271
|
+
<div class="method_details first">
|
272
|
+
<h3 class="signature first" id="initialize-instance_method">
|
273
|
+
|
274
|
+
- (<tt><span class='object_link'><a href="" title="Boris::SNMPConnector (class)">SNMPConnector</a></span></tt>) <strong>initialize</strong>(host, cred, options, logger = nil)
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
</h3><div class="docstring">
|
281
|
+
<div class="discussion">
|
282
|
+
|
283
|
+
<p>A new instance of SNMPConnector</p>
|
284
|
+
|
285
|
+
|
286
|
+
</div>
|
287
|
+
</div>
|
288
|
+
<div class="tags">
|
289
|
+
|
290
|
+
|
291
|
+
</div><table class="source_code">
|
292
|
+
<tr>
|
293
|
+
<td>
|
294
|
+
<pre class="lines">
|
295
|
+
|
296
|
+
|
297
|
+
5
|
298
|
+
6
|
299
|
+
7
|
300
|
+
8
|
301
|
+
9
|
302
|
+
10
|
303
|
+
11</pre>
|
304
|
+
</td>
|
305
|
+
<td>
|
306
|
+
<pre class="code"><span class="info file"># File 'lib/boris/connectors/snmp.rb', line 5</span>
|
307
|
+
|
308
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_host'>host</span><span class='comma'>,</span> <span class='id identifier rubyid_cred'>cred</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='id identifier rubyid_logger'>logger</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
|
309
|
+
<span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_host'>host</span><span class='comma'>,</span> <span class='id identifier rubyid_cred'>cred</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='id identifier rubyid_logger'>logger</span><span class='rparen'>)</span>
|
310
|
+
<span class='ivar'>@snmp_options</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:snmp_options</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='symbol'>:host</span><span class='op'>=></span><span class='ivar'>@host</span><span class='comma'>,</span> <span class='symbol'>:version</span><span class='op'>=></span><span class='symbol'>:SNMPv1</span><span class='comma'>,</span> <span class='symbol'>:community</span><span class='op'>=></span><span class='ivar'>@user</span><span class='rparen'>)</span>
|
311
|
+
|
312
|
+
<span class='comment'>#snmp connections are always reconnectable
|
313
|
+
</span> <span class='ivar'>@reconnectable</span> <span class='op'>=</span> <span class='kw'>true</span>
|
314
|
+
<span class='kw'>end</span></pre>
|
315
|
+
</td>
|
316
|
+
</tr>
|
317
|
+
</table>
|
318
|
+
</div>
|
319
|
+
|
320
|
+
</div>
|
321
|
+
|
322
|
+
|
323
|
+
<div id="instance_method_details" class="method_details_list">
|
324
|
+
<h2>Instance Method Details</h2>
|
325
|
+
|
326
|
+
|
327
|
+
<div class="method_details first">
|
328
|
+
<h3 class="signature first" id="disconnect-instance_method">
|
329
|
+
|
330
|
+
- (<tt>Object</tt>) <strong>disconnect</strong>
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
</h3><table class="source_code">
|
337
|
+
<tr>
|
338
|
+
<td>
|
339
|
+
<pre class="lines">
|
340
|
+
|
341
|
+
|
342
|
+
13
|
343
|
+
14
|
344
|
+
15
|
345
|
+
16
|
346
|
+
17</pre>
|
347
|
+
</td>
|
348
|
+
<td>
|
349
|
+
<pre class="code"><span class="info file"># File 'lib/boris/connectors/snmp.rb', line 13</span>
|
350
|
+
|
351
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_disconnect'>disconnect</span>
|
352
|
+
<span class='kw'>super</span>
|
353
|
+
<span class='ivar'>@transport</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
354
|
+
<span class='id identifier rubyid_debug'>debug</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>connections closed</span><span class='tstring_end'>'</span></span>
|
355
|
+
<span class='kw'>end</span></pre>
|
356
|
+
</td>
|
357
|
+
</tr>
|
358
|
+
</table>
|
359
|
+
</div>
|
360
|
+
|
361
|
+
<div class="method_details ">
|
362
|
+
<h3 class="signature " id="establish_connection-instance_method">
|
363
|
+
|
364
|
+
- (<tt>Object</tt>) <strong>establish_connection</strong>
|
365
|
+
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
|
370
|
+
</h3><table class="source_code">
|
371
|
+
<tr>
|
372
|
+
<td>
|
373
|
+
<pre class="lines">
|
374
|
+
|
375
|
+
|
376
|
+
19
|
377
|
+
20
|
378
|
+
21
|
379
|
+
22
|
380
|
+
23
|
381
|
+
24
|
382
|
+
25
|
383
|
+
26
|
384
|
+
27
|
385
|
+
28
|
386
|
+
29
|
387
|
+
30
|
388
|
+
31
|
389
|
+
32
|
390
|
+
33
|
391
|
+
34</pre>
|
392
|
+
</td>
|
393
|
+
<td>
|
394
|
+
<pre class="code"><span class="info file"># File 'lib/boris/connectors/snmp.rb', line 19</span>
|
395
|
+
|
396
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_establish_connection'>establish_connection</span>
|
397
|
+
<span class='kw'>super</span>
|
398
|
+
|
399
|
+
<span class='kw'>begin</span>
|
400
|
+
<span class='ivar'>@transport</span> <span class='op'>=</span> <span class='const'>SNMP</span><span class='op'>::</span><span class='const'>Manager</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='ivar'>@snmp_options</span><span class='rparen'>)</span>
|
401
|
+
<span class='id identifier rubyid_value_at'>value_at</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>sysDescr</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
402
|
+
<span class='id identifier rubyid_debug'>debug</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>connection established</span><span class='tstring_end'>'</span></span>
|
403
|
+
<span class='ivar'>@connected</span> <span class='op'>=</span> <span class='kw'>true</span>
|
404
|
+
<span class='kw'>rescue</span> <span class='const'>SNMP</span><span class='op'>::</span><span class='const'>RequestTimeout</span>
|
405
|
+
<span class='id identifier rubyid_warn'>warn</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>connection failed (connection timeout)</span><span class='tstring_end'>'</span></span>
|
406
|
+
<span class='kw'>rescue</span> <span class='op'>=></span> <span class='id identifier rubyid_error'>error</span>
|
407
|
+
<span class='id identifier rubyid_warn'>warn</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>connection failed (</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_error'>error</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span><span class='rbrace'>}</span><span class='tstring_content'>)</span><span class='tstring_end'>"</span></span>
|
408
|
+
<span class='kw'>end</span>
|
409
|
+
|
410
|
+
<span class='kw'>return</span> <span class='kw'>self</span>
|
411
|
+
<span class='kw'>end</span></pre>
|
412
|
+
</td>
|
413
|
+
</tr>
|
414
|
+
</table>
|
415
|
+
</div>
|
416
|
+
|
417
|
+
<div class="method_details ">
|
418
|
+
<h3 class="signature " id="value_at-instance_method">
|
419
|
+
|
420
|
+
- (<tt>Object</tt>) <strong>value_at</strong>(request)
|
421
|
+
|
422
|
+
|
423
|
+
|
424
|
+
|
425
|
+
|
426
|
+
</h3><table class="source_code">
|
427
|
+
<tr>
|
428
|
+
<td>
|
429
|
+
<pre class="lines">
|
430
|
+
|
431
|
+
|
432
|
+
36
|
433
|
+
37
|
434
|
+
38</pre>
|
435
|
+
</td>
|
436
|
+
<td>
|
437
|
+
<pre class="code"><span class="info file"># File 'lib/boris/connectors/snmp.rb', line 36</span>
|
438
|
+
|
439
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_value_at'>value_at</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='rparen'>)</span>
|
440
|
+
<span class='id identifier rubyid_values_at'>values_at</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='comma'>,</span> <span class='int'>1</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
|
441
|
+
<span class='kw'>end</span></pre>
|
442
|
+
</td>
|
443
|
+
</tr>
|
444
|
+
</table>
|
445
|
+
</div>
|
446
|
+
|
447
|
+
<div class="method_details ">
|
448
|
+
<h3 class="signature " id="values_at-instance_method">
|
449
|
+
|
450
|
+
- (<tt>Object</tt>) <strong>values_at</strong>(request, limit = nil)
|
451
|
+
|
452
|
+
|
453
|
+
|
454
|
+
|
455
|
+
|
456
|
+
</h3><table class="source_code">
|
457
|
+
<tr>
|
458
|
+
<td>
|
459
|
+
<pre class="lines">
|
460
|
+
|
461
|
+
|
462
|
+
40
|
463
|
+
41
|
464
|
+
42
|
465
|
+
43
|
466
|
+
44
|
467
|
+
45
|
468
|
+
46
|
469
|
+
47
|
470
|
+
48
|
471
|
+
49
|
472
|
+
50
|
473
|
+
51
|
474
|
+
52
|
475
|
+
53
|
476
|
+
54</pre>
|
477
|
+
</td>
|
478
|
+
<td>
|
479
|
+
<pre class="code"><span class="info file"># File 'lib/boris/connectors/snmp.rb', line 40</span>
|
480
|
+
|
481
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_values_at'>values_at</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='comma'>,</span> <span class='id identifier rubyid_limit'>limit</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
|
482
|
+
<span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='comma'>,</span> <span class='id identifier rubyid_limit'>limit</span><span class='rparen'>)</span>
|
483
|
+
|
484
|
+
<span class='id identifier rubyid_return_data'>return_data</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
485
|
+
|
486
|
+
<span class='ivar'>@transport</span><span class='period'>.</span><span class='id identifier rubyid_walk'>walk</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_row'>row</span><span class='op'>|</span>
|
487
|
+
<span class='id identifier rubyid_row'>row</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_item'>item</span><span class='op'>|</span> <span class='id identifier rubyid_return_data'>return_data</span> <span class='op'><<</span> <span class='lbrace'>{</span><span class='symbol'>:name</span><span class='op'>=></span><span class='id identifier rubyid_item'>item</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='comma'>,</span> <span class='symbol'>:value</span><span class='op'>=></span><span class='id identifier rubyid_item'>item</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='rbrace'>}</span><span class='rbrace'>}</span>
|
488
|
+
<span class='kw'>end</span>
|
489
|
+
|
490
|
+
<span class='id identifier rubyid_info'>info</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_return_data'>return_data</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span><span class='rbrace'>}</span><span class='tstring_content'> row(s) returned</span><span class='tstring_end'>"</span></span>
|
491
|
+
|
492
|
+
<span class='id identifier rubyid_limit'>limit</span> <span class='op'>=</span> <span class='id identifier rubyid_return_data'>return_data</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='kw'>if</span> <span class='id identifier rubyid_limit'>limit</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
493
|
+
|
494
|
+
<span class='id identifier rubyid_return_data'>return_data</span><span class='lbracket'>[</span><span class='int'>0</span><span class='op'>..</span><span class='id identifier rubyid_limit'>limit</span><span class='rbracket'>]</span>
|
495
|
+
<span class='kw'>end</span></pre>
|
496
|
+
</td>
|
497
|
+
</tr>
|
498
|
+
</table>
|
499
|
+
</div>
|
500
|
+
|
501
|
+
</div>
|
502
|
+
|
503
|
+
</div>
|
504
|
+
|
505
|
+
<div id="footer">
|
506
|
+
Generated on Sun Feb 3 16:32:43 2013 by
|
507
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
508
|
+
0.8.3 (ruby-1.9.3).
|
509
|
+
</div>
|
510
|
+
|
511
|
+
</body>
|
512
|
+
</html>
|