Giter VIP home page Giter VIP logo

ansible-rackhd-inventory's People

Contributors

mlimaloureiro avatar thebrunolopes avatar

Stargazers

 avatar

Watchers

 avatar  avatar

ansible-rackhd-inventory's Issues

Filter by more than one group

It was requested that dynamic inventories script should allow to filter by more than one group, i.e, retrieve the nodes that belong to two groups. e.g., We could want the nodes that belong to the groups "ceph-node" or "ceph-mon" and the group "new".
This change would allow us to append a new field in the config.yaml file named "filter_group" with a string value. We could go even further and change the way we define the "filter_group" to a list of strings to allow filtering by more than one group if needed be.

Dynamic inventory return fields

Acording to the documentation "If you intend to replace an existing inventory ini file with a dynamic provider, it must return a JSON object which contains an ‘all’ group that includes every host in the inventory as a member and every group in the inventory as a child. It should also include an ‘ungrouped’ group which contains all hosts which are not members of any other group."

What changes does this entail for our script ? At the moment we only have "_meta" and the "<group_name>" as outputs. I estimate that adding every host to the "all" attribute should not require much effort. However, are the "ungrouped" really necessary ?

Implement --host <hostname> functionality

At the moment the inventory script only allows the "--list" argument.
According to the documentation " Dynamic inventory providers must accept the --list and --host arguments."

According to this, we should also allow the --host argument.
Is the hostname also its Id ?
Should we retrieve the node's information with this call (GET /api/current/nodes/)?

Environment Variables

One of the features requested was that the RackHD url and the path to the config.yaml file could be changed by environment variables. The RackHD url defined in the environment variable would take precedence over the one defined in the config.yaml file.

If there are no groups defined in the config.yaml file we should get all groups

As the tittle suggest, if there are no groups specified in the config.yaml file we should retrieve all groups in the RackHD. However, from my readings of the RackHD api documentation, we can get the list of tags with GET "/api/current/tags" and then for each tag GET the nodes that belong to that group. This works, howbeit, it is very inefficient. We should get all the nodes in RackHD with one call and the groups that that node belongs to should be included in the objects retrieved. Does something like "/api/current/tags/nodes" or "/api/current/nodes/tags" exist ?

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.