netbox-client-ruby 0.10.0 → 0.10.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (128) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rspec.yml +6 -4
  3. data/.gitignore +6 -1
  4. data/Appraisals +17 -0
  5. data/Gemfile +15 -3
  6. data/Rakefile +2 -0
  7. data/bin/setup +1 -4
  8. data/gemfiles/faraday0.gemfile +12 -2
  9. data/gemfiles/faraday1.gemfile +11 -1
  10. data/gemfiles/faraday2.gemfile +11 -1
  11. data/lib/netbox-client-ruby.rb +2 -0
  12. data/lib/netbox_client_ruby/api/circuits/circuit.rb +1 -4
  13. data/lib/netbox_client_ruby/api/circuits/circuit_termination.rb +1 -4
  14. data/lib/netbox_client_ruby/api/circuits/circuit_terminations.rb +2 -3
  15. data/lib/netbox_client_ruby/api/circuits/circuit_type.rb +1 -1
  16. data/lib/netbox_client_ruby/api/circuits/circuit_types.rb +2 -3
  17. data/lib/netbox_client_ruby/api/circuits/circuits.rb +2 -3
  18. data/lib/netbox_client_ruby/api/circuits/provider.rb +1 -1
  19. data/lib/netbox_client_ruby/api/circuits/providers.rb +2 -3
  20. data/lib/netbox_client_ruby/api/circuits.rb +1 -9
  21. data/lib/netbox_client_ruby/api/dcim/console_connection.rb +1 -3
  22. data/lib/netbox_client_ruby/api/dcim/console_connections.rb +2 -3
  23. data/lib/netbox_client_ruby/api/dcim/console_port.rb +1 -3
  24. data/lib/netbox_client_ruby/api/dcim/console_ports.rb +2 -3
  25. data/lib/netbox_client_ruby/api/dcim/console_server_port.rb +1 -3
  26. data/lib/netbox_client_ruby/api/dcim/console_server_ports.rb +2 -3
  27. data/lib/netbox_client_ruby/api/dcim/device.rb +1 -9
  28. data/lib/netbox_client_ruby/api/dcim/device_role.rb +1 -1
  29. data/lib/netbox_client_ruby/api/dcim/device_roles.rb +2 -3
  30. data/lib/netbox_client_ruby/api/dcim/device_type.rb +1 -2
  31. data/lib/netbox_client_ruby/api/dcim/device_types.rb +2 -3
  32. data/lib/netbox_client_ruby/api/dcim/devices.rb +2 -3
  33. data/lib/netbox_client_ruby/api/dcim/interface.rb +1 -2
  34. data/lib/netbox_client_ruby/api/dcim/interface_connection.rb +1 -2
  35. data/lib/netbox_client_ruby/api/dcim/interface_connections.rb +2 -3
  36. data/lib/netbox_client_ruby/api/dcim/interfaces.rb +2 -3
  37. data/lib/netbox_client_ruby/api/dcim/inventory_item.rb +1 -2
  38. data/lib/netbox_client_ruby/api/dcim/inventory_items.rb +2 -3
  39. data/lib/netbox_client_ruby/api/dcim/manufacturer.rb +1 -1
  40. data/lib/netbox_client_ruby/api/dcim/manufacturers.rb +2 -3
  41. data/lib/netbox_client_ruby/api/dcim/platform.rb +1 -2
  42. data/lib/netbox_client_ruby/api/dcim/platforms.rb +2 -3
  43. data/lib/netbox_client_ruby/api/dcim/power_connection.rb +1 -3
  44. data/lib/netbox_client_ruby/api/dcim/power_connections.rb +2 -3
  45. data/lib/netbox_client_ruby/api/dcim/power_outlet.rb +1 -3
  46. data/lib/netbox_client_ruby/api/dcim/power_outlets.rb +2 -3
  47. data/lib/netbox_client_ruby/api/dcim/power_port.rb +1 -3
  48. data/lib/netbox_client_ruby/api/dcim/power_ports.rb +2 -3
  49. data/lib/netbox_client_ruby/api/dcim/rack.rb +1 -1
  50. data/lib/netbox_client_ruby/api/dcim/rack_group.rb +1 -3
  51. data/lib/netbox_client_ruby/api/dcim/rack_groups.rb +2 -3
  52. data/lib/netbox_client_ruby/api/dcim/rack_reservation.rb +1 -3
  53. data/lib/netbox_client_ruby/api/dcim/rack_reservations.rb +2 -3
  54. data/lib/netbox_client_ruby/api/dcim/rack_role.rb +1 -1
  55. data/lib/netbox_client_ruby/api/dcim/rack_roles.rb +2 -3
  56. data/lib/netbox_client_ruby/api/dcim/racks.rb +2 -3
  57. data/lib/netbox_client_ruby/api/dcim/region.rb +1 -1
  58. data/lib/netbox_client_ruby/api/dcim/regions.rb +2 -3
  59. data/lib/netbox_client_ruby/api/dcim/site.rb +1 -2
  60. data/lib/netbox_client_ruby/api/dcim/sites.rb +2 -3
  61. data/lib/netbox_client_ruby/api/dcim/virtual_chassis.rb +1 -2
  62. data/lib/netbox_client_ruby/api/dcim/virtual_chassis_list.rb +2 -3
  63. data/lib/netbox_client_ruby/api/dcim.rb +1 -43
  64. data/lib/netbox_client_ruby/api/extras/config_context.rb +1 -1
  65. data/lib/netbox_client_ruby/api/extras/config_contexts.rb +2 -3
  66. data/lib/netbox_client_ruby/api/extras/journal_entries.rb +2 -3
  67. data/lib/netbox_client_ruby/api/extras/journal_entry.rb +1 -1
  68. data/lib/netbox_client_ruby/api/extras/tag.rb +1 -1
  69. data/lib/netbox_client_ruby/api/extras/tags.rb +2 -3
  70. data/lib/netbox_client_ruby/api/extras.rb +1 -6
  71. data/lib/netbox_client_ruby/api/ipam/aggregate.rb +1 -2
  72. data/lib/netbox_client_ruby/api/ipam/aggregates.rb +2 -3
  73. data/lib/netbox_client_ruby/api/ipam/ip_address.rb +3 -11
  74. data/lib/netbox_client_ruby/api/ipam/ip_addresses.rb +2 -3
  75. data/lib/netbox_client_ruby/api/ipam/ip_range.rb +1 -5
  76. data/lib/netbox_client_ruby/api/ipam/ip_ranges.rb +2 -3
  77. data/lib/netbox_client_ruby/api/ipam/prefix.rb +1 -8
  78. data/lib/netbox_client_ruby/api/ipam/prefixes.rb +2 -3
  79. data/lib/netbox_client_ruby/api/ipam/rir.rb +1 -1
  80. data/lib/netbox_client_ruby/api/ipam/rirs.rb +2 -3
  81. data/lib/netbox_client_ruby/api/ipam/role.rb +1 -1
  82. data/lib/netbox_client_ruby/api/ipam/roles.rb +2 -3
  83. data/lib/netbox_client_ruby/api/ipam/service.rb +1 -2
  84. data/lib/netbox_client_ruby/api/ipam/services.rb +2 -3
  85. data/lib/netbox_client_ruby/api/ipam/vlan.rb +1 -5
  86. data/lib/netbox_client_ruby/api/ipam/vlan_group.rb +1 -2
  87. data/lib/netbox_client_ruby/api/ipam/vlan_groups.rb +2 -3
  88. data/lib/netbox_client_ruby/api/ipam/vlans.rb +2 -3
  89. data/lib/netbox_client_ruby/api/ipam/vrf.rb +1 -2
  90. data/lib/netbox_client_ruby/api/ipam/vrfs.rb +2 -3
  91. data/lib/netbox_client_ruby/api/ipam.rb +1 -21
  92. data/lib/netbox_client_ruby/api/secrets/rsa_key_pair.rb +1 -3
  93. data/lib/netbox_client_ruby/api/secrets/secret.rb +1 -3
  94. data/lib/netbox_client_ruby/api/secrets/secret_role.rb +1 -3
  95. data/lib/netbox_client_ruby/api/secrets/secret_roles.rb +2 -3
  96. data/lib/netbox_client_ruby/api/secrets/secrets.rb +2 -3
  97. data/lib/netbox_client_ruby/api/secrets/session_key.rb +1 -4
  98. data/lib/netbox_client_ruby/api/secrets.rb +1 -5
  99. data/lib/netbox_client_ruby/api/tenancy/tenant.rb +1 -2
  100. data/lib/netbox_client_ruby/api/tenancy/tenant_group.rb +1 -1
  101. data/lib/netbox_client_ruby/api/tenancy/tenant_groups.rb +2 -3
  102. data/lib/netbox_client_ruby/api/tenancy/tenants.rb +2 -3
  103. data/lib/netbox_client_ruby/api/tenancy.rb +1 -5
  104. data/lib/netbox_client_ruby/api/virtualization/cluster.rb +1 -4
  105. data/lib/netbox_client_ruby/api/virtualization/cluster_group.rb +1 -1
  106. data/lib/netbox_client_ruby/api/virtualization/cluster_groups.rb +2 -3
  107. data/lib/netbox_client_ruby/api/virtualization/cluster_type.rb +1 -1
  108. data/lib/netbox_client_ruby/api/virtualization/cluster_types.rb +2 -3
  109. data/lib/netbox_client_ruby/api/virtualization/clusters.rb +2 -3
  110. data/lib/netbox_client_ruby/api/virtualization/interface.rb +1 -2
  111. data/lib/netbox_client_ruby/api/virtualization/interfaces.rb +2 -3
  112. data/lib/netbox_client_ruby/api/virtualization/virtual_machine.rb +1 -6
  113. data/lib/netbox_client_ruby/api/virtualization/virtual_machines.rb +2 -3
  114. data/lib/netbox_client_ruby/api/virtualization.rb +1 -11
  115. data/lib/netbox_client_ruby/communication.rb +3 -4
  116. data/lib/netbox_client_ruby/connection.rb +1 -19
  117. data/lib/netbox_client_ruby/entities.rb +1 -2
  118. data/lib/netbox_client_ruby/entity.rb +9 -10
  119. data/lib/netbox_client_ruby/error.rb +2 -0
  120. data/lib/netbox_client_ruby.rb +67 -2
  121. data/netbox-client-ruby.gemspec +3 -13
  122. metadata +9 -84
  123. data/Gemfile.lock +0 -115
  124. data/VERSION +0 -1
  125. data/gemfiles/faraday0.gemfile.lock +0 -94
  126. data/gemfiles/faraday1.gemfile.lock +0 -93
  127. data/gemfiles/faraday2.gemfile.lock +0 -101
  128. data/lib/netbox_client_ruby/api.rb +0 -38
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec7ff93496769653e21eea7c3f04b184890fb7babdc00ea8f0f8173cc7040470
4
- data.tar.gz: ff23b46b13f2f849dd3b4b3465ff42ead9b771ff5a064a6aa27d9582031b4f4a
3
+ metadata.gz: 18e5869bd3208f03bf22e8289c197e33d3dffabe0f3cbc9d2ca76af857f2b4c2
4
+ data.tar.gz: 0fdfe7917cc1a7044ff62027cbeeda0f70c5f7300050900a35cb9022b7217aae
5
5
  SHA512:
