A Foreman Plugin for TeamDynamix. It manages a host's life cycle as a corresponding Asset in TeamDynamix.
To install foreman_teamdynamix require it in your gem file by adding the line.
gem 'foreman_teamdynamix'
Then update foreman to include the gem with the command.
bundle update foreman_teamdynamix
To setup the configuration file create a new file named 'foreman_teamdynamix.yaml' at the location /etc/foreman/plugins/
If there is no configuration file then the tab should not appear on the detailed hosts screen, but if there is one and it is empty then it will appear without any fields.
Example Configuration
---
:teamdynamix:
:api:
:url: https://miamioh.teamdynamix.com/SBTDWebApi/api
:appId: 741
:username: 'xxxxxx'
:password: 'xxxxxx'
:create:
StatusID: 641
AcquisitionDate: host.created_at
OwningCustomerName: "'foreman_teamdynamix_plugin_test'"
Attributes:
- Name: mu.ci.Lifecycle Status
ID: 11634
Value: 26190
- Name: mu.ci.Description
ID: 11632
Value: >-
"created by ForemanTeamdynamix plugin, owner is #{host.owner_id}"
- Name: Ticket Routing Details
ID: 11636
Value: >-
"Asset for host running on OS #{host.operatingsystem_id}"
:delete:
StatusId: 642
:fields:
:url: https://miamioh.teamdynamix.com/SBTDNext/Apps
Asset ID: ID
Owner: OwningCustomerName
Parent Asset: ParentID
mu.ci.Description: Attributes.mu.ci.Description
Ticket Routing Details: Attributes.Ticket Routing Details
mu.ci.Lifecycle Status: Attributes.mu.ci.Lifecycle Status
[:api][:create] or [:delete]
[:api][:create][Attributes]
[:fields]
rake db:migrate
Navigate to /hosts/, click on one of the listed host. There should be tabs: 'Properties', 'Metrics', 'Templates', 'NICs' and 'teamdynamix.title or Team Dynamix Tab'
foreman running locally (i.e not installed via rpm/debian package) does not use settings from /etc/foreman/plugins/
Add the teamdynamix config to
rake teamdynamix:sync:hosts
Scans the hosts and sync them with TeamDynamix.
gem install foreman_teamdynamix --dev
rake test:foreman_teamdynamix