ninech/netbox-client-ruby

View on GitHub
lib/netbox_client_ruby/api/dcim/console_connection.rb

Summary

Maintainability
A
35 mins
Test Coverage
# frozen_string_literal: true

module NetboxClientRuby
  module DCIM
    class ConsoleConnection
      include Entity

      id id: :id
      deletable true
      path 'dcim/console-connections/:id.json'
      creation_path 'dcim/console-connections/'

      object_fields(
        device: proc { |raw_data| Device.new raw_data['id'] },
        cs_port: proc { |raw_data| ConsoleServerPort.new raw_data['id'] },
      )
    end
  end
end