dashboard-api 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,527 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Module: Switchports
8
+
9
+ &mdash; Documentation by YARD 0.9.5
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
+ pathId = "Switchports";
19
+ relpath = '';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="class_list.html"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="_index.html">Index (S)</a> &raquo;
40
+
41
+
42
+ <span class="title">Switchports</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <iframe id="search_frame" src="class_list.html"></iframe>
63
+
64
+ <div id="content"><h1>Module: Switchports
65
+
66
+
67
+
68
+ </h1>
69
+ <div class="box_info">
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <dl>
80
+ <dt>Included in:</dt>
81
+ <dd><span class='object_link'><a href="DashboardAPI.html" title="DashboardAPI (class)">DashboardAPI</a></span></dd>
82
+ </dl>
83
+
84
+
85
+
86
+ <dl>
87
+ <dt>Defined in:</dt>
88
+ <dd>lib/switchports.rb</dd>
89
+ </dl>
90
+
91
+ </div>
92
+
93
+ <h2>Overview</h2><div class="docstring">
94
+ <div class="discussion">
95
+
96
+ <p>Switchports section of the Meraki Dashboard API</p>
97
+
98
+
99
+ </div>
100
+ </div>
101
+ <div class="tags">
102
+
103
+ <p class="tag_title">Author:</p>
104
+ <ul class="author">
105
+
106
+ <li>
107
+
108
+
109
+
110
+
111
+
112
+ <div class='inline'>
113
+ <p>Joe Letizia</p>
114
+ </div>
115
+
116
+ </li>
117
+
118
+ </ul>
119
+
120
+ </div>
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+ <h2>
129
+ Instance Method Summary
130
+ <small><a href="#" class="summary_toggle">collapse</a></small>
131
+ </h2>
132
+
133
+ <ul class="summary">
134
+
135
+ <li class="public ">
136
+ <span class="summary_signature">
137
+
138
+ <a href="#get_single_switch_port-instance_method" title="#get_single_switch_port (instance method)">#<strong>get_single_switch_port</strong>(device_serial, port_number) &#x21d2; Hash </a>
139
+
140
+
141
+
142
+ </span>
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+ <span class="summary_desc"><div class='inline'>
153
+ <p>Get configuration for a single switch port.</p>
154
+ </div></span>
155
+
156
+ </li>
157
+
158
+
159
+ <li class="public ">
160
+ <span class="summary_signature">
161
+
162
+ <a href="#get_switch_ports-instance_method" title="#get_switch_ports (instance method)">#<strong>get_switch_ports</strong>(device_serial) &#x21d2; Array </a>
163
+
164
+
165
+
166
+ </span>
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+ <span class="summary_desc"><div class='inline'>
177
+ <p>Get configuration for all switchports on a given switch.</p>
178
+ </div></span>
179
+
180
+ </li>
181
+
182
+
183
+ <li class="public ">
184
+ <span class="summary_signature">
185
+
186
+ <a href="#update_switchport-instance_method" title="#update_switchport (instance method)">#<strong>update_switchport</strong>(device_serial, port_number, options) &#x21d2; Hash </a>
187
+
188
+
189
+
190
+ </span>
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+ <span class="summary_desc"><div class='inline'>
201
+ <p>Update the attributes for a given switchport.</p>
202
+ </div></span>
203
+
204
+ </li>
205
+
206
+
207
+ </ul>
208
+
209
+
210
+
211
+
212
+ <div id="instance_method_details" class="method_details_list">
213
+ <h2>Instance Method Details</h2>
214
+
215
+
216
+ <div class="method_details first">
217
+ <h3 class="signature first" id="get_single_switch_port-instance_method">
218
+
219
+ #<strong>get_single_switch_port</strong>(device_serial, port_number) &#x21d2; <tt>Hash</tt>
220
+
221
+
222
+
223
+
224
+
225
+ </h3><div class="docstring">
226
+ <div class="discussion">
227
+
228
+ <p>Get configuration for a single switch port</p>
229
+
230
+
231
+ </div>
232
+ </div>
233
+ <div class="tags">
234
+ <p class="tag_title">Parameters:</p>
235
+ <ul class="param">
236
+
237
+ <li>
238
+
239
+ <span class='name'>device_serial</span>
240
+
241
+
242
+ <span class='type'>(<tt>String</tt>)</span>
243
+
244
+
245
+
246
+ &mdash;
247
+ <div class='inline'>
248
+ <p>meraki serial number of the switch</p>
249
+ </div>
250
+
251
+ </li>
252
+
253
+ <li>
254
+
255
+ <span class='name'>port_number</span>
256
+
257
+
258
+ <span class='type'>(<tt>Integer</tt>)</span>
259
+
260
+
261
+
262
+ &mdash;
263
+ <div class='inline'>
264
+ <p>port number you want to modify</p>
265
+ </div>
266
+
267
+ </li>
268
+
269
+ </ul>
270
+
271
+ <p class="tag_title">Returns:</p>
272
+ <ul class="return">
273
+
274
+ <li>
275
+
276
+
277
+ <span class='type'>(<tt>Hash</tt>)</span>
278
+
279
+
280
+
281
+ &mdash;
282
+ <div class='inline'>
283
+ <p>hash of the switch ports attributes</p>
284
+ </div>
285
+
286
+ </li>
287
+
288
+ </ul>
289
+
290
+ </div><table class="source_code">
291
+ <tr>
292
+ <td>
293
+ <pre class="lines">
294
+
295
+
296
+ 15
297
+ 16
298
+ 17
299
+ 18</pre>
300
+ </td>
301
+ <td>
302
+ <pre class="code"><span class="info file"># File 'lib/switchports.rb', line 15</span>
303
+
304
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_single_switch_port'>get_single_switch_port</span><span class='lparen'>(</span><span class='id identifier rubyid_device_serial'>device_serial</span><span class='comma'>,</span> <span class='id identifier rubyid_port_number'>port_number</span><span class='rparen'>)</span>
305
+ <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Invalid switchport provided</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_port_number'>port_number</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Integer</span><span class='rparen'>)</span>
306
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_make_api_call'>make_api_call</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/devices/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_device_serial'>device_serial</span><span class='embexpr_end'>}</span><span class='tstring_content'>/switchPorts/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_port_number'>port_number</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>GET</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
307
+ <span class='kw'>end</span></pre>
308
+ </td>
309
+ </tr>
310
+ </table>
311
+ </div>
312
+
313
+ <div class="method_details ">
314
+ <h3 class="signature " id="get_switch_ports-instance_method">
315
+
316
+ #<strong>get_switch_ports</strong>(device_serial) &#x21d2; <tt>Array</tt>
317
+
318
+
319
+
320
+
321
+
322
+ </h3><div class="docstring">
323
+ <div class="discussion">
324
+
325
+ <p>Get configuration for all switchports on a given switch</p>
326
+
327
+
328
+ </div>
329
+ </div>
330
+ <div class="tags">
331
+ <p class="tag_title">Parameters:</p>
332
+ <ul class="param">
333
+
334
+ <li>
335
+
336
+ <span class='name'>device_serial</span>
337
+
338
+
339
+ <span class='type'>(<tt>String</tt>)</span>
340
+
341
+
342
+
343
+ &mdash;
344
+ <div class='inline'>
345
+ <p>meraki serial number of the switch</p>
346
+ </div>
347
+
348
+ </li>
349
+
350
+ </ul>
351
+
352
+ <p class="tag_title">Returns:</p>
353
+ <ul class="return">
354
+
355
+ <li>
356
+
357
+
358
+ <span class='type'>(<tt>Array</tt>)</span>
359
+
360
+
361
+
362
+ &mdash;
363
+ <div class='inline'>
364
+ <p>an array of Hashes, each containing the switchports attributes /
365
+ configuration</p>
366
+ </div>
367
+
368
+ </li>
369
+
370
+ </ul>
371
+
372
+ </div><table class="source_code">
373
+ <tr>
374
+ <td>
375
+ <pre class="lines">
376
+
377
+
378
+ 7
379
+ 8
380
+ 9</pre>
381
+ </td>
382
+ <td>
383
+ <pre class="code"><span class="info file"># File 'lib/switchports.rb', line 7</span>
384
+
385
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_switch_ports'>get_switch_ports</span><span class='lparen'>(</span><span class='id identifier rubyid_device_serial'>device_serial</span><span class='rparen'>)</span>
386
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_make_api_call'>make_api_call</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/devices/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_device_serial'>device_serial</span><span class='embexpr_end'>}</span><span class='tstring_content'>/switchPorts</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>GET</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
387
+ <span class='kw'>end</span></pre>
388
+ </td>
389
+ </tr>
390
+ </table>
391
+ </div>
392
+
393
+ <div class="method_details ">
394
+ <h3 class="signature " id="update_switchport-instance_method">
395
+
396
+ #<strong>update_switchport</strong>(device_serial, port_number, options) &#x21d2; <tt>Hash</tt>
397
+
398
+
399
+
400
+
401
+
402
+ </h3><div class="docstring">
403
+ <div class="discussion">
404
+
405
+ <p>Update the attributes for a given switchport</p>
406
+
407
+
408
+ </div>
409
+ </div>
410
+ <div class="tags">
411
+ <p class="tag_title">Parameters:</p>
412
+ <ul class="param">
413
+
414
+ <li>
415
+
416
+ <span class='name'>device_serial</span>
417
+
418
+
419
+ <span class='type'>(<tt>String</tt>)</span>
420
+
421
+
422
+
423
+ &mdash;
424
+ <div class='inline'>
425
+ <p>meraki serial number of the switch</p>
426
+ </div>
427
+
428
+ </li>
429
+
430
+ <li>
431
+
432
+ <span class='name'>port_number</span>
433
+
434
+
435
+ <span class='type'>(<tt>Integer</tt>)</span>
436
+
437
+
438
+
439
+ &mdash;
440
+ <div class='inline'>
441
+ <p>port number you want to modify</p>
442
+ </div>
443
+
444
+ </li>
445
+
446
+ <li>
447
+
448
+ <span class='name'>options</span>
449
+
450
+
451
+ <span class='type'>(<tt>Hash</tt>)</span>
452
+
453
+
454
+
455
+ &mdash;
456
+ <div class='inline'>
457
+ <p>hash of attributes. Keys can include name, tags, enabled, type, vlan,
458
+ voiceVlan allowedVlans, poeEnabled, isolationEnabled, rstpEnabled,
459
+ stpGuard, accessPolicyNumber. For values to these keys, please refer to the
460
+ official Meraki Dashboard API documentation.</p>
461
+ </div>
462
+
463
+ </li>
464
+
465
+ </ul>
466
+
467
+ <p class="tag_title">Returns:</p>
468
+ <ul class="return">
469
+
470
+ <li>
471
+
472
+
473
+ <span class='type'>(<tt>Hash</tt>)</span>
474
+
475
+
476
+
477
+ &mdash;
478
+ <div class='inline'>
479
+ <p>hash of the update port attributes</p>
480
+ </div>
481
+
482
+ </li>
483
+
484
+ </ul>
485
+
486
+ </div><table class="source_code">
487
+ <tr>
488
+ <td>
489
+ <pre class="lines">
490
+
491
+
492
+ 26
493
+ 27
494
+ 28
495
+ 29
496
+ 30
497
+ 31
498
+ 32</pre>
499
+ </td>
500
+ <td>
501
+ <pre class="code"><span class="info file"># File 'lib/switchports.rb', line 26</span>
502
+
503
+ <span class='kw'>def</span> <span class='id identifier rubyid_update_switchport'>update_switchport</span><span class='lparen'>(</span><span class='id identifier rubyid_device_serial'>device_serial</span><span class='comma'>,</span> <span class='id identifier rubyid_port_number'>port_number</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
504
+ <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Options were not passed as a Hash</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Hash</span><span class='rparen'>)</span>
505
+ <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Invalid switchport provided</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_port_number'>port_number</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Integer</span><span class='rparen'>)</span>
506
+ <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='symbol'>:body</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_options'>options</span><span class='rbrace'>}</span>
507
+
508
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_make_api_call'>make_api_call</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/devices/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_device_serial'>device_serial</span><span class='embexpr_end'>}</span><span class='tstring_content'>/switchPorts/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_port_number'>port_number</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>PUT</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
509
+ <span class='kw'>end</span></pre>
510
+ </td>
511
+ </tr>
512
+ </table>
513
+ </div>
514
+
515
+ </div>
516
+
517
+ </div>
518
+
519
+ <div id="footer">
520
+ Generated on Tue Nov 15 22:02:45 2016 by
521
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
522
+ 0.9.5 (ruby-2.3.0).
523
+ </div>
524
+
525
+ </div>
526
+ </body>
527
+ </html>