6
- metadata.gz: 2f2437ae2ecb563e586b62ac05a852f6726f46d2e117373ebf0381b6b9e615906fe74504ea5898036380c08ed98b8b2b72e04095ed3b9649303f9859fa0f7da8
7
- data.tar.gz: e8ab26e54501488a91c0bc1544c2cfb8c7b79801bb6e73fa87c0c3351d24481b2a07b87ae369dab263f2b3bd7450c035a179d959f443032fdc943cf48e14a8a3
6
+ metadata.gz: 8a8d7fe9888b6dcfbb5ea83afd762c64015cccf686d745e0ac62bd9da59d4d0c1168c5d45f690b1047155bebd633041cc1ec82d95ca31aac6ec9783cf686552a
7
+ data.tar.gz: 33a83a7ce2d5456a50967b35bb49d747e605d6e1449b1152164c220b6968e6cd56177fec8667bad1f924e8d1527f7fc2dc36575c59bb906f7471a34b2d8ae880
@@ -15,11 +15,9 @@ jobs:
15
15
  matrix:
16
16
  os: [ubuntu-latest]
17
17
  # Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
18
- ruby: ['2.7', '3.0', '3.1', '3.2']
18
+ ruby: ['2.7', '3.0', '3.1', '3.2', '3.3']
19
19
  gemfile:
