Giter VIP home page Giter VIP logo

foreman_teamdynamix's People

Contributors

edestecd avatar farlerac avatar kobybr avatar luoymu avatar mooresm1 avatar nipendar avatar wimmeldj avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

nipendar

foreman_teamdynamix's Issues

TeamDynamix API Search is not working or we can't figure it out

Figure out how to use this: https://miamioh.teamdynamix.com/SBTDWebApi/Home/section/Assets#POSTapi/{appId}/assets/search

So we can improve the rake task here: https://github.com/MiamiOH/foreman_teamdynamix/blob/master/lib/tasks/sync_hosts_with_teamdynamix.rake#L14

We want something like this:

Host.all.each do |h|
  # if there is a TD asset with h.teamdynamix_asset_id update it and next

  # if there is a TD asset with name or serialNumber of host.name then update it and set host.teamdynamix_asset_id and next

  # if there is not an asset then create one and set host.teamdynamix_asset_id
end

Re-use TD api auth token

In order to reuse the authentication token to TeamDynamix Api

  • set the auth token in an encrypted session
  • or reuse via singleton dependency injection

Make a rake task to sync with TeamDynamix

What sync means:

Go through all hosts in Foreman and search for a matching Asset in TD.
If found, update the fields in the TD asset.
If not found, create a TD asset with desired fields.

We should be able to run this rake task in a cron job on regular intervals.

Don't hardcode ids for TeamDynamix

Offending code:
https://github.com/MiamiOH/foreman_teamdynamix/blob/master/lib/teamdynamix_api.rb#L109
https://github.com/MiamiOH/foreman_teamdynamix/blob/master/lib/teamdynamix_api.rb#L114

https://github.com/MiamiOH/foreman_teamdynamix/blob/master/lib/teamdynamix_api.rb#L122

These should at minimum be read from the yaml config file with good instructions in the README on how to obtain them. Any non technical person should be able to find them.

It would be even better if API calls could be made in the plugin to obtain them.

These are probably not the same in our production / sandbox environments and Rails.env is not a good indicator of these. All our foreman environments run with Rails.env == production, b/c the rpm install is setup that way. We don't install from source.

Error when cloning existing host

Could not create the asset for the host in TeamDynamix: {"status":"400","msg":"Bad Request","body":{"ID":-1,"Message":"Name or serial number must be provided for asset records."}}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.