Module: Bixby::Inventory

Defined in:
lib/bixby-client/modules/inventory.rb

Class Method Summary collapse

Class Method Details

.register_agent(opts) ⇒ JsonResponse

Register an agent with the manager

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :uuid (String)

    UUID of the host

  • :public_key (String)

    Public key

  • :hostname (String)

    Hostname

  • :tenant (String)

    Name of the tenant

  • :password (String)

    Password for registering an Agent with the server

  • :port (FixNum)

    Port agent listens on (optional, default: 18000)

  • :tags (Array<String>)

    List of tags to assign to host (optional)

Returns:

  • (JsonResponse)


17
18
19
20
# File 'lib/bixby-client/modules/inventory.rb', line 17

def self.register_agent(opts)
  req = JsonRequest.new("inventory:register_agent", opts)
  return Bixby::Client.new(nil, nil).exec_api(req)
end