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.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +34 -0
  3. data/.gitignore +5 -4
  4. data/.travis.yml +20 -0
  5. data/Gemfile +9 -5
  6. data/Gemfile.lock +63 -31
  7. data/README.md +134 -138
  8. data/Rakefile +9 -7
  9. data/dashboard-api.gemspec +28 -28
  10. data/doc/Admins.html +603 -603
  11. data/doc/Clients.html +276 -276
  12. data/doc/DashboardAPI.html +603 -603
  13. data/doc/DashboardAPIVersion.html +159 -159
  14. data/doc/Devices.html +879 -879
  15. data/doc/Networks.html +1382 -1382
  16. data/doc/Organizations.html +1477 -1477
  17. data/doc/Phones.html +641 -641
  18. data/doc/SAML.html +758 -758
  19. data/doc/SSIDs.html +523 -523
  20. data/doc/Switchports.html +526 -526
  21. data/doc/Templates.html +378 -378
  22. data/doc/VLANs.html +762 -762
  23. data/doc/_index.html +235 -235
  24. data/doc/class_list.html +51 -51
  25. data/doc/css/full_list.css +58 -58
  26. data/doc/css/style.css +481 -481
  27. data/doc/file.README.html +248 -248
  28. data/doc/file_list.html +56 -56
  29. data/doc/frames.html +17 -17
  30. data/doc/index.html +248 -248
  31. data/doc/js/app.js +243 -243
  32. data/doc/js/full_list.js +216 -216
  33. data/doc/js/jquery.js +3 -3
  34. data/doc/method_list.html +523 -523
  35. data/doc/top-level-namespace.html +113 -113
  36. data/lib/admins.rb +37 -37
  37. data/lib/clients.rb +12 -12
  38. data/lib/dashboard-api.rb +82 -83
  39. data/lib/dashboard-api/version.rb +6 -6
  40. data/lib/devices.rb +57 -57
  41. data/lib/networks.rb +108 -108
  42. data/lib/organizations.rb +110 -115
  43. data/lib/phones.rb +40 -40
  44. data/lib/saml.rb +47 -47
  45. data/lib/ssids.rb +33 -33
  46. data/lib/switchports.rb +33 -33
  47. data/lib/templates.rb +18 -18
  48. data/lib/vlans.rb +49 -49
  49. metadata +7 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2fe6ff96f28e3094c3518fe307c09794656e2f9a
4
- data.tar.gz: e861bfecfc0f90fee654e0175bd63dea7bc0dbf8
3
+ metadata.gz: 76f99b3ba5f01a335d52b5578bb6e9543076e81e
4
+ data.tar.gz: 12731012f9e74c580c0d07351dcd8e11438fc561
5
5
  SHA512:
6
- metadata.gz: cf14d3502d0e1e120815d1d900b54b54cb6578cbd94ce733edcf00a0c19d1119b2213dbf997dde6c5d7ee7bc7bd18e1201cb836299e623f7d15371cea3010100
7
- data.tar.gz: cd18dafbbd891cd29e45c5ec38bb85fb8f916320a33f4ed7b10968f47745034c9e1e4a2b3fb3d25d4401ffa5fc8e393f4911cdcc83ed9a6d2b062e06e0102d80
6
+ metadata.gz: ad02d784855e57a5a0ad6098744cdca5f73c31cfe0da99f0ff4aa7a5b6032a78575ffe403a25cff7fa556893bf3b100c8005740bba4ba32c2184c2f635d09211
7
+ data.tar.gz: d1fd20cca6cf3ba00def18c6e11ef5ac0b43eb0559315ef3915e9ffa9fa732d2c7fd254b77e47403be910c98cc6b2052ab5097011745ed946295c24d7c2bc6fc
@@ -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
- .yardoc
3
- _Yardoc
4
- .DS_Store
1
+ fixtures/
2
+ tools/
3
+ .yardoc
4
+ _Yardoc
5
+ .DS_Store
@@ -0,0 +1,20 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.3.0
4
+ cache:
5
+ directories:
6
+ - fixtures
7
+ after_success:
8
+ - coveralls
9
+ env:
10
+ global:
11
+ - secure: Xap2VUqjAVjlspW6A6LK3VpBptIPXLzdx4XVYJJC4J61MmfcHwUX4rb0LVSvAPS1wiji7cjmmBJVhy5PyOn3JFGe+PiWEGjnn9OcVmr650mOhX6+3net+QDHYLz8phrX+WjNBmdK/uuZaeV4b8F/iPm0CRSF5WjUFRwPJVzH9pj1gtcdiWNv+spjPSEnTuF+ws1nOpmZ2Xu1vlajeEZC1GF6iaHgwYM1XCqRuNsrv2EQr1c6Dupl9jZmbeGcluFNVWnOn41JuBvnVgs7cZkaJC89h8waXnagfcuRTdM1B61L4DPpRbcxCWG7eVsfVft0ejLbaMnZqDs5usLJAdf6PM0vID57PdrWLwzX8f4STh4VtjM7sfXZQHloPJlBkBlUenwWfOvqHsmwgQjqd4SSTFReZrc2Z8YQR0S9ulNtAIR58X+kI3/zJW/1MDbB3RkB+PIAQodRK4NJK52czmRQtvLjEONzDO8ubyruBWCqKY0x1DlcIkt2sZatBPe/w6r5K2bKF+lHZW6WXGNkbtj2h9q0qVgcWshPP9S+iEfrwrVqMyUWE/JIM6vu6DE/rd0Jw19IeFj6nYxG6hVfSBClWAuVGmOfWqgx8Lc3XmD8htgrT6zcIpOWLTdnXwywyiCPICCUUu01/W8qqXwwR5MA0UaEsoBehmoV2bDT3UOMr30=
12
+ - secure: tKqHedMq0IssTYZINtgkX3KV3yPGE6+mm9netbbA1ZU1Uq8xr6jMLbeGZIWYzb8RkwzFyOO70OvL1aB9/PVe2CXqyvYxqCNLSmB2t+9AAiue1WXt/xr6k5gGUXbTzRdsnYyehzcGQKqG2p3ppp+Cx282ZFk3FlkTw+WyZrZeOGJGFhhoKVDGb8VyE+Ythd5ZVfqQ9Sbt7+Pd+jmBFfBh6sAVg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+n0NHVmI8pjUVAtRvjO51GuuFZ4opvOXN1eX/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
@@ -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
- crack (0.4.3)
7
- safe_yaml (~> 1.0.0)
8
- hashdiff (0.3.0)
9
- httparty (0.14.0)
10
- multi_xml (>= 0.5.2)
11
- multi_xml (0.5.5)
12
- public_suffix (2.0.4)
13
- safe_yaml (1.0.4)
14
- vcr (3.0.3)
15
- webmock (2.1.0)
16
- addressable (>= 2.3.6)
17
- crack (>= 0.3.2)
18
- hashdiff
19
- yard (0.9.5)
20
-
21
- PLATFORMS
22
- ruby
23
-
24
- DEPENDENCIES
25
- httparty
26
- vcr
27
- webmock
28
- yard
29
-
30
- BUNDLED WITH
31
- 1.13.6
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
- Documentation: [here](http://www.rubydoc.info/gems/dashboard-api/1.0.0)
3
-
4
- Issues: [here](https://github.com/jletizia/dashboardapi/issues)
5
-
6
- # Description
7
- A ruby implementation of the entire [Meraki Dashboard API](https://documentation.meraki.com/zGeneral_Administration/Other_Topics/The_Cisco_Meraki_Dashboard_API)
8
-
9
- # Usage
10
- ## Installation
11
- ```bash
12
- gem install dashboard-api
13
- ```
14
-
15
- Once the gem is installed, you can use it by requiring `dashboard-api`
16
- ```ruby
17
- require 'dashboard-api'
18
- ```
19
- ## Examples
20
-
21
- ### Basic implementation
22
- #### Get a list of networks for a specific Dashboard Organization
23
-
24
- ```ruby
25
- # get_networks.rb
26
- require 'dashboard-api'
27
-
28
- # read in API key and Org ID from Environment variables
29
- @dashboard_api_key = ENV['dashboard_api_key']
30
- @dashboard_org_id = ENV['dashboard_org_id']
31
-
32
- dapi = DashboardAPI.new(@dashboard_api_key)
33
- dapi.get_networks(@dashboard_org_id)
34
- ```
35
-
36
- #### Update a specific network
37
- 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
38
- 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).
39
- ```ruby
40
- # update_network.rb
41
- require 'dashboard-api'
42
-
43
- # read in API key and Org ID from Environment variables
44
- @dashboard_api_key = ENV['dashboard_api_key']
45
- @dashboard_org_id = ENV['dashboard_org_id']
46
- @network_id = ENV['combined_network']
47
-
48
- dapi = DashboardAPI.new(@dashboard_api_key)
49
-
50
- network_options = {:id => @network_id, :name => 'New VPN Spoke'}
51
- dapi.update_network(@network_id, network_options)
52
- ```
53
-
54
-
55
- # Contributing
56
- 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,
57
- you only need to read the above sections.
58
-
59
- ## Dependencies
60
- To install the necessary dependencies run:
61
- ```bash
62
- bundle install
63
- ```
64
- or
65
-
66
- ```bash
67
- gem install --dev dashboard-api
68
- ```
69
- or look in the `Gemfile` and install each dependency individually.
70
-
71
- ## Testing
72
- Because the Dashboard API needs actual Dashboard resources to hit against, there is a decent amount of pre-configuring that needs to go into place. This includes not only setting your API key, a default organization ID, etc. but also setting up test devices that will be modified, removed, claimed, etc. on Dashboard. It is recommended to use a completely separate test organization, with separate test devices if possible, as to not potentially disturb a production organization.
73
-
74
- ### Environment Variables
75
- Each test file will read in the necessary ENV variables for it's specifc set of tests:
76
- ```ruby
77
- class OrganizationsTest < Minitest::Test
78
- def setup
79
- @dashboard_api_key = ENV['dashboard_api_key']
80
- @org_id = ENV['dashboard_org_id']
81
- @network_id = ENV['test_network_id']
82
- @dapi = DashboardAPI.new(@dashboard_api_key)
83
- end
84
- ```
85
- The full list of necessary ENV variables is:
86
- * `dashboard_api_key` Your Meraki Dashboard API key
87
- * `dashboard_org_id` The Meraki Dashboard Organization ID you will be testing on
88
- * `test_network_id` A test network ID that will be used to test renaming networks
89
- * `vpn_network` A test MX network that will test modifying AutoVPN settings
90
- * `switch_network` A test MS netwok that will test things like access policies, etc.
91
- * `mx_serial` A test MX that has client traffic passing through it
92
- * `spare_mr` A test MR used to claim in and out of networks
93
- * `test_admin_id` The ID of a test admin used to test updating and deleting admins
94
- * `config_template_id` A test configuration template network ID used to test removing a template
95
- * `unclaimed_device` A device that can be used to test claiming
96
- * `phone_network` Test phone network
97
- * `phone_contact_id` Test contact for your phone network
98
- * `saml_id` ID of a test SAML user
99
- * `config_template_id` ID of the template you will bind the test network to
100
- * `config_bind_network` network you want to bind to a template
101
-
102
- ### Running a test
103
- As this is an 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.
104
-
105
- #### First test run issues
106
- Due to the HTTP interactions containing private data we are trying to obscure with environment variables in the first place (API key, organization IDs, etc.), the fixtures used to initially test this gem can not be provided here. This means that you will need to generate your own fixtures. Luckily, this is as easy as just running the tests in the first place. Unluckily, due to Minitest randomizing the order of it's tests, you may run into situations where the test to delete a network runs for the first time, before that network ever exists (remember, with VCR, only the first test run's HTTP interaction is saved, and used for each later test). When this happens, a 404 will be received, VCR will save it, and the test will fail.
107
-
108
- #### What this means
109
- Getting all of the tests to a point where they all pass will not be a trivial task, due to the workflow of: running the tests, finding the tests that failed due to a prerequisite not having happened at some point before that test run, fixing the prerequisite, deleting the fixture (they live in `fixtures/vcr_cassettes/`), and rerunning the tests.
110
-
111
- #### How to actually run the tests
112
- ```
113
- rake test
114
- ```
115
-
116
- After the first completely successful, all green run, tests will be almost instantenous:
117
-
118
- ```bash
119
- dashboard-api git:(master) ✗ rake test
120
- Started with run options --seed 42405
121
-
122
- DashAPITest
123
- test_snmp_returns_as_array PASS (0.01s)
124
- test_license_state_returns_as_hash PASS (0.01s)
125
- test_api_key_is_a_string PASS (0.00s)
126
- test_get_an_organization PASS (0.01s)
127
- test_it_returns_as_json PASS (0.00s)
128
- test_get_inventory_for_an_org PASS (0.01s)
129
- test_get_license_state_for_an_org PASS (0.00s)
130
- test_third_party_peer_returns_as_array PASS (0.01s)
131
- test_it_is_a_dash_api PASS (0.00s)
132
- test_current_snmp_status PASS (0.00s)
133
- test_inventory_returns_as_array PASS (0.00s)
134
- test_third_party_vpn_peers PASS (0.00s)
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
+ ```