netbox-client-ruby 0.10.1 → 0.10.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rspec.yml +4 -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 +2 -5
  13. data/lib/netbox_client_ruby/api/circuits/circuit_termination.rb +2 -5
  14. data/lib/netbox_client_ruby/api/circuits/circuit_terminations.rb +1 -2
  15. data/lib/netbox_client_ruby/api/circuits/circuit_type.rb +2 -2
  16. data/lib/netbox_client_ruby/api/circuits/circuit_types.rb +1 -2
  17. data/lib/netbox_client_ruby/api/circuits/circuits.rb +1 -2
  18. data/lib/netbox_client_ruby/api/circuits/provider.rb +2 -2
  19. data/lib/netbox_client_ruby/api/circuits/providers.rb +1 -2
  20. data/lib/netbox_client_ruby/api/circuits.rb +1 -9
  21. data/lib/netbox_client_ruby/api/dcim/console_connection.rb +2 -4
  22. data/lib/netbox_client_ruby/api/dcim/console_connections.rb +1 -2
  23. data/lib/netbox_client_ruby/api/dcim/console_port.rb +2 -4
  24. data/lib/netbox_client_ruby/api/dcim/console_ports.rb +1 -2
  25. data/lib/netbox_client_ruby/api/dcim/console_server_port.rb +2 -4
  26. data/lib/netbox_client_ruby/api/dcim/console_server_ports.rb +1 -2
  27. data/lib/netbox_client_ruby/api/dcim/device.rb +2 -10
  28. data/lib/netbox_client_ruby/api/dcim/device_role.rb +2 -2
  29. data/lib/netbox_client_ruby/api/dcim/device_roles.rb +1 -2
  30. data/lib/netbox_client_ruby/api/dcim/device_type.rb +2 -3
  31. data/lib/netbox_client_ruby/api/dcim/device_types.rb +1 -2
  32. data/lib/netbox_client_ruby/api/dcim/devices.rb +1 -2
  33. data/lib/netbox_client_ruby/api/dcim/interface.rb +2 -3
  34. data/lib/netbox_client_ruby/api/dcim/interface_connection.rb +2 -3
  35. data/lib/netbox_client_ruby/api/dcim/interface_connections.rb +1 -2
  36. data/lib/netbox_client_ruby/api/dcim/interfaces.rb +1 -2
  37. data/lib/netbox_client_ruby/api/dcim/inventory_item.rb +2 -3
  38. data/lib/netbox_client_ruby/api/dcim/inventory_items.rb +1 -2
  39. data/lib/netbox_client_ruby/api/dcim/manufacturer.rb +2 -2
  40. data/lib/netbox_client_ruby/api/dcim/manufacturers.rb +1 -2
  41. data/lib/netbox_client_ruby/api/dcim/platform.rb +2 -3
  42. data/lib/netbox_client_ruby/api/dcim/platforms.rb +1 -2
  43. data/lib/netbox_client_ruby/api/dcim/power_connection.rb +2 -4
  44. data/lib/netbox_client_ruby/api/dcim/power_connections.rb +1 -2
  45. data/lib/netbox_client_ruby/api/dcim/power_outlet.rb +2 -4
  46. data/lib/netbox_client_ruby/api/dcim/power_outlets.rb +1 -2
  47. data/lib/netbox_client_ruby/api/dcim/power_port.rb +2 -4
  48. data/lib/netbox_client_ruby/api/dcim/power_ports.rb +1 -2
  49. data/lib/netbox_client_ruby/api/dcim/rack.rb +2 -2
  50. data/lib/netbox_client_ruby/api/dcim/rack_group.rb +2 -4
  51. data/lib/netbox_client_ruby/api/dcim/rack_groups.rb +1 -2
  52. data/lib/netbox_client_ruby/api/dcim/rack_reservation.rb +2 -4
  53. data/lib/netbox_client_ruby/api/dcim/rack_reservations.rb +1 -2
  54. data/lib/netbox_client_ruby/api/dcim/rack_role.rb +2 -2
  55. data/lib/netbox_client_ruby/api/dcim/rack_roles.rb +1 -2
  56. data/lib/netbox_client_ruby/api/dcim/racks.rb +1 -2
  57. data/lib/netbox_client_ruby/api/dcim/region.rb +2 -2
  58. data/lib/netbox_client_ruby/api/dcim/regions.rb +1 -2
  59. data/lib/netbox_client_ruby/api/dcim/site.rb +2 -3
  60. data/lib/netbox_client_ruby/api/dcim/sites.rb +1 -2
  61. data/lib/netbox_client_ruby/api/dcim/virtual_chassis.rb +2 -3
  62. data/lib/netbox_client_ruby/api/dcim/virtual_chassis_list.rb +1 -2
  63. data/lib/netbox_client_ruby/api/dcim.rb +1 -43
  64. data/lib/netbox_client_ruby/api/extras/config_context.rb +2 -2
  65. data/lib/netbox_client_ruby/api/extras/config_contexts.rb +1 -2
  66. data/lib/netbox_client_ruby/api/extras/journal_entries.rb +1 -2
  67. data/lib/netbox_client_ruby/api/extras/journal_entry.rb +2 -2
  68. data/lib/netbox_client_ruby/api/extras/tag.rb +2 -2
  69. data/lib/netbox_client_ruby/api/extras/tags.rb +1 -2
  70. data/lib/netbox_client_ruby/api/extras.rb +1 -6
  71. data/lib/netbox_client_ruby/api/ipam/aggregate.rb +2 -3
  72. data/lib/netbox_client_ruby/api/ipam/aggregates.rb +1 -2
  73. data/lib/netbox_client_ruby/api/ipam/ip_address.rb +4 -12
  74. data/lib/netbox_client_ruby/api/ipam/ip_addresses.rb +1 -2
  75. data/lib/netbox_client_ruby/api/ipam/ip_range.rb +2 -6
  76. data/lib/netbox_client_ruby/api/ipam/ip_ranges.rb +1 -2
  77. data/lib/netbox_client_ruby/api/ipam/prefix.rb +2 -9
  78. data/lib/netbox_client_ruby/api/ipam/prefixes.rb +1 -2
  79. data/lib/netbox_client_ruby/api/ipam/rir.rb +2 -2
  80. data/lib/netbox_client_ruby/api/ipam/rirs.rb +1 -2
  81. data/lib/netbox_client_ruby/api/ipam/role.rb +2 -2
  82. data/lib/netbox_client_ruby/api/ipam/roles.rb +1 -2
  83. data/lib/netbox_client_ruby/api/ipam/service.rb +2 -3
  84. data/lib/netbox_client_ruby/api/ipam/services.rb +1 -2
  85. data/lib/netbox_client_ruby/api/ipam/vlan.rb +2 -6
  86. data/lib/netbox_client_ruby/api/ipam/vlan_group.rb +2 -3
  87. data/lib/netbox_client_ruby/api/ipam/vlan_groups.rb +1 -2
  88. data/lib/netbox_client_ruby/api/ipam/vlans.rb +1 -2
  89. data/lib/netbox_client_ruby/api/ipam/vrf.rb +2 -3
  90. data/lib/netbox_client_ruby/api/ipam/vrfs.rb +1 -2
  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 +2 -4
  94. data/lib/netbox_client_ruby/api/secrets/secret_role.rb +2 -4
  95. data/lib/netbox_client_ruby/api/secrets/secret_roles.rb +1 -2
  96. data/lib/netbox_client_ruby/api/secrets/secrets.rb +1 -2
  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 +2 -3
  100. data/lib/netbox_client_ruby/api/tenancy/tenant_group.rb +2 -2
  101. data/lib/netbox_client_ruby/api/tenancy/tenant_groups.rb +1 -2
  102. data/lib/netbox_client_ruby/api/tenancy/tenants.rb +1 -2
  103. data/lib/netbox_client_ruby/api/tenancy.rb +1 -5
  104. data/lib/netbox_client_ruby/api/virtualization/cluster.rb +2 -5
  105. data/lib/netbox_client_ruby/api/virtualization/cluster_group.rb +2 -2
  106. data/lib/netbox_client_ruby/api/virtualization/cluster_groups.rb +1 -2
  107. data/lib/netbox_client_ruby/api/virtualization/cluster_type.rb +2 -2
  108. data/lib/netbox_client_ruby/api/virtualization/cluster_types.rb +1 -2
  109. data/lib/netbox_client_ruby/api/virtualization/clusters.rb +1 -2
  110. data/lib/netbox_client_ruby/api/virtualization/interface.rb +2 -3
  111. data/lib/netbox_client_ruby/api/virtualization/interfaces.rb +1 -2
  112. data/lib/netbox_client_ruby/api/virtualization/virtual_machine.rb +2 -7
  113. data/lib/netbox_client_ruby/api/virtualization/virtual_machines.rb +1 -2
  114. data/lib/netbox_client_ruby/api/virtualization.rb +1 -11
  115. data/lib/netbox_client_ruby/communication.rb +1 -2
  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 +2 -3
  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 +4 -14
  122. metadata +10 -84
  123. data/Gemfile.lock +0 -117
  124. data/gemfiles/faraday0.gemfile.lock +0 -94
  125. data/gemfiles/faraday1.gemfile.lock +0 -93
  126. data/gemfiles/faraday2.gemfile.lock +0 -101
  127. data/lib/netbox_client_ruby/api.rb +0 -38
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e05b0acd52ba688b19ce5874d612d9601290f8ec3c88a4798849f976c3f0b368
4
- data.tar.gz: 1cd26e233b325ff0502698cd91e6036f430d5d7920aa660b6edeb9852f8c1e11
3
+ metadata.gz: 4a632845ab62cb10130f5008b63077722e648f6914bb17c0120ca24717fef106
4
+ data.tar.gz: cd1846a99f1b50edbb0789c8fb09f7178228df187e18384d3a9936180c8bb9ff
5
5
  SHA512:
