105 Commits

Author SHA1 Message Date
76e9ed68d8 feat: add shorthand for --bucket to influx delete (#259) 2021-09-08 15:26:34 -05:00
1ec4e1590b feat: stub out remote and replication commands and subcommands (#254)
* feat: stubbed out remote and replication commands and subcommands

* refactor: renamed remote.go file to match command

* refactor: combined replication metrics and replication list subcommands into list only

* refactor: removed extra appends to pass lint check
2021-09-03 13:17:18 -07:00
65da55e3f3 fix: --host value passed to setup is written to generated config (#255) 2021-09-02 17:42:37 -04:00
fa12328714 fix: detect and error out on incorrect positional args (#236) 2021-08-20 17:30:30 -04:00
285103df13 fix: make --http-debug flag visible in help text (#228) 2021-08-20 10:27:36 -04:00
d615694ee9 refactor: replace uses of ioutil with io and os (#223) 2021-08-04 14:45:22 -04:00
4ae87ced37 fix: enable default completion logic on top-level app (#221) 2021-07-30 16:04:41 -04:00
e2bd0a0a12 feat: Bind skip-verify flag to INFLUX_SKIP_VERIFY (#208)
* feat: Bind skip-verify flag to INFLUX_SKIP_VERIFY

This improves the user experience when using the influx tooling in
development environments.

* chore: Update CHANGELOG with skip-verify flag binding
2021-07-28 10:28:36 +10:00
7efea59d35 fix: fix env var used for configs path (#207) 2021-07-26 12:38:50 -04:00
127f829226 feat: allow passing password via flag in user password (#191) 2021-07-13 14:37:23 -04:00
c3feea5900 feat: update restore to support InfluxDB 2.0.x (#185) 2021-07-09 15:36:44 -04:00
95f190bf64 feat: update backup to support InfluxDB 2.0.x (#184) 2021-07-09 12:51:53 -04:00
3ca681b1dd feat: implement template command (#169) 2021-07-02 10:19:51 -04:00
40fc1845e9 feat: port stacks command from influxdb (#168) 2021-06-30 17:21:50 -04:00
a3f36a9821 feat: port apply command from influxdb (#160) 2021-06-30 14:47:23 -04:00
a058fe7e0b feat: port influx auth command (#152) 2021-06-28 14:06:29 -05:00
ead44e4e83 fix: downgrade urfave/cli to v1 to enable more flexible parsing (#154) 2021-06-28 14:49:26 -04:00
72d1ad8361 feat: port influx export stack subcommand (#150)
* confirmed subcommand parsing

* feat: port influx export stack subcommand

* refactor: removed redundant code and improved error messages

* chore: ran make fmt to fix code formatting issues

Co-authored-by: Michelle McFarland <michellemcfarland@Michelles-MacBook-Pro.local>
2021-06-28 09:02:49 -07:00
a1921e1e59 feat: port influx v1 auth command (#138) 2021-06-28 09:03:33 -05:00
d519890f03 feat: improved error messages for cloud- or oss-only commands (#140)
* feat: set logging info for cloud- or oss-only commands

* fix: add cloud-only to BucketSchemasApi

* fix: api-only flagging and %w for return error wrapping

* fix: keep the model assignment
2021-06-23 10:41:35 -04:00
f80b91730d feat: v1 dbrp commands (#136)
* feat: v1 dbrp commands

* fix: fixed the cloud create command

* chore: cleanup

* fix: updated based on required attrs in swagger

* feat: update to latest openapi rev

* chore: made dbrps plural consistently

* chore: formatting

* fix: standardized Default field name and added comments

* chore: changed file name for command to singular
2021-06-22 10:07:15 -04:00
a029bf2871 refactor: remove resource-type enums from export commands (#137) 2021-06-22 09:10:03 -04:00
800e4c2cfb feat: placeholder for v1 subcommands (#135)
* feat: placeholder for v1 subcommands

* chore: more usage comments
2021-06-21 16:03:39 -04:00
23e73e9146 feat: reimplement influx secret CLI command (#125)
* refactor: rename `getPassword` to `getSecret`
2021-06-21 13:33:51 -05:00
a4fdefc392 feat: port export all command from influxdb (#134) 2021-06-21 12:34:15 -04:00
bd0b90df41 feat: port top-level export command from influxdb (#131) 2021-06-21 08:23:18 -04:00
1dad2f5f72 refactor: move things around to make building a client easier from other projects (#123)
* refactor: split logic for building API config into public func
* refactor: move config code out of internal/
2021-06-16 11:09:26 -04:00
51b1eadb12 feat: reimplement influx dashboards with new APIs (#122)
Fixes #108
2021-06-15 16:22:09 -05:00
6757c2bcfa feat: implement influx restore using new APIs (#121) 2021-06-15 16:45:55 -04:00
abe521add0 feat: reimplement influx telegrafs with new APIs (#120)
* feat: reimplement `influx telegrafs` with new APIs

* chore: restructure structs for later modification

* refactor: bump openapi & regenerate clients

* refactor: better error output and descriptions

Co-authored-by: Dan Moran <dmoran@influxdata.com>
2021-06-15 14:55:04 -05:00
943e8fba31 feat: reimplement influx backup using new APIs (#116) 2021-06-11 09:50:39 -04:00
63da8eccbd feat: task subcommand (#105)
* feat: task subcommand

Closes #19

* fix: testing and review comments

* fix: pointer deref and error message
2021-05-26 08:44:22 -04:00
9747d05ae1 refactor: expose generated code and client business logic to share with Kapacitor (#103)
* refactor: take clients out of internal

* refactor: move stdio to pkg

* Move internal/api to api

* refactor: final changes for Kapacitor to access shared functionality

* chore: regenerate mocks

* fix: bad automated refactor

* chore: extra formatting not caught by make fmt
2021-05-25 10:05:01 -04:00
d54aa9ec2d feat: create subcommand for tasks cli (#102)
* refactor: add task APIs to codegen

* feat: tasks subcommand

Co-authored-by: Dan Moran <dmoran@influxdata.com>
2021-05-25 09:06:37 -04:00
60dd8b54b5 feat: port user commands from influxdb (#99) 2021-05-20 13:24:13 -04:00
e4af676ae5 feat: port delete from influxdb (#98) 2021-05-20 09:20:30 -04:00
d8ef442b64 feat: port org members commands from influxdb (#97) 2021-05-19 11:02:59 -04:00
8ab34d59e6 feat: port top-level org commands from influxdb. (#96) 2021-05-17 15:43:02 -04:00
8e73906437 refactor: replace global slices with functions (#94)
I started to see strange behavior where flags would merge across
subcommands. I'm not sure if the bug was in our 'append' usage or
in urfave/cli's handling of flag-slices, but this change seems to
fix the problem either way.
2021-05-14 16:10:07 -04:00
99d573bdaa feat: port influx config from influxdb (#90) 2021-05-13 11:47:03 -04:00
6a9f17d100 feat: add formatted output to influx query (#87) 2021-05-13 10:54:45 -04:00
d22fb717c6 feat: port most of influx query from influxdb (#86) 2021-05-12 15:18:08 -04:00
ead7e63d41 refactor: split flat internal/ module into modules-per-cmd (#64) 2021-05-06 13:47:03 -04:00
7eca7c0bb9 feat: Add bucket schema management commands (#52)
* feat: update generated client to include schema-management APIs
* feat: implement interfaces to decode flags and CSV
* feat: implement decoders for different measurement schema column formats
* feat: extend bucket CLI commands to support schema type property
* feat: add CLI commands to manage measurement schema
* test: add unit tests for bucket schema create, update and list commands
2021-05-05 10:12:11 -04:00
4a1e6223f0 feat: add bash/zsh/powershell completions (#59) 2021-05-04 12:17:13 -04:00
3414e1a983 refactor: Move from global state to functions (#53)
This commit represents a few experiments of features I've used in Cobra

1. Uses cli.GenericFlag to encapsulate parsing and validation of flag
   values at parse time. This removes the burden from the individual
   CLI commands to parse and validate args and options.

2. Add influxid.ID that may be used by any flag that requires an
   Influx ID. influxid.ID parses and validates string value is a valid
   ID, removing this burden from individual commands and ensuring valid
   values before the command actions begins.

3. Binds cli.Flags directly to params structures to directly capture
   the values when parsing flags.

4. Moves from global state to local builder functions for the majority
   of the commands. This allows the commands to bind to flag variables
   reducing the repeated ctx.String(), ctx.Int(), etc

5. Leverages the BeforeFunc to create middleware and inject the CLI and
   API client into commands, saving the repeated boilerplate across
   all of the instantiated commands. This is extensible, so additional
   middleware can be appends using the middleware.WithBeforeFns
2021-05-03 09:31:45 -04:00
0b4d753728 feat: port influx bucket commands from influxdb (#54)
* feat: add /buckets and /orgs APIs to codegen
* feat: add bucket CLI commands
* test: add bucket tests
2021-05-03 08:46:53 -04:00
7f5542c119 refactor: inject trace ID as a default header (#50) 2021-04-27 17:21:37 -04:00
0e1db1e782 feat: port influx write from influxdb (#47) 2021-04-26 12:32:54 -04:00
bd97d2c7f3 refactor: split CLI commands into separate files (#46) 2021-04-26 10:48:15 -04:00