dashboard-api 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +34 -0
- data/.gitignore +5 -4
- data/.travis.yml +20 -0
- data/Gemfile +9 -5
- data/Gemfile.lock +63 -31
- data/README.md +134 -138
- data/Rakefile +9 -7
- data/dashboard-api.gemspec +28 -28
- data/doc/Admins.html +603 -603
- data/doc/Clients.html +276 -276
- data/doc/DashboardAPI.html +603 -603
- data/doc/DashboardAPIVersion.html +159 -159
- data/doc/Devices.html +879 -879
- data/doc/Networks.html +1382 -1382
- data/doc/Organizations.html +1477 -1477
- data/doc/Phones.html +641 -641
- data/doc/SAML.html +758 -758
- data/doc/SSIDs.html +523 -523
- data/doc/Switchports.html +526 -526
- data/doc/Templates.html +378 -378
- data/doc/VLANs.html +762 -762
- data/doc/_index.html +235 -235
- data/doc/class_list.html +51 -51
- data/doc/css/full_list.css +58 -58
- data/doc/css/style.css +481 -481
- data/doc/file.README.html +248 -248
- data/doc/file_list.html +56 -56
- data/doc/frames.html +17 -17
- data/doc/index.html +248 -248
- data/doc/js/app.js +243 -243
- data/doc/js/full_list.js +216 -216
- data/doc/js/jquery.js +3 -3
- data/doc/method_list.html +523 -523
- data/doc/top-level-namespace.html +113 -113
- data/lib/admins.rb +37 -37
- data/lib/clients.rb +12 -12
- data/lib/dashboard-api.rb +82 -83
- data/lib/dashboard-api/version.rb +6 -6
- data/lib/devices.rb +57 -57
- data/lib/networks.rb +108 -108
- data/lib/organizations.rb +110 -115
- data/lib/phones.rb +40 -40
- data/lib/saml.rb +47 -47
- data/lib/ssids.rb +33 -33
- data/lib/switchports.rb +33 -33
- data/lib/templates.rb +18 -18
- data/lib/vlans.rb +49 -49
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76f99b3ba5f01a335d52b5578bb6e9543076e81e
|
4
|
+
data.tar.gz: 12731012f9e74c580c0d07351dcd8e11438fc561
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad02d784855e57a5a0ad6098744cdca5f73c31cfe0da99f0ff4aa7a5b6032a78575ffe403a25cff7fa556893bf3b100c8005740bba4ba32c2184c2f635d09211
|
7
|
+
data.tar.gz: d1fd20cca6cf3ba00def18c6e11ef5ac0b43eb0559315ef3915e9ffa9fa732d2c7fd254b77e47403be910c98cc6b2052ab5097011745ed946295c24d7c2bc6fc
|
data/.codeclimate.yml
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
---
|
2
|
+
engines:
|
3
|
+
bundler-audit:
|
4
|
+
enabled: true
|
5
|
+
csslint:
|
6
|
+
enabled: true
|
7
|
+
duplication:
|
8
|
+
enabled: true
|
9
|
+
config:
|
10
|
+
languages:
|
11
|
+
- ruby
|
12
|
+
- javascript
|
13
|
+
- python
|
14
|
+
- php
|
15
|
+
eslint:
|
16
|
+
enabled: true
|
17
|
+
fixme:
|
18
|
+
enabled: true
|
19
|
+
rubocop:
|
20
|
+
enabled: true
|
21
|
+
ratings:
|
22
|
+
paths:
|
23
|
+
- Gemfile.lock
|
24
|
+
- "**.css"
|
25
|
+
- "**.inc"
|
26
|
+
- "**.js"
|
27
|
+
- "**.jsx"
|
28
|
+
- "**.module"
|
29
|
+
- "**.php"
|
30
|
+
- "**.py"
|
31
|
+
- "**.rb"
|
32
|
+
exclude_paths:
|
33
|
+
- test/
|
34
|
+
- doc/
|
data/.gitignore
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
fixtures/
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
fixtures/
|
2
|
+
tools/
|
3
|
+
.yardoc
|
4
|
+
_Yardoc
|
5
|
+
.DS_Store
|
data/.travis.yml
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
language: ruby
|
2
|
+
rvm:
|
3
|
+
- 2.3.0
|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O51GuuFZ4opvOXN1eX/Op3BKCGK2q0YAo028f5Um9m/zPenwwAWfUx/gg+NL4TTqDzRZ5s2AxJUl1P0HZG419N6RRk0UeCqK/qS/g39qS063nF6ecNDg4uvvxQerY1yDQ40XehEVrSuJRZz7AX3NOaSiv90yUGGqP1QkyZk0oAaNmuBgyaZRB3b/hzueDBkoWBPXKwxdMCQSwjDVZKW+mjGH3AH5nRa6AV2bPLHUCwJa2W48HEMoZpMnDgORWPD/2bEmBVH4Iey0WbRFN3T9srpfku72CVqrVZ0it+OWxvYSnp2zWJy4TIpJt4N45gZ52Sb8Eksm26HF4gULuRQzt+LiDzPiaM88Se4Yu478mlT5TSDcr/pwcrgPHVcmwbRjeFwXgYTt0AW0iCM9tdelU2zEcdbC0bQNudqbkzaWTJtnwqPq2GlNLd/J0dCbhhgHOliZmP8EYlclIj9wl5AOPJw+XSZy/x0fUsh6imLY4CHuMcPBtIhA3VQ5U3uXYeZreaJgZx5nU4b3nWkpatwIcAguyqkXUXKZX/Mpto8ja2uCM+d7VExdMiMuu4dzhboSM+RdeRr5U+RbClS23Hlc3uTBHo8trZcbrngY0+A01/KTg=
|
data/Gemfile
CHANGED
@@ -1,5 +1,9 @@
|
|
1
|
-
source "https://rubygems.org"
|
2
|
-
gem "httparty"
|
3
|
-
gem 'vcr'
|
4
|
-
gem 'webmock'
|
5
|
-
gem 'yard'
|
1
|
+
source "https://rubygems.org"
|
2
|
+
gem "httparty"
|
3
|
+
gem 'vcr'
|
4
|
+
gem 'webmock'
|
5
|
+
gem 'yard', '~> 0.9.11'
|
6
|
+
gem 'rake'
|
7
|
+
gem 'minitest'
|
8
|
+
gem 'minitest-reporters'
|
9
|
+
gem 'coveralls', require: false
|
data/Gemfile.lock
CHANGED
@@ -1,31 +1,63 @@
|
|
1
|
-
GEM
|
2
|
-
remote: https://rubygems.org/
|
3
|
-
specs:
|
4
|
-
addressable (2.5.0)
|
5
|
-
public_suffix (~> 2.0, >= 2.0.2)
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
1
|
+
GEM
|
2
|
+
remote: https://rubygems.org/
|
3
|
+
specs:
|
4
|
+
addressable (2.5.0)
|
5
|
+
public_suffix (~> 2.0, >= 2.0.2)
|
6
|
+
ansi (1.5.0)
|
7
|
+
builder (3.2.2)
|
8
|
+
coveralls (0.8.15)
|
9
|
+
json (>= 1.8, < 3)
|
10
|
+
simplecov (~> 0.12.0)
|
11
|
+
term-ansicolor (~> 1.3)
|
12
|
+
thor (~> 0.19.1)
|
13
|
+
tins (>= 1.6.0, < 2)
|
14
|
+
crack (0.4.3)
|
15
|
+
safe_yaml (~> 1.0.0)
|
16
|
+
docile (1.1.5)
|
17
|
+
hashdiff (0.3.0)
|
18
|
+
httparty (0.14.0)
|
19
|
+
multi_xml (>= 0.5.2)
|
20
|
+
json (1.8.3)
|
21
|
+
minitest (5.9.1)
|
22
|
+
minitest-reporters (1.1.12)
|
23
|
+
ansi
|
24
|
+
builder
|
25
|
+
minitest (>= 5.0)
|
26
|
+
ruby-progressbar
|
27
|
+
multi_xml (0.5.5)
|
28
|
+
public_suffix (2.0.4)
|
29
|
+
rake (11.3.0)
|
30
|
+
ruby-progressbar (1.8.1)
|
31
|
+
safe_yaml (1.0.4)
|
32
|
+
simplecov (0.12.0)
|
33
|
+
docile (~> 1.1.0)
|
34
|
+
json (>= 1.8, < 3)
|
35
|
+
simplecov-html (~> 0.10.0)
|
36
|
+
simplecov-html (0.10.0)
|
37
|
+
term-ansicolor (1.4.0)
|
38
|
+
tins (~> 1.0)
|
39
|
+
thor (0.19.1)
|
40
|
+
tins (1.12.0)
|
41
|
+
vcr (3.0.3)
|
42
|
+
webmock (2.1.0)
|
43
|
+
addressable (>= 2.3.6)
|
44
|
+
crack (>= 0.3.2)
|
45
|
+
hashdiff
|
46
|
+
yard (0.9.12)
|
47
|
+
|
48
|
+
PLATFORMS
|
49
|
+
ruby
|
50
|
+
x64-mingw32
|
51
|
+
|
52
|
+
DEPENDENCIES
|
53
|
+
coveralls
|
54
|
+
httparty
|
55
|
+
minitest
|
56
|
+
minitest-reporters
|
57
|
+
rake
|
58
|
+
vcr
|
59
|
+
webmock
|
60
|
+
yard (~> 0.9.11)
|
61
|
+
|
62
|
+
BUNDLED WITH
|
63
|
+
1.16.1
|
data/README.md
CHANGED
@@ -1,138 +1,134 @@
|
|
1
|
-
# Dashboard API v1.0.0
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
#
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
#
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
dapi.
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
```
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
* `
|
88
|
-
* `
|
89
|
-
* `
|
90
|
-
* `
|
91
|
-
* `
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
```
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
Finished in 0.05813s
|
137
|
-
12 tests, 12 assertions, 0 failures, 0 errors, 0 skips
|
138
|
-
```
|
1
|
+
# Dashboard API v1.0.0
|
2
|
+
[![Build Status](https://travis-ci.org/jletizia/dashboardapi.svg?branch=master)](https://travis-ci.org/jletizia/dashboardapi)
|
3
|
+
[![Coverage Status](https://coveralls.io/repos/github/jletizia/dashboardapi/badge.svg?branch=master)](https://coveralls.io/github/jletizia/dashboardapi?branch=master)
|
4
|
+
[![Code Climate](https://codeclimate.com/github/jletizia/dashboardapi/badges/gpa.svg)](https://codeclimate.com/github/jletizia/dashboardapi)
|
5
|
+
|
6
|
+
Documentation: [here](http://www.rubydoc.info/gems/dashboard-api/1.0.0)
|
7
|
+
|
8
|
+
Issues: [here](https://github.com/jletizia/dashboardapi/issues)
|
9
|
+
|
10
|
+
# Description
|
11
|
+
A ruby implementation of the entire [Meraki Dashboard API](https://documentation.meraki.com/zGeneral_Administration/Other_Topics/The_Cisco_Meraki_Dashboard_API)
|
12
|
+
|
13
|
+
# Usage
|
14
|
+
## Installation
|
15
|
+
```bash
|
16
|
+
gem install dashboard-api
|
17
|
+
```
|
18
|
+
Once the gem is installed, you can use it by requiring `dashboard-api`
|
19
|
+
```ruby
|
20
|
+
require 'dashboard-api'
|
21
|
+
```
|
22
|
+
## Examples
|
23
|
+
|
24
|
+
### Basic implementation
|
25
|
+
#### Get a list of networks for a specific Dashboard Organization
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
# get_networks.rb
|
29
|
+
require 'dashboard-api'
|
30
|
+
|
31
|
+
# read in API key and Org ID from Environment variables
|
32
|
+
@dashboard_api_key = ENV['dashboard_api_key']
|
33
|
+
@dashboard_org_id = ENV['dashboard_org_id']
|
34
|
+
|
35
|
+
dapi = DashboardAPI.new(@dashboard_api_key)
|
36
|
+
dapi.get_networks(@dashboard_org_id)
|
37
|
+
```
|
38
|
+
|
39
|
+
#### Update a specific network
|
40
|
+
This will update a specific network to have the new name of `New VPN Spoke`. Note the options hash, `network_options`. Whenever making a call to something that updates
|
41
|
+
Dashboard, an options hash will be used, with all necessary attributes as keys. Specifics about these keys can be found in the official [Meraki API Documentation](https://dashboard.meraki.com/manage/support/api_docs).
|
42
|
+
```ruby
|
43
|
+
# update_network.rb
|
44
|
+
require 'dashboard-api'
|
45
|
+
|
46
|
+
# read in API key and Org ID from Environment variables
|
47
|
+
@dashboard_api_key = ENV['dashboard_api_key']
|
48
|
+
@dashboard_org_id = ENV['dashboard_org_id']
|
49
|
+
@network_id = ENV['combined_network']
|
50
|
+
|
51
|
+
dapi = DashboardAPI.new(@dashboard_api_key)
|
52
|
+
|
53
|
+
network_options = {:id => @network_id, :name => 'New VPN Spoke'}
|
54
|
+
dapi.update_network(@network_id, network_options)
|
55
|
+
```
|
56
|
+
|
57
|
+
|
58
|
+
# Contributing
|
59
|
+
If you feel like contributing, information about the testing environment can be found below. If you just want to use the gem to help interact with the Meraki Dashboard,
|
60
|
+
you only need to read the above sections.
|
61
|
+
|
62
|
+
## Dependencies
|
63
|
+
To install the necessary dependencies run:
|
64
|
+
```bash
|
65
|
+
bundle install
|
66
|
+
```
|
67
|
+
or
|
68
|
+
|
69
|
+
```bash
|
70
|
+
gem install --dev dashboard-api
|
71
|
+
```
|
72
|
+
or look in the `Gemfile` and install each dependency individually.
|
73
|
+
|
74
|
+
## Testing
|
75
|
+
### Prerequisites
|
76
|
+
There are a few prerequisites if you want to be able to run tests (at least for the first time, until fixtures get generated). These are split up into Dashboard and Environment Variables:
|
77
|
+
#### Dashboard configuration
|
78
|
+
* A combined network that should have
|
79
|
+
* an MX, with VLANs enabled
|
80
|
+
* an MS
|
81
|
+
* an MR, with the first SSID
|
82
|
+
* a single network called 'DELETE ME' exists
|
83
|
+
* A single template called 'API Delete Me' already exists
|
84
|
+
* A single template exists called 'API Permanent'
|
85
|
+
|
86
|
+
#### Environment Variables
|
87
|
+
* `dashboard_api_key` Your Meraki Dashboard API key
|
88
|
+
* `org_id` The Meraki Dashboard Organization where you will be testing on
|
89
|
+
* `combined_network` The combined network set up in the above requirements
|
90
|
+
* `ms_serial` The serial number of the MS in the combined network. Used to test switchport methods
|
91
|
+
* `unclaimed_device` A device that is unclaimed. Used to test claining into an org / network.
|
92
|
+
|
93
|
+
### Running a test
|
94
|
+
As this is a wrapper gem for an RESTful API, the vast majority of methods make some sort of HTTP call. To reduce the amount of time testing takes, and ensure that we have good data to work against at all times, we utilize [VCR](https://github.com/vcr/vcr). This will capture the HTTP interaction the first time a test is ran, save them as fixtures, and then replay that fixture on each subsequent call to that method during tests.
|
95
|
+
|
96
|
+
**NOTE**: This means that if you happen to have things misconfigured, run a test, and receive a 404, that 404 response is now saved for that test. You will need to manually remove it from `fixtures/vcr_cassettes` and rerun the test.
|
97
|
+
|
98
|
+
#### How to actually run the tests
|
99
|
+
```
|
100
|
+
rake test without-secrets
|
101
|
+
```
|
102
|
+
#### Without secrets?
|
103
|
+
Running the rake test with the `without-secrets` options tells VCR not to obfuscate any sensitive information when creating fixtures (sensitive information being described as the ENVs listed below). This is OK for 99.99% of the normal use cases (such as feature development on a local machine). The reason the functionality to allow for the obfuscation is for the potential down the line to be able to release a current "working set" of fixtures, so that you don't need to have an entire Dashboard Organization set up to modify existing methods and test them.
|
104
|
+
|
105
|
+
If you want to run your local tests with secret obfuscation for any reason, you need the following ENV variables set:
|
106
|
+
```
|
107
|
+
['secret_dashboard_api_key', 'secret_dashboard_org_id', 'secret_ms_serial', 'secret_unclaimed_device', 'secret_combined_network', 'secret_first_name', 'secret_last_name',
|
108
|
+
'secret_email', 'secret_admin_id', 'secret_shard_id']
|
109
|
+
```
|
110
|
+
|
111
|
+
### Test results
|
112
|
+
After the first completely successful, all green run, subsequent tests will be almost instantaneous:
|
113
|
+
|
114
|
+
```bash
|
115
|
+
➜ dashboard-api git:(master) ✗ rake test
|
116
|
+
Started with run options --seed 42405
|
117
|
+
|
118
|
+
DashAPITest
|
119
|
+
test_snmp_returns_as_array PASS (0.01s)
|
120
|
+
test_license_state_returns_as_hash PASS (0.01s)
|
121
|
+
test_api_key_is_a_string PASS (0.00s)
|
122
|
+
test_get_an_organization PASS (0.01s)
|
123
|
+
test_it_returns_as_json PASS (0.00s)
|
124
|
+
test_get_inventory_for_an_org PASS (0.01s)
|
125
|
+
test_get_license_state_for_an_org PASS (0.00s)
|
126
|
+
test_third_party_peer_returns_as_array PASS (0.01s)
|
127
|
+
test_it_is_a_dash_api PASS (0.00s)
|
128
|
+
test_current_snmp_status PASS (0.00s)
|
129
|
+
test_inventory_returns_as_array PASS (0.00s)
|
130
|
+
test_third_party_vpn_peers PASS (0.00s)
|
131
|
+
|
132
|
+
Finished in 0.05813s
|
133
|
+
12 tests, 12 assertions, 0 failures, 0 errors, 0 skips
|
134
|
+
```
|