netbox-client-ruby 0.4.9 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/gem-push.yml +27 -0
- data/.github/workflows/rspec.yml +25 -0
- data/README.md +71 -35
- data/VERSION +1 -1
- data/bin/console +23 -1
- data/docker-compose.yml +5 -5
- data/dump.sql +9892 -7318
- data/lib/netbox_client_ruby/api.rb +5 -0
- data/lib/netbox_client_ruby/api/circuits.rb +33 -0
- data/lib/netbox_client_ruby/api/circuits/circuit.rb +37 -0
- data/lib/netbox_client_ruby/api/circuits/circuit_termination.rb +23 -0
- data/lib/netbox_client_ruby/api/circuits/circuit_terminations.rb +21 -0
- data/lib/netbox_client_ruby/api/circuits/circuit_type.rb +14 -0
- data/lib/netbox_client_ruby/api/circuits/circuit_types.rb +21 -0
- data/lib/netbox_client_ruby/api/circuits/circuits.rb +26 -0
- data/lib/netbox_client_ruby/api/circuits/provider.rb +14 -0
- data/lib/netbox_client_ruby/api/circuits/providers.rb +21 -0
- data/lib/netbox_client_ruby/api/dcim.rb +30 -2
- data/lib/netbox_client_ruby/api/dcim/console_connection.rb +21 -0
- data/lib/netbox_client_ruby/api/dcim/console_connections.rb +21 -0
- data/lib/netbox_client_ruby/api/dcim/console_port.rb +21 -0
- data/lib/netbox_client_ruby/api/dcim/console_ports.rb +21 -0
- data/lib/netbox_client_ruby/api/dcim/console_server_port.rb +21 -0
- data/lib/netbox_client_ruby/api/dcim/console_server_ports.rb +21 -0
- data/lib/netbox_client_ruby/api/dcim/device.rb +3 -1
- data/lib/netbox_client_ruby/api/dcim/interface_connection.rb +20 -0
- data/lib/netbox_client_ruby/api/dcim/interface_connections.rb +21 -0
- data/lib/netbox_client_ruby/api/dcim/platform.rb +6 -0
- data/lib/netbox_client_ruby/api/dcim/power_connection.rb +21 -0
- data/lib/netbox_client_ruby/api/dcim/power_connections.rb +21 -0
- data/lib/netbox_client_ruby/api/dcim/rack_reservation.rb +21 -0
- data/lib/netbox_client_ruby/api/dcim/rack_reservations.rb +21 -0
- data/lib/netbox_client_ruby/api/dcim/rack_role.rb +0 -2
- data/lib/netbox_client_ruby/api/dcim/site.rb +15 -2
- data/lib/netbox_client_ruby/api/dcim/virtual_chassis.rb +19 -0
- data/lib/netbox_client_ruby/api/dcim/virtual_chassis_list.rb +21 -0
- data/lib/netbox_client_ruby/api/virtualization/interface.rb +1 -2
- data/lib/netbox_client_ruby/entity.rb +7 -1
- data/netbox-client-ruby.gemspec +11 -12
- data/netbox-client-ruby_rsa +51 -0
- data/netbox-client-ruby_rsa.pub +1 -0
- data/netbox.env +1 -1
- metadata +65 -22
- data/.travis.yml +0 -25
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
require 'netbox_client_ruby/entities'
|
|
2
|
+
require 'netbox_client_ruby/api/dcim/console_server_port'
|
|
3
|
+
|
|
4
|
+
module NetboxClientRuby
|
|
5
|
+
module DCIM
|
|
6
|
+
class ConsoleServerPorts
|
|
7
|
+
include Entities
|
|
8
|
+
|
|
9
|
+
path 'dcim/console-server-ports.json'
|
|
10
|
+
data_key 'results'
|
|
11
|
+
count_key 'count'
|
|
12
|
+
entity_creator :entity_creator
|
|
13
|
+
|
|
14
|
+
private
|
|
15
|
+
|
|
16
|
+
def entity_creator(raw_entity)
|
|
17
|
+
ConsoleServerPort.new raw_entity['id']
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -5,6 +5,7 @@ require 'netbox_client_ruby/api/tenancy/tenant'
|
|
|
5
5
|
require 'netbox_client_ruby/api/dcim/platform'
|
|
6
6
|
require 'netbox_client_ruby/api/dcim/site'
|
|
7
7
|
require 'netbox_client_ruby/api/dcim/rack'
|
|
8
|
+
require 'netbox_client_ruby/api/dcim/virtual_chassis'
|
|
8
9
|
require 'netbox_client_ruby/api/ipam/ip_address'
|
|
9
10
|
|
|
10
11
|
module NetboxClientRuby
|
|
@@ -26,7 +27,8 @@ module NetboxClientRuby
|
|
|
26
27
|
parent_device: proc { |raw_data| Device.new raw_data['id'] },
|
|
27
28
|
primary_ip: proc { |raw_data| IPAM::IpAddress.new raw_data['id'] },
|
|
28
29
|
primary_ip4: proc { |raw_data| IPAM::IpAddress.new raw_data['id'] },
|
|
29
|
-
primary_ip6: proc { |raw_data| IPAM::IpAddress.new raw_data['id'] }
|
|
30
|
+
primary_ip6: proc { |raw_data| IPAM::IpAddress.new raw_data['id'] },
|
|
31
|
+
virtual_chassis: proc { |raw_data| DCIM::VirtualChassis.new raw_data['id'] },
|
|
30
32
|
)
|
|
31
33
|
end
|
|
32
34
|
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
require 'netbox_client_ruby/entity'
|
|
2
|
+
require 'netbox_client_ruby/api/dcim/interface'
|
|
3
|
+
|
|
4
|
+
module NetboxClientRuby
|
|
5
|
+
module DCIM
|
|
6
|
+
class InterfaceConnection
|
|
7
|
+
include Entity
|
|
8
|
+
|
|
9
|
+
id id: :id
|
|
10
|
+
deletable true
|
|
11
|
+
path 'dcim/interface-connections/:id.json'
|
|
12
|
+
creation_path 'dcim/interface-connections/'
|
|
13
|
+
|
|
14
|
+
object_fields(
|
|
15
|
+
interface_a: proc { |raw_data| Interface.new raw_data['id'] },
|
|
16
|
+
interface_b: proc { |raw_data| Interface.new raw_data['id'] },
|
|
17
|
+
)
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
require 'netbox_client_ruby/entities'
|
|
2
|
+
require 'netbox_client_ruby/api/dcim/interface_connection'
|
|
3
|
+
|
|
4
|
+
module NetboxClientRuby
|
|
5
|
+
module DCIM
|
|
6
|
+
class InterfaceConnections
|
|
7
|
+
include Entities
|
|
8
|
+
|
|
9
|
+
path 'dcim/interface-connections.json'
|
|
10
|
+
data_key 'results'
|
|
11
|
+
count_key 'count'
|
|
12
|
+
entity_creator :entity_creator
|
|
13
|
+
|
|
14
|
+
private
|
|
15
|
+
|
|
16
|
+
def entity_creator(raw_entity)
|
|
17
|
+
InterfaceConnection.new raw_entity['id']
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
require 'netbox_client_ruby/entity'
|
|
2
|
+
require 'netbox_client_ruby/api/dcim/manufacturer'
|
|
2
3
|
|
|
3
4
|
module NetboxClientRuby
|
|
4
5
|
module DCIM
|
|
@@ -9,6 +10,11 @@ module NetboxClientRuby
|
|
|
9
10
|
deletable true
|
|
10
11
|
path 'dcim/platforms/:id.json'
|
|
11
12
|
creation_path 'dcim/platforms/'
|
|
13
|
+
object_fields(
|
|
14
|
+
manufacturer: proc do |raw_manufacturer|
|
|
15
|
+
DCIM::Manufacturer.new raw_manufacturer['id']
|
|
16
|
+
end
|
|
17
|
+
)
|
|
12
18
|
end
|
|
13
19
|
end
|
|
14
20
|
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
require 'netbox_client_ruby/entity'
|
|
2
|
+
require 'netbox_client_ruby/api/dcim/device'
|
|
3
|
+
require 'netbox_client_ruby/api/dcim/power_outlet'
|
|
4
|
+
|
|
5
|
+
module NetboxClientRuby
|
|
6
|
+
module DCIM
|
|
7
|
+
class PowerConnection
|
|
8
|
+
include Entity
|
|
9
|
+
|
|
10
|
+
id id: :id
|
|
11
|
+
deletable true
|
|
12
|
+
path 'dcim/power-connections/:id.json'
|
|
13
|
+
creation_path 'dcim/power-connections/'
|
|
14
|
+
|
|
15
|
+
object_fields(
|
|
16
|
+
device: proc { |raw_data| Device.new raw_data['id'] },
|
|
17
|
+
power_outlet: proc { |raw_data| PowerOutlet.new raw_data['id'] },
|
|
18
|
+
)
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
require 'netbox_client_ruby/entities'
|
|
2
|
+
require 'netbox_client_ruby/api/dcim/power_connection'
|
|
3
|
+
|
|
4
|
+
module NetboxClientRuby
|
|
5
|
+
module DCIM
|
|
6
|
+
class PowerConnections
|
|
7
|
+
include Entities
|
|
8
|
+
|
|
9
|
+
path 'dcim/power-connections.json'
|
|
10
|
+
data_key 'results'
|
|
11
|
+
count_key 'count'
|
|
12
|
+
entity_creator :entity_creator
|
|
13
|
+
|
|
14
|
+
private
|
|
15
|
+
|
|
16
|
+
def entity_creator(raw_entity)
|
|
17
|
+
PowerConnection.new raw_entity['id']
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
require 'netbox_client_ruby/entity'
|
|
2
|
+
require 'netbox_client_ruby/api/dcim/rack'
|
|
3
|
+
require 'netbox_client_ruby/api/tenancy/tenant'
|
|
4
|
+
|
|
5
|
+
module NetboxClientRuby
|
|
6
|
+
module DCIM
|
|
7
|
+
class RackReservation
|
|
8
|
+
include Entity
|
|
9
|
+
|
|
10
|
+
id id: :id
|
|
11
|
+
deletable true
|
|
12
|
+
path 'dcim/rack-reservations/:id.json'
|
|
13
|
+
creation_path 'dcim/rack-reservations/'
|
|
14
|
+
|
|
15
|
+
object_fields(
|
|
16
|
+
rack: proc { |raw_data| DCIM::Rack.new raw_data['id'] },
|
|
17
|
+
tenant: proc { |raw_data| Tenancy::Tenant.new raw_data['id'] },
|
|
18
|
+
)
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
require 'netbox_client_ruby/entities'
|
|
2
|
+
require 'netbox_client_ruby/api/dcim/rack_reservation'
|
|
3
|
+
|
|
4
|
+
module NetboxClientRuby
|
|
5
|
+
module DCIM
|
|
6
|
+
class RackReservations
|
|
7
|
+
include Entities
|
|
8
|
+
|
|
9
|
+
path 'dcim/rack-reservations.json'
|
|
10
|
+
data_key 'results'
|
|
11
|
+
count_key 'count'
|
|
12
|
+
entity_creator :entity_creator
|
|
13
|
+
|
|
14
|
+
private
|
|
15
|
+
|
|
16
|
+
def entity_creator(raw_entity)
|
|
17
|
+
RackReservation.new raw_entity['id']
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -1,17 +1,30 @@
|
|
|
1
1
|
require 'netbox_client_ruby/entity'
|
|
2
|
+
require 'netbox_client_ruby/api/dcim/region'
|
|
2
3
|
|
|
3
4
|
module NetboxClientRuby
|
|
4
5
|
module DCIM
|
|
5
6
|
class Site
|
|
6
7
|
include Entity
|
|
7
8
|
|
|
9
|
+
STATUS_VALUES = {
|
|
10
|
+
active: 1,
|
|
11
|
+
planned: 2,
|
|
12
|
+
retired: 4
|
|
13
|
+
}.freeze
|
|
14
|
+
|
|
8
15
|
id id: :id
|
|
9
|
-
readonly_fields :count_prefixes, :count_vlans, :count_racks,
|
|
10
|
-
:count_circuits
|
|
16
|
+
readonly_fields :count_prefixes, :count_vlans, :count_racks,
|
|
17
|
+
:count_devices, :count_circuits
|
|
11
18
|
|
|
12
19
|
deletable true
|
|
13
20
|
path 'dcim/sites/:id.json'
|
|
14
21
|
creation_path 'dcim/sites/'
|
|
22
|
+
object_fields(
|
|
23
|
+
region: proc { |raw_region| DCIM::Region.new raw_region['id'] },
|
|
24
|
+
status: proc do |raw_status|
|
|
25
|
+
STATUS_VALUES.key(raw_status['value']) || raw_status['value']
|
|
26
|
+
end
|
|
27
|
+
)
|
|
15
28
|
end
|
|
16
29
|
end
|
|
17
30
|
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
require 'netbox_client_ruby/entity'
|
|
2
|
+
require 'netbox_client_ruby/api/dcim/device'
|
|
3
|
+
|
|
4
|
+
module NetboxClientRuby
|
|
5
|
+
module DCIM
|
|
6
|
+
class VirtualChassis
|
|
7
|
+
include Entity
|
|
8
|
+
|
|
9
|
+
id id: :id
|
|
10
|
+
deletable true
|
|
11
|
+
path 'dcim/virtual-chassis/:id.json'
|
|
12
|
+
creation_path 'dcim/virtual-chassis/'
|
|
13
|
+
|
|
14
|
+
object_fields(
|
|
15
|
+
master: proc { |raw_data| Device.new raw_data['id'] },
|
|
16
|
+
)
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
require 'netbox_client_ruby/entities'
|
|
2
|
+
require 'netbox_client_ruby/api/dcim/virtual_chassis'
|
|
3
|
+
|
|
4
|
+
module NetboxClientRuby
|
|
5
|
+
module DCIM
|
|
6
|
+
class VirtualChassisList
|
|
7
|
+
include Entities
|
|
8
|
+
|
|
9
|
+
path 'dcim/virtual-chassis.json'
|
|
10
|
+
data_key 'results'
|
|
11
|
+
count_key 'count'
|
|
12
|
+
entity_creator :entity_creator
|
|
13
|
+
|
|
14
|
+
private
|
|
15
|
+
|
|
16
|
+
def entity_creator(raw_entity)
|
|
17
|
+
VirtualChassis.new raw_entity['id']
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -11,8 +11,7 @@ module NetboxClientRuby
|
|
|
11
11
|
path 'virtualization/interfaces/:id.json'
|
|
12
12
|
creation_path 'virtualization/interfaces/'
|
|
13
13
|
object_fields virtual_machine: proc { |raw_data|
|
|
14
|
-
|
|
15
|
-
VirtualMachine.new(raw_data.is_a?(Hash) ? raw_data['id'] : raw_data)
|
|
14
|
+
VirtualMachine.new raw_data['id']
|
|
16
15
|
}
|
|
17
16
|
end
|
|
18
17
|
end
|
|
@@ -130,6 +130,8 @@ module NetboxClientRuby
|
|
|
130
130
|
end
|
|
131
131
|
|
|
132
132
|
def reload
|
|
133
|
+
raise LocalError, "Can't 'reload', this object has never been saved" unless ids_set?
|
|
134
|
+
|
|
133
135
|
@data = get
|
|
134
136
|
revert
|
|
135
137
|
self
|
|
@@ -173,6 +175,10 @@ module NetboxClientRuby
|
|
|
173
175
|
patch
|
|
174
176
|
end
|
|
175
177
|
|
|
178
|
+
def url
|
|
179
|
+
"#{connection.url_prefix}#{path}"
|
|
180
|
+
end
|
|
181
|
+
|
|
176
182
|
def raw_data!
|
|
177
183
|
data
|
|
178
184
|
end
|
|
@@ -255,7 +261,7 @@ module NetboxClientRuby
|
|
|
255
261
|
end
|
|
256
262
|
|
|
257
263
|
def get
|
|
258
|
-
response connection.get path unless @deleted
|
|
264
|
+
response connection.get path unless @deleted or !ids_set?
|
|
259
265
|
end
|
|
260
266
|
|
|
261
267
|
def readonly_fields
|
data/netbox-client-ruby.gemspec
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
lib = File.expand_path('../lib', __FILE__)
|
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
|
4
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
3
|
|
|
6
4
|
Gem::Specification.new do |spec|
|
|
7
5
|
spec.name = 'netbox-client-ruby'
|
|
8
|
-
spec.version = File.read(File.expand_path('
|
|
9
|
-
spec.authors = ['Christian Mäder']
|
|
10
|
-
spec.email = ['christian.maeder@nine.ch']
|
|
6
|
+
spec.version = File.read(File.expand_path('VERSION', __dir__)).strip
|
|
11
7
|
|
|
12
8
|
spec.summary = 'A read/write client for Netbox v2.'
|
|
13
9
|
spec.homepage = 'https://github.com/ninech/netbox-client-ruby'
|
|
14
10
|
spec.license = 'MIT'
|
|
15
11
|
|
|
12
|
+
spec.authors = ['Christian Mäder']
|
|
13
|
+
spec.email = ['christian.maeder@nine.ch']
|
|
14
|
+
|
|
16
15
|
if spec.respond_to?(:metadata)
|
|
17
16
|
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
|
18
17
|
end
|
|
@@ -25,16 +24,16 @@ Gem::Specification.new do |spec|
|
|
|
25
24
|
spec.require_paths = ['lib']
|
|
26
25
|
|
|
27
26
|
spec.add_runtime_dependency 'dry-configurable', '~> 0.1'
|
|
28
|
-
spec.add_runtime_dependency 'faraday', '>= 0.11.0'
|
|
29
|
-
spec.add_runtime_dependency 'faraday_middleware', '~> 0.11.0'
|
|
27
|
+
spec.add_runtime_dependency 'faraday', '~> 0.11', '>= 0.11.0'
|
|
30
28
|
spec.add_runtime_dependency 'faraday-detailed_logger', '~> 2.1'
|
|
31
|
-
spec.add_runtime_dependency '
|
|
32
|
-
spec.add_runtime_dependency '
|
|
29
|
+
spec.add_runtime_dependency 'faraday_middleware', '~> 0.11'
|
|
30
|
+
spec.add_runtime_dependency 'ipaddress', '~> 0.8', '>= 0.8.3'
|
|
31
|
+
spec.add_runtime_dependency 'openssl', '~> 2.0', '>= 2.0.5'
|
|
33
32
|
|
|
34
|
-
spec.add_development_dependency 'bundler', '~> 1
|
|
33
|
+
spec.add_development_dependency 'bundler', '~> 2.1'
|
|
34
|
+
spec.add_development_dependency 'pry', '~> 0.10'
|
|
35
35
|
spec.add_development_dependency 'rake', '~> 10.0'
|
|
36
36
|
spec.add_development_dependency 'rspec', '~> 3.5'
|
|
37
|
-
spec.add_development_dependency 'pry', '~> 0.10'
|
|
38
37
|
spec.add_development_dependency 'rubocop', '~> 0.48'
|
|
39
38
|
spec.add_development_dependency 'rubocop-rspec', '~> 1.15'
|
|
40
39
|
end
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
-----BEGIN RSA PRIVATE KEY-----
|
|
2
|
+
MIIJKQIBAAKCAgEAq8CSKPwZSbdekzP4Bpp/3KWgQdBlQdgV9mzgvCf6cj8h2tYt
|
|
3
|
+
Y05QKP0pbQv1XAX0S1pave49xON9X/huGKdEtou6/XC3HrDyyAQ43wSR0gv357W7
|
|
4
|
+
B6DEpAhw6ApINPFY/KQL78BqcAEu4pwXvJ3IdwBIYLJ9Czrg8r+JPwOVNWbD0UWM
|
|
5
|
+
etsUKPKooOKbz1WPZwF9IEMUtTRYs7TlQyh5Sc7nDII0hvYpm9fwy+jpNYqF81nQ
|
|
6
|
+
SOFyNgNn/bHImqDVbZLS77/P4kTdbIQTDemPPppfOfMjjEsB1Z7J/I7S7x3C8k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T/XhZY8Vs4FCSTN8oYDz0Dxcls6Rrbnbb
|
|
50
|
+
bvN4dDuIpk3R7G592Ju1viJyIRFwEmp92lBqYvt7cX2cq9rkFnd5zCVTkrfZ
|
|
51
|
+
-----END RSA PRIVATE KEY-----
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCrwJIo/BlJt16TM/gGmn/cpaBB0GVB2BX2bOC8J/pyPyHa1i1jTlAo/SltC/VcBfRLWlq97j3E431f+G4Yp0S2i7r9cLcesPLIBDjfBJHSC/fntbsHoMSkCHDoCkg08Vj8pAvvwGpwAS7inBe8nch3AEhgsn0LOuDyv4k/A5U1ZsPRRYx62xQo8qig4pvPVY9nAX0gQxS1NFiztOVDKHlJzucMgjSG9imb1/DL6Ok1ioXzWdBI4XI2A2f9sciaoNVtktLvv8/iRN1shBMN6Y8+ml858yOMSwHVnsn8jtLvHcLyQFcl4aqkLAz9k4yD8C9uIHIBU7SDx9SzWWh7yHS2kmAf5zZwtWBIM30ZGOnIb2ig5DEaE7Gb/SewtVuY5nhsA8G+vBIGuGPvmolr6VdbU+0p+N1pD60JG0L/oCiUK0IyCipEbVPWHpXJ4xbMfbHtW07CPX9N1oB2dlBrCxq9NcJdUPLtexLi55lx05shJ8g/8UwXP0pCmAPaPBni1L+1dOW22DxyF1Hl+WvzwAHNVambjbCHTPeR132mQ3naslTqsnhdGgGbe7d0zXQMrIpVytRUONH0okmDtZyg1xsGdIsUcJFPJu0A9pJE013HNUPTqzoCgaiKsB2z4RyGQRwHmaeH9GpvXcC6al/dozJMT8Lh8XpHa7PJO8g2vhHd6w== netbox-client-ruby
|
data/netbox.env
CHANGED
|
@@ -2,7 +2,7 @@ SUPERUSER_NAME=admin
|
|
|
2
2
|
SUPERUSER_EMAIL=admin@example.com
|
|
3
3
|
SUPERUSER_PASSWORD=admin
|
|
4
4
|
SUPERUSER_API_TOKEN=0123456789abcdef0123456789abcdef01234567
|
|
5
|
-
ALLOWED_HOSTS
|
|
5
|
+
ALLOWED_HOSTS=*
|
|
6
6
|
DB_NAME=netbox
|
|
7
7
|
DB_USER=netbox
|
|
8
8
|
DB_PASSWORD=netbox
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: netbox-client-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Christian Mäder
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-02-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: dry-configurable
|
|
@@ -31,6 +31,9 @@ dependencies:
|
|
|
31
31
|
- - ">="
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
33
|
version: 0.11.0
|
|
34
|
+
- - "~>"
|
|
35
|
+
- !ruby/object:Gem::Version
|
|
36
|
+
version: '0.11'
|
|
34
37
|
type: :runtime
|
|
35
38
|
prerelease: false
|
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -38,38 +41,44 @@ dependencies:
|
|
|
38
41
|
- - ">="
|
|
39
42
|
- !ruby/object:Gem::Version
|
|
40
43
|
version: 0.11.0
|
|
44
|
+
- - "~>"
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '0.11'
|
|
41
47
|
- !ruby/object:Gem::Dependency
|
|
42
|
-
name:
|
|
48
|
+
name: faraday-detailed_logger
|
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
|
44
50
|
requirements:
|
|
45
51
|
- - "~>"
|
|
46
52
|
- !ruby/object:Gem::Version
|
|
47
|
-
version:
|
|
53
|
+
version: '2.1'
|
|
48
54
|
type: :runtime
|
|
49
55
|
prerelease: false
|
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
57
|
requirements:
|
|
52
58
|
- - "~>"
|
|
53
59
|
- !ruby/object:Gem::Version
|
|
54
|
-
version:
|
|
60
|
+
version: '2.1'
|
|
55
61
|
- !ruby/object:Gem::Dependency
|
|
56
|
-
name:
|
|
62
|
+
name: faraday_middleware
|
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
|
58
64
|
requirements:
|
|
59
65
|
- - "~>"
|
|
60
66
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: '
|
|
67
|
+
version: '0.11'
|
|
62
68
|
type: :runtime
|
|
63
69
|
prerelease: false
|
|
64
70
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
71
|
requirements:
|
|
66
72
|
- - "~>"
|
|
67
73
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: '
|
|
74
|
+
version: '0.11'
|
|
69
75
|
- !ruby/object:Gem::Dependency
|
|
70
76
|
name: ipaddress
|
|
71
77
|
requirement: !ruby/object:Gem::Requirement
|
|
72
78
|
requirements:
|
|
79
|
+
- - "~>"
|
|
80
|
+
- !ruby/object:Gem::Version
|
|
81
|
+
version: '0.8'
|
|
73
82
|
- - ">="
|
|
74
83
|
- !ruby/object:Gem::Version
|
|
75
84
|
version: 0.8.3
|
|
@@ -77,6 +86,9 @@ dependencies:
|
|
|
77
86
|
prerelease: false
|
|
78
87
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
88
|
requirements:
|
|
89
|
+
- - "~>"
|
|
90
|
+
- !ruby/object:Gem::Version
|
|
91
|
+
version: '0.8'
|
|
80
92
|
- - ">="
|
|
81
93
|
- !ruby/object:Gem::Version
|
|
82
94
|
version: 0.8.3
|
|
@@ -84,6 +96,9 @@ dependencies:
|
|
|
84
96
|
name: openssl
|
|
85
97
|
requirement: !ruby/object:Gem::Requirement
|
|
86
98
|
requirements:
|
|
99
|
+
- - "~>"
|
|
100
|
+
- !ruby/object:Gem::Version
|
|
101
|
+
version: '2.0'
|
|
87
102
|
- - ">="
|
|
88
103
|
- !ruby/object:Gem::Version
|
|
89
104
|
version: 2.0.5
|
|
@@ -91,6 +106,9 @@ dependencies:
|
|
|
91
106
|
prerelease: false
|
|
92
107
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
108
|
requirements:
|
|
109
|
+
- - "~>"
|
|
110
|
+
- !ruby/object:Gem::Version
|
|
111
|
+
version: '2.0'
|
|
94
112
|
- - ">="
|
|
95
113
|
- !ruby/object:Gem::Version
|
|
96
114
|
version: 2.0.5
|
|
@@ -100,56 +118,56 @@ dependencies:
|
|
|
100
118
|
requirements:
|
|
101
119
|
- - "~>"
|
|
102
120
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: '1
|
|
121
|
+
version: '2.1'
|
|
104
122
|
type: :development
|
|
105
123
|
prerelease: false
|
|
106
124
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
125
|
requirements:
|
|
108
126
|
- - "~>"
|
|
109
127
|
- !ruby/object:Gem::Version
|
|
110
|
-
version: '1
|
|
128
|
+
version: '2.1'
|
|
111
129
|
- !ruby/object:Gem::Dependency
|
|
112
|
-
name:
|
|
130
|
+
name: pry
|
|
113
131
|
requirement: !ruby/object:Gem::Requirement
|
|
114
132
|
requirements:
|
|
115
133
|
- - "~>"
|
|
116
134
|
- !ruby/object:Gem::Version
|
|
117
|
-
version: '10
|
|
135
|
+
version: '0.10'
|
|
118
136
|
type: :development
|
|
119
137
|
prerelease: false
|
|
120
138
|
version_requirements: !ruby/object:Gem::Requirement
|
|
121
139
|
requirements:
|
|
122
140
|
- - "~>"
|
|
123
141
|
- !ruby/object:Gem::Version
|
|
124
|
-
version: '10
|
|
142
|
+
version: '0.10'
|
|
125
143
|
- !ruby/object:Gem::Dependency
|
|
126
|
-
name:
|
|
144
|
+
name: rake
|
|
127
145
|
requirement: !ruby/object:Gem::Requirement
|
|
128
146
|
requirements:
|
|
129
147
|
- - "~>"
|
|
130
148
|
- !ruby/object:Gem::Version
|
|
131
|
-
version: '
|
|
149
|
+
version: '10.0'
|
|
132
150
|
type: :development
|
|
133
151
|
prerelease: false
|
|
134
152
|
version_requirements: !ruby/object:Gem::Requirement
|
|
135
153
|
requirements:
|
|
136
154
|
- - "~>"
|
|
137
155
|
- !ruby/object:Gem::Version
|
|
138
|
-
version: '
|
|
156
|
+
version: '10.0'
|
|
139
157
|
- !ruby/object:Gem::Dependency
|
|
140
|
-
name:
|
|
158
|
+
name: rspec
|
|
141
159
|
requirement: !ruby/object:Gem::Requirement
|
|
142
160
|
requirements:
|
|
143
161
|
- - "~>"
|
|
144
162
|
- !ruby/object:Gem::Version
|
|
145
|
-
version: '
|
|
163
|
+
version: '3.5'
|
|
146
164
|
type: :development
|
|
147
165
|
prerelease: false
|
|
148
166
|
version_requirements: !ruby/object:Gem::Requirement
|
|
149
167
|
requirements:
|
|
150
168
|
- - "~>"
|
|
151
169
|
- !ruby/object:Gem::Version
|
|
152
|
-
version: '
|
|
170
|
+
version: '3.5'
|
|
153
171
|
- !ruby/object:Gem::Dependency
|
|
154
172
|
name: rubocop
|
|
155
173
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -186,9 +204,10 @@ extensions: []
|
|
|
186
204
|
extra_rdoc_files: []
|
|
187
205
|
files:
|
|
188
206
|
- ".dockerignore"
|
|
207
|
+
- ".github/workflows/gem-push.yml"
|
|
208
|
+
- ".github/workflows/rspec.yml"
|
|
189
209
|
- ".gitignore"
|
|
190
210
|
- ".rspec"
|
|
191
|
-
- ".travis.yml"
|
|
192
211
|
- Dockerfile
|
|
193
212
|
- Gemfile
|
|
194
213
|
- LICENSE.txt
|
|
@@ -205,7 +224,22 @@ files:
|
|
|
205
224
|
- lib/netbox-client-ruby.rb
|
|
206
225
|
- lib/netbox_client_ruby.rb
|
|
207
226
|
- lib/netbox_client_ruby/api.rb
|
|
227
|
+
- lib/netbox_client_ruby/api/circuits.rb
|
|
228
|
+
- lib/netbox_client_ruby/api/circuits/circuit.rb
|
|
229
|
+
- lib/netbox_client_ruby/api/circuits/circuit_termination.rb
|
|
230
|
+
- lib/netbox_client_ruby/api/circuits/circuit_terminations.rb
|
|
231
|
+
- lib/netbox_client_ruby/api/circuits/circuit_type.rb
|
|
232
|
+
- lib/netbox_client_ruby/api/circuits/circuit_types.rb
|
|
233
|
+
- lib/netbox_client_ruby/api/circuits/circuits.rb
|
|
234
|
+
- lib/netbox_client_ruby/api/circuits/provider.rb
|
|
235
|
+
- lib/netbox_client_ruby/api/circuits/providers.rb
|
|
208
236
|
- lib/netbox_client_ruby/api/dcim.rb
|
|
237
|
+
- lib/netbox_client_ruby/api/dcim/console_connection.rb
|
|
238
|
+
- lib/netbox_client_ruby/api/dcim/console_connections.rb
|
|
239
|
+
- lib/netbox_client_ruby/api/dcim/console_port.rb
|
|
240
|
+
- lib/netbox_client_ruby/api/dcim/console_ports.rb
|
|
241
|
+
- lib/netbox_client_ruby/api/dcim/console_server_port.rb
|
|
242
|
+
- lib/netbox_client_ruby/api/dcim/console_server_ports.rb
|
|
209
243
|
- lib/netbox_client_ruby/api/dcim/device.rb
|
|
210
244
|
- lib/netbox_client_ruby/api/dcim/device_role.rb
|
|
211
245
|
- lib/netbox_client_ruby/api/dcim/device_roles.rb
|
|
@@ -213,6 +247,8 @@ files:
|
|
|
213
247
|
- lib/netbox_client_ruby/api/dcim/device_types.rb
|
|
214
248
|
- lib/netbox_client_ruby/api/dcim/devices.rb
|
|
215
249
|
- lib/netbox_client_ruby/api/dcim/interface.rb
|
|
250
|
+
- lib/netbox_client_ruby/api/dcim/interface_connection.rb
|
|
251
|
+
- lib/netbox_client_ruby/api/dcim/interface_connections.rb
|
|
216
252
|
- lib/netbox_client_ruby/api/dcim/interfaces.rb
|
|
217
253
|
- lib/netbox_client_ruby/api/dcim/inventory_item.rb
|
|
218
254
|
- lib/netbox_client_ruby/api/dcim/inventory_items.rb
|
|
@@ -220,6 +256,8 @@ files:
|
|
|
220
256
|
- lib/netbox_client_ruby/api/dcim/manufacturers.rb
|
|
221
257
|
- lib/netbox_client_ruby/api/dcim/platform.rb
|
|
222
258
|
- lib/netbox_client_ruby/api/dcim/platforms.rb
|
|
259
|
+
- lib/netbox_client_ruby/api/dcim/power_connection.rb
|
|
260
|
+
- lib/netbox_client_ruby/api/dcim/power_connections.rb
|
|
223
261
|
- lib/netbox_client_ruby/api/dcim/power_outlet.rb
|
|
224
262
|
- lib/netbox_client_ruby/api/dcim/power_outlets.rb
|
|
225
263
|
- lib/netbox_client_ruby/api/dcim/power_port.rb
|
|
@@ -227,6 +265,8 @@ files:
|
|
|
227
265
|
- lib/netbox_client_ruby/api/dcim/rack.rb
|
|
228
266
|
- lib/netbox_client_ruby/api/dcim/rack_group.rb
|
|
229
267
|
- lib/netbox_client_ruby/api/dcim/rack_groups.rb
|
|
268
|
+
- lib/netbox_client_ruby/api/dcim/rack_reservation.rb
|
|
269
|
+
- lib/netbox_client_ruby/api/dcim/rack_reservations.rb
|
|
230
270
|
- lib/netbox_client_ruby/api/dcim/rack_role.rb
|
|
231
271
|
- lib/netbox_client_ruby/api/dcim/rack_roles.rb
|
|
232
272
|
- lib/netbox_client_ruby/api/dcim/racks.rb
|
|
@@ -234,6 +274,8 @@ files:
|
|
|
234
274
|
- lib/netbox_client_ruby/api/dcim/regions.rb
|
|
235
275
|
- lib/netbox_client_ruby/api/dcim/site.rb
|
|
236
276
|
- lib/netbox_client_ruby/api/dcim/sites.rb
|
|
277
|
+
- lib/netbox_client_ruby/api/dcim/virtual_chassis.rb
|
|
278
|
+
- lib/netbox_client_ruby/api/dcim/virtual_chassis_list.rb
|
|
237
279
|
- lib/netbox_client_ruby/api/ipam.rb
|
|
238
280
|
- lib/netbox_client_ruby/api/ipam/aggregate.rb
|
|
239
281
|
- lib/netbox_client_ruby/api/ipam/aggregates.rb
|
|
@@ -282,6 +324,8 @@ files:
|
|
|
282
324
|
- lib/netbox_client_ruby/error/local_error.rb
|
|
283
325
|
- lib/netbox_client_ruby/error/remote_error.rb
|
|
284
326
|
- netbox-client-ruby.gemspec
|
|
327
|
+
- netbox-client-ruby_rsa
|
|
328
|
+
- netbox-client-ruby_rsa.pub
|
|
285
329
|
- netbox.env
|
|
286
330
|
homepage: https://github.com/ninech/netbox-client-ruby
|
|
287
331
|
licenses:
|
|
@@ -303,8 +347,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
303
347
|
- !ruby/object:Gem::Version
|
|
304
348
|
version: '0'
|
|
305
349
|
requirements: []
|
|
306
|
-
|
|
307
|
-
rubygems_version: 2.7.6
|
|
350
|
+
rubygems_version: 3.0.3
|
|
308
351
|
signing_key:
|
|
309
352
|
specification_version: 4
|
|
310
353
|
summary: A read/write client for Netbox v2.
|