Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs for the golang collins cli #598

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from

Conversation

michaeljs1990
Copy link
Contributor

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.

@byxorna
Copy link
Contributor

byxorna commented Mar 5, 2019

@komapa @defect @alex-laties

Copy link
Contributor

@byxorna byxorna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm generally! thanks for this!

<p>See <a href="#configs">configs</a> to setup configurations.</p>

<h2>Usage</h2>
<p>Check out <a href="https://github.com/michaeljs1990/collins-go-cli">github.com/michaeljs1990/collins-go-cli</a> for documentation</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update this with the output from a tumblr org package?


<h2>Installation</h2>
<pre>
$ go get -u cgit.xrt0x.com/xrt0x/collins-go-cli/cmd/collins
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

porque no github.com/tumblr/collins-go-cli?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah so the package above it literally a cloned version of your collins-cli ruby gem ported to go with some additional features. I can add docs for the tumblr/go-collins library as well though.

@defect
Copy link
Contributor

defect commented Mar 12, 2019

Good stuff! As with tumblr/go-collins#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.

@alex-laties
Copy link

collins-shell needs to die in a fire. It was unsupported as of 4 years ago... so at this point 🔥.

@michaeljs1990
Copy link
Contributor Author

@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.

  1. JSON output format is a valid JSON dump
  2. YAML output format is valid YAML in all languages and not limited to ruby
  3. You can pipe IPs, tags, hostnames, or anything else to collins query to get more info about them
  4. Additional fields that are computed client side. See func fieldToAssetStruct or the docs for the full list
  5. collins provision has a wait flag for that pesky rate limiter
  6. collins power issues commands inside goroutines so bad BMCs don't slow you down
  7. If you have been using the collins ruby cli it should function 100% the same for basic workflows
  8. collins query has negative matching key:~valueidontwant that is available for all flags -n "~devnode"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants