ninech/netbox-client-ruby

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

Summary

Maintainability
A
35 mins
Test Coverage
# frozen_string_literal: true

module NetboxClientRuby
  module DCIM
    class RackGroup
      include Entity

      id id: :id
      deletable true
      path 'dcim/rack-groups/:id.json'
      creation_path 'dcim/rack-groups/'
      object_fields(
        region: proc { |raw_data| DCIM::Region.new raw_data['id'] },
        tenant: proc { |raw_data| Tenancy::Tenant.new raw_data['id'] },
      )
    end
  end
end