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.
- checksums.yaml +4 -4
- data/.github/workflows/rspec.yml +4 -4
- data/.gitignore +6 -1
- data/Appraisals +17 -0
- data/Gemfile +15 -3
- data/Rakefile +2 -0
- data/bin/setup +1 -4
- data/gemfiles/faraday0.gemfile +12 -2
- data/gemfiles/faraday1.gemfile +11 -1
- data/gemfiles/faraday2.gemfile +11 -1
- data/lib/netbox-client-ruby.rb +2 -0
- data/lib/netbox_client_ruby/api/circuits/circuit.rb +2 -5
- data/lib/netbox_client_ruby/api/circuits/circuit_termination.rb +2 -5
- data/lib/netbox_client_ruby/api/circuits/circuit_terminations.rb +1 -2
- data/lib/netbox_client_ruby/api/circuits/circuit_type.rb +2 -2
- data/lib/netbox_client_ruby/api/circuits/circuit_types.rb +1 -2
- data/lib/netbox_client_ruby/api/circuits/circuits.rb +1 -2
- data/lib/netbox_client_ruby/api/circuits/provider.rb +2 -2
- data/lib/netbox_client_ruby/api/circuits/providers.rb +1 -2
- data/lib/netbox_client_ruby/api/circuits.rb +1 -9
- data/lib/netbox_client_ruby/api/dcim/console_connection.rb +2 -4
- data/lib/netbox_client_ruby/api/dcim/console_connections.rb +1 -2
- data/lib/netbox_client_ruby/api/dcim/console_port.rb +2 -4
- data/lib/netbox_client_ruby/api/dcim/console_ports.rb +1 -2
- data/lib/netbox_client_ruby/api/dcim/console_server_port.rb +2 -4
- data/lib/netbox_client_ruby/api/dcim/console_server_ports.rb +1 -2
- data/lib/netbox_client_ruby/api/dcim/device.rb +2 -10
- data/lib/netbox_client_ruby/api/dcim/device_role.rb +2 -2
- data/lib/netbox_client_ruby/api/dcim/device_roles.rb +1 -2
- data/lib/netbox_client_ruby/api/dcim/device_type.rb +2 -3
- data/lib/netbox_client_ruby/api/dcim/device_types.rb +1 -2
- data/lib/netbox_client_ruby/api/dcim/devices.rb +1 -2
- data/lib/netbox_client_ruby/api/dcim/interface.rb +2 -3
- data/lib/netbox_client_ruby/api/dcim/interface_connection.rb +2 -3
- data/lib/netbox_client_ruby/api/dcim/interface_connections.rb +1 -2
- data/lib/netbox_client_ruby/api/dcim/interfaces.rb +1 -2
- data/lib/netbox_client_ruby/api/dcim/inventory_item.rb +2 -3
- data/lib/netbox_client_ruby/api/dcim/inventory_items.rb +1 -2
- data/lib/netbox_client_ruby/api/dcim/manufacturer.rb +2 -2
- data/lib/netbox_client_ruby/api/dcim/manufacturers.rb +1 -2
- data/lib/netbox_client_ruby/api/dcim/platform.rb +2 -3
- data/lib/netbox_client_ruby/api/dcim/platforms.rb +1 -2
- data/lib/netbox_client_ruby/api/dcim/power_connection.rb +2 -4
- data/lib/netbox_client_ruby/api/dcim/power_connections.rb +1 -2
- data/lib/netbox_client_ruby/api/dcim/power_outlet.rb +2 -4
- data/lib/netbox_client_ruby/api/dcim/power_outlets.rb +1 -2
- data/lib/netbox_client_ruby/api/dcim/power_port.rb +2 -4
- data/lib/netbox_client_ruby/api/dcim/power_ports.rb +1 -2
- data/lib/netbox_client_ruby/api/dcim/rack.rb +2 -2
- data/lib/netbox_client_ruby/api/dcim/rack_group.rb +2 -4
- data/lib/netbox_client_ruby/api/dcim/rack_groups.rb +1 -2
- data/lib/netbox_client_ruby/api/dcim/rack_reservation.rb +2 -4
- data/lib/netbox_client_ruby/api/dcim/rack_reservations.rb +1 -2
- data/lib/netbox_client_ruby/api/dcim/rack_role.rb +2 -2
- data/lib/netbox_client_ruby/api/dcim/rack_roles.rb +1 -2
- data/lib/netbox_client_ruby/api/dcim/racks.rb +1 -2
- data/lib/netbox_client_ruby/api/dcim/region.rb +2 -2
- data/lib/netbox_client_ruby/api/dcim/regions.rb +1 -2
- data/lib/netbox_client_ruby/api/dcim/site.rb +2 -3
- data/lib/netbox_client_ruby/api/dcim/sites.rb +1 -2
- data/lib/netbox_client_ruby/api/dcim/virtual_chassis.rb +2 -3
- data/lib/netbox_client_ruby/api/dcim/virtual_chassis_list.rb +1 -2
- data/lib/netbox_client_ruby/api/dcim.rb +1 -43
- data/lib/netbox_client_ruby/api/extras/config_context.rb +2 -2
- data/lib/netbox_client_ruby/api/extras/config_contexts.rb +1 -2
- data/lib/netbox_client_ruby/api/extras/journal_entries.rb +1 -2
- data/lib/netbox_client_ruby/api/extras/journal_entry.rb +2 -2
- data/lib/netbox_client_ruby/api/extras/tag.rb +2 -2
- data/lib/netbox_client_ruby/api/extras/tags.rb +1 -2
- data/lib/netbox_client_ruby/api/extras.rb +1 -6
- data/lib/netbox_client_ruby/api/ipam/aggregate.rb +2 -3
- data/lib/netbox_client_ruby/api/ipam/aggregates.rb +1 -2
- data/lib/netbox_client_ruby/api/ipam/ip_address.rb +4 -12
- data/lib/netbox_client_ruby/api/ipam/ip_addresses.rb +1 -2
- data/lib/netbox_client_ruby/api/ipam/ip_range.rb +2 -6
- data/lib/netbox_client_ruby/api/ipam/ip_ranges.rb +1 -2
- data/lib/netbox_client_ruby/api/ipam/prefix.rb +2 -9
- data/lib/netbox_client_ruby/api/ipam/prefixes.rb +1 -2
- data/lib/netbox_client_ruby/api/ipam/rir.rb +2 -2
- data/lib/netbox_client_ruby/api/ipam/rirs.rb +1 -2
- data/lib/netbox_client_ruby/api/ipam/role.rb +2 -2
- data/lib/netbox_client_ruby/api/ipam/roles.rb +1 -2
- data/lib/netbox_client_ruby/api/ipam/service.rb +2 -3
- data/lib/netbox_client_ruby/api/ipam/services.rb +1 -2
- data/lib/netbox_client_ruby/api/ipam/vlan.rb +2 -6
- data/lib/netbox_client_ruby/api/ipam/vlan_group.rb +2 -3
- data/lib/netbox_client_ruby/api/ipam/vlan_groups.rb +1 -2
- data/lib/netbox_client_ruby/api/ipam/vlans.rb +1 -2
- data/lib/netbox_client_ruby/api/ipam/vrf.rb +2 -3
- data/lib/netbox_client_ruby/api/ipam/vrfs.rb +1 -2
- data/lib/netbox_client_ruby/api/ipam.rb +1 -21
- data/lib/netbox_client_ruby/api/secrets/rsa_key_pair.rb +1 -3
- data/lib/netbox_client_ruby/api/secrets/secret.rb +2 -4
- data/lib/netbox_client_ruby/api/secrets/secret_role.rb +2 -4
- data/lib/netbox_client_ruby/api/secrets/secret_roles.rb +1 -2
- data/lib/netbox_client_ruby/api/secrets/secrets.rb +1 -2
- data/lib/netbox_client_ruby/api/secrets/session_key.rb +1 -4
- data/lib/netbox_client_ruby/api/secrets.rb +1 -5
- data/lib/netbox_client_ruby/api/tenancy/tenant.rb +2 -3
- data/lib/netbox_client_ruby/api/tenancy/tenant_group.rb +2 -2
- data/lib/netbox_client_ruby/api/tenancy/tenant_groups.rb +1 -2
- data/lib/netbox_client_ruby/api/tenancy/tenants.rb +1 -2
- data/lib/netbox_client_ruby/api/tenancy.rb +1 -5
- data/lib/netbox_client_ruby/api/virtualization/cluster.rb +2 -5
- data/lib/netbox_client_ruby/api/virtualization/cluster_group.rb +2 -2
- data/lib/netbox_client_ruby/api/virtualization/cluster_groups.rb +1 -2
- data/lib/netbox_client_ruby/api/virtualization/cluster_type.rb +2 -2
- data/lib/netbox_client_ruby/api/virtualization/cluster_types.rb +1 -2
- data/lib/netbox_client_ruby/api/virtualization/clusters.rb +1 -2
- data/lib/netbox_client_ruby/api/virtualization/interface.rb +2 -3
- data/lib/netbox_client_ruby/api/virtualization/interfaces.rb +1 -2
- data/lib/netbox_client_ruby/api/virtualization/virtual_machine.rb +2 -7
- data/lib/netbox_client_ruby/api/virtualization/virtual_machines.rb +1 -2
- data/lib/netbox_client_ruby/api/virtualization.rb +1 -11
- data/lib/netbox_client_ruby/communication.rb +1 -2
- data/lib/netbox_client_ruby/connection.rb +1 -19
- data/lib/netbox_client_ruby/entities.rb +1 -2
- data/lib/netbox_client_ruby/entity.rb +2 -3
- data/lib/netbox_client_ruby/error.rb +2 -0
- data/lib/netbox_client_ruby.rb +67 -2
- data/netbox-client-ruby.gemspec +4 -14
- metadata +10 -84
- data/Gemfile.lock +0 -117
- data/gemfiles/faraday0.gemfile.lock +0 -94
- data/gemfiles/faraday1.gemfile.lock +0 -93
- data/gemfiles/faraday2.gemfile.lock +0 -101
- data/lib/netbox_client_ruby/api.rb +0 -38
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a632845ab62cb10130f5008b63077722e648f6914bb17c0120ca24717fef106
|
4
|
+
data.tar.gz: cd1846a99f1b50edbb0789c8fb09f7178228df187e18384d3a9936180c8bb9ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4bf36821671e75f9978ff981ac9919fd4a01e12194b082623379b3dcc1ad80a7f17a172feb73ab90ce2f94e9fbace89f349fea1fe2b4e35232b498ef15da7613
|
7
|
+
data.tar.gz: '091ee5ebe63466e0093bd978ad3c7560df12a4978e542fa8467a0d16163fbee22119b72f9493578e87ecd5fbb624755dcc5c5674093577a9807c391df351a418'
|
data/.github/workflows/rspec.yml
CHANGED
@@ -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@
|
38
|
+
- uses: actions/checkout@v4
|
39
39
|
with:
|
40
40
|
fetch-depth: 0
|
41
41
|
- uses: ruby/setup-ruby@v1
|
data/.gitignore
CHANGED
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
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
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
data/bin/setup
CHANGED
data/gemfiles/faraday0.gemfile
CHANGED
@@ -1,6 +1,16 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
1
3
|
source "https://rubygems.org"
|
2
4
|
|
3
|
-
gem "
|
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: "../"
|
data/gemfiles/faraday1.gemfile
CHANGED
@@ -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: "../"
|
data/gemfiles/faraday2.gemfile
CHANGED
@@ -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: "../"
|
data/lib/netbox-client-ruby.rb
CHANGED
@@ -1,7 +1,4 @@
|
|
1
|
-
|
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
|
19
|
+
path 'circuits/circuits/:id/'
|
23
20
|
creation_path 'circuits/circuits/'
|
24
21
|
|
25
22
|
object_fields(
|
@@ -1,7 +1,4 @@
|
|
1
|
-
|
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
|
10
|
+
path 'circuits/circuit-terminations/:id/'
|
14
11
|
creation_path 'circuits/circuit-terminations/'
|
15
12
|
|
16
13
|
object_fields(
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
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
|
10
|
+
path 'circuits/circuit-types/:id/'
|
11
11
|
creation_path 'circuits/circuit-types/'
|
12
12
|
end
|
13
13
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
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
|
10
|
+
path 'circuits/providers/:id/'
|
11
11
|
creation_path 'circuits/providers/'
|
12
12
|
end
|
13
13
|
end
|
@@ -1,12 +1,4 @@
|
|
1
|
-
|
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
|
-
|
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
|
10
|
+
path 'dcim/console-connections/:id/'
|
13
11
|
creation_path 'dcim/console-connections/'
|
14
12
|
|
15
13
|
object_fields(
|
@@ -1,6 +1,4 @@
|
|
1
|
-
|
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
|
10
|
+
path 'dcim/console-ports/:id/'
|
13
11
|
creation_path 'dcim/console-ports/'
|
14
12
|
|
15
13
|
object_fields(
|
@@ -1,6 +1,4 @@
|
|
1
|
-
|
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
|
10
|
+
path 'dcim/console-server-ports/:id/'
|
13
11
|
creation_path 'dcim/console-server-ports/'
|
14
12
|
|
15
13
|
object_fields(
|
@@ -1,12 +1,4 @@
|
|
1
|
-
|
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
|
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
|
-
|
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
|
10
|
+
path 'dcim/device-roles/:id/'
|
11
11
|
creation_path 'dcim/device-roles/'
|
12
12
|
end
|
13
13
|
end
|
@@ -1,5 +1,4 @@
|
|
1
|
-
|
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
|
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
|
-
|
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
|
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
|
-
|
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
|
10
|
+
path 'dcim/interface-connections/:id/'
|
12
11
|
creation_path 'dcim/interface-connections/'
|
13
12
|
|
14
13
|
object_fields(
|
@@ -1,5 +1,4 @@
|
|
1
|
-
|
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
|
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,4 +1,4 @@
|
|
1
|
-
|
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
|
10
|
+
path 'dcim/manufacturers/:id/'
|
11
11
|
creation_path 'dcim/manufacturers/'
|
12
12
|
end
|
13
13
|
end
|
@@ -1,5 +1,4 @@
|
|
1
|
-
|
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
|
10
|
+
path 'dcim/platforms/:id/'
|
12
11
|
creation_path 'dcim/platforms/'
|
13
12
|
object_fields(
|
14
13
|
manufacturer: proc do |raw_manufacturer|
|
@@ -1,6 +1,4 @@
|
|
1
|
-
|
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
|
10
|
+
path 'dcim/power-connections/:id/'
|
13
11
|
creation_path 'dcim/power-connections/'
|
14
12
|
|
15
13
|
object_fields(
|
@@ -1,6 +1,4 @@
|
|
1
|
-
|
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
|
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,6 +1,4 @@
|
|
1
|
-
|
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
|
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'] }
|