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