dashboard-api 0.9.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4a1c33d558d0b2d6ddbeaa9219a8d9ff6dca06dc
4
- data.tar.gz: 95e2eaa4ab8556fba0d3d4a82232a5db85dea3cb
3
+ metadata.gz: 2fe6ff96f28e3094c3518fe307c09794656e2f9a
4
+ data.tar.gz: e861bfecfc0f90fee654e0175bd63dea7bc0dbf8
5
5
  SHA512:
6
- metadata.gz: 26e6b2aeced9bd82162308b99550a4a2769f76fac825a7770573b5d0ce80b7ad93708bbc5a2ad52a8f2bd8da2b10ff2e9b75e70a02c33cdf9540539caef55229
7
- data.tar.gz: 55e8de734064da06fbe92500668c96e2742e9d1770b8e7334fd2815347215501037dc1aa8d792d6894c93418e036dd08961ca5e57cd1d534afe38135b251e404
6
+ metadata.gz: cf14d3502d0e1e120815d1d900b54b54cb6578cbd94ce733edcf00a0c19d1119b2213dbf997dde6c5d7ee7bc7bd18e1201cb836299e623f7d15371cea3010100
7
+ data.tar.gz: cd18dafbbd891cd29e45c5ec38bb85fb8f916320a33f4ed7b10968f47745034c9e1e4a2b3fb3d25d4401ffa5fc8e393f4911cdcc83ed9a6d2b062e06e0102d80
data/README.md CHANGED
@@ -1,66 +1,88 @@
1
- # Dashboard API v0.9.0
2
- A ruby implementation of the [Meraki Dashboard API](https://documentation.meraki.com/zGeneral_Administration/Other_Topics/The_Cisco_Meraki_Dashboard_API)
1
+ # Dashboard API v1.0.0
2
+ Documentation: [here](http://www.rubydoc.info/gems/dashboard-api/1.0.0)
3
3
 
4
- Documentation [here](http://www.rubydoc.info/gems/dashboard-api/0.3.0)
4
+ Issues: [here](https://github.com/jletizia/dashboardapi/issues)
5
5
 
6
- # Preface
7
- The following readme is broken down into two sections:
8
- * Installing / Usage of the gem
9
- * Contributing to development of the gem
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)
10
8
 
11
- # Installation and Normal Usage
12
- ## Usage
9
+ # Usage
10
+ ## Installation
13
11
  ```bash
14
12
  gem install dashboard-api
15
13
  ```
14
+
16
15
  Once the gem is installed, you can use it by requiring `dashboard-api`
17
- ```
16
+ ```ruby
18
17
  require 'dashboard-api'
19
- => true
20
18
  ```
21
-
22
19
  ## Examples
23
- It is highly recommended that you utilize environment variables when dealing with things like API keys, tokens, etc. instead of utilizing them directly in a script. All examples will be shown with this convention.
24
20
 
25
- ###Instantiating a new instance:
26
- ```ruby
27
- dapi = DashboardAPI.new(ENV['dashboard_api_key'])
28
- ```
21
+ ### Basic implementation
22
+ #### Get a list of networks for a specific Dashboard Organization
29
23
 
30
- ###Listing details about a specific network:
31
24
  ```ruby
32
- dapi.get_single_network(ENV['vpn_network'])
33
- => {"id"=>"N_<OMITTED>", "organizationId"=>"<OMITTED>", "type"=>"appliance", "name"=>"vpn_test_network", "timeZone"=>"America/Los_Angeles", "tags"=>""}
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
34
  ```
35
- There are many times where you need to actually pass data up to the Dashboard API, be it for creating new networks, updating device information, etc. In situations like these, an options hash is expected
36
- to be passed alongside to the method call. The Dashboard-API gem documentation mentions what is expected in the option hash for methods that require it, but the offical [Meraki Dashboard API documentation](https://dashboard.meraki.com/manage/support/api_docs) is recommended for exact details.
37
35
 
38
- ###Creating a new network:
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
39
  ```ruby
40
- options = {:name => 'new_test_network', :type => 'wireless'}
41
- => {:name=>"new_test_network", :type=>"wireless"}
42
- dapi.create_network(ENV['dashboard_org_id'], options)
43
- => {"id"=>"N_<OMITTED>", "organizationId"=>"<OMITTED>", "type"=>"wireless", "name"=>"new_test_network", "timeZone"=>"America/Los_Angeles", "tags"=>""}
44
- ```
40
+ # update_network.rb
41
+ require 'dashboard-api'
45
42
 
46
- Not every method call will return a Hash object. Some will return an Array, often containing a Hash in each element. Information about what is expected to be returned can be found in the Dashboard-API Documentation, as well as the official Meraki Dashboard API help documentation.
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
47
 
48
- ```ruby
49
- dapi.get_third_party_peers(ENV['dashboard_org_id'])
50
- => [{"name"=>"test_api_peer", "publicIp"=>"10.0.0.1", "privateSubnets"=>["10.1.0.0/24"], "secret"=>"password", "tags"=>["all"]}, {"name"=>"second_api_peerr", "publicIp"=>"10.0.0.2", "privateSubnets"=>["10.2.0.0/24"], "secret"=>"password", "tags"=>["api_test"]}]
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)
51
52
  ```
52
53
 
53
- # Development
54
- ## Testing
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
55
60
  To install the necessary dependencies run:
56
- ```
61
+ ```bash
57
62
  bundle install
58
63
  ```
59
- If you do not use bundler, you can check out the gemfile, and install the dependencies individually as necessary.
64
+ or
65
+
66
+ ```bash
67
+ gem install --dev dashboard-api
68
+ ```
69
+ or look in the `Gemfile` and install each dependency individually.
60
70
 
61
- The Meraki Dashboard API requires both an API key, as well as certain identifiers such as Organization, or Network IDs. If you would like to run the full current test suite, the following
62
- ENV variables need to be set:
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.
63
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:
64
86
  * `dashboard_api_key` Your Meraki Dashboard API key
65
87
  * `dashboard_org_id` The Meraki Dashboard Organization ID you will be testing on
66
88
  * `test_network_id` A test network ID that will be used to test renaming networks
@@ -70,14 +92,28 @@ ENV variables need to be set:
70
92
  * `spare_mr` A test MR used to claim in and out of networks
71
93
  * `test_admin_id` The ID of a test admin used to test updating and deleting admins
72
94
  * `config_template_id` A test configuration template network ID used to test removing a template
73
- It is recommended that you set up a test organization with test devices in it when working with developing new functionality to this gem, as to not potentially disturb any of your production networks.
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.
74
104
 
75
- Once those are set and dependencies are installed, you can run the tests with
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
76
112
  ```
77
113
  rake test
78
114
  ```
79
115
 
80
- As the majority of the testing for this gem requires HTTP calls, testing is currently run with [VCR](https://github.com/vcr/vcr) to capture actual HTTP responses to run the tests off of. This requires that the environment variables you set up above are for a valid Meraki Dashboard Organization. After running the tests for the first time, subsequent tests will be ran off of the saved output. We would also expect subsequent test runs to be close to instantenous, as seen below:
116
+ After the first completely successful, all green run, tests will be almost instantenous:
81
117
 
82
118
  ```bash
83
119
  ➜ dashboard-api git:(master) ✗ rake test
@@ -100,5 +136,3 @@ DashAPITest
100
136
  Finished in 0.05813s
101
137
  12 tests, 12 assertions, 0 failures, 0 errors, 0 skips
102
138
  ```
103
-
104
- All of the saved HTTP responses from VCR will be saved by default in `fixtures/vcr_cassettes/`. These **should not be added / comitted to git** as they will contain all of the keys / tokens we set as ENV variables above.
data/Rakefile CHANGED
@@ -2,5 +2,6 @@ require 'rake/testtask'
2
2
 
3
3
  Rake::TestTask.new do |t|
4
4
  t.test_files = FileList['test/test*.rb']
5
+ t.warning = false
5
6
  end
6
7
 
@@ -594,7 +594,7 @@ for more details.</p>
594
594
  </div>
595
595
 
596
596
  <div id="footer">
597
- Generated on Wed Nov 16 21:55:08 2016 by
597
+ Generated on Thu Nov 17 22:15:39 2016 by
598
598
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
599
599
  0.9.5 (ruby-2.3.0).
600
600
  </div>
@@ -267,7 +267,7 @@
267
267
  </div>
268
268
 
269
269
  <div id="footer">
270
- Generated on Wed Nov 16 21:55:08 2016 by
270
+ Generated on Thu Nov 17 22:15:39 2016 by
271
271
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
272
272
  0.9.5 (ruby-2.3.0).
273
273
  </div>
@@ -367,7 +367,7 @@
367
367
 
368
368
 
369
369
  <h3 class="inherited">Methods included from <span class='object_link'><a href="Organizations.html" title="Organizations (module)">Organizations</a></span></h3>
370
- <p class="inherited"><span class='object_link'><a href="Organizations.html#get_inventory-instance_method" title="Organizations#get_inventory (method)">#get_inventory</a></span>, <span class='object_link'><a href="Organizations.html#get_license_state-instance_method" title="Organizations#get_license_state (method)">#get_license_state</a></span>, <span class='object_link'><a href="Organizations.html#get_organization-instance_method" title="Organizations#get_organization (method)">#get_organization</a></span>, <span class='object_link'><a href="Organizations.html#get_snmp_status-instance_method" title="Organizations#get_snmp_status (method)">#get_snmp_status</a></span>, <span class='object_link'><a href="Organizations.html#get_third_party_peers-instance_method" title="Organizations#get_third_party_peers (method)">#get_third_party_peers</a></span></p>
370
+ <p class="inherited"><span class='object_link'><a href="Organizations.html#claim-instance_method" title="Organizations#claim (method)">#claim</a></span>, <span class='object_link'><a href="Organizations.html#clone_organization-instance_method" title="Organizations#clone_organization (method)">#clone_organization</a></span>, <span class='object_link'><a href="Organizations.html#create_organization-instance_method" title="Organizations#create_organization (method)">#create_organization</a></span>, <span class='object_link'><a href="Organizations.html#get_inventory-instance_method" title="Organizations#get_inventory (method)">#get_inventory</a></span>, <span class='object_link'><a href="Organizations.html#get_license_state-instance_method" title="Organizations#get_license_state (method)">#get_license_state</a></span>, <span class='object_link'><a href="Organizations.html#get_organization-instance_method" title="Organizations#get_organization (method)">#get_organization</a></span>, <span class='object_link'><a href="Organizations.html#get_snmp_settings-instance_method" title="Organizations#get_snmp_settings (method)">#get_snmp_settings</a></span>, <span class='object_link'><a href="Organizations.html#get_third_party_peers-instance_method" title="Organizations#get_third_party_peers (method)">#get_third_party_peers</a></span>, <span class='object_link'><a href="Organizations.html#list_all_organizations-instance_method" title="Organizations#list_all_organizations (method)">#list_all_organizations</a></span>, <span class='object_link'><a href="Organizations.html#update_organization-instance_method" title="Organizations#update_organization (method)">#update_organization</a></span>, <span class='object_link'><a href="Organizations.html#update_snmp_settings-instance_method" title="Organizations#update_snmp_settings (method)">#update_snmp_settings</a></span>, <span class='object_link'><a href="Organizations.html#update_third_party_peers-instance_method" title="Organizations#update_third_party_peers (method)">#update_third_party_peers</a></span></p>
371
371
 
372
372
  <div id="constructor_details" class="method_details_list">
373
373
  <h2>Constructor Details</h2>
@@ -539,7 +539,9 @@ handling</p>
539
539
  77
540
540
  78
541
541
  79
542
- 80</pre>
542
+ 80
543
+ 81
544
+ 82</pre>
543
545
  </td>
544
546
  <td>
545
547
  <pre class="code"><span class="info file"># File 'lib/dashboard-api.rb', line 45</span>
@@ -568,7 +570,9 @@ handling</p>
568
570
  <span class='kw'>end</span>
569
571
  <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>PUT</span><span class='tstring_end'>&#39;</span></span>
570
572
  <span class='id identifier rubyid_res'>res</span> <span class='op'>=</span> <span class='const'>HTTParty</span><span class='period'>.</span><span class='id identifier rubyid_put'>put</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_base_uri'>base_uri</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_endpoint_url'>endpoint_url</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
571
- <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Bad Request due to the following error(s): </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_res'>res</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>errors</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_res'>res</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>errors</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
573
+ <span class='comment'># needs to check for is an array, because when you update a 3rd party VPN peer, it returns as an array
574
+ </span> <span class='comment'># if you screw something up, it returns as a Hash, and will hit the normal if res[&#39;errors&#39;
575
+ </span> <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Bad Request due to the following error(s): </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_res'>res</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>errors</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_res'>res</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>errors</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_res'>res</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Array</span>
572
576
  <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>404 returned. Are you sure you are using the proper IDs?</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_res'>res</span><span class='period'>.</span><span class='id identifier rubyid_code'>code</span> <span class='op'>==</span> <span class='int'>404</span>
573
577
  <span class='kw'>return</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_res'>res</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
574
578
  <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>DELETE</span><span class='tstring_end'>&#39;</span></span>
@@ -590,7 +594,7 @@ handling</p>
590
594
  </div>
591
595
 
592
596
  <div id="footer">
593
- Generated on Wed Nov 16 21:55:08 2016 by
597
+ Generated on Thu Nov 17 22:15:39 2016 by
594
598
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
595
599
  0.9.5 (ruby-2.3.0).
596
600
  </div>
@@ -135,7 +135,7 @@
135
135
 
136
136
  </div>
137
137
  </dt>
138
- <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.9.0</span><span class='tstring_end'>&quot;</span></span></pre></dd>
138
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>1.0.0</span><span class='tstring_end'>&quot;</span></span></pre></dd>
139
139
 
140
140
  </dl>
141
141
 
@@ -150,7 +150,7 @@
150
150
  </div>
151
151
 
152
152
  <div id="footer">
153
- Generated on Wed Nov 16 21:55:08 2016 by
153
+ Generated on Thu Nov 17 22:15:39 2016 by
154
154
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
155
155
  0.9.5 (ruby-2.3.0).
156
156
  </div>
@@ -870,7 +870,7 @@ longitude, latitude. A full list is found on the official Meraki API Docs</p>
870
870
  </div>
871
871
 
872
872
  <div id="footer">
873
- Generated on Wed Nov 16 21:55:08 2016 by
873
+ Generated on Thu Nov 17 22:15:39 2016 by
874
874
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
875
875
  0.9.5 (ruby-2.3.0).
876
876
  </div>
@@ -487,15 +487,15 @@ these.</p>
487
487
  <pre class="lines">
488
488
 
489
489
 
490
+ 85
490
491
  86
491
492
  87
492
493
  88
493
494
  89
494
- 90
495
- 91</pre>
495
+ 90</pre>
496
496
  </td>
497
497
  <td>
498
- <pre class="code"><span class="info file"># File 'lib/networks.rb', line 86</span>
498
+ <pre class="code"><span class="info file"># File 'lib/networks.rb', line 85</span>
499
499
 
500
500
  <span class='kw'>def</span> <span class='id identifier rubyid_bind_network_to_template'>bind_network_to_template</span><span class='lparen'>(</span><span class='id identifier rubyid_network_id'>network_id</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
501
501
  <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>
@@ -676,15 +676,13 @@ type: the type of network (wireless, switch, appliance, or phone)
676
676
  46
677
677
  47
678
678
  48
679
- 49
680
- 50</pre>
679
+ 49</pre>
681
680
  </td>
682
681
  <td>
683
682
  <pre class="code"><span class="info file"># File 'lib/networks.rb', line 46</span>
684
683
 
685
684
  <span class='kw'>def</span> <span class='id identifier rubyid_delete_network'>delete_network</span><span class='lparen'>(</span><span class='id identifier rubyid_network_id'>network_id</span><span class='rparen'>)</span>
686
685
  <span class='id identifier rubyid_res'>res</span> <span class='op'>=</span> <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'>/networks/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_network_id'>network_id</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'>DELETE</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
687
- <span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_res'>res</span>
688
686
  <span class='kw'>return</span> <span class='id identifier rubyid_res'>res</span><span class='period'>.</span><span class='id identifier rubyid_code'>code</span> <span class='op'>==</span> <span class='int'>204</span> <span class='op'>?</span> <span class='kw'>true</span> <span class='op'>:</span> <span class='kw'>false</span>
689
687
  <span class='kw'>end</span></pre>
690
688
  </td>
@@ -756,12 +754,12 @@ type: the type of network (wireless, switch, appliance, or phone)
756
754
  <pre class="lines">
757
755
 
758
756
 
757
+ 54
759
758
  55
760
- 56
761
- 57</pre>
759
+ 56</pre>
762
760
  </td>
763
761
  <td>
764
- <pre class="code"><span class="info file"># File 'lib/networks.rb', line 55</span>
762
+ <pre class="code"><span class="info file"># File 'lib/networks.rb', line 54</span>
765
763
 
766
764
  <span class='kw'>def</span> <span class='id identifier rubyid_get_auto_vpn_settings'>get_auto_vpn_settings</span><span class='lparen'>(</span><span class='id identifier rubyid_network_id'>network_id</span><span class='rparen'>)</span>
767
765
  <span class='id identifier rubyid_res'>res</span> <span class='op'>=</span> <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'>/networks/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_network_id'>network_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/siteToSiteVpn</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>
@@ -835,13 +833,13 @@ type: the type of network (wireless, switch, appliance, or phone)
835
833
  <pre class="lines">
836
834
 
837
835
 
836
+ 75
838
837
  76
839
838
  77
840
- 78
841
- 79</pre>
839
+ 78</pre>
842
840
  </td>
843
841
  <td>
844
- <pre class="code"><span class="info file"># File 'lib/networks.rb', line 76</span>
842
+ <pre class="code"><span class="info file"># File 'lib/networks.rb', line 75</span>
845
843
 
846
844
  <span class='kw'>def</span> <span class='id identifier rubyid_get_ms_access_policies'>get_ms_access_policies</span><span class='lparen'>(</span><span class='id identifier rubyid_network_id'>network_id</span><span class='rparen'>)</span>
847
845
  <span class='id identifier rubyid_res'>res</span> <span class='op'>=</span> <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'>/networks/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_network_id'>network_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/accessPolicies</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>
@@ -1073,14 +1071,14 @@ Meraki Dashboard API documentation for more information on these.</p>
1073
1071
  <pre class="lines">
1074
1072
 
1075
1073
 
1074
+ 103
1076
1075
  104
1077
1076
  105
1078
1077
  106
1079
- 107
1080
- 108</pre>
1078
+ 107</pre>
1081
1079
  </td>
1082
1080
  <td>
1083
- <pre class="code"><span class="info file"># File 'lib/networks.rb', line 104</span>
1081
+ <pre class="code"><span class="info file"># File 'lib/networks.rb', line 103</span>
1084
1082
 
1085
1083
  <span class='kw'>def</span> <span class='id identifier rubyid_traffic_analysis'>traffic_analysis</span><span class='lparen'>(</span><span class='id identifier rubyid_network_id'>network_id</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
1086
1084
  <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>
@@ -1156,12 +1154,12 @@ Meraki Dashboard API documentation for more information on these.</p>
1156
1154
  <pre class="lines">
1157
1155
 
1158
1156
 
1157
+ 95
1159
1158
  96
1160
- 97
1161
- 98</pre>
1159
+ 97</pre>
1162
1160
  </td>
1163
1161
  <td>
1164
- <pre class="code"><span class="info file"># File 'lib/networks.rb', line 96</span>
1162
+ <pre class="code"><span class="info file"># File 'lib/networks.rb', line 95</span>
1165
1163
 
1166
1164
  <span class='kw'>def</span> <span class='id identifier rubyid_unbind_network_to_template'>unbind_network_to_template</span><span class='lparen'>(</span><span class='id identifier rubyid_network_id'>network_id</span><span class='rparen'>)</span>
1167
1165
  <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'>/networks/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_network_id'>network_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/unbind</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'>POST</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
@@ -1249,15 +1247,15 @@ useVPN</p>
1249
1247
  <pre class="lines">
1250
1248
 
1251
1249
 
1250
+ 65
1252
1251
  66
1253
1252
  67
1254
1253
  68
1255
1254
  69
1256
- 70
1257
- 71</pre>
1255
+ 70</pre>
1258
1256
  </td>
1259
1257
  <td>
1260
- <pre class="code"><span class="info file"># File 'lib/networks.rb', line 66</span>
1258
+ <pre class="code"><span class="info file"># File 'lib/networks.rb', line 65</span>
1261
1259
 
1262
1260
  <span class='kw'>def</span> <span class='id identifier rubyid_update_auto_vpn_settings'>update_auto_vpn_settings</span><span class='lparen'>(</span><span class='id identifier rubyid_network_id'>network_id</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
1263
1261
  <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>
@@ -1375,7 +1373,7 @@ tags assigned to the network</p>
1375
1373
  </div>
1376
1374
 
1377
1375
  <div id="footer">
1378
- Generated on Wed Nov 16 21:55:08 2016 by
1376
+ Generated on Thu Nov 17 22:15:39 2016 by
1379
1377
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1380
1378
  0.9.5 (ruby-2.3.0).
1381
1379
  </div>
@@ -135,6 +135,78 @@
135
135
  <li class="public ">
136
136
  <span class="summary_signature">
137
137
 
138
+ <a href="#claim-instance_method" title="#claim (instance method)">#<strong>claim</strong>(org_id, options) &#x21d2; Integer </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>Claim something.</p>
154
+ </div></span>
155
+
156
+ </li>
157
+
158
+
159
+ <li class="public ">
160
+ <span class="summary_signature">
161
+
162
+ <a href="#clone_organization-instance_method" title="#clone_organization (instance method)">#<strong>clone_organization</strong>(source_org_id, options) &#x21d2; Hash </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>Clone an organization.</p>
178
+ </div></span>
179
+
180
+ </li>
181
+
182
+
183
+ <li class="public ">
184
+ <span class="summary_signature">
185
+
186
+ <a href="#create_organization-instance_method" title="#create_organization (instance method)">#<strong>create_organization</strong>(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>Create a new organization.</p>
202
+ </div></span>
203
+
204
+ </li>
205
+
206
+
207
+ <li class="public ">
208
+ <span class="summary_signature">
209
+
138
210
  <a href="#get_inventory-instance_method" title="#get_inventory (instance method)">#<strong>get_inventory</strong>(org_id) &#x21d2; Array </a>
139
211
 
140
212
 
@@ -207,7 +279,7 @@
207
279
  <li class="public ">
208
280
  <span class="summary_signature">
209
281
 
210
- <a href="#get_snmp_status-instance_method" title="#get_snmp_status (instance method)">#<strong>get_snmp_status</strong>(org_id) &#x21d2; Hash </a>
282
+ <a href="#get_snmp_settings-instance_method" title="#get_snmp_settings (instance method)">#<strong>get_snmp_settings</strong>(org_id) &#x21d2; Hash </a>
211
283
 
212
284
 
213
285
 
@@ -249,6 +321,102 @@
249
321
  <p>Returns the configurations for an organizations 3rd party VPN peers.</p>
250
322
  </div></span>
251
323
 
324
+ </li>
325
+
326
+
327
+ <li class="public ">
328
+ <span class="summary_signature">
329
+
330
+ <a href="#list_all_organizations-instance_method" title="#list_all_organizations (instance method)">#<strong>list_all_organizations</strong> &#x21d2; Array </a>
331
+
332
+
333
+
334
+ </span>
335
+
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+ <span class="summary_desc"><div class='inline'>
345
+ <p>Returns all organizations a user is an administrator on.</p>
346
+ </div></span>
347
+
348
+ </li>
349
+
350
+
351
+ <li class="public ">
352
+ <span class="summary_signature">
353
+
354
+ <a href="#update_organization-instance_method" title="#update_organization (instance method)">#<strong>update_organization</strong>(org_id, options) &#x21d2; Hash </a>
355
+
356
+
357
+
358
+ </span>
359
+
360
+
361
+
362
+
363
+
364
+
365
+
366
+
367
+
368
+ <span class="summary_desc"><div class='inline'>
369
+ <p>Update an organization.</p>
370
+ </div></span>
371
+
372
+ </li>
373
+
374
+
375
+ <li class="public ">
376
+ <span class="summary_signature">
377
+
378
+ <a href="#update_snmp_settings-instance_method" title="#update_snmp_settings (instance method)">#<strong>update_snmp_settings</strong>(org_id, options) &#x21d2; Hash </a>
379
+
380
+
381
+
382
+ </span>
383
+
384
+
385
+
386
+
387
+
388
+
389
+
390
+
391
+
392
+ <span class="summary_desc"><div class='inline'>
393
+ <p>Updates the current SNMP status for an organization.</p>
394
+ </div></span>
395
+
396
+ </li>
397
+
398
+
399
+ <li class="public ">
400
+ <span class="summary_signature">
401
+
402
+ <a href="#update_third_party_peers-instance_method" title="#update_third_party_peers (instance method)">#<strong>update_third_party_peers</strong>(org_id, options) &#x21d2; Array </a>
403
+
404
+
405
+
406
+ </span>
407
+
408
+
409
+
410
+
411
+
412
+
413
+
414
+
415
+
416
+ <span class="summary_desc"><div class='inline'>
417
+ <p>Updates your third party peers.</p>
418
+ </div></span>
419
+
252
420
  </li>
253
421
 
254
422
 
@@ -262,9 +430,9 @@
262
430
 
263
431
 
264
432
  <div class="method_details first">
265
- <h3 class="signature first" id="get_inventory-instance_method">
433
+ <h3 class="signature first" id="claim-instance_method">
266
434
 
267
- #<strong>get_inventory</strong>(org_id) &#x21d2; <tt>Array</tt>
435
+ #<strong>claim</strong>(org_id, options) &#x21d2; <tt>Integer</tt>
268
436
 
269
437
 
270
438
 
@@ -273,7 +441,7 @@
273
441
  </h3><div class="docstring">
274
442
  <div class="discussion">
275
443
 
276
- <p>Returns the current inventory for an organization</p>
444
+ <p>Claim something</p>
277
445
 
278
446
 
279
447
  </div>
@@ -293,7 +461,25 @@
293
461
 
294
462
  &mdash;
295
463
  <div class='inline'>
296
- <p>dashboard organization ID</p>
464
+ <p>the organization that you want to claim to</p>
465
+ </div>
466
+
467
+ </li>
468
+
469
+ <li>
470
+
471
+ <span class='name'>options</span>
472
+
473
+
474
+ <span class='type'>(<tt>Hash</tt>)</span>
475
+
476
+
477
+
478
+ &mdash;
479
+ <div class='inline'>
480
+ <p>a hash containing information about what you want to claim. This can be
481
+ order, serial, licenseKey and licenseMode. Refer to the official Dashboard
482
+ API documentation for more information about these</p>
297
483
  </div>
298
484
 
299
485
  </li>
@@ -306,13 +492,13 @@
306
492
  <li>
307
493
 
308
494
 
309
- <span class='type'>(<tt>Array</tt>)</span>
495
+ <span class='type'>(<tt>Integer</tt>)</span>
310
496
 
311
497
 
312
498
 
313
499
  &mdash;
314
500
  <div class='inline'>
315
- <p>an array of hashes containg information on each individual device</p>
501
+ <p>HTTP Code</p>
316
502
  </div>
317
503
 
318
504
  </li>
@@ -325,15 +511,21 @@
325
511
  <pre class="lines">
326
512
 
327
513
 
328
- 21
329
- 22
330
- 23</pre>
514
+ 109
515
+ 110
516
+ 111
517
+ 112
518
+ 113
519
+ 114</pre>
331
520
  </td>
332
521
  <td>
333
- <pre class="code"><span class="info file"># File 'lib/organizations.rb', line 21</span>
522
+ <pre class="code"><span class="info file"># File 'lib/organizations.rb', line 109</span>
334
523
 
335
- <span class='kw'>def</span> <span class='id identifier rubyid_get_inventory'>get_inventory</span><span class='lparen'>(</span><span class='id identifier rubyid_org_id'>org_id</span><span class='rparen'>)</span>
336
- <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'>/organizations/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_org_id'>org_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/inventory</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>
524
+ <span class='kw'>def</span> <span class='id identifier rubyid_claim'>claim</span><span class='lparen'>(</span><span class='id identifier rubyid_org_id'>org_id</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
525
+ <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>
526
+
527
+ <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>
528
+ <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'>/organizations/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_org_id'>org_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/claim</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'>POST</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
337
529
  <span class='kw'>end</span></pre>
338
530
  </td>
339
531
  </tr>
@@ -341,9 +533,9 @@
341
533
  </div>
342
534
 
343
535
  <div class="method_details ">
344
- <h3 class="signature " id="get_license_state-instance_method">
536
+ <h3 class="signature " id="clone_organization-instance_method">
345
537
 
346
- #<strong>get_license_state</strong>(org_id) &#x21d2; <tt>Hash</tt>
538
+ #<strong>clone_organization</strong>(source_org_id, options) &#x21d2; <tt>Hash</tt>
347
539
 
348
540
 
349
541
 
@@ -352,7 +544,7 @@
352
544
  </h3><div class="docstring">
353
545
  <div class="discussion">
354
546
 
355
- <p>Returns the current license state for a given organization</p>
547
+ <p>Clone an organization</p>
356
548
 
357
549
 
358
550
  </div>
@@ -363,7 +555,7 @@
363
555
 
364
556
  <li>
365
557
 
366
- <span class='name'>org_id</span>
558
+ <span class='name'>source_org_id</span>
367
559
 
368
560
 
369
561
  <span class='type'>(<tt>String</tt>)</span>
@@ -372,7 +564,23 @@
372
564
 
373
565
  &mdash;
374
566
  <div class='inline'>
375
- <p>dashboard organization ID</p>
567
+ <p>the source organization that we want to clone from</p>
568
+ </div>
569
+
570
+ </li>
571
+
572
+ <li>
573
+
574
+ <span class='name'>options</span>
575
+
576
+
577
+ <span class='type'>(<tt>Hash</tt>)</span>
578
+
579
+
580
+
581
+ &mdash;
582
+ <div class='inline'>
583
+ <p>options hash containing the attributes for the new organization</p>
376
584
  </div>
377
585
 
378
586
  </li>
@@ -391,7 +599,7 @@
391
599
 
392
600
  &mdash;
393
601
  <div class='inline'>
394
- <p>results contains the current license state information</p>
602
+ <p>the attributes of the newly cloned organization</p>
395
603
  </div>
396
604
 
397
605
  </li>
@@ -404,15 +612,21 @@
404
612
  <pre class="lines">
405
613
 
406
614
 
407
- 14
408
- 15
409
- 16</pre>
615
+ 96
616
+ 97
617
+ 98
618
+ 99
619
+ 100
620
+ 101</pre>
410
621
  </td>
411
622
  <td>
412
- <pre class="code"><span class="info file"># File 'lib/organizations.rb', line 14</span>
623
+ <pre class="code"><span class="info file"># File 'lib/organizations.rb', line 96</span>
413
624
 
414
- <span class='kw'>def</span> <span class='id identifier rubyid_get_license_state'>get_license_state</span><span class='lparen'>(</span><span class='id identifier rubyid_org_id'>org_id</span><span class='rparen'>)</span>
415
- <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'>/organizations/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_org_id'>org_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/licenseState</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>
625
+ <span class='kw'>def</span> <span class='id identifier rubyid_clone_organization'>clone_organization</span><span class='lparen'>(</span><span class='id identifier rubyid_source_org_id'>source_org_id</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
626
+ <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>
627
+
628
+ <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>
629
+ <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'>/organizations/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_source_org_id'>source_org_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/clone</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'>POST</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
416
630
  <span class='kw'>end</span></pre>
417
631
  </td>
418
632
  </tr>
@@ -420,9 +634,9 @@
420
634
  </div>
421
635
 
422
636
  <div class="method_details ">
423
- <h3 class="signature " id="get_organization-instance_method">
637
+ <h3 class="signature " id="create_organization-instance_method">
424
638
 
425
- #<strong>get_organization</strong>(org_id) &#x21d2; <tt>Hash</tt>
639
+ #<strong>create_organization</strong>(options) &#x21d2; <tt>Hash</tt>
426
640
 
427
641
 
428
642
 
@@ -431,7 +645,7 @@
431
645
  </h3><div class="docstring">
432
646
  <div class="discussion">
433
647
 
434
- <p>Returns information about an organization</p>
648
+ <p>Create a new organization</p>
435
649
 
436
650
 
437
651
  </div>
@@ -442,16 +656,16 @@
442
656
 
443
657
  <li>
444
658
 
445
- <span class='name'>org_id</span>
659
+ <span class='name'>options</span>
446
660
 
447
661
 
448
- <span class='type'>(<tt>String</tt>)</span>
662
+ <span class='type'>(<tt>Hash</tt>)</span>
449
663
 
450
664
 
451
665
 
452
666
  &mdash;
453
667
  <div class='inline'>
454
- <p>dashboard organization ID</p>
668
+ <p>an options hash containing the name of the new organization</p>
455
669
  </div>
456
670
 
457
671
  </li>
@@ -470,7 +684,7 @@
470
684
 
471
685
  &mdash;
472
686
  <div class='inline'>
473
- <p>results contains the org id and name of the given organization</p>
687
+ <p>the attributes of the newly created organization</p>
474
688
  </div>
475
689
 
476
690
  </li>
@@ -483,15 +697,21 @@
483
697
  <pre class="lines">
484
698
 
485
699
 
486
- 7
487
- 8
488
- 9</pre>
700
+ 85
701
+ 86
702
+ 87
703
+ 88
704
+ 89
705
+ 90</pre>
489
706
  </td>
490
707
  <td>
491
- <pre class="code"><span class="info file"># File 'lib/organizations.rb', line 7</span>
708
+ <pre class="code"><span class="info file"># File 'lib/organizations.rb', line 85</span>
492
709
 
493
- <span class='kw'>def</span> <span class='id identifier rubyid_get_organization'>get_organization</span><span class='lparen'>(</span><span class='id identifier rubyid_org_id'>org_id</span><span class='rparen'>)</span>
494
- <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'>/organizations/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_org_id'>org_id</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>
710
+ <span class='kw'>def</span> <span class='id identifier rubyid_create_organization'>create_organization</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
711
+ <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>
712
+
713
+ <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>
714
+ <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'>/organizations</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'>POST</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
495
715
  <span class='kw'>end</span></pre>
496
716
  </td>
497
717
  </tr>
@@ -499,9 +719,9 @@
499
719
  </div>
500
720
 
501
721
  <div class="method_details ">
502
- <h3 class="signature " id="get_snmp_status-instance_method">
722
+ <h3 class="signature " id="get_inventory-instance_method">
503
723
 
504
- #<strong>get_snmp_status</strong>(org_id) &#x21d2; <tt>Hash</tt>
724
+ #<strong>get_inventory</strong>(org_id) &#x21d2; <tt>Array</tt>
505
725
 
506
726
 
507
727
 
@@ -510,7 +730,7 @@
510
730
  </h3><div class="docstring">
511
731
  <div class="discussion">
512
732
 
513
- <p>Returns the current SNMP status for an organization</p>
733
+ <p>Returns the current inventory for an organization</p>
514
734
 
515
735
 
516
736
  </div>
@@ -543,13 +763,13 @@
543
763
  <li>
544
764
 
545
765
 
546
- <span class='type'>(<tt>Hash</tt>)</span>
766
+ <span class='type'>(<tt>Array</tt>)</span>
547
767
 
548
768
 
549
769
 
550
770
  &mdash;
551
771
  <div class='inline'>
552
- <p>a hash containing all SNMP configuration information for an organization</p>
772
+ <p>an array of hashes containg information on each individual device</p>
553
773
  </div>
554
774
 
555
775
  </li>
@@ -562,15 +782,15 @@
562
782
  <pre class="lines">
563
783
 
564
784
 
565
- 28
566
- 29
567
- 30</pre>
785
+ 21
786
+ 22
787
+ 23</pre>
568
788
  </td>
569
789
  <td>
570
- <pre class="code"><span class="info file"># File 'lib/organizations.rb', line 28</span>
790
+ <pre class="code"><span class="info file"># File 'lib/organizations.rb', line 21</span>
571
791
 
572
- <span class='kw'>def</span> <span class='id identifier rubyid_get_snmp_status'>get_snmp_status</span><span class='lparen'>(</span><span class='id identifier rubyid_org_id'>org_id</span><span class='rparen'>)</span>
573
- <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'>/organizations/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_org_id'>org_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/snmp</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>
792
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_inventory'>get_inventory</span><span class='lparen'>(</span><span class='id identifier rubyid_org_id'>org_id</span><span class='rparen'>)</span>
793
+ <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'>/organizations/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_org_id'>org_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/inventory</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>
574
794
  <span class='kw'>end</span></pre>
575
795
  </td>
576
796
  </tr>
@@ -578,9 +798,9 @@
578
798
  </div>
579
799
 
580
800
  <div class="method_details ">
581
- <h3 class="signature " id="get_third_party_peers-instance_method">
801
+ <h3 class="signature " id="get_license_state-instance_method">
582
802
 
583
- #<strong>get_third_party_peers</strong>(org_id) &#x21d2; <tt>Array</tt>
803
+ #<strong>get_license_state</strong>(org_id) &#x21d2; <tt>Hash</tt>
584
804
 
585
805
 
586
806
 
@@ -589,7 +809,7 @@
589
809
  </h3><div class="docstring">
590
810
  <div class="discussion">
591
811
 
592
- <p>Returns the configurations for an organizations 3rd party VPN peers</p>
812
+ <p>Returns the current license state for a given organization</p>
593
813
 
594
814
 
595
815
  </div>
@@ -622,14 +842,13 @@
622
842
  <li>
623
843
 
624
844
 
625
- <span class='type'>(<tt>Array</tt>)</span>
845
+ <span class='type'>(<tt>Hash</tt>)</span>
626
846
 
627
847
 
628
848
 
629
849
  &mdash;
630
850
  <div class='inline'>
631
- <p>an arrry of hashes containing the configuration information for each 3rd
632
- party VPN peer</p>
851
+ <p>results contains the current license state information</p>
633
852
  </div>
634
853
 
635
854
  </li>
@@ -642,19 +861,606 @@ party VPN peer</p>
642
861
  <pre class="lines">
643
862
 
644
863
 
645
- 36
646
- 37
647
- 38</pre>
864
+ 14
865
+ 15
866
+ 16</pre>
648
867
  </td>
649
868
  <td>
650
- <pre class="code"><span class="info file"># File 'lib/organizations.rb', line 36</span>
869
+ <pre class="code"><span class="info file"># File 'lib/organizations.rb', line 14</span>
651
870
 
652
- <span class='kw'>def</span> <span class='id identifier rubyid_get_third_party_peers'>get_third_party_peers</span><span class='lparen'>(</span><span class='id identifier rubyid_org_id'>org_id</span><span class='rparen'>)</span>
871
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_license_state'>get_license_state</span><span class='lparen'>(</span><span class='id identifier rubyid_org_id'>org_id</span><span class='rparen'>)</span>
872
+ <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'>/organizations/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_org_id'>org_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/licenseState</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>
873
+ <span class='kw'>end</span></pre>
874
+ </td>
875
+ </tr>
876
+ </table>
877
+ </div>
878
+
879
+ <div class="method_details ">
880
+ <h3 class="signature " id="get_organization-instance_method">
881
+
882
+ #<strong>get_organization</strong>(org_id) &#x21d2; <tt>Hash</tt>
883
+
884
+
885
+
886
+
887
+
888
+ </h3><div class="docstring">
889
+ <div class="discussion">
890
+
891
+ <p>Returns information about an organization</p>
892
+
893
+
894
+ </div>
895
+ </div>
896
+ <div class="tags">
897
+ <p class="tag_title">Parameters:</p>
898
+ <ul class="param">
899
+
900
+ <li>
901
+
902
+ <span class='name'>org_id</span>
903
+
904
+
905
+ <span class='type'>(<tt>String</tt>)</span>
906
+
907
+
908
+
909
+ &mdash;
910
+ <div class='inline'>
911
+ <p>dashboard organization ID</p>
912
+ </div>
913
+
914
+ </li>
915
+
916
+ </ul>
917
+
918
+ <p class="tag_title">Returns:</p>
919
+ <ul class="return">
920
+
921
+ <li>
922
+
923
+
924
+ <span class='type'>(<tt>Hash</tt>)</span>
925
+
926
+
927
+
928
+ &mdash;
929
+ <div class='inline'>
930
+ <p>results contains the org id and name of the given organization</p>
931
+ </div>
932
+
933
+ </li>
934
+
935
+ </ul>
936
+
937
+ </div><table class="source_code">
938
+ <tr>
939
+ <td>
940
+ <pre class="lines">
941
+
942
+
943
+ 7
944
+ 8
945
+ 9</pre>
946
+ </td>
947
+ <td>
948
+ <pre class="code"><span class="info file"># File 'lib/organizations.rb', line 7</span>
949
+
950
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_organization'>get_organization</span><span class='lparen'>(</span><span class='id identifier rubyid_org_id'>org_id</span><span class='rparen'>)</span>
951
+ <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'>/organizations/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_org_id'>org_id</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>
952
+ <span class='kw'>end</span></pre>
953
+ </td>
954
+ </tr>
955
+ </table>
956
+ </div>
957
+
958
+ <div class="method_details ">
959
+ <h3 class="signature " id="get_snmp_settings-instance_method">
960
+
961
+ #<strong>get_snmp_settings</strong>(org_id) &#x21d2; <tt>Hash</tt>
962
+
963
+
964
+
965
+
966
+
967
+ </h3><div class="docstring">
968
+ <div class="discussion">
969
+
970
+ <p>Returns the current SNMP status for an organization</p>
971
+
972
+
973
+ </div>
974
+ </div>
975
+ <div class="tags">
976
+ <p class="tag_title">Parameters:</p>
977
+ <ul class="param">
978
+
979
+ <li>
980
+
981
+ <span class='name'>org_id</span>
982
+
983
+
984
+ <span class='type'>(<tt>String</tt>)</span>
985
+
986
+
987
+
988
+ &mdash;
989
+ <div class='inline'>
990
+ <p>dashboard organization ID</p>
991
+ </div>
992
+
993
+ </li>
994
+
995
+ </ul>
996
+
997
+ <p class="tag_title">Returns:</p>
998
+ <ul class="return">
999
+
1000
+ <li>
1001
+
1002
+
1003
+ <span class='type'>(<tt>Hash</tt>)</span>
1004
+
1005
+
1006
+
1007
+ &mdash;
1008
+ <div class='inline'>
1009
+ <p>a hash containing all SNMP configuration information for an organization</p>
1010
+ </div>
1011
+
1012
+ </li>
1013
+
1014
+ </ul>
1015
+
1016
+ </div><table class="source_code">
1017
+ <tr>
1018
+ <td>
1019
+ <pre class="lines">
1020
+
1021
+
1022
+ 28
1023
+ 29
1024
+ 30</pre>
1025
+ </td>
1026
+ <td>
1027
+ <pre class="code"><span class="info file"># File 'lib/organizations.rb', line 28</span>
1028
+
1029
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_snmp_settings'>get_snmp_settings</span><span class='lparen'>(</span><span class='id identifier rubyid_org_id'>org_id</span><span class='rparen'>)</span>
1030
+ <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'>/organizations/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_org_id'>org_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/snmp</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>
1031
+ <span class='kw'>end</span></pre>
1032
+ </td>
1033
+ </tr>
1034
+ </table>
1035
+ </div>
1036
+
1037
+ <div class="method_details ">
1038
+ <h3 class="signature " id="get_third_party_peers-instance_method">
1039
+
1040
+ #<strong>get_third_party_peers</strong>(org_id) &#x21d2; <tt>Array</tt>
1041
+
1042
+
1043
+
1044
+
1045
+
1046
+ </h3><div class="docstring">
1047
+ <div class="discussion">
1048
+
1049
+ <p>Returns the configurations for an organizations 3rd party VPN peers</p>
1050
+
1051
+
1052
+ </div>
1053
+ </div>
1054
+ <div class="tags">
1055
+ <p class="tag_title">Parameters:</p>
1056
+ <ul class="param">
1057
+
1058
+ <li>
1059
+
1060
+ <span class='name'>org_id</span>
1061
+
1062
+
1063
+ <span class='type'>(<tt>String</tt>)</span>
1064
+
1065
+
1066
+
1067
+ &mdash;
1068
+ <div class='inline'>
1069
+ <p>dashboard organization ID</p>
1070
+ </div>
1071
+
1072
+ </li>
1073
+
1074
+ </ul>
1075
+
1076
+ <p class="tag_title">Returns:</p>
1077
+ <ul class="return">
1078
+
1079
+ <li>
1080
+
1081
+
1082
+ <span class='type'>(<tt>Array</tt>)</span>
1083
+
1084
+
1085
+
1086
+ &mdash;
1087
+ <div class='inline'>
1088
+ <p>an arrry of hashes containing the configuration information for each 3rd
1089
+ party VPN peer</p>
1090
+ </div>
1091
+
1092
+ </li>
1093
+
1094
+ </ul>
1095
+
1096
+ </div><table class="source_code">
1097
+ <tr>
1098
+ <td>
1099
+ <pre class="lines">
1100
+
1101
+
1102
+ 49
1103
+ 50
1104
+ 51</pre>
1105
+ </td>
1106
+ <td>
1107
+ <pre class="code"><span class="info file"># File 'lib/organizations.rb', line 49</span>
1108
+
1109
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_third_party_peers'>get_third_party_peers</span><span class='lparen'>(</span><span class='id identifier rubyid_org_id'>org_id</span><span class='rparen'>)</span>
653
1110
  <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'>/organizations/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_org_id'>org_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/thirdPartyVPNPeers</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>
654
1111
  <span class='kw'>end</span></pre>
655
1112
  </td>
656
1113
  </tr>
657
1114
  </table>
1115
+ </div>
1116
+
1117
+ <div class="method_details ">
1118
+ <h3 class="signature " id="list_all_organizations-instance_method">
1119
+
1120
+ #<strong>list_all_organizations</strong> &#x21d2; <tt>Array</tt>
1121
+
1122
+
1123
+
1124
+
1125
+
1126
+ </h3><div class="docstring">
1127
+ <div class="discussion">
1128
+
1129
+ <p>Returns all organizations a user is an administrator on</p>
1130
+
1131
+
1132
+ </div>
1133
+ </div>
1134
+ <div class="tags">
1135
+
1136
+ <p class="tag_title">Returns:</p>
1137
+ <ul class="return">
1138
+
1139
+ <li>
1140
+
1141
+
1142
+ <span class='type'>(<tt>Array</tt>)</span>
1143
+
1144
+
1145
+
1146
+ &mdash;
1147
+ <div class='inline'>
1148
+ <p>an array of hashes containing the organizations and their attributes</p>
1149
+ </div>
1150
+
1151
+ </li>
1152
+
1153
+ </ul>
1154
+
1155
+ </div><table class="source_code">
1156
+ <tr>
1157
+ <td>
1158
+ <pre class="lines">
1159
+
1160
+
1161
+ 67
1162
+ 68
1163
+ 69</pre>
1164
+ </td>
1165
+ <td>
1166
+ <pre class="code"><span class="info file"># File 'lib/organizations.rb', line 67</span>
1167
+
1168
+ <span class='kw'>def</span> <span class='id identifier rubyid_list_all_organizations'>list_all_organizations</span>
1169
+ <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'>/organizations</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>
1170
+ <span class='kw'>end</span></pre>
1171
+ </td>
1172
+ </tr>
1173
+ </table>
1174
+ </div>
1175
+
1176
+ <div class="method_details ">
1177
+ <h3 class="signature " id="update_organization-instance_method">
1178
+
1179
+ #<strong>update_organization</strong>(org_id, options) &#x21d2; <tt>Hash</tt>
1180
+
1181
+
1182
+
1183
+
1184
+
1185
+ </h3><div class="docstring">
1186
+ <div class="discussion">
1187
+
1188
+ <p>Update an organization</p>
1189
+
1190
+
1191
+ </div>
1192
+ </div>
1193
+ <div class="tags">
1194
+ <p class="tag_title">Parameters:</p>
1195
+ <ul class="param">
1196
+
1197
+ <li>
1198
+
1199
+ <span class='name'>org_id</span>
1200
+
1201
+
1202
+ <span class='type'>(<tt>String</tt>)</span>
1203
+
1204
+
1205
+
1206
+ &mdash;
1207
+ <div class='inline'>
1208
+ <p>the organization ID that you want to update</p>
1209
+ </div>
1210
+
1211
+ </li>
1212
+
1213
+ <li>
1214
+
1215
+ <span class='name'>options</span>
1216
+
1217
+
1218
+ <span class='type'>(<tt>Hash</tt>)</span>
1219
+
1220
+
1221
+
1222
+ &mdash;
1223
+ <div class='inline'>
1224
+ <p>an options hash containing the org ID and new name of the org</p>
1225
+ </div>
1226
+
1227
+ </li>
1228
+
1229
+ </ul>
1230
+
1231
+ <p class="tag_title">Returns:</p>
1232
+ <ul class="return">
1233
+
1234
+ <li>
1235
+
1236
+
1237
+ <span class='type'>(<tt>Hash</tt>)</span>
1238
+
1239
+
1240
+
1241
+ &mdash;
1242
+ <div class='inline'>
1243
+ <p>the updated attributes of the organization</p>
1244
+ </div>
1245
+
1246
+ </li>
1247
+
1248
+ </ul>
1249
+
1250
+ </div><table class="source_code">
1251
+ <tr>
1252
+ <td>
1253
+ <pre class="lines">
1254
+
1255
+
1256
+ 75
1257
+ 76
1258
+ 77
1259
+ 78
1260
+ 79
1261
+ 80</pre>
1262
+ </td>
1263
+ <td>
1264
+ <pre class="code"><span class="info file"># File 'lib/organizations.rb', line 75</span>
1265
+
1266
+ <span class='kw'>def</span> <span class='id identifier rubyid_update_organization'>update_organization</span><span class='lparen'>(</span><span class='id identifier rubyid_org_id'>org_id</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
1267
+ <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>
1268
+
1269
+ <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>
1270
+ <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'>/organizations/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_org_id'>org_id</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>
1271
+ <span class='kw'>end</span></pre>
1272
+ </td>
1273
+ </tr>
1274
+ </table>
1275
+ </div>
1276
+
1277
+ <div class="method_details ">
1278
+ <h3 class="signature " id="update_snmp_settings-instance_method">
1279
+
1280
+ #<strong>update_snmp_settings</strong>(org_id, options) &#x21d2; <tt>Hash</tt>
1281
+
1282
+
1283
+
1284
+
1285
+
1286
+ </h3><div class="docstring">
1287
+ <div class="discussion">
1288
+
1289
+ <p>Updates the current SNMP status for an organization</p>
1290
+
1291
+
1292
+ </div>
1293
+ </div>
1294
+ <div class="tags">
1295
+ <p class="tag_title">Parameters:</p>
1296
+ <ul class="param">
1297
+
1298
+ <li>
1299
+
1300
+ <span class='name'>org_id</span>
1301
+
1302
+
1303
+ <span class='type'>(<tt>String</tt>)</span>
1304
+
1305
+
1306
+
1307
+ &mdash;
1308
+ <div class='inline'>
1309
+ <p>dashboard organization ID</p>
1310
+ </div>
1311
+
1312
+ </li>
1313
+
1314
+ <li>
1315
+
1316
+ <span class='name'>options</span>
1317
+
1318
+
1319
+ <span class='type'>(<tt>Hash</tt>)</span>
1320
+
1321
+
1322
+
1323
+ &mdash;
1324
+ <div class='inline'>
1325
+ <p>a hash containing all updated SNMP configuration information for an
1326
+ organization. Please refer to official Dashboard API documentation for more
1327
+ information on these options: v2cEnabled, v3Enabled, v3AuthMode,
1328
+ v3AuthPass, v3PrivMode, v3PrivPass, peerIps</p>
1329
+ </div>
1330
+
1331
+ </li>
1332
+
1333
+ </ul>
1334
+
1335
+ <p class="tag_title">Returns:</p>
1336
+ <ul class="return">
1337
+
1338
+ <li>
1339
+
1340
+
1341
+ <span class='type'>(<tt>Hash</tt>)</span>
1342
+
1343
+
1344
+
1345
+ &mdash;
1346
+ <div class='inline'>
1347
+ <p>a hash containing all SNMP configuration information for an organization</p>
1348
+ </div>
1349
+
1350
+ </li>
1351
+
1352
+ </ul>
1353
+
1354
+ </div><table class="source_code">
1355
+ <tr>
1356
+ <td>
1357
+ <pre class="lines">
1358
+
1359
+
1360
+ 38
1361
+ 39
1362
+ 40
1363
+ 41
1364
+ 42
1365
+ 43</pre>
1366
+ </td>
1367
+ <td>
1368
+ <pre class="code"><span class="info file"># File 'lib/organizations.rb', line 38</span>
1369
+
1370
+ <span class='kw'>def</span> <span class='id identifier rubyid_update_snmp_settings'>update_snmp_settings</span><span class='lparen'>(</span><span class='id identifier rubyid_org_id'>org_id</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
1371
+ <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>
1372
+
1373
+ <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>
1374
+ <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'>/organizations/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_org_id'>org_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/snmp</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>
1375
+ <span class='kw'>end</span></pre>
1376
+ </td>
1377
+ </tr>
1378
+ </table>
1379
+ </div>
1380
+
1381
+ <div class="method_details ">
1382
+ <h3 class="signature " id="update_third_party_peers-instance_method">
1383
+
1384
+ #<strong>update_third_party_peers</strong>(org_id, options) &#x21d2; <tt>Array</tt>
1385
+
1386
+
1387
+
1388
+
1389
+
1390
+ </h3><div class="docstring">
1391
+ <div class="discussion">
1392
+
1393
+ <p>Updates your third party peers</p>
1394
+
1395
+
1396
+ </div>
1397
+ </div>
1398
+ <div class="tags">
1399
+ <p class="tag_title">Parameters:</p>
1400
+ <ul class="param">
1401
+
1402
+ <li>
1403
+
1404
+ <span class='name'>org_id</span>
1405
+
1406
+
1407
+ <span class='type'>(<tt>String</tt>)</span>
1408
+
1409
+
1410
+
1411
+ &mdash;
1412
+ <div class='inline'>
1413
+ <p>dashboard organization ID</p>
1414
+ </div>
1415
+
1416
+ </li>
1417
+
1418
+ </ul>
1419
+
1420
+ <p class="tag_title">Returns:</p>
1421
+ <ul class="return">
1422
+
1423
+ <li>
1424
+
1425
+
1426
+ <span class='type'>(<tt>Array</tt>)</span>
1427
+
1428
+
1429
+
1430
+ &mdash;
1431
+ <div class='inline'>
1432
+ <p>returns the array of hashes for all currently configured 3rd party peers</p>
1433
+ </div>
1434
+
1435
+ </li>
1436
+
1437
+ </ul>
1438
+
1439
+ </div><table class="source_code">
1440
+ <tr>
1441
+ <td>
1442
+ <pre class="lines">
1443
+
1444
+
1445
+ 58
1446
+ 59
1447
+ 60
1448
+ 61
1449
+ 62
1450
+ 63</pre>
1451
+ </td>
1452
+ <td>
1453
+ <pre class="code"><span class="info file"># File 'lib/organizations.rb', line 58</span>
1454
+
1455
+ <span class='kw'>def</span> <span class='id identifier rubyid_update_third_party_peers'>update_third_party_peers</span><span class='lparen'>(</span><span class='id identifier rubyid_org_id'>org_id</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
1456
+ <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>
1457
+
1458
+ <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>
1459
+ <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'>/organizations/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_org_id'>org_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/thirdPartyVPNPeers</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>
1460
+ <span class='kw'>end</span></pre>
1461
+ </td>
1462
+ </tr>
1463
+ </table>
658
1464
  </div>
659
1465
 
660
1466
  </div>
@@ -662,7 +1468,7 @@ party VPN peer</p>
662
1468
  </div>
663
1469
 
664
1470
  <div id="footer">
665
- Generated on Wed Nov 16 21:55:08 2016 by
1471
+ Generated on Thu Nov 17 22:15:39 2016 by
666
1472
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
667
1473
  0.9.5 (ruby-2.3.0).
668
1474
  </div>