StackStorm-Exchange / stackstorm-kubernetes

st2 content pack containing Kubernetes sensors
https://exchange.stackstorm.org/
Apache License 2.0
19 stars 17 forks source link

[WIP] Pull the new changes from pearsontechnology/st2contrib #2

Closed emedvedev closed 7 years ago

emedvedev commented 7 years ago

@mward29 Here's a work-in-progress PR to merge the new autogen changes into the old version that we have.

Some dark rituals have been performed to warp spacetime and rewrite history:

  1. All your commit history will be preserved, file references are rewritten from /packs/kubernetes in your repo to / in this one.
  2. I've inserted a commit that will add version 0.2.0 right after our current state (so that there's a clear checkpoint), and the new version is now 0.3.0.
  3. Version in pack.yaml is rewrited to valid semver throughout the git tree. Since it's the initial transfer, some black magic is alright this one time.

The build is failing due to linting issues, as predicted, so here's what we'll need to do:

  1. Ideally, place the generator itself into a /etc dir inside the pack repo so that it would be possible to fix things and re-run as needed.
  2. Correct the sensor template errors. There's two: order of imports and double newline before class definition. I fixed the sensor_template.py in pack root, but that's only for TPR, I think, if used at all.
  3. Correct the action template errors. Three: double line before class, indents of two spaces instead of four, no spaces after commas in the run() method parameters. Also, the def run and return lines should have the # NOQA comment at the end to skip the line length check.
  4. Lint all the non-generated files manually (I think I've already done most of it, might've overlooked something though).

Should be trivial enough. Holler at me if you need help!