LiUdesk CMDB

A Ruby gem to handle communicating with the Linköping University TopDesk-based CMDB

Usage example

require 'liudesk_cmdb'

client = LiudeskCMDB::Client.new 'https://api.test.it.liu.se', subscription_key: 'XXXXXXXXXXXXXXXX'

machine = LiudeskCMDB::Models::LinuxClientV1.get client, 'sanghelios.it.liu.se'
#<LiudeskCMDB::Models::LinuxClientV1:0x0000563973e1ffc0
# @client=#<LiudeskCMDB::Client:0x0000563973c86510 ...
# @data=
#  {...
#   :hostname=>"sanghelios.it.liu.se",
#   :operating_system_install_date=>nil,
#   ...}>
machine.hardware
#<LiudeskCMDB::Models::HardwareV1:0x0000563973cb4500
# @client=#<LiudeskCMDB::Client:0x0000563973c86510 ...
# @data=
#  {...
#   :hostname=>"sanghelios.it.liu.se",
#   :name=>"HP - EliteDesk 800 G2 SFF - 00108",
#   ...}>
machine.operating_system_install_date = Time.now
machine.update
#<LiudeskCMDB::Models::LinuxClientV1:0x0000563973e1ffc0
# @client=#<LiudeskCMDB::Client:0x0000563973c86510 ...
# @data=
#  {..
#   :hostname=>"sanghelios.it.liu.se",
#   :operating_system_install_date=>2023-06-13 12:46:14.549 UTC,
#   ...}>

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/ananace/ruby-liudesk-cmdb
The project lives at https://gitlab.liu.se/ITI/ruby-liudesk-cmdb

License

The gem is available as open source under the terms of the MIT License.