collins
collins copied to clipboard
Docs for the golang collins cli
Hey, I have been messing around with a golang build for collins CLI for a bit now and have been using it for a while without any major issue outside of a few minor bug fixes. Just thought I would add it here as well in case it's useful for others.
@komapa @defect @alex-laties
Good stuff! As with https://github.com/tumblr/go-collins/pull/23 I can't check this out until a couple of days from now, but I'll review and merge ASAP if no one gets to it before me.
Remind me, what does the feature parity with @byxorna 's ruby CLI look like?
An unrelated comment below so feel free to ignore, but i thought it made sense in this context. cc @tumblr/collins @byxorna @komapa
Should we clean up collins-shell from there? It hasn't been maintained for quite a few years, and I'm pretty sure no one at tumblr uses it (or even knows about it) anymore.
collins-shell needs to die in a fire. It was unsupported as of 4 years ago... so at this point 🔥.
@defect the feature parity for the collins-go-cli is targeted for you to be able to replace the collins-cli gem if you so wish and pretend like nothing ever happened. You should be able to go back through your bash history and run all of the same commands and get the same outputs. In addition to that I added some features of which I documented some example usage here.
From the main readme these are the changes/additions to the client from the ruby one.
- JSON output format is a valid JSON dump
- YAML output format is valid YAML in all languages and not limited to ruby
- You can pipe IPs, tags, hostnames, or anything else to
collins query
to get more info about them - Additional fields that are computed client side. See
func fieldToAssetStruct
or the docs for the full list -
collins provision
has a wait flag for that pesky rate limiter -
collins power
issues commands inside goroutines so bad BMCs don't slow you down - If you have been using the collins ruby cli it should function 100% the same for basic workflows
-
collins query
has negative matchingkey:~valueidontwant
that is available for all flags-n "~devnode"