diff --git a/lib/netbox_client_ruby.rb b/lib/netbox_client_ruby.rb index 0438045..544a342 100644 --- a/lib/netbox_client_ruby.rb +++ b/lib/netbox_client_ruby.rb @@ -1,8 +1,43 @@ # frozen_string_literal: true require 'dry-configurable' -require 'netbox_client_ruby/error' -require 'netbox_client_ruby/api' +require 'ipaddress' +require 'openssl' + +require 'faraday' +require 'faraday/detailed_logger' + +if Faraday::VERSION < '2' + begin + require 'faraday_middleware' + rescue LoadError => e + message = <<~MSG + For the current version of Faraday (#{Faraday::VERSION}), "faraday_middleware" + is a required peer dependency of "netbox-client-ruby". Please install + "faraday_middleware" separately OR upgrade to Faraday 2, in which case, + "faraday_middleware" is not needed to work with "netbox-client-ruby". + + #{e.message} + MSG + raise NetboxClientRuby::Error, message + end +end + +require 'zeitwerk' + +# load zeitwerk +Zeitwerk::Loader.for_gem.tap do |loader| + loader.ignore("#{__dir__}/netbox-client-ruby.rb") + loader.collapse("#{__dir__}/netbox_client_ruby/api") + loader.inflector.inflect('dcim' => 'DCIM') + loader.inflector.inflect('ipam' => 'IPAM') + loader.inflector.inflect('rsa_key_pair' => 'RSAKeyPair') + # loader.log! + loader.setup +end + +# load gem errors +require_relative 'netbox_client_ruby/error' module NetboxClientRuby extend Dry::Configurable @@ -31,4 +66,32 @@ module NetboxClientRuby setting :logger setting :request_options, default: { open_timeout: 1, timeout: 5 } end + + def self.circuits + NetboxClientRuby::Circuits + end + + def self.dcim + NetboxClientRuby::DCIM + end + + def self.extras + NetboxClientRuby::Extras + end + + def self.ipam + NetboxClientRuby::IPAM + end + + def self.secrets + NetboxClientRuby::Secrets + end + + def self.tenancy + NetboxClientRuby::Tenancy + end + + def self.virtualization + NetboxClientRuby::Virtualization + end end diff --git a/lib/netbox_client_ruby/api.rb b/lib/netbox_client_ruby/api.rb deleted file mode 100644 index 83944a5..0000000 --- a/lib/netbox_client_ruby/api.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -require 'netbox_client_ruby/api/circuits' -require 'netbox_client_ruby/api/dcim' -require 'netbox_client_ruby/api/extras' -require 'netbox_client_ruby/api/ipam' -require 'netbox_client_ruby/api/secrets' -require 'netbox_client_ruby/api/tenancy' -require 'netbox_client_ruby/api/virtualization' -require 'netbox_client_ruby/communication' - -module NetboxClientRuby - def self.circuits - NetboxClientRuby::Circuits - end - - def self.dcim - NetboxClientRuby::DCIM - end - - def self.extras - NetboxClientRuby::Extras - end - - def self.ipam - NetboxClientRuby::IPAM - end - - def self.secrets - NetboxClientRuby::Secrets - end - - def self.tenancy - NetboxClientRuby::Tenancy - end - - def self.virtualization - NetboxClientRuby::Virtualization - end -end diff --git a/lib/netbox_client_ruby/api/circuits.rb b/lib/netbox_client_ruby/api/circuits.rb index c29cec3..796f54e 100644 --- a/lib/netbox_client_ruby/api/circuits.rb +++ b/lib/netbox_client_ruby/api/circuits.rb @@ -1,15 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/api/circuits/circuit' -require 'netbox_client_ruby/api/circuits/circuits' -require 'netbox_client_ruby/api/circuits/circuit_termination' -require 'netbox_client_ruby/api/circuits/circuit_terminations' -require 'netbox_client_ruby/api/circuits/circuit_type' -require 'netbox_client_ruby/api/circuits/circuit_types' -require 'netbox_client_ruby/api/circuits/provider' -require 'netbox_client_ruby/api/circuits/providers' -require 'netbox_client_ruby/communication' - module NetboxClientRuby module Circuits { diff --git a/lib/netbox_client_ruby/api/circuits/circuit.rb b/lib/netbox_client_ruby/api/circuits/circuit.rb index 27a10d9..a105757 100644 --- a/lib/netbox_client_ruby/api/circuits/circuit.rb +++ b/lib/netbox_client_ruby/api/circuits/circuit.rb @@ -1,10 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/circuits/circuit_type' -require 'netbox_client_ruby/api/circuits/provider' -require 'netbox_client_ruby/api/tenancy/tenant' - module NetboxClientRuby module Circuits class Circuit diff --git a/lib/netbox_client_ruby/api/circuits/circuit_termination.rb b/lib/netbox_client_ruby/api/circuits/circuit_termination.rb index b6e76a9..3129c2a 100644 --- a/lib/netbox_client_ruby/api/circuits/circuit_termination.rb +++ b/lib/netbox_client_ruby/api/circuits/circuit_termination.rb @@ -1,10 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/circuits/circuit' -require 'netbox_client_ruby/api/dcim/site' -require 'netbox_client_ruby/api/dcim/interface' - module NetboxClientRuby module Circuits class CircuitTermination diff --git a/lib/netbox_client_ruby/api/circuits/circuit_terminations.rb b/lib/netbox_client_ruby/api/circuits/circuit_terminations.rb index b4627cd..4a875d5 100644 --- a/lib/netbox_client_ruby/api/circuits/circuit_terminations.rb +++ b/lib/netbox_client_ruby/api/circuits/circuit_terminations.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/circuits/circuit_termination' - module NetboxClientRuby module Circuits class CircuitTerminations diff --git a/lib/netbox_client_ruby/api/circuits/circuit_type.rb b/lib/netbox_client_ruby/api/circuits/circuit_type.rb index a16c6e4..b9a247e 100644 --- a/lib/netbox_client_ruby/api/circuits/circuit_type.rb +++ b/lib/netbox_client_ruby/api/circuits/circuit_type.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' - module NetboxClientRuby module Circuits class CircuitType diff --git a/lib/netbox_client_ruby/api/circuits/circuit_types.rb b/lib/netbox_client_ruby/api/circuits/circuit_types.rb index 33cec31..14aab6e 100644 --- a/lib/netbox_client_ruby/api/circuits/circuit_types.rb +++ b/lib/netbox_client_ruby/api/circuits/circuit_types.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/circuits/circuit_type' - module NetboxClientRuby module Circuits class CircuitTypes diff --git a/lib/netbox_client_ruby/api/circuits/circuits.rb b/lib/netbox_client_ruby/api/circuits/circuits.rb index 68fefbb..cb62f34 100644 --- a/lib/netbox_client_ruby/api/circuits/circuits.rb +++ b/lib/netbox_client_ruby/api/circuits/circuits.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/circuits/circuit' - module NetboxClientRuby module Circuits ## diff --git a/lib/netbox_client_ruby/api/circuits/provider.rb b/lib/netbox_client_ruby/api/circuits/provider.rb index 864a3c2..8b9fefe 100644 --- a/lib/netbox_client_ruby/api/circuits/provider.rb +++ b/lib/netbox_client_ruby/api/circuits/provider.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' - module NetboxClientRuby module Circuits class Provider diff --git a/lib/netbox_client_ruby/api/circuits/providers.rb b/lib/netbox_client_ruby/api/circuits/providers.rb index cf0e48f..06f01d6 100644 --- a/lib/netbox_client_ruby/api/circuits/providers.rb +++ b/lib/netbox_client_ruby/api/circuits/providers.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/circuits/provider' - module NetboxClientRuby module Circuits class Providers diff --git a/lib/netbox_client_ruby/api/dcim.rb b/lib/netbox_client_ruby/api/dcim.rb index 7d88c57..f019407 100644 --- a/lib/netbox_client_ruby/api/dcim.rb +++ b/lib/netbox_client_ruby/api/dcim.rb @@ -1,49 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/api/dcim/console_connection' -require 'netbox_client_ruby/api/dcim/console_connections' -require 'netbox_client_ruby/api/dcim/console_port' -require 'netbox_client_ruby/api/dcim/console_ports' -require 'netbox_client_ruby/api/dcim/console_server_port' -require 'netbox_client_ruby/api/dcim/console_server_ports' -require 'netbox_client_ruby/api/dcim/device' -require 'netbox_client_ruby/api/dcim/devices' -require 'netbox_client_ruby/api/dcim/device_role' -require 'netbox_client_ruby/api/dcim/device_roles' -require 'netbox_client_ruby/api/dcim/device_type' -require 'netbox_client_ruby/api/dcim/device_types' -require 'netbox_client_ruby/api/dcim/interface' -require 'netbox_client_ruby/api/dcim/interface_connection' -require 'netbox_client_ruby/api/dcim/interface_connections' -require 'netbox_client_ruby/api/dcim/interfaces' -require 'netbox_client_ruby/api/dcim/inventory_item' -require 'netbox_client_ruby/api/dcim/inventory_items' -require 'netbox_client_ruby/api/dcim/manufacturer' -require 'netbox_client_ruby/api/dcim/manufacturers' -require 'netbox_client_ruby/api/dcim/platform' -require 'netbox_client_ruby/api/dcim/platforms' -require 'netbox_client_ruby/api/dcim/power_connection' -require 'netbox_client_ruby/api/dcim/power_connections' -require 'netbox_client_ruby/api/dcim/power_outlet' -require 'netbox_client_ruby/api/dcim/power_outlets' -require 'netbox_client_ruby/api/dcim/power_port' -require 'netbox_client_ruby/api/dcim/power_ports' -require 'netbox_client_ruby/api/dcim/rack' -require 'netbox_client_ruby/api/dcim/rack_group' -require 'netbox_client_ruby/api/dcim/rack_groups' -require 'netbox_client_ruby/api/dcim/rack_reservation' -require 'netbox_client_ruby/api/dcim/rack_reservations' -require 'netbox_client_ruby/api/dcim/rack_role' -require 'netbox_client_ruby/api/dcim/rack_roles' -require 'netbox_client_ruby/api/dcim/racks' -require 'netbox_client_ruby/api/dcim/region' -require 'netbox_client_ruby/api/dcim/regions' -require 'netbox_client_ruby/api/dcim/site' -require 'netbox_client_ruby/api/dcim/sites' -require 'netbox_client_ruby/api/dcim/virtual_chassis' -require 'netbox_client_ruby/api/dcim/virtual_chassis_list' -require 'netbox_client_ruby/communication' - module NetboxClientRuby module DCIM { diff --git a/lib/netbox_client_ruby/api/dcim/console_connection.rb b/lib/netbox_client_ruby/api/dcim/console_connection.rb index 2c70f5f..58d0151 100644 --- a/lib/netbox_client_ruby/api/dcim/console_connection.rb +++ b/lib/netbox_client_ruby/api/dcim/console_connection.rb @@ -1,9 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/dcim/device' -require 'netbox_client_ruby/api/dcim/console_server_port' - module NetboxClientRuby module DCIM class ConsoleConnection diff --git a/lib/netbox_client_ruby/api/dcim/console_connections.rb b/lib/netbox_client_ruby/api/dcim/console_connections.rb index 00a15fb..f294960 100644 --- a/lib/netbox_client_ruby/api/dcim/console_connections.rb +++ b/lib/netbox_client_ruby/api/dcim/console_connections.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/dcim/console_connection' - module NetboxClientRuby module DCIM class ConsoleConnections diff --git a/lib/netbox_client_ruby/api/dcim/console_port.rb b/lib/netbox_client_ruby/api/dcim/console_port.rb index 0926bdc..0bd1ba3 100644 --- a/lib/netbox_client_ruby/api/dcim/console_port.rb +++ b/lib/netbox_client_ruby/api/dcim/console_port.rb @@ -1,9 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/dcim/device' -require 'netbox_client_ruby/api/dcim/console_server_port' - module NetboxClientRuby module DCIM class ConsolePort diff --git a/lib/netbox_client_ruby/api/dcim/console_ports.rb b/lib/netbox_client_ruby/api/dcim/console_ports.rb index f98c892..2abd414 100644 --- a/lib/netbox_client_ruby/api/dcim/console_ports.rb +++ b/lib/netbox_client_ruby/api/dcim/console_ports.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/dcim/console_port' - module NetboxClientRuby module DCIM class ConsolePorts diff --git a/lib/netbox_client_ruby/api/dcim/console_server_port.rb b/lib/netbox_client_ruby/api/dcim/console_server_port.rb index cfe264c..16c9814 100644 --- a/lib/netbox_client_ruby/api/dcim/console_server_port.rb +++ b/lib/netbox_client_ruby/api/dcim/console_server_port.rb @@ -1,9 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/dcim/device' -require 'netbox_client_ruby/api/dcim/console_port' - module NetboxClientRuby module DCIM class ConsoleServerPort diff --git a/lib/netbox_client_ruby/api/dcim/console_server_ports.rb b/lib/netbox_client_ruby/api/dcim/console_server_ports.rb index a26c262..ff749f6 100644 --- a/lib/netbox_client_ruby/api/dcim/console_server_ports.rb +++ b/lib/netbox_client_ruby/api/dcim/console_server_ports.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/dcim/console_server_port' - module NetboxClientRuby module DCIM class ConsoleServerPorts diff --git a/lib/netbox_client_ruby/api/dcim/device.rb b/lib/netbox_client_ruby/api/dcim/device.rb index c636b9d..c81326a 100644 --- a/lib/netbox_client_ruby/api/dcim/device.rb +++ b/lib/netbox_client_ruby/api/dcim/device.rb @@ -1,15 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/dcim/device_type' -require 'netbox_client_ruby/api/dcim/device_role' -require 'netbox_client_ruby/api/tenancy/tenant' -require 'netbox_client_ruby/api/dcim/platform' -require 'netbox_client_ruby/api/dcim/site' -require 'netbox_client_ruby/api/dcim/rack' -require 'netbox_client_ruby/api/dcim/virtual_chassis' -require 'netbox_client_ruby/api/ipam/ip_address' - module NetboxClientRuby module DCIM class Device diff --git a/lib/netbox_client_ruby/api/dcim/device_role.rb b/lib/netbox_client_ruby/api/dcim/device_role.rb index f912160..921996f 100644 --- a/lib/netbox_client_ruby/api/dcim/device_role.rb +++ b/lib/netbox_client_ruby/api/dcim/device_role.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' - module NetboxClientRuby module DCIM class DeviceRole diff --git a/lib/netbox_client_ruby/api/dcim/device_roles.rb b/lib/netbox_client_ruby/api/dcim/device_roles.rb index 081f564..677aeab 100644 --- a/lib/netbox_client_ruby/api/dcim/device_roles.rb +++ b/lib/netbox_client_ruby/api/dcim/device_roles.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/dcim/device_type' - module NetboxClientRuby module DCIM class DeviceRoles diff --git a/lib/netbox_client_ruby/api/dcim/device_type.rb b/lib/netbox_client_ruby/api/dcim/device_type.rb index 0df8672..f8999a3 100644 --- a/lib/netbox_client_ruby/api/dcim/device_type.rb +++ b/lib/netbox_client_ruby/api/dcim/device_type.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/dcim/manufacturer' - module NetboxClientRuby module DCIM class InterfaceOrdering diff --git a/lib/netbox_client_ruby/api/dcim/device_types.rb b/lib/netbox_client_ruby/api/dcim/device_types.rb index d95aef9..ca9dc0f 100644 --- a/lib/netbox_client_ruby/api/dcim/device_types.rb +++ b/lib/netbox_client_ruby/api/dcim/device_types.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/dcim/device_type' - module NetboxClientRuby module DCIM class DeviceTypes diff --git a/lib/netbox_client_ruby/api/dcim/devices.rb b/lib/netbox_client_ruby/api/dcim/devices.rb index b6d5e99..84f4ebc 100644 --- a/lib/netbox_client_ruby/api/dcim/devices.rb +++ b/lib/netbox_client_ruby/api/dcim/devices.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/dcim/device' - module NetboxClientRuby module DCIM class Devices diff --git a/lib/netbox_client_ruby/api/dcim/interface.rb b/lib/netbox_client_ruby/api/dcim/interface.rb index 9ffa197..8307e2f 100644 --- a/lib/netbox_client_ruby/api/dcim/interface.rb +++ b/lib/netbox_client_ruby/api/dcim/interface.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/dcim/device' - module NetboxClientRuby module DCIM class Interface diff --git a/lib/netbox_client_ruby/api/dcim/interface_connection.rb b/lib/netbox_client_ruby/api/dcim/interface_connection.rb index 8a43922..d86d052 100644 --- a/lib/netbox_client_ruby/api/dcim/interface_connection.rb +++ b/lib/netbox_client_ruby/api/dcim/interface_connection.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/dcim/interface' - module NetboxClientRuby module DCIM class InterfaceConnection diff --git a/lib/netbox_client_ruby/api/dcim/interface_connections.rb b/lib/netbox_client_ruby/api/dcim/interface_connections.rb index 748970e..3fbfc84 100644 --- a/lib/netbox_client_ruby/api/dcim/interface_connections.rb +++ b/lib/netbox_client_ruby/api/dcim/interface_connections.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/dcim/interface_connection' - module NetboxClientRuby module DCIM class InterfaceConnections diff --git a/lib/netbox_client_ruby/api/dcim/interfaces.rb b/lib/netbox_client_ruby/api/dcim/interfaces.rb index f98325d..dc370f5 100644 --- a/lib/netbox_client_ruby/api/dcim/interfaces.rb +++ b/lib/netbox_client_ruby/api/dcim/interfaces.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/dcim/interface' - module NetboxClientRuby module DCIM class Interfaces diff --git a/lib/netbox_client_ruby/api/dcim/inventory_item.rb b/lib/netbox_client_ruby/api/dcim/inventory_item.rb index 6c2613e..6cda69e 100644 --- a/lib/netbox_client_ruby/api/dcim/inventory_item.rb +++ b/lib/netbox_client_ruby/api/dcim/inventory_item.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/dcim/device' - module NetboxClientRuby module DCIM class InventoryItem diff --git a/lib/netbox_client_ruby/api/dcim/inventory_items.rb b/lib/netbox_client_ruby/api/dcim/inventory_items.rb index c7e4692..59f2fe1 100644 --- a/lib/netbox_client_ruby/api/dcim/inventory_items.rb +++ b/lib/netbox_client_ruby/api/dcim/inventory_items.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/dcim/inventory_item' - module NetboxClientRuby module DCIM class InventoryItems diff --git a/lib/netbox_client_ruby/api/dcim/manufacturer.rb b/lib/netbox_client_ruby/api/dcim/manufacturer.rb index d6a1b6f..e335a88 100644 --- a/lib/netbox_client_ruby/api/dcim/manufacturer.rb +++ b/lib/netbox_client_ruby/api/dcim/manufacturer.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' - module NetboxClientRuby module DCIM class Manufacturer diff --git a/lib/netbox_client_ruby/api/dcim/manufacturers.rb b/lib/netbox_client_ruby/api/dcim/manufacturers.rb index 685bcf6..6f4f658 100644 --- a/lib/netbox_client_ruby/api/dcim/manufacturers.rb +++ b/lib/netbox_client_ruby/api/dcim/manufacturers.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/dcim/manufacturer' - module NetboxClientRuby module DCIM class Manufacturers diff --git a/lib/netbox_client_ruby/api/dcim/platform.rb b/lib/netbox_client_ruby/api/dcim/platform.rb index 4fed41c..142d08a 100644 --- a/lib/netbox_client_ruby/api/dcim/platform.rb +++ b/lib/netbox_client_ruby/api/dcim/platform.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/dcim/manufacturer' - module NetboxClientRuby module DCIM class Platform diff --git a/lib/netbox_client_ruby/api/dcim/platforms.rb b/lib/netbox_client_ruby/api/dcim/platforms.rb index 74a8a04..e5a155d 100644 --- a/lib/netbox_client_ruby/api/dcim/platforms.rb +++ b/lib/netbox_client_ruby/api/dcim/platforms.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/dcim/platform' - module NetboxClientRuby module DCIM class Platforms diff --git a/lib/netbox_client_ruby/api/dcim/power_connection.rb b/lib/netbox_client_ruby/api/dcim/power_connection.rb index c086dfd..25db595 100644 --- a/lib/netbox_client_ruby/api/dcim/power_connection.rb +++ b/lib/netbox_client_ruby/api/dcim/power_connection.rb @@ -1,9 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/dcim/device' -require 'netbox_client_ruby/api/dcim/power_outlet' - module NetboxClientRuby module DCIM class PowerConnection diff --git a/lib/netbox_client_ruby/api/dcim/power_connections.rb b/lib/netbox_client_ruby/api/dcim/power_connections.rb index f8341f8..ec754bc 100644 --- a/lib/netbox_client_ruby/api/dcim/power_connections.rb +++ b/lib/netbox_client_ruby/api/dcim/power_connections.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/dcim/power_connection' - module NetboxClientRuby module DCIM class PowerConnections diff --git a/lib/netbox_client_ruby/api/dcim/power_outlet.rb b/lib/netbox_client_ruby/api/dcim/power_outlet.rb index bd33e64..8a06f87 100644 --- a/lib/netbox_client_ruby/api/dcim/power_outlet.rb +++ b/lib/netbox_client_ruby/api/dcim/power_outlet.rb @@ -1,9 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/dcim/device' -require 'netbox_client_ruby/api/dcim/power_port' - module NetboxClientRuby module DCIM class PowerOutlet diff --git a/lib/netbox_client_ruby/api/dcim/power_outlets.rb b/lib/netbox_client_ruby/api/dcim/power_outlets.rb index 6c3cf06..c31fedf 100644 --- a/lib/netbox_client_ruby/api/dcim/power_outlets.rb +++ b/lib/netbox_client_ruby/api/dcim/power_outlets.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/dcim/interface' - module NetboxClientRuby module DCIM class PowerOutlets diff --git a/lib/netbox_client_ruby/api/dcim/power_port.rb b/lib/netbox_client_ruby/api/dcim/power_port.rb index 09df253..9d89089 100644 --- a/lib/netbox_client_ruby/api/dcim/power_port.rb +++ b/lib/netbox_client_ruby/api/dcim/power_port.rb @@ -1,9 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/dcim/device' -require 'netbox_client_ruby/api/dcim/power_outlet' - module NetboxClientRuby module DCIM class PowerPort diff --git a/lib/netbox_client_ruby/api/dcim/power_ports.rb b/lib/netbox_client_ruby/api/dcim/power_ports.rb index 7e6b7d6..8efadbb 100644 --- a/lib/netbox_client_ruby/api/dcim/power_ports.rb +++ b/lib/netbox_client_ruby/api/dcim/power_ports.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/dcim/interface' - module NetboxClientRuby module DCIM class PowerPorts diff --git a/lib/netbox_client_ruby/api/dcim/rack.rb b/lib/netbox_client_ruby/api/dcim/rack.rb index f0e174e..2fad4ed 100644 --- a/lib/netbox_client_ruby/api/dcim/rack.rb +++ b/lib/netbox_client_ruby/api/dcim/rack.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' - module NetboxClientRuby module DCIM class Rack diff --git a/lib/netbox_client_ruby/api/dcim/rack_group.rb b/lib/netbox_client_ruby/api/dcim/rack_group.rb index ca8a23b..07a90d9 100644 --- a/lib/netbox_client_ruby/api/dcim/rack_group.rb +++ b/lib/netbox_client_ruby/api/dcim/rack_group.rb @@ -1,9 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/dcim/region' -require 'netbox_client_ruby/api/tenancy/tenant' - module NetboxClientRuby module DCIM class RackGroup diff --git a/lib/netbox_client_ruby/api/dcim/rack_groups.rb b/lib/netbox_client_ruby/api/dcim/rack_groups.rb index a0b21db..4ce71cc 100644 --- a/lib/netbox_client_ruby/api/dcim/rack_groups.rb +++ b/lib/netbox_client_ruby/api/dcim/rack_groups.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/dcim/rack_group' - module NetboxClientRuby module DCIM class RackGroups diff --git a/lib/netbox_client_ruby/api/dcim/rack_reservation.rb b/lib/netbox_client_ruby/api/dcim/rack_reservation.rb index e31c6b5..3a88371 100644 --- a/lib/netbox_client_ruby/api/dcim/rack_reservation.rb +++ b/lib/netbox_client_ruby/api/dcim/rack_reservation.rb @@ -1,9 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/dcim/rack' -require 'netbox_client_ruby/api/tenancy/tenant' - module NetboxClientRuby module DCIM class RackReservation diff --git a/lib/netbox_client_ruby/api/dcim/rack_reservations.rb b/lib/netbox_client_ruby/api/dcim/rack_reservations.rb index 00a46e7..1d69fca 100644 --- a/lib/netbox_client_ruby/api/dcim/rack_reservations.rb +++ b/lib/netbox_client_ruby/api/dcim/rack_reservations.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/dcim/rack_reservation' - module NetboxClientRuby module DCIM class RackReservations diff --git a/lib/netbox_client_ruby/api/dcim/rack_role.rb b/lib/netbox_client_ruby/api/dcim/rack_role.rb index ba3d5ea..aa24255 100644 --- a/lib/netbox_client_ruby/api/dcim/rack_role.rb +++ b/lib/netbox_client_ruby/api/dcim/rack_role.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' - module NetboxClientRuby module DCIM class RackRole diff --git a/lib/netbox_client_ruby/api/dcim/rack_roles.rb b/lib/netbox_client_ruby/api/dcim/rack_roles.rb index 205de58..d059aa1 100644 --- a/lib/netbox_client_ruby/api/dcim/rack_roles.rb +++ b/lib/netbox_client_ruby/api/dcim/rack_roles.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/dcim/rack_role' - module NetboxClientRuby module DCIM class RackRoles diff --git a/lib/netbox_client_ruby/api/dcim/racks.rb b/lib/netbox_client_ruby/api/dcim/racks.rb index 8bd6601..98f3496 100644 --- a/lib/netbox_client_ruby/api/dcim/racks.rb +++ b/lib/netbox_client_ruby/api/dcim/racks.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/dcim/rack' - module NetboxClientRuby module DCIM class Racks diff --git a/lib/netbox_client_ruby/api/dcim/region.rb b/lib/netbox_client_ruby/api/dcim/region.rb index 857a80c..7266491 100644 --- a/lib/netbox_client_ruby/api/dcim/region.rb +++ b/lib/netbox_client_ruby/api/dcim/region.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' - module NetboxClientRuby module DCIM class Region diff --git a/lib/netbox_client_ruby/api/dcim/regions.rb b/lib/netbox_client_ruby/api/dcim/regions.rb index 7ef35c3..2be9123 100644 --- a/lib/netbox_client_ruby/api/dcim/regions.rb +++ b/lib/netbox_client_ruby/api/dcim/regions.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/dcim/region' - module NetboxClientRuby module DCIM class Regions diff --git a/lib/netbox_client_ruby/api/dcim/site.rb b/lib/netbox_client_ruby/api/dcim/site.rb index a62cb0c..d751aad 100644 --- a/lib/netbox_client_ruby/api/dcim/site.rb +++ b/lib/netbox_client_ruby/api/dcim/site.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/dcim/region' - module NetboxClientRuby module DCIM class Site diff --git a/lib/netbox_client_ruby/api/dcim/sites.rb b/lib/netbox_client_ruby/api/dcim/sites.rb index 324c502..dbefb06 100644 --- a/lib/netbox_client_ruby/api/dcim/sites.rb +++ b/lib/netbox_client_ruby/api/dcim/sites.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/dcim/site' - module NetboxClientRuby module DCIM class Sites diff --git a/lib/netbox_client_ruby/api/dcim/virtual_chassis.rb b/lib/netbox_client_ruby/api/dcim/virtual_chassis.rb index 8e6671d..a1fd606 100644 --- a/lib/netbox_client_ruby/api/dcim/virtual_chassis.rb +++ b/lib/netbox_client_ruby/api/dcim/virtual_chassis.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/dcim/device' - module NetboxClientRuby module DCIM class VirtualChassis diff --git a/lib/netbox_client_ruby/api/dcim/virtual_chassis_list.rb b/lib/netbox_client_ruby/api/dcim/virtual_chassis_list.rb index c17790d..c5289bd 100644 --- a/lib/netbox_client_ruby/api/dcim/virtual_chassis_list.rb +++ b/lib/netbox_client_ruby/api/dcim/virtual_chassis_list.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/dcim/virtual_chassis' - module NetboxClientRuby module DCIM class VirtualChassisList diff --git a/lib/netbox_client_ruby/api/extras.rb b/lib/netbox_client_ruby/api/extras.rb index dba3daa..11fae70 100644 --- a/lib/netbox_client_ruby/api/extras.rb +++ b/lib/netbox_client_ruby/api/extras.rb @@ -1,12 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/api/extras/config_context' -require 'netbox_client_ruby/api/extras/config_contexts' -require 'netbox_client_ruby/api/extras/journal_entry' -require 'netbox_client_ruby/api/extras/journal_entries' -require 'netbox_client_ruby/api/extras/tag' -require 'netbox_client_ruby/api/extras/tags' - module NetboxClientRuby module Extras { diff --git a/lib/netbox_client_ruby/api/extras/config_context.rb b/lib/netbox_client_ruby/api/extras/config_context.rb index 8c3f22b..adcddaa 100644 --- a/lib/netbox_client_ruby/api/extras/config_context.rb +++ b/lib/netbox_client_ruby/api/extras/config_context.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' - module NetboxClientRuby module Extras class ConfigContext diff --git a/lib/netbox_client_ruby/api/extras/config_contexts.rb b/lib/netbox_client_ruby/api/extras/config_contexts.rb index cfd2cd5..a29a753 100644 --- a/lib/netbox_client_ruby/api/extras/config_contexts.rb +++ b/lib/netbox_client_ruby/api/extras/config_contexts.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/extras/config_context' - module NetboxClientRuby module Extras class ConfigContexts diff --git a/lib/netbox_client_ruby/api/extras/journal_entries.rb b/lib/netbox_client_ruby/api/extras/journal_entries.rb index efe27cd..1e8b7f6 100644 --- a/lib/netbox_client_ruby/api/extras/journal_entries.rb +++ b/lib/netbox_client_ruby/api/extras/journal_entries.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/extras/journal_entry' - module NetboxClientRuby module Extras class JournalEntries diff --git a/lib/netbox_client_ruby/api/extras/journal_entry.rb b/lib/netbox_client_ruby/api/extras/journal_entry.rb index 71802bd..4f6ae5d 100644 --- a/lib/netbox_client_ruby/api/extras/journal_entry.rb +++ b/lib/netbox_client_ruby/api/extras/journal_entry.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' - module NetboxClientRuby module Extras class JournalEntry diff --git a/lib/netbox_client_ruby/api/extras/tag.rb b/lib/netbox_client_ruby/api/extras/tag.rb index 1476057..81c713f 100644 --- a/lib/netbox_client_ruby/api/extras/tag.rb +++ b/lib/netbox_client_ruby/api/extras/tag.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' - module NetboxClientRuby module Extras class Tag diff --git a/lib/netbox_client_ruby/api/extras/tags.rb b/lib/netbox_client_ruby/api/extras/tags.rb index c1b01d9..8ef46e8 100644 --- a/lib/netbox_client_ruby/api/extras/tags.rb +++ b/lib/netbox_client_ruby/api/extras/tags.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/extras/tag' - module NetboxClientRuby module Extras class Tags diff --git a/lib/netbox_client_ruby/api/ipam.rb b/lib/netbox_client_ruby/api/ipam.rb index 76fa262..ac7257f 100644 --- a/lib/netbox_client_ruby/api/ipam.rb +++ b/lib/netbox_client_ruby/api/ipam.rb @@ -1,27 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/api/ipam/aggregate' -require 'netbox_client_ruby/api/ipam/aggregates' -require 'netbox_client_ruby/api/ipam/ip_addresses' -require 'netbox_client_ruby/api/ipam/ip_address' -require 'netbox_client_ruby/api/ipam/ip_ranges' -require 'netbox_client_ruby/api/ipam/ip_range' -require 'netbox_client_ruby/api/ipam/prefix' -require 'netbox_client_ruby/api/ipam/prefixes' -require 'netbox_client_ruby/api/ipam/rir' -require 'netbox_client_ruby/api/ipam/rirs' -require 'netbox_client_ruby/api/ipam/role' -require 'netbox_client_ruby/api/ipam/roles' -require 'netbox_client_ruby/api/ipam/service' -require 'netbox_client_ruby/api/ipam/services' -require 'netbox_client_ruby/api/ipam/vlan_group' -require 'netbox_client_ruby/api/ipam/vlan_groups' -require 'netbox_client_ruby/api/ipam/vlan' -require 'netbox_client_ruby/api/ipam/vlans' -require 'netbox_client_ruby/api/ipam/vrf' -require 'netbox_client_ruby/api/ipam/vrfs' -require 'netbox_client_ruby/communication' - module NetboxClientRuby module IPAM { diff --git a/lib/netbox_client_ruby/api/ipam/aggregate.rb b/lib/netbox_client_ruby/api/ipam/aggregate.rb index d54eeb0..2f12a96 100644 --- a/lib/netbox_client_ruby/api/ipam/aggregate.rb +++ b/lib/netbox_client_ruby/api/ipam/aggregate.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/ipam/rir' - module NetboxClientRuby module IPAM class Aggregate diff --git a/lib/netbox_client_ruby/api/ipam/aggregates.rb b/lib/netbox_client_ruby/api/ipam/aggregates.rb index 2406831..c279475 100644 --- a/lib/netbox_client_ruby/api/ipam/aggregates.rb +++ b/lib/netbox_client_ruby/api/ipam/aggregates.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/ipam/aggregate' - module NetboxClientRuby module IPAM class Aggregates diff --git a/lib/netbox_client_ruby/api/ipam/ip_address.rb b/lib/netbox_client_ruby/api/ipam/ip_address.rb index 3c89942..0d73890 100644 --- a/lib/netbox_client_ruby/api/ipam/ip_address.rb +++ b/lib/netbox_client_ruby/api/ipam/ip_address.rb @@ -1,11 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/dcim/interface' -require 'netbox_client_ruby/api/ipam/vrf' -require 'netbox_client_ruby/api/tenancy/tenant' -require 'ipaddress' - module NetboxClientRuby module IPAM class IpAddress diff --git a/lib/netbox_client_ruby/api/ipam/ip_addresses.rb b/lib/netbox_client_ruby/api/ipam/ip_addresses.rb index 64d46f7..3d1a13c 100644 --- a/lib/netbox_client_ruby/api/ipam/ip_addresses.rb +++ b/lib/netbox_client_ruby/api/ipam/ip_addresses.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/ipam/ip_address' - module NetboxClientRuby module IPAM class IpAddresses diff --git a/lib/netbox_client_ruby/api/ipam/ip_range.rb b/lib/netbox_client_ruby/api/ipam/ip_range.rb index e40e431..e91d1ee 100644 --- a/lib/netbox_client_ruby/api/ipam/ip_range.rb +++ b/lib/netbox_client_ruby/api/ipam/ip_range.rb @@ -1,11 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/ipam/role' -require 'netbox_client_ruby/api/ipam/vrf' -require 'netbox_client_ruby/api/tenancy/tenant' -require 'ipaddress' - module NetboxClientRuby module IPAM class IpRange diff --git a/lib/netbox_client_ruby/api/ipam/ip_ranges.rb b/lib/netbox_client_ruby/api/ipam/ip_ranges.rb index 8baaf05..e85b2be 100644 --- a/lib/netbox_client_ruby/api/ipam/ip_ranges.rb +++ b/lib/netbox_client_ruby/api/ipam/ip_ranges.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/ipam/ip_range' - module NetboxClientRuby module IPAM class IpRanges diff --git a/lib/netbox_client_ruby/api/ipam/prefix.rb b/lib/netbox_client_ruby/api/ipam/prefix.rb index 2ef0dcd..81d2878 100644 --- a/lib/netbox_client_ruby/api/ipam/prefix.rb +++ b/lib/netbox_client_ruby/api/ipam/prefix.rb @@ -1,14 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/ipam/role' -require 'netbox_client_ruby/api/dcim/site' -require 'netbox_client_ruby/api/ipam/vrf' -require 'netbox_client_ruby/api/ipam/vlan' -require 'netbox_client_ruby/api/ipam/vlan_group' -require 'netbox_client_ruby/api/tenancy/tenant' -require 'ipaddress' - module NetboxClientRuby module IPAM class Prefix diff --git a/lib/netbox_client_ruby/api/ipam/prefixes.rb b/lib/netbox_client_ruby/api/ipam/prefixes.rb index ff3dcd6..e3f06b0 100644 --- a/lib/netbox_client_ruby/api/ipam/prefixes.rb +++ b/lib/netbox_client_ruby/api/ipam/prefixes.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/ipam/prefix' - module NetboxClientRuby module IPAM class Prefixes diff --git a/lib/netbox_client_ruby/api/ipam/rir.rb b/lib/netbox_client_ruby/api/ipam/rir.rb index 6d9feda..03adff3 100644 --- a/lib/netbox_client_ruby/api/ipam/rir.rb +++ b/lib/netbox_client_ruby/api/ipam/rir.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' - module NetboxClientRuby module IPAM class Rir diff --git a/lib/netbox_client_ruby/api/ipam/rirs.rb b/lib/netbox_client_ruby/api/ipam/rirs.rb index 41a5fb0..31015a5 100644 --- a/lib/netbox_client_ruby/api/ipam/rirs.rb +++ b/lib/netbox_client_ruby/api/ipam/rirs.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/ipam/rir' - module NetboxClientRuby module IPAM class Rirs diff --git a/lib/netbox_client_ruby/api/ipam/role.rb b/lib/netbox_client_ruby/api/ipam/role.rb index 076d37d..ff0a7ec 100644 --- a/lib/netbox_client_ruby/api/ipam/role.rb +++ b/lib/netbox_client_ruby/api/ipam/role.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' - module NetboxClientRuby module IPAM class Role diff --git a/lib/netbox_client_ruby/api/ipam/roles.rb b/lib/netbox_client_ruby/api/ipam/roles.rb index a59b06e..4c09868 100644 --- a/lib/netbox_client_ruby/api/ipam/roles.rb +++ b/lib/netbox_client_ruby/api/ipam/roles.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/ipam/role' - module NetboxClientRuby module IPAM class Roles diff --git a/lib/netbox_client_ruby/api/ipam/service.rb b/lib/netbox_client_ruby/api/ipam/service.rb index c86c3fd..64ee7d2 100644 --- a/lib/netbox_client_ruby/api/ipam/service.rb +++ b/lib/netbox_client_ruby/api/ipam/service.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/ipam/ip_address' - module NetboxClientRuby module IPAM class Service diff --git a/lib/netbox_client_ruby/api/ipam/services.rb b/lib/netbox_client_ruby/api/ipam/services.rb index 4e98f07..c57efe4 100644 --- a/lib/netbox_client_ruby/api/ipam/services.rb +++ b/lib/netbox_client_ruby/api/ipam/services.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/ipam/service' - module NetboxClientRuby module IPAM class Services diff --git a/lib/netbox_client_ruby/api/ipam/vlan.rb b/lib/netbox_client_ruby/api/ipam/vlan.rb index e726ce1..dcf9bd9 100644 --- a/lib/netbox_client_ruby/api/ipam/vlan.rb +++ b/lib/netbox_client_ruby/api/ipam/vlan.rb @@ -1,11 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/tenancy/tenant' -require 'netbox_client_ruby/api/dcim/site' -require 'netbox_client_ruby/api/ipam/role' -require 'netbox_client_ruby/api/ipam/vlan_group' - module NetboxClientRuby module IPAM class Vlan diff --git a/lib/netbox_client_ruby/api/ipam/vlan_group.rb b/lib/netbox_client_ruby/api/ipam/vlan_group.rb index 9184705..61fd9f0 100644 --- a/lib/netbox_client_ruby/api/ipam/vlan_group.rb +++ b/lib/netbox_client_ruby/api/ipam/vlan_group.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/dcim/site' - module NetboxClientRuby module IPAM class VlanGroup diff --git a/lib/netbox_client_ruby/api/ipam/vlan_groups.rb b/lib/netbox_client_ruby/api/ipam/vlan_groups.rb index a5d51d3..36e8764 100644 --- a/lib/netbox_client_ruby/api/ipam/vlan_groups.rb +++ b/lib/netbox_client_ruby/api/ipam/vlan_groups.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/ipam/vlan_group' - module NetboxClientRuby module IPAM class VlanGroups diff --git a/lib/netbox_client_ruby/api/ipam/vlans.rb b/lib/netbox_client_ruby/api/ipam/vlans.rb index d10f813..8c97477 100644 --- a/lib/netbox_client_ruby/api/ipam/vlans.rb +++ b/lib/netbox_client_ruby/api/ipam/vlans.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/ipam/vlan' - module NetboxClientRuby module IPAM class Vlans diff --git a/lib/netbox_client_ruby/api/ipam/vrf.rb b/lib/netbox_client_ruby/api/ipam/vrf.rb index 24db860..f508e69 100644 --- a/lib/netbox_client_ruby/api/ipam/vrf.rb +++ b/lib/netbox_client_ruby/api/ipam/vrf.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/tenancy/tenant' - module NetboxClientRuby module IPAM class Vrf diff --git a/lib/netbox_client_ruby/api/ipam/vrfs.rb b/lib/netbox_client_ruby/api/ipam/vrfs.rb index 983881c..92db804 100644 --- a/lib/netbox_client_ruby/api/ipam/vrfs.rb +++ b/lib/netbox_client_ruby/api/ipam/vrfs.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/ipam/vrf' - module NetboxClientRuby module IPAM class Vrfs diff --git a/lib/netbox_client_ruby/api/secrets.rb b/lib/netbox_client_ruby/api/secrets.rb index 1362258..8e234d8 100644 --- a/lib/netbox_client_ruby/api/secrets.rb +++ b/lib/netbox_client_ruby/api/secrets.rb @@ -1,11 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/api/secrets/rsa_key_pair' -require 'netbox_client_ruby/api/secrets/secret_roles' -require 'netbox_client_ruby/api/secrets/secrets' -require 'netbox_client_ruby/api/secrets/session_key' -require 'netbox_client_ruby/communication' - module NetboxClientRuby module Secrets { diff --git a/lib/netbox_client_ruby/api/secrets/rsa_key_pair.rb b/lib/netbox_client_ruby/api/secrets/rsa_key_pair.rb index 9db75bd..bd2f50d 100644 --- a/lib/netbox_client_ruby/api/secrets/rsa_key_pair.rb +++ b/lib/netbox_client_ruby/api/secrets/rsa_key_pair.rb @@ -1,9 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/dcim/device' -require 'netbox_client_ruby/api/secrets/secret_role' - module NetboxClientRuby module Secrets class RSAKeyPair diff --git a/lib/netbox_client_ruby/api/secrets/secret.rb b/lib/netbox_client_ruby/api/secrets/secret.rb index 5266cdb..8d5401a 100644 --- a/lib/netbox_client_ruby/api/secrets/secret.rb +++ b/lib/netbox_client_ruby/api/secrets/secret.rb @@ -1,9 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/dcim/device' -require 'netbox_client_ruby/api/secrets/secret_role' - module NetboxClientRuby module Secrets class Secret diff --git a/lib/netbox_client_ruby/api/secrets/secret_role.rb b/lib/netbox_client_ruby/api/secrets/secret_role.rb index 88515f6..eaa536c 100644 --- a/lib/netbox_client_ruby/api/secrets/secret_role.rb +++ b/lib/netbox_client_ruby/api/secrets/secret_role.rb @@ -1,9 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/dcim/device' -require 'netbox_client_ruby/api/secrets/secret_role' - module NetboxClientRuby module Secrets class SecretRole diff --git a/lib/netbox_client_ruby/api/secrets/secret_roles.rb b/lib/netbox_client_ruby/api/secrets/secret_roles.rb index c8ebc53..88e6172 100644 --- a/lib/netbox_client_ruby/api/secrets/secret_roles.rb +++ b/lib/netbox_client_ruby/api/secrets/secret_roles.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/secrets/secret_role' - module NetboxClientRuby module Secrets class SecretRoles diff --git a/lib/netbox_client_ruby/api/secrets/secrets.rb b/lib/netbox_client_ruby/api/secrets/secrets.rb index ea55656..62e7d0d 100644 --- a/lib/netbox_client_ruby/api/secrets/secrets.rb +++ b/lib/netbox_client_ruby/api/secrets/secrets.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/secrets/secret' - module NetboxClientRuby module Secrets class Secrets diff --git a/lib/netbox_client_ruby/api/secrets/session_key.rb b/lib/netbox_client_ruby/api/secrets/session_key.rb index af7dd1a..77d7671 100644 --- a/lib/netbox_client_ruby/api/secrets/session_key.rb +++ b/lib/netbox_client_ruby/api/secrets/session_key.rb @@ -1,10 +1,5 @@ # frozen_string_literal: true -require 'openssl' -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/dcim/device' -require 'netbox_client_ruby/api/secrets/secret_role' - module NetboxClientRuby module Secrets class SessionKey diff --git a/lib/netbox_client_ruby/api/tenancy.rb b/lib/netbox_client_ruby/api/tenancy.rb index a646392..8545644 100644 --- a/lib/netbox_client_ruby/api/tenancy.rb +++ b/lib/netbox_client_ruby/api/tenancy.rb @@ -1,11 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/api/tenancy/tenant' -require 'netbox_client_ruby/api/tenancy/tenants' -require 'netbox_client_ruby/api/tenancy/tenant_group' -require 'netbox_client_ruby/api/tenancy/tenant_groups' -require 'netbox_client_ruby/communication' - module NetboxClientRuby module Tenancy { diff --git a/lib/netbox_client_ruby/api/tenancy/tenant.rb b/lib/netbox_client_ruby/api/tenancy/tenant.rb index 1044a8d..1e8f816 100644 --- a/lib/netbox_client_ruby/api/tenancy/tenant.rb +++ b/lib/netbox_client_ruby/api/tenancy/tenant.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/tenancy/tenant_group' - module NetboxClientRuby module Tenancy class Tenant diff --git a/lib/netbox_client_ruby/api/tenancy/tenant_group.rb b/lib/netbox_client_ruby/api/tenancy/tenant_group.rb index 3abe253..82170a8 100644 --- a/lib/netbox_client_ruby/api/tenancy/tenant_group.rb +++ b/lib/netbox_client_ruby/api/tenancy/tenant_group.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' - module NetboxClientRuby module Tenancy class TenantGroup diff --git a/lib/netbox_client_ruby/api/tenancy/tenant_groups.rb b/lib/netbox_client_ruby/api/tenancy/tenant_groups.rb index 9fd4a7a..0144bf8 100644 --- a/lib/netbox_client_ruby/api/tenancy/tenant_groups.rb +++ b/lib/netbox_client_ruby/api/tenancy/tenant_groups.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/tenancy/tenant_group' - module NetboxClientRuby module Tenancy class TenantGroups diff --git a/lib/netbox_client_ruby/api/tenancy/tenants.rb b/lib/netbox_client_ruby/api/tenancy/tenants.rb index 48caa62..48bfbf7 100644 --- a/lib/netbox_client_ruby/api/tenancy/tenants.rb +++ b/lib/netbox_client_ruby/api/tenancy/tenants.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/tenancy/tenant' - module NetboxClientRuby module Tenancy class Tenants diff --git a/lib/netbox_client_ruby/api/virtualization.rb b/lib/netbox_client_ruby/api/virtualization.rb index 9e994d7..9235420 100644 --- a/lib/netbox_client_ruby/api/virtualization.rb +++ b/lib/netbox_client_ruby/api/virtualization.rb @@ -1,17 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/api/virtualization/cluster_group' -require 'netbox_client_ruby/api/virtualization/cluster_groups' -require 'netbox_client_ruby/api/virtualization/cluster_type' -require 'netbox_client_ruby/api/virtualization/cluster_types' -require 'netbox_client_ruby/api/virtualization/cluster' -require 'netbox_client_ruby/api/virtualization/clusters' -require 'netbox_client_ruby/api/virtualization/interface' -require 'netbox_client_ruby/api/virtualization/interfaces' -require 'netbox_client_ruby/api/virtualization/virtual_machine' -require 'netbox_client_ruby/api/virtualization/virtual_machines' -require 'netbox_client_ruby/communication' - module NetboxClientRuby module Virtualization { diff --git a/lib/netbox_client_ruby/api/virtualization/cluster.rb b/lib/netbox_client_ruby/api/virtualization/cluster.rb index 2f01ca6..f271269 100644 --- a/lib/netbox_client_ruby/api/virtualization/cluster.rb +++ b/lib/netbox_client_ruby/api/virtualization/cluster.rb @@ -1,10 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/virtualization/cluster_group' -require 'netbox_client_ruby/api/virtualization/cluster_type' -require 'netbox_client_ruby/api/dcim/site' - module NetboxClientRuby module Virtualization class Cluster diff --git a/lib/netbox_client_ruby/api/virtualization/cluster_group.rb b/lib/netbox_client_ruby/api/virtualization/cluster_group.rb index b085bbb..98dc258 100644 --- a/lib/netbox_client_ruby/api/virtualization/cluster_group.rb +++ b/lib/netbox_client_ruby/api/virtualization/cluster_group.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' - module NetboxClientRuby module Virtualization class ClusterGroup diff --git a/lib/netbox_client_ruby/api/virtualization/cluster_groups.rb b/lib/netbox_client_ruby/api/virtualization/cluster_groups.rb index 954f047..af4806e 100644 --- a/lib/netbox_client_ruby/api/virtualization/cluster_groups.rb +++ b/lib/netbox_client_ruby/api/virtualization/cluster_groups.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/virtualization/cluster_group' - module NetboxClientRuby module Virtualization class ClusterGroups diff --git a/lib/netbox_client_ruby/api/virtualization/cluster_type.rb b/lib/netbox_client_ruby/api/virtualization/cluster_type.rb index a611851..b7786eb 100644 --- a/lib/netbox_client_ruby/api/virtualization/cluster_type.rb +++ b/lib/netbox_client_ruby/api/virtualization/cluster_type.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' - module NetboxClientRuby module Virtualization class ClusterType diff --git a/lib/netbox_client_ruby/api/virtualization/cluster_types.rb b/lib/netbox_client_ruby/api/virtualization/cluster_types.rb index 411dbe9..0dcb4a1 100644 --- a/lib/netbox_client_ruby/api/virtualization/cluster_types.rb +++ b/lib/netbox_client_ruby/api/virtualization/cluster_types.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/virtualization/cluster_type' - module NetboxClientRuby module Virtualization class ClusterTypes diff --git a/lib/netbox_client_ruby/api/virtualization/clusters.rb b/lib/netbox_client_ruby/api/virtualization/clusters.rb index 4fbda04..2554e77 100644 --- a/lib/netbox_client_ruby/api/virtualization/clusters.rb +++ b/lib/netbox_client_ruby/api/virtualization/clusters.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/virtualization/cluster' - module NetboxClientRuby module Virtualization class Clusters diff --git a/lib/netbox_client_ruby/api/virtualization/interface.rb b/lib/netbox_client_ruby/api/virtualization/interface.rb index 940c456..0a1ca92 100644 --- a/lib/netbox_client_ruby/api/virtualization/interface.rb +++ b/lib/netbox_client_ruby/api/virtualization/interface.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/virtualization/virtual_machine' - module NetboxClientRuby module Virtualization class Interface diff --git a/lib/netbox_client_ruby/api/virtualization/interfaces.rb b/lib/netbox_client_ruby/api/virtualization/interfaces.rb index 8cb6acb..261e074 100644 --- a/lib/netbox_client_ruby/api/virtualization/interfaces.rb +++ b/lib/netbox_client_ruby/api/virtualization/interfaces.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/virtualization/interface' - module NetboxClientRuby module Virtualization class Interfaces diff --git a/lib/netbox_client_ruby/api/virtualization/virtual_machine.rb b/lib/netbox_client_ruby/api/virtualization/virtual_machine.rb index 8c2e62b..b3b7670 100644 --- a/lib/netbox_client_ruby/api/virtualization/virtual_machine.rb +++ b/lib/netbox_client_ruby/api/virtualization/virtual_machine.rb @@ -1,12 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/api/dcim/device_role' -require 'netbox_client_ruby/api/dcim/platform' -require 'netbox_client_ruby/api/ipam/ip_address' -require 'netbox_client_ruby/api/tenancy/tenant' -require 'netbox_client_ruby/api/virtualization/cluster' - module NetboxClientRuby module Virtualization class VirtualMachine diff --git a/lib/netbox_client_ruby/api/virtualization/virtual_machines.rb b/lib/netbox_client_ruby/api/virtualization/virtual_machines.rb index 65d34c7..a8ca2c2 100644 --- a/lib/netbox_client_ruby/api/virtualization/virtual_machines.rb +++ b/lib/netbox_client_ruby/api/virtualization/virtual_machines.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entities' -require 'netbox_client_ruby/api/virtualization/virtual_machine' - module NetboxClientRuby module Virtualization class VirtualMachines diff --git a/lib/netbox_client_ruby/communication.rb b/lib/netbox_client_ruby/communication.rb index 869746e..3e971f2 100644 --- a/lib/netbox_client_ruby/communication.rb +++ b/lib/netbox_client_ruby/communication.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/error' -require 'netbox_client_ruby/connection' - module NetboxClientRuby module Communication def response(response) diff --git a/lib/netbox_client_ruby/connection.rb b/lib/netbox_client_ruby/connection.rb index cd3163d..8fbbe2a 100644 --- a/lib/netbox_client_ruby/connection.rb +++ b/lib/netbox_client_ruby/connection.rb @@ -1,25 +1,5 @@ # frozen_string_literal: true -require 'faraday' -require 'faraday/detailed_logger' -require 'netbox_client_ruby/error' - -if Faraday::VERSION < '2' - begin - require 'faraday_middleware' - rescue LoadError => e - message = <<~MSG - For the current version of Faraday (#{Faraday::VERSION}), "faraday_middleware" - is a required peer dependency of "netbox-client-ruby". Please install - "faraday_middleware" separately OR upgrade to Faraday 2, in which case, - "faraday_middleware" is not needed to work with "netbox-client-ruby". - - #{e.message} - MSG - raise NetboxClientRuby::Error, message - end -end - module NetboxClientRuby class Connection DEFAULT_OPTIONS = { diff --git a/lib/netbox_client_ruby/entities.rb b/lib/netbox_client_ruby/entities.rb index 5fcdb91..8f430bb 100644 --- a/lib/netbox_client_ruby/entities.rb +++ b/lib/netbox_client_ruby/entities.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/entity' -require 'netbox_client_ruby/error' - module NetboxClientRuby module Entities include NetboxClientRuby::Communication diff --git a/lib/netbox_client_ruby/entity.rb b/lib/netbox_client_ruby/entity.rb index 10262f7..1ec0027 100644 --- a/lib/netbox_client_ruby/entity.rb +++ b/lib/netbox_client_ruby/entity.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'netbox_client_ruby/communication' -require 'netbox_client_ruby/error' - module NetboxClientRuby module Entity include NetboxClientRuby::Communication diff --git a/netbox-client-ruby.gemspec b/netbox-client-ruby.gemspec index e57cc2e..b46e2ff 100644 --- a/netbox-client-ruby.gemspec +++ b/netbox-client-ruby.gemspec @@ -26,4 +26,5 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency 'faraday-detailed_logger', '~> 2.1' spec.add_runtime_dependency 'ipaddress', '~> 0.8', '>= 0.8.3' spec.add_runtime_dependency 'openssl', '>= 2.0.5' + spec.add_runtime_dependency 'zeitwerk', '~> 2.6.0' end