6
- metadata.gz: 8c12dbb99d8fe6a8c431252fe95489395b55d783161989b457cb8f53d97303289e13e83b45a55bdad9e679fac347b921ac64843c54e2c1b7c64d4d98d66fe383
7
- data.tar.gz: 5bd2e5b74095102928eee7f63a2ddfd19f213e099f0eac97edd8ce7be58b754416f9a363b465aa07de99c6d99cc96cfb8542f9f2f6af1e9182862245539ae626
6
+ metadata.gz: 4bf36821671e75f9978ff981ac9919fd4a01e12194b082623379b3dcc1ad80a7f17a172feb73ab90ce2f94e9fbace89f349fea1fe2b4e35232b498ef15da7613
7
+ data.tar.gz: '091ee5ebe63466e0093bd978ad3c7560df12a4978e542fa8467a0d16163fbee22119b72f9493578e87ecd5fbb624755dcc5c5674093577a9807c391df351a418'
@@ -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,13 @@ 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
39
  with:
40
40
  fetch-depth: 0
41
41
  - uses: ruby/setup-ruby@v1
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
@@ -19,7 +16,7 @@ module NetboxClientRuby
19
16
 
20
17
  id id: :id
21
18
  deletable true
22
- path 'circuits/circuits/:id.json'
19
+ path 'circuits/circuits/:id/'
23
20
  creation_path 'circuits/circuits/'
