ebsarr / packet

packet, a CLI tool to manage packet.net services
Other
40 stars 14 forks source link

[WIP] Support new Packet "organizations" API #20

Closed vielmetti closed 6 years ago

vielmetti commented 6 years ago

[work in progress]

Packet is adding an "organizations" API, when that documentation is available it would be great to add support.

ebsarr commented 6 years ago

Roger

ebsarr commented 6 years ago

@vielmetti : I'll start to work on this next. I'm thinking off adding organizations API support under the packet admin command. Do you have some ideas for sub-command names? list-organizations for example seems too long to type but I'm also afraid using something different might be confusing.

sygibson commented 6 years ago

Clarity over Brevity and day ... I haven't checked all of the options around this, but plain old:

list-orgs

would be an acceptable short form - most people are familiar with "orgs" as a short cut for "organizations". I often set options in tools to support short and long format not sure how hard/easy that is with Golang (I have little experience with it. Simple bash example:

list-orgs|list-organizations) do_something ;;

~~shane

On Sat, Mar 17, 2018 at 10:48 AM, Bassirou Sarr notifications@github.com wrote:

@vielmetti https://github.com/vielmetti : I'll start to work on this next. I'm thinking off adding organizations API support under the packet admin command. Do you have some ideas for sub-command names? list-organizations for example seems too long to type but I'm also afraid using something different might be confusing.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ebsarr/packet/issues/20#issuecomment-373939276, or mute the thread https://github.com/notifications/unsubscribe-auth/AFEAEaS4iwaTfpa_CkJVLmB1PXTZUJrwks5tfUxjgaJpZM4QkuRN .

-- Sr. Architect and Community Evangelist Digital Rebar Provision - http://rebar.digital/ RackN, Inc. - https://www.rackn.com/

ebsarr commented 6 years ago

@sygibson : Thank you for your comment. I think I'll go with the following commands:

$ packet admin list-orgs
$ packet admin create-org
$ packet admin list-org --org-id [id]
$ packet admin update-org --org-id [id]
$ packet admin delete-org --org-id [id]
$ packet admin payment-methods --org-id [id]
vielmetti commented 6 years ago

The only other thing that comes to mind somewhere in the CLI is the function corresponding to the endpoint "create a project for the organization" at /organizations/{id}/projects

ebsarr commented 6 years ago

@vielmetti

The only other thing that comes to mind somewhere in the CLI is the function corresponding to the endpoint "create a project for the organization" at /organizations/{id}/projects

This feature has been added in the latest release v2.2.1 . Not quite convenient yet since you cannot query organizations to get the ID info, yet... Will have to wait for v2.3 .

ebsarr commented 6 years ago

The "Organizations" API is fully supported now.