20
20
  [
21
- 'Gemfile',
22
- 'gemfiles/faraday0.gemfile',
23
21
  'gemfiles/faraday1.gemfile',
24
22
  'gemfiles/faraday2.gemfile',
25
23
  ]
@@ -31,11 +29,15 @@ jobs:
31
29
  gemfile: gemfiles/faraday0.gemfile
32
30
  - ruby: '3.2'
33
31
  gemfile: gemfiles/faraday0.gemfile
32
+ - ruby: '3.3'
33
+ gemfile: gemfiles/faraday0.gemfile
34
34
  runs-on: ${{ matrix.os }}
35
35
  env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
36
36
  BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}
37
37
  steps:
38
- - uses: actions/checkout@v2
38
+ - uses: actions/checkout@v4
39
+ with:
40
+ fetch-depth: 0
39
41
  - uses: ruby/setup-ruby@v1
40
42
  with:
41
43
  ruby-version: ${{ matrix.ruby }}
data/.gitignore CHANGED
@@ -13,4 +13,9 @@
13
13
  quickstart.rb
14
14
  *.gz
15
15
 
16
- /vendor/
16
+ vendor/
17
+ Gemfile.lock
18
+ *.gemfile.lock
19
+
20
+ # Ignore MacOS files
21
+ .DS_Store
data/Appraisals ADDED
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ appraise 'faraday0' do
4
+ gem 'faraday', '< 1.0'
5
+ gem 'faraday_middleware', '< 1'
6
+ end
7
+
8
+ appraise 'faraday1' do
9
+ gem 'faraday', '= 1.0'
10
+ gem 'faraday_middleware', '< 2'
11
+ end
12
+
13
+ appraise 'faraday2' do
14
+ gem 'faraday', '< 3'
15
+ gem 'faraday-net_http_persistent'
16
+ remove_gem "faraday_middleware"
17
+ end
data/Gemfile CHANGED
@@ -1,7 +1,19 @@
1
- source 'https://rubygems.org'
1
+ # frozen_string_literal: true
2
2
 