24
21
 
25
22
  object_fields(
@@ -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
@@ -10,7 +7,7 @@ module NetboxClientRuby
10
7
 
11
8
  id id: :id
12
9
  deletable true
13
- path 'circuits/circuit-terminations/:id.json'
10
+ path 'circuits/circuit-terminations/:id/'
14
11
  creation_path 'circuits/circuit-terminations/'
15
12
 
16
13
  object_fields(
@@ -1,5 +1,4 @@
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
@@ -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
@@ -7,7 +7,7 @@ module NetboxClientRuby
7
7
 
8
8
  id id: :id
9
9
  deletable true
10
- path 'circuits/circuit-types/:id.json'
10
+ path 'circuits/circuit-types/:id/'
11
11
  creation_path 'circuits/circuit-types/'
12
12
  end
13
13
  end
@@ -1,5 +1,4 @@
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
@@ -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
@@ -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
@@ -7,7 +7,7 @@ module NetboxClientRuby
7
7
 
8
8
  id id: :id
9
9
  deletable true
10
- path 'circuits/providers/:id.json'
10
+ path 'circuits/providers/:id/'
11
11
  creation_path 'circuits/providers/'
12
12
  end
13
13
  end
@@ -1,5 +1,4 @@
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
@@ -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
@@ -9,7 +7,7 @@ module NetboxClientRuby
9
7
 
10
8
  id id: :id
11
9
  deletable true
12
- path 'dcim/console-connections/:id.json'
10
+ path 'dcim/console-connections/:id/'
13
11
  creation_path 'dcim/console-connections/'
14
12
 
15
13
  object_fields(
@@ -1,5 +1,4 @@
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
@@ -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
@@ -9,7 +7,7 @@ module NetboxClientRuby
9
7
 
10
8
  id id: :id
11
9
  deletable true
12
- path 'dcim/console-ports/:id.json'
10
+ path 'dcim/console-ports/:id/'
13
11
  creation_path 'dcim/console-ports/'
14
12
 
15
13
  object_fields(
@@ -1,5 +1,4 @@
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
@@ -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
@@ -9,7 +7,7 @@ module NetboxClientRuby
9
7
 
10
8
  id id: :id
11
9
  deletable true
12
- path 'dcim/console-server-ports/:id.json'
10
+ path 'dcim/console-server-ports/:id/'
13
11
  creation_path 'dcim/console-server-ports/'
14
12
 
15
13
  object_fields(
@@ -1,5 +1,4 @@
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
@@ -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
@@ -15,7 +7,7 @@ module NetboxClientRuby
15
7
 
16
8
  id id: :id
17
9
  deletable true
18
- path 'dcim/devices/:id.json'
10
+ path 'dcim/devices/:id/'
19
11
  creation_path 'dcim/devices/'
20
12
  object_fields(
21
13
  device_type: proc { |raw_data| DeviceType.new raw_data['id'] },
@@ -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
@@ -7,7 +7,7 @@ module NetboxClientRuby
7
7
 
8
8
  id id: :id
9
9
  deletable true
10
- path 'dcim/device-roles/:id.json'
10
+ path 'dcim/device-roles/:id/'
11
11
  creation_path 'dcim/device-roles/'
12
12
  end
13
13
  end
@@ -1,5 +1,4 @@
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
@@ -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
@@ -17,7 +16,7 @@ module NetboxClientRuby
17
16
 
18
17
  id id: :id
19
18
  deletable true
20
- path 'dcim/device-types/:id.json'
19
+ path 'dcim/device-types/:id/'
21
20
  creation_path 'dcim/device-types/'
22
21
  object_fields(
23
22
  manufacturer: proc { |raw_data| Manufacturer.new raw_data['id'] },
@@ -1,5 +1,4 @@
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
@@ -1,5 +1,4 @@
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
@@ -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
@@ -8,7 +7,7 @@ module NetboxClientRuby
8
7
 
9
8
  id id: :id
10
9
  deletable true
11
- path 'dcim/interfaces/:id.json'
10
+ path 'dcim/interfaces/:id/'
12
11
  creation_path 'dcim/interfaces/'
13
12
  object_fields device: proc { |raw_data| Device.new raw_data['id'] }
14
13
  end
@@ -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
@@ -8,7 +7,7 @@ module NetboxClientRuby
8
7
 
9
8
  id id: :id
10
9
  deletable true
11
- path 'dcim/interface-connections/:id.json'
10
+ path 'dcim/interface-connections/:id/'
12
11
  creation_path 'dcim/interface-connections/'
13
12
 
14
13
  object_fields(
@@ -1,5 +1,4 @@
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
@@ -1,5 +1,4 @@
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
@@ -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
@@ -8,7 +7,7 @@ module NetboxClientRuby
8
7
 
9
8
  id id: :id
10
9
  deletable true
11
- path 'dcim/inventory-items/:id.json'
10
+ path 'dcim/inventory-items/:id/'
12
11
  creation_path 'dcim/inventory-items/'
13
12
  object_fields device: proc { |raw_data| Device.new raw_data['id'] },
14
13
  manufacturer: proc { |raw_data| Manufacturer.new raw_data['id'] }
@@ -1,5 +1,4 @@
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
@@ -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
@@ -7,7 +7,7 @@ module NetboxClientRuby
7
7
 
8
8
  id id: :id
9
9
  deletable true
10
- path 'dcim/manufacturers/:id.json'
10
+ path 'dcim/manufacturers/:id/'
11
11
  creation_path 'dcim/manufacturers/'
12
12
  end
13
13
  end
@@ -1,5 +1,4 @@
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
@@ -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
@@ -8,7 +7,7 @@ module NetboxClientRuby
8
7
 
9
8
  id id: :id
10
9
  deletable true
11
- path 'dcim/platforms/:id.json'
10
+ path 'dcim/platforms/:id/'
12
11
  creation_path 'dcim/platforms/'
13
12
  object_fields(
14
13
  manufacturer: proc do |raw_manufacturer|
@@ -1,5 +1,4 @@
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
@@ -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
@@ -9,7 +7,7 @@ module NetboxClientRuby
9
7
 
10
8
  id id: :id
11
9
  deletable true
12
- path 'dcim/power-connections/:id.json'
10
+ path 'dcim/power-connections/:id/'
13
11
  creation_path 'dcim/power-connections/'
14
12
 
15
13
  object_fields(
@@ -1,5 +1,4 @@
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
@@ -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
@@ -9,7 +7,7 @@ module NetboxClientRuby
9
7
 
10
8
  id id: :id
11
9
  deletable true
12
- path 'dcim/power-outlets/:id.json'
10
+ path 'dcim/power-outlets/:id/'
13
11
  creation_path 'dcim/power-outlets/'
14
12
  object_fields device: proc { |raw_data| Device.new raw_data['id'] }
15
13
  object_fields connected_port: proc { |raw_data| PowerPort.new raw_data }
@@ -1,5 +1,4 @@
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
@@ -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
@@ -9,7 +7,7 @@ module NetboxClientRuby
9
7
 
10
8
  id id: :id
11
9
  deletable true
12
- path 'dcim/power-ports/:id.json'
10
+ path 'dcim/power-ports/:id/'
13
11
  creation_path 'dcim/power-ports/'
14
12
  object_fields device: proc { |raw_data| Device.new raw_data['id'] }
15
13
  object_fields power_outlet: proc { |raw_data| PowerOutlet.new raw_data['id'] }