Sha256: c9b82e02eac855a5d52c5a187573da344ed9ea711375762a631ee61a0557e448

Contents?: true

Size: 1.09 KB

Versions: 16

Compression:

Stored size: 1.09 KB

Contents

#!/usr/bin/env ruby

require 'bundler/setup'
require 'netbox-client-ruby'

# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.

NetboxClientRuby.configure do |c|
  c.netbox.auth.token = '0123456789abcdef0123456789abcdef01234567'
  c.netbox.auth.rsa_private_key.path =
    File.expand_path('../netbox-client-ruby_rsa', __dir__)
  c.netbox.auth.rsa_private_key.password = nil
  c.netbox.api_base_url = "http://#{`docker-compose port nginx 8080`.strip}/api/"
  c.faraday.logger = :detailed_logger
end

NCR = NetboxClientRuby

version = File.read(File.expand_path('../VERSION', __dir__)).strip

puts <<~WELCOME_TEXT
  This is using NetboxClientRuby v#{version}.
  `NetboxClientRuby` has been abbreviated to `NCR` in this console.
  You will be talking to '#{NetboxClientRuby.config.netbox.api_base_url}'.

  Wondering how many regions you have in your Netbox?
  Type: NetboxClientRuby.dcim.regions.count
  Or Short: NCR.dcim.regions.count
WELCOME_TEXT

require 'pry'
Pry.start

# require 'irb'
# IRB.start(__FILE__)

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
netbox-client-ruby-0.10.2 bin/console
netbox-client-ruby-0.10.1 bin/console
netbox-client-ruby-0.10.0 bin/console
netbox-client-ruby-0.9.0 bin/console
netbox-client-ruby-0.8.0 bin/console
netbox-client-ruby-0.7.1 bin/console
netbox-client-ruby-0.7.0 bin/console
netbox-client-ruby-0.6.0 bin/console
netbox-client-ruby-0.5.7 bin/console
netbox-client-ruby-0.5.6 bin/console
netbox-client-ruby-0.5.5 bin/console
netbox-client-ruby-0.5.4 bin/console
netbox-client-ruby-0.5.3 bin/console
netbox-client-ruby-0.5.2 bin/console
netbox-client-ruby-0.5.1 bin/console
netbox-client-ruby-0.5.0 bin/console