3
- gem "faraday", "~> 1.10"
4
- gem "faraday_middleware"
3
+ source 'https://rubygems.org'
5
4
 
6
5
  # Specify your gem dependencies in netbox-client-ruby.gemspec
7
6
  gemspec
7
+
8
+ gem 'appraisal', git: 'https://github.com/thoughtbot/appraisal.git'
9
+ gem 'pry'
10
+ gem 'rake'
11
+ gem 'rspec'
12
+ gem 'rubocop'
13
+ gem 'rubocop-performance'
14
+ gem 'rubocop-rake'
15
+ gem 'rubocop-rspec'
16
+
17
+ # fallback to faraday 1.x in dev environment
18
+ gem 'faraday', '~> 1.10'
19
+ gem 'faraday_middleware'
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
  require 'rspec/core/rake_task'
3
5
 
data/bin/setup CHANGED
@@ -4,7 +4,4 @@ IFS=$'\n\t'
4
4
  set -vx
5
5
 
6
6
  bundle install
7
-
8
- for filename in gemfiles/*.gemfile; do
9
- BUNDLE_GEMFILE=$filename bundle install
10
- done
7
+ bundle exec appraisal install
@@ -1,6 +1,16 @@
1
+ # This file was generated by Appraisal
2
+
1
3
  source "https://rubygems.org"
2
4
 
3
- gem "faraday", "= 0.11"
5
+ gem "appraisal", git: "https://github.com/thoughtbot/appraisal.git"
6
+ gem "pry"
7
+ gem "rake"
8
+ gem "rspec"
9
+ gem "rubocop"
10
+ gem "rubocop-performance"
11
+ gem "rubocop-rake"
12
+ gem "rubocop-rspec"
13
+ gem "faraday", "< 1.0"
4
14
  gem "faraday_middleware", "< 1"
5
15
 
6
- gemspec path: ".."
16
+ gemspec path: "../"
@@ -1,6 +1,16 @@
1
+ # This file was generated by Appraisal
2
+
1
3
  source "https://rubygems.org"
2
4
 
5
+ gem "appraisal", git: "https://github.com/thoughtbot/appraisal.git"
6
+ gem "pry"
7
+ gem "rake"
8
+ gem "rspec"
9
+ gem "rubocop"
10
+ gem "rubocop-performance"
11
+ gem "rubocop-rake"
12
+ gem "rubocop-rspec"
3
13
  gem "faraday", "= 1.0"
4
14
  gem "faraday_middleware", "< 2"
5
15
 
6
- gemspec path: ".."
16
+ gemspec path: "../"
@@ -1,6 +1,16 @@
1
+ # This file was generated by Appraisal
2
+
1
3
  source "https://rubygems.org"
2
4
 
5
+ gem "appraisal", git: "https://github.com/thoughtbot/appraisal.git"
6
+ gem "pry"
7
+ gem "rake"
8
+ gem "rspec"
9
+ gem "rubocop"
10
+ gem "rubocop-performance"
11
+ gem "rubocop-rake"
12
+ gem "rubocop-rspec"
3
13
  gem "faraday", "< 3"
4
14
  gem "faraday-net_http_persistent"
5
15
 
6
- gemspec path: ".."
16
+ gemspec path: "../"
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'netbox_client_ruby'
@@ -1,7 +1,4 @@
1
- require 'netbox_client_ruby/entity'
2
- require 'netbox_client_ruby/api/circuits/circuit_type'
3
- require 'netbox_client_ruby/api/circuits/provider'
4
- require 'netbox_client_ruby/api/tenancy/tenant'
1
+ # frozen_string_literal: true
5
2
 
6
3
  module NetboxClientRuby
7
4
  module Circuits
@@ -1,7 +1,4 @@
1
- require 'netbox_client_ruby/entity'
2
- require 'netbox_client_ruby/api/circuits/circuit'
3
- require 'netbox_client_ruby/api/dcim/site'
4
- require 'netbox_client_ruby/api/dcim/interface'
1
+ # frozen_string_literal: true
5
2
 
6
3
  module NetboxClientRuby
7
4
  module Circuits
@@ -1,12 +1,11 @@
1
- require 'netbox_client_ruby/entities'
2
- require 'netbox_client_ruby/api/circuits/circuit_termination'
1
+ # frozen_string_literal: true
3
2
 
4
3
  module NetboxClientRuby
5
4
  module Circuits
6
5
  class CircuitTerminations
7
6
  include Entities
8
7
 
9
- path 'circuits/circuit-terminations.json'
8
+ path 'circuits/circuit-terminations/'
10
9
  data_key 'results'
11
10
  count_key 'count'
12
11
  entity_creator :entity_creator
@@ -1,4 +1,4 @@
1
- require 'netbox_client_ruby/entity'
1
+ # frozen_string_literal: true
2
2
 
3
3
  module NetboxClientRuby
4
4
  module Circuits
@@ -1,12 +1,11 @@
1
- require 'netbox_client_ruby/entities'
2
- require 'netbox_client_ruby/api/circuits/circuit_type'
1
+ # frozen_string_literal: true
3
2
 
4
3
  module NetboxClientRuby
5
4
  module Circuits
6
5
  class CircuitTypes
7
6
  include Entities
8
7
 
9
- path 'circuits/circuit-types.json'
8
+ path 'circuits/circuit-types/'
10
9
  data_key 'results'
11
10
  count_key 'count'
12
11
  entity_creator :entity_creator
@@ -1,5 +1,4 @@
1
- require 'netbox_client_ruby/entities'
2
- require 'netbox_client_ruby/api/circuits/circuit'
1
+ # frozen_string_literal: true
3
2
 
4
3
  module NetboxClientRuby
5
4
  module Circuits
@@ -11,7 +10,7 @@ module NetboxClientRuby
11
10
  class Circuits
12
11
  include Entities
13
12
 
14
- path 'circuits/circuits.json'
13
+ path 'circuits/circuits/'
15
14
  data_key 'results'
16
15
  count_key 'count'
17
16
  entity_creator :entity_creator
@@ -1,4 +1,4 @@
1
- require 'netbox_client_ruby/entity'
1
+ # frozen_string_literal: true
2
2
 
3
3
  module NetboxClientRuby
4
4
  module Circuits
@@ -1,12 +1,11 @@
1
- require 'netbox_client_ruby/entities'
2
- require 'netbox_client_ruby/api/circuits/provider'
1
+ # frozen_string_literal: true
3
2
 
4
3
  module NetboxClientRuby
5
4
  module Circuits
6
5
  class Providers
7
6
  include Entities
8
7
 
9
- path 'circuits/providers.json'
8
+ path 'circuits/providers/'
10
9
  data_key 'results'
11
10
  count_key 'count'
12
11
  entity_creator :entity_creator
@@ -1,12 +1,4 @@
1
- require 'netbox_client_ruby/api/circuits/circuit'
2
- require 'netbox_client_ruby/api/circuits/circuits'
3
- require 'netbox_client_ruby/api/circuits/circuit_termination'
4
- require 'netbox_client_ruby/api/circuits/circuit_terminations'
5
- require 'netbox_client_ruby/api/circuits/circuit_type'
6
- require 'netbox_client_ruby/api/circuits/circuit_types'
7
- require 'netbox_client_ruby/api/circuits/provider'
8
- require 'netbox_client_ruby/api/circuits/providers'
9
- require 'netbox_client_ruby/communication'
1
+ # frozen_string_literal: true
10
2
 
11
3
  module NetboxClientRuby
12
4
  module Circuits
@@ -1,6 +1,4 @@
1
- require 'netbox_client_ruby/entity'
2
- require 'netbox_client_ruby/api/dcim/device'
3
- require 'netbox_client_ruby/api/dcim/console_server_port'
1
+ # frozen_string_literal: true
4
2
 
5
3
  module NetboxClientRuby
6
4
  module DCIM
@@ -1,12 +1,11 @@
1
- require 'netbox_client_ruby/entities'
2
- require 'netbox_client_ruby/api/dcim/console_connection'
1
+ # frozen_string_literal: true
3
2
 
4
3
  module NetboxClientRuby
5
4
  module DCIM
6
5
  class ConsoleConnections
7
6
  include Entities
8
7
 
9
- path 'dcim/console-connections.json'
8
+ path 'dcim/console-connections/'
10
9
  data_key 'results'
11
10
  count_key 'count'
12
11
  entity_creator :entity_creator
@@ -1,6 +1,4 @@
1
- require 'netbox_client_ruby/entity'
2
- require 'netbox_client_ruby/api/dcim/device'
3
- require 'netbox_client_ruby/api/dcim/console_server_port'
1
+ # frozen_string_literal: true
4
2
 
5
3
  module NetboxClientRuby
6
4
  module DCIM
@@ -1,12 +1,11 @@
1
- require 'netbox_client_ruby/entities'
2
- require 'netbox_client_ruby/api/dcim/console_port'
1
+ # frozen_string_literal: true
3
2
 
4
3
  module NetboxClientRuby
5
4
  module DCIM
6
5
  class ConsolePorts
7
6
  include Entities
8
7
 
9
- path 'dcim/console-ports.json'
8
+ path 'dcim/console-ports/'
10
9
  data_key 'results'
11
10
  count_key 'count'
12
11
  entity_creator :entity_creator
@@ -1,6 +1,4 @@
1
- require 'netbox_client_ruby/entity'
2
- require 'netbox_client_ruby/api/dcim/device'
3
- require 'netbox_client_ruby/api/dcim/console_port'
1
+ # frozen_string_literal: true
4
2
 
5
3
  module NetboxClientRuby
6
4
  module DCIM
@@ -1,12 +1,11 @@
1
- require 'netbox_client_ruby/entities'
2
- require 'netbox_client_ruby/api/dcim/console_server_port'
1
+ # frozen_string_literal: true
3
2
 
4
3
  module NetboxClientRuby
5
4
  module DCIM
6
5
  class ConsoleServerPorts
7
6
  include Entities
8
7
 
9
- path 'dcim/console-server-ports.json'
8
+ path 'dcim/console-server-ports/'
10
9
  data_key 'results'
11
10
  count_key 'count'
12
11
  entity_creator :entity_creator
@@ -1,12 +1,4 @@
1
- require 'netbox_client_ruby/entity'
2
- require 'netbox_client_ruby/api/dcim/device_type'
3
- require 'netbox_client_ruby/api/dcim/device_role'
4
- require 'netbox_client_ruby/api/tenancy/tenant'
5
- require 'netbox_client_ruby/api/dcim/platform'
6
- require 'netbox_client_ruby/api/dcim/site'
7
- require 'netbox_client_ruby/api/dcim/rack'
8
- require 'netbox_client_ruby/api/dcim/virtual_chassis'
9
- require 'netbox_client_ruby/api/ipam/ip_address'
1
+ # frozen_string_literal: true
10
2
 
11
3
  module NetboxClientRuby
12
4
  module DCIM
@@ -1,4 +1,4 @@
1
- require 'netbox_client_ruby/entity'
1
+ # frozen_string_literal: true
2
2
 
3
3
  module NetboxClientRuby
4
4
  module DCIM
@@ -1,12 +1,11 @@
1
- require 'netbox_client_ruby/entities'
2
- require 'netbox_client_ruby/api/dcim/device_type'
1
+ # frozen_string_literal: true
3
2
 
4
3
  module NetboxClientRuby
5
4
  module DCIM
6
5
  class DeviceRoles
7
6
  include Entities
8
7
 
9
- path 'dcim/device-roles.json'
8
+ path 'dcim/device-roles/'
10
9
  data_key 'results'
11
10
  count_key 'count'
12
11
  entity_creator :entity_creator
@@ -1,5 +1,4 @@
1
- require 'netbox_client_ruby/entity'
2
- require 'netbox_client_ruby/api/dcim/manufacturer'
1
+ # frozen_string_literal: true
3
2
 
4
3
  module NetboxClientRuby
5
4
  module DCIM
@@ -1,12 +1,11 @@
1
- require 'netbox_client_ruby/entities'
2
- require 'netbox_client_ruby/api/dcim/device_type'
1
+ # frozen_string_literal: true
3
2
 
4
3
  module NetboxClientRuby
5
4
  module DCIM
6
5
  class DeviceTypes
7
6
  include Entities
8
7
 
9
- path 'dcim/device-types.json'
8
+ path 'dcim/device-types/'
10
9
  data_key 'results'
11
10
  count_key 'count'
12
11
  entity_creator :entity_creator
@@ -1,12 +1,11 @@
1
- require 'netbox_client_ruby/entities'
2
- require 'netbox_client_ruby/api/dcim/device'
1
+ # frozen_string_literal: true
3
2
 
4
3
  module NetboxClientRuby
5
4
  module DCIM
6
5
  class Devices
7
6
  include Entities
8
7
 
9
- path 'dcim/devices.json'
8
+ path 'dcim/devices/'
10
9
  data_key 'results'
11
10
  count_key 'count'
12
11
  entity_creator :entity_creator
@@ -1,5 +1,4 @@
1
- require 'netbox_client_ruby/entity'
2
- require 'netbox_client_ruby/api/dcim/device'
1
+ # frozen_string_literal: true
3
2
 
4
3
  module NetboxClientRuby
5
4
  module DCIM
@@ -1,5 +1,4 @@
1
- require 'netbox_client_ruby/entity'
2
- require 'netbox_client_ruby/api/dcim/interface'
1
+ # frozen_string_literal: true
3
2
 
4
3
  module NetboxClientRuby
5
4
  module DCIM
@@ -1,12 +1,11 @@
1
- require 'netbox_client_ruby/entities'
2
- require 'netbox_client_ruby/api/dcim/interface_connection'
1
+ # frozen_string_literal: true
3
2
 
4
3
  module NetboxClientRuby
5
4
  module DCIM
6
5
  class InterfaceConnections
7
6
  include Entities
8
7
 
9
- path 'dcim/interface-connections.json'
8
+ path 'dcim/interface-connections/'
10
9
  data_key 'results'
11
10
  count_key 'count'
12
11
  entity_creator :entity_creator
@@ -1,12 +1,11 @@
1
- require 'netbox_client_ruby/entities'
2
- require 'netbox_client_ruby/api/dcim/interface'
1
+ # frozen_string_literal: true
3
2
 
4
3
  module NetboxClientRuby
5
4
  module DCIM
6
5
  class Interfaces
7
6
  include Entities
8
7
 
9
- path 'dcim/interfaces.json'
8
+ path 'dcim/interfaces/'
10
9
  data_key 'results'
11
10
  count_key 'count'
12
11
  entity_creator :entity_creator
@@ -1,5 +1,4 @@
1
- require 'netbox_client_ruby/entity'
2
- require 'netbox_client_ruby/api/dcim/device'
1
+ # frozen_string_literal: true
3
2
 
4
3
  module NetboxClientRuby
5
4
  module DCIM
@@ -1,12 +1,11 @@
1
- require 'netbox_client_ruby/entities'
2
- require 'netbox_client_ruby/api/dcim/inventory_item'
1
+ # frozen_string_literal: true
3
2
 
4
3
  module NetboxClientRuby
5
4
  module DCIM
6
5
  class InventoryItems
7
6
  include Entities
8
7
 
9
- path 'dcim/inventory-items.json'
8
+ path 'dcim/inventory-items/'
10
9
  data_key 'results'
11
10
  count_key 'count'
12
11
  entity_creator :entity_creator
@@ -1,4 +1,4 @@
1
- require 'netbox_client_ruby/entity'
1
+ # frozen_string_literal: true
2
2
 
3
3
  module NetboxClientRuby
4
4
  module DCIM
@@ -1,12 +1,11 @@
1
- require 'netbox_client_ruby/entities'
2
- require 'netbox_client_ruby/api/dcim/manufacturer'
1
+ # frozen_string_literal: true
3
2
 
4
3
  module NetboxClientRuby
5
4
  module DCIM
6
5
  class Manufacturers
7
6
  include Entities
8
7
 
9
- path 'dcim/manufacturers.json'
8
+ path 'dcim/manufacturers/'
10
9
  data_key 'results'
11
10
  count_key 'count'
12
11
  entity_creator :entity_creator
@@ -1,5 +1,4 @@
1
- require 'netbox_client_ruby/entity'
2
- require 'netbox_client_ruby/api/dcim/manufacturer'
1
+ # frozen_string_literal: true
3
2
 
4
3
  module NetboxClientRuby
5
4
  module DCIM
@@ -1,12 +1,11 @@
1
- require 'netbox_client_ruby/entities'
2
- require 'netbox_client_ruby/api/dcim/platform'
1
+ # frozen_string_literal: true
3
2
 
4
3
  module NetboxClientRuby
5
4
  module DCIM
6
5
  class Platforms
7
6
  include Entities
8
7
 
9
- path 'dcim/platforms.json'
8
+ path 'dcim/platforms/'
10
9
  data_key 'results'
11
10
  count_key 'count'
12
11
  entity_creator :entity_creator
@@ -1,6 +1,4 @@
1
- require 'netbox_client_ruby/entity'
2
- require 'netbox_client_ruby/api/dcim/device'
3
- require 'netbox_client_ruby/api/dcim/power_outlet'
1
+ # frozen_string_literal: true
4
2
 
5
3
  module NetboxClientRuby
6
4
  module DCIM
@@ -1,12 +1,11 @@
1
- require 'netbox_client_ruby/entities'
2
- require 'netbox_client_ruby/api/dcim/power_connection'
1
+ # frozen_string_literal: true
3
2
 
4
3
  module NetboxClientRuby
5
4
  module DCIM
6
5
  class PowerConnections
7
6
  include Entities
8
7
 
9
- path 'dcim/power-connections.json'
8
+ path 'dcim/power-connections/'
10
9
  data_key 'results'
11
10
  count_key 'count'
12
11
  entity_creator :entity_creator
@@ -1,6 +1,4 @@
1
- require 'netbox_client_ruby/entity'
2
- require 'netbox_client_ruby/api/dcim/device'
3
- require 'netbox_client_ruby/api/dcim/power_port'
1
+ # frozen_string_literal: true
4
2
 
5
3
  module NetboxClientRuby
6
4
  module DCIM
@@ -1,12 +1,11 @@
1
- require 'netbox_client_ruby/entities'
2
- require 'netbox_client_ruby/api/dcim/interface'
1
+ # frozen_string_literal: true
3
2
 
4
3
  module NetboxClientRuby
5
4
  module DCIM
6
5
  class PowerOutlets
7
6
  include Entities
8
7
 
9
- path 'dcim/power-outlets.json'
8
+ path 'dcim/power-outlets/'
10
9
  data_key 'results'
11
10
  count_key 'count'
12
11
  entity_creator :entity_creator
@@ -1,6 +1,4 @@
1
- require 'netbox_client_ruby/entity'
2
- require 'netbox_client_ruby/api/dcim/device'
3
- require 'netbox_client_ruby/api/dcim/power_outlet'
1
+ # frozen_string_literal: true
4
2
 
5
3
  module NetboxClientRuby
6
4
  module DCIM
@@ -1,12 +1,11 @@
1
- require 'netbox_client_ruby/entities'
2
- require 'netbox_client_ruby/api/dcim/interface'
1
+ # frozen_string_literal: true
3
2
 
4
3
  module NetboxClientRuby
5
4
  module DCIM
6
5
  class PowerPorts
7
6
  include Entities
8
7
 
9
- path 'dcim/power-ports.json'
8
+ path 'dcim/power-ports/'
10
9
  data_key 'results'
11
10
  count_key 'count'
12
11
  entity_creator :entity_creator