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

influx bucket create cannot use organization name #15828

Closed
jsternberg opened this issue Nov 11, 2019 · 1 comment · Fixed by #16187 or #16206
Closed

influx bucket create cannot use organization name #15828

jsternberg opened this issue Nov 11, 2019 · 1 comment · Fixed by #16187 or #16206

Comments

@jsternberg
Copy link
Contributor

jsternberg commented Nov 11, 2019

The influx bucket create command doesn't seem to have a -o flag for specifying the organization name. Here is what I did on my local box using the latest master at revision a64b976.

jsternberg:[~/g/s/g/i/influxdb] $ (master $=) influx bucket create -o influxdata -n NOAA                                              [7/7]
Error: unknown shorthand flag: 'o' in -o
Usage:
  influx bucket create [flags]

Flags:
  -h, --help                 Help for the create command
  -n, --name string          Name of bucket that will be created
      --org-id string        The ID of the organization that owns the bucket
  -r, --retention duration   Duration in nanoseconds data will live in bucket

Global Flags:
      --host string    HTTP address of Influx (default "http://localhost:9999")
      --local          Run commands locally against the filesystem
  -t, --token string   API token to be used throughout client calls

jsternberg:[~/g/s/g/i/influxdb] $ (master $=) influx org find
ID                      Name
97aa81cc0e247dc4        influxdata
jsternberg:[~/g/s/g/i/influxdb] $ (master $=) influx bucket create --org-id 97aa81cc0e247dc4 -n NOAA
ID                      Name    Retention       Org     OrganizationID
b76b31ef2f0341e0        NOAA    0s              <nil>   <nil>

Additionally, I found it weird that when I did create the bucket, the Org and OrganizationID fields were nil. It seems like these aren't getting copied in to the command's display. When I do influx bucket find these fields are still nil.

Most other commands support -o org as an option and it is a lot more convenient than having to find the organization id explicitly. It would also make writing tutorials easier because then you don't have to teach the person how to retrieve the organization id.

@imogenkinsman
Copy link
Contributor

imogenkinsman commented Dec 9, 2019

Acceptance criteria:

  • first, fix the issue for buckets
  • then: all places where we accept an org-id in the CLI should also accept an organization name
    (you'll need to do some research into where this is missing for other CLI functions; we already know it's an issue for bucket, it could also be an issue for others)
  • if a user passes both the org-id an the org name, we should have a consistent behavior for how we handle that (either reject with a message, or always only use the org-id or name)

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