diff --git a/docs/metal.md b/docs/metal.md index 927b65bb..4ce5040e 100644 --- a/docs/metal.md +++ b/docs/metal.md @@ -34,9 +34,9 @@ Command line interface for Equinix Metal * [metal hardware-reservation](metal_hardware-reservation.md) - Hardware reservation operations. Information on reserving hardware on Equinix Metal is available on https://metal.equinix.com/developers/docs/deploy/reserved/. * [metal init](metal_init.md) - Create a configuration file. * [metal ip](metal_ip.md) - IP address and subnet operations. For more information on IP addresses, subnets, and IP address reservations, visit https://metal.equinix.com/developers/docs/networking/ip-addresses/. -* [metal metros](metal_metros.md) - Metro operations -* [metal operating-systems](metal_operating-systems.md) - Operating system operations -* [metal organization](metal_organization.md) - Organization operations +* [metal metros](metal_metros.md) - Metro operations. For more information on Equinix Metal metros and availability, visit https://metal.equinix.com/developers/docs/locations/metros/. +* [metal operating-systems](metal_operating-systems.md) - Operating system operations. For more information on which operating systems Equinix Metal offers, visit https://metal.equinix.com/developers/docs/operating-systems/supported/. +* [metal organization](metal_organization.md) - Organization operations. For more information on Equinix Metal organizations, visit https://metal.equinix.com/developers/docs/accounts/organizations/. * [metal plan](metal_plan.md) - Plan operations. For more information on the different Equinix Metal plans, visit https://metal.equinix.com/developers/docs/servers/server-specs/. * [metal project](metal_project.md) - Project operations. For more information on Equinix Metal Projects, visit https://metal.equinix.com/developers/docs/accounts/projects/. * [metal ssh-key](metal_ssh-key.md) - SSH key operations. For more information on SSH keys, visit https://metal.equinix.com/developers/docs/accounts/ssh-keys/ in the Equinix Metal documentation. diff --git a/docs/metal_metros.md b/docs/metal_metros.md index 5b60255e..77e7b5f5 100644 --- a/docs/metal_metros.md +++ b/docs/metal_metros.md @@ -1,10 +1,10 @@ ## metal metros -Metro operations +Metro operations. For more information on Equinix Metal metros and availability, visit https://metal.equinix.com/developers/docs/locations/metros/. ### Synopsis -Metro operations: get +Metro operations: get. ### Options @@ -29,5 +29,5 @@ Metro operations: get ### SEE ALSO * [metal](metal.md) - Command line interface for Equinix Metal -* [metal metros get](metal_metros_get.md) - Retrieves a list of available metros. +* [metal metros get](metal_metros_get.md) - Retrieves a list of metros. diff --git a/docs/metal_metros_get.md b/docs/metal_metros_get.md index 6932cab2..98acfe87 100644 --- a/docs/metal_metros_get.md +++ b/docs/metal_metros_get.md @@ -1,19 +1,22 @@ ## metal metros get -Retrieves a list of available metros. +Retrieves a list of metros. ### Synopsis -Example: - -metal metros get - - +Retrieves a list of metros available to the current user. ``` metal metros get [flags] ``` +### Examples + +``` + # Lists metros available to the current user: + metal metros get +``` + ### Options ``` @@ -36,5 +39,5 @@ metal metros get [flags] ### SEE ALSO -* [metal metros](metal_metros.md) - Metro operations +* [metal metros](metal_metros.md) - Metro operations. For more information on Equinix Metal metros and availability, visit https://metal.equinix.com/developers/docs/locations/metros/. diff --git a/docs/metal_operating-systems.md b/docs/metal_operating-systems.md index 4b629af6..18705ef3 100644 --- a/docs/metal_operating-systems.md +++ b/docs/metal_operating-systems.md @@ -1,10 +1,10 @@ ## metal operating-systems -Operating system operations +Operating system operations. For more information on which operating systems Equinix Metal offers, visit https://metal.equinix.com/developers/docs/operating-systems/supported/. ### Synopsis -Operating system operations: get +Operating system operations: get. ### Options @@ -29,5 +29,5 @@ Operating system operations: get ### SEE ALSO * [metal](metal.md) - Command line interface for Equinix Metal -* [metal operating-systems get](metal_operating-systems_get.md) - Retrieves a list of available operating systems. +* [metal operating-systems get](metal_operating-systems_get.md) - Retrieves a list of operating systems. diff --git a/docs/metal_operating-systems_get.md b/docs/metal_operating-systems_get.md index bdf5089a..38357591 100644 --- a/docs/metal_operating-systems_get.md +++ b/docs/metal_operating-systems_get.md @@ -1,16 +1,22 @@ ## metal operating-systems get -Retrieves a list of available operating systems. +Retrieves a list of operating systems. ### Synopsis -Example: - metal operating-systems get +Retrieves a list of operating systems available to the current user. Response includes the operating system's slug, distro, version, and name. ``` metal operating-systems get [flags] ``` +### Examples + +``` + # Lists the operating systems available to the current user: + metal operating-systems get +``` + ### Options ``` @@ -33,5 +39,5 @@ metal operating-systems get [flags] ### SEE ALSO -* [metal operating-systems](metal_operating-systems.md) - Operating system operations +* [metal operating-systems](metal_operating-systems.md) - Operating system operations. For more information on which operating systems Equinix Metal offers, visit https://metal.equinix.com/developers/docs/operating-systems/supported/. diff --git a/docs/metal_organization.md b/docs/metal_organization.md index 1c8aee60..e9af6cd0 100644 --- a/docs/metal_organization.md +++ b/docs/metal_organization.md @@ -1,10 +1,10 @@ ## metal organization -Organization operations +Organization operations. For more information on Equinix Metal organizations, visit https://metal.equinix.com/developers/docs/accounts/organizations/. ### Synopsis -Organization operations: create, update, delete and get +Organization operations: create, get, update, payment-methods, and delete. ### Options @@ -29,9 +29,9 @@ Organization operations: create, update, delete and get ### SEE ALSO * [metal](metal.md) - Command line interface for Equinix Metal -* [metal organization create](metal_organization_create.md) - Creates an organization -* [metal organization delete](metal_organization_delete.md) - Deletes an organization -* [metal organization get](metal_organization_get.md) - Retrieves an organization or list of organizations -* [metal organization payment-methods](metal_organization_payment-methods.md) - Retrieves a list of payment methods for the organization -* [metal organization update](metal_organization_update.md) - Updates an organization +* [metal organization create](metal_organization_create.md) - Creates an organization. +* [metal organization delete](metal_organization_delete.md) - Deletes an organization. +* [metal organization get](metal_organization_get.md) - Retrieves a list of organizations or the details of the specified organization. +* [metal organization payment-methods](metal_organization_payment-methods.md) - Retrieves a list of payment methods. +* [metal organization update](metal_organization_update.md) - Updates the specified organization. diff --git a/docs/metal_organization_create.md b/docs/metal_organization_create.md index 0ac6448a..bc6429b1 100644 --- a/docs/metal_organization_create.md +++ b/docs/metal_organization_create.md @@ -1,28 +1,34 @@ ## metal organization create -Creates an organization +Creates an organization. ### Synopsis -Example: +Creates a new organization with the current user as the organization's owner. -metal organization create -n [name] +``` +metal organization create -n [-d ] [-w ] [-t ] [-l ] [flags] +``` - +### Examples ``` -metal organization create [flags] + # Creates a new organization named "it-backend-infra": + metal organization create -n it-backend-infra + + # Creates a new organization with name, website, and twitter: + metal organization create -n test-org -w www.metal.equinix.com -t https://twitter.com/equinixmetal ``` ### Options ``` - -d, --description string Description of the organization + -d, --description string Description of the organization. -h, --help help for create - -l, --logo string Logo URL] - -n, --name string Name of the organization - -t, --twitter string Twitter URL of the organization - -w, --website string Website URL of the organization + -l, --logo string A Logo image URL.] + -n, --name string Name of the organization. + -t, --twitter string Twitter URL of the organization. + -w, --website string Website URL of the organization. ``` ### Options inherited from parent commands @@ -41,5 +47,5 @@ metal organization create [flags] ### SEE ALSO -* [metal organization](metal_organization.md) - Organization operations +* [metal organization](metal_organization.md) - Organization operations. For more information on Equinix Metal organizations, visit https://metal.equinix.com/developers/docs/accounts/organizations/. diff --git a/docs/metal_organization_delete.md b/docs/metal_organization_delete.md index 7ccc8a96..eae1531d 100644 --- a/docs/metal_organization_delete.md +++ b/docs/metal_organization_delete.md @@ -1,25 +1,33 @@ ## metal organization delete -Deletes an organization +Deletes an organization. ### Synopsis -Example: - -metal organization delete -i [organization_UUID] +Deletes an organization. You can not delete an organization that contains projects or has outstanding charges. Only organization owners can delete an organization. - +``` +metal organization delete -i [flags] +``` + +### Examples ``` -metal organization delete [flags] + # Deletes an organization, with confirmation: + metal organization delete -i 3bd5bf07-6094-48ad-bd03-d94e8712fdc8 + > + ✔ Are you sure you want to delete organization 3bd5bf07-6094-48ad-bd03-d94e8712fdc8: y + + # Deletes an organization, skipping confirmation: + metal organization delete -i 3bd5bf07-6094-48ad-bd03-d94e8712fdc8 -f ``` ### Options ``` - -f, --force Force removal of the organization + -f, --force Skips confirmation for the removal of the organization. -h, --help help for delete - -i, --organization-id string UUID of the organization + -i, --organization-id string The UUID of the organization. ``` ### Options inherited from parent commands @@ -38,5 +46,5 @@ metal organization delete [flags] ### SEE ALSO -* [metal organization](metal_organization.md) - Organization operations +* [metal organization](metal_organization.md) - Organization operations. For more information on Equinix Metal organizations, visit https://metal.equinix.com/developers/docs/accounts/organizations/. diff --git a/docs/metal_organization_get.md b/docs/metal_organization_get.md index c5ed16b2..91f89a66 100644 --- a/docs/metal_organization_get.md +++ b/docs/metal_organization_get.md @@ -1,28 +1,30 @@ ## metal organization get -Retrieves an organization or list of organizations +Retrieves a list of organizations or the details of the specified organization. ### Synopsis -Example: - -To retrieve list of all available organizations: -metal organization get +Retrieves a list of organizations or the details of the specified organization. Details of an organization are only available to its members. -To retrieve a single organization: -metal organization get -i [organization-id] +``` +metal organization get -i [flags] +``` - +### Examples ``` -metal organization get [flags] + # Retrieves list of the current user's organizations: + metal organization get + + # Retrieves details of an organization: + metal organization get -i 3bd5bf07-6094-48ad-bd03-d94e8712fdc8 ``` ### Options ``` -h, --help help for get - -i, --organization-id string UUID of the organization + -i, --organization-id string The UUID of an organization. ``` ### Options inherited from parent commands @@ -41,5 +43,5 @@ metal organization get [flags] ### SEE ALSO -* [metal organization](metal_organization.md) - Organization operations +* [metal organization](metal_organization.md) - Organization operations. For more information on Equinix Metal organizations, visit https://metal.equinix.com/developers/docs/accounts/organizations/. diff --git a/docs/metal_organization_payment-methods.md b/docs/metal_organization_payment-methods.md index a7a85364..27368f73 100644 --- a/docs/metal_organization_payment-methods.md +++ b/docs/metal_organization_payment-methods.md @@ -1,24 +1,27 @@ ## metal organization payment-methods -Retrieves a list of payment methods for the organization +Retrieves a list of payment methods. ### Synopsis -Example: - -metal organization payment-methods --id [organization_UUID] +Retrieves a list of payment methods for the specified organization if the current user is a member with the proper role. +``` +metal organization payment-methods -i [flags] +``` +### Examples ``` -metal organization payment-methods [flags] + # Lists the payment methods for an organization: + metal organization payment-methods --id 3bd5bf07-6094-48ad-bd03-d94e8712fdc8 ``` ### Options ``` -h, --help help for payment-methods - -i, --id string UUID of the organization + -i, --id string The UUID of the organization. ``` ### Options inherited from parent commands @@ -37,5 +40,5 @@ metal organization payment-methods [flags] ### SEE ALSO -* [metal organization](metal_organization.md) - Organization operations +* [metal organization](metal_organization.md) - Organization operations. For more information on Equinix Metal organizations, visit https://metal.equinix.com/developers/docs/accounts/organizations/. diff --git a/docs/metal_organization_update.md b/docs/metal_organization_update.md index 700f03f0..b8a3c398 100644 --- a/docs/metal_organization_update.md +++ b/docs/metal_organization_update.md @@ -1,29 +1,32 @@ ## metal organization update -Updates an organization +Updates the specified organization. ### Synopsis -Example: - -metal organization update --id [organization_UUID] --name [new_name] +Updates the specified organization. You can update the name, website, Twitter, or logo. +``` +metal organization update -i [-n ] [-d ] [-w ] [-t ] [-l ] [flags] +``` +### Examples ``` -metal organization update [flags] + # Updates the name of an organization: + metal organization update -i 3bd5bf07-6094-48ad-bd03-d94e8712fdc8 --name test-cluster02 ``` ### Options ``` - -d, --description string Description of the organization + -d, --description string User-friendly description of the organization. -h, --help help for update - -i, --id string Organization ID - -l, --logo string Logo URL of the organization - -n, --name string Name of the organization - -t, --twitter string Twitter URL of the organization - -w, --website string Website of the organization + -i, --id string An organization UUID. + -l, --logo string A logo image URL for the organization. + -n, --name string New name for the organization. + -t, --twitter string A Twitter URL of the organization. + -w, --website string A website URL for the organization. ``` ### Options inherited from parent commands @@ -42,5 +45,5 @@ metal organization update [flags] ### SEE ALSO -* [metal organization](metal_organization.md) - Organization operations +* [metal organization](metal_organization.md) - Organization operations. For more information on Equinix Metal organizations, visit https://metal.equinix.com/developers/docs/accounts/organizations/. diff --git a/internal/metros/metro.go b/internal/metros/metro.go index 6e9c3204..c429d249 100644 --- a/internal/metros/metro.go +++ b/internal/metros/metro.go @@ -34,10 +34,10 @@ type Client struct { func (c *Client) NewCommand() *cobra.Command { var cmd = &cobra.Command{ - Use: "metros", + Use: `metros`, Aliases: []string{"metro"}, - Short: "Metro operations", - Long: `Metro operations: get`, + Short: "Metro operations. For more information on Equinix Metal metros and availability, visit https://metal.equinix.com/developers/docs/locations/metros/.", + Long: "Metro operations: get.", PersistentPreRun: func(cmd *cobra.Command, args []string) { if root := cmd.Root(); root != nil { if root.PersistentPreRun != nil { diff --git a/internal/metros/retrieve.go b/internal/metros/retrieve.go index 268c32d6..2b1006ec 100644 --- a/internal/metros/retrieve.go +++ b/internal/metros/retrieve.go @@ -30,12 +30,11 @@ func (c *Client) Retrieve() *cobra.Command { var retrieveMetrosCmd = &cobra.Command{ Use: "get", Aliases: []string{"list"}, - Short: "Retrieves a list of available metros.", - Long: `Example: - -metal metros get - - `, + Short: "Retrieves a list of metros.", + Long: "Retrieves a list of metros available to the current user.", + Example: ` # Lists metros available to the current user: + metal metros get`, + RunE: func(cmd *cobra.Command, args []string) error { cmd.SilenceUsage = true metros, _, err := c.Service.List(c.Servicer.ListOptions(nil, nil)) diff --git a/internal/organizations/create.go b/internal/organizations/create.go index a1ead2e0..f1e4bcee 100644 --- a/internal/organizations/create.go +++ b/internal/organizations/create.go @@ -37,13 +37,15 @@ func (c *Client) Create() *cobra.Command { // createOrganizationCmd represents the createOrganization command var createOrganizationCmd = &cobra.Command{ - Use: "create", - Short: "Creates an organization", - Long: `Example: + Use: `create -n [-d ] [-w ] [-t ] [-l ]`, + Short: "Creates an organization.", + Long: "Creates a new organization with the current user as the organization's owner. ", + Example: ` # Creates a new organization named "it-backend-infra": + metal organization create -n it-backend-infra + + # Creates a new organization with name, website, and twitter: + metal organization create -n test-org -w www.metal.equinix.com -t https://twitter.com/equinixmetal `, -metal organization create -n [name] - - `, RunE: func(cmd *cobra.Command, args []string) error { cmd.SilenceUsage = true req := &packngo.OrganizationCreateRequest{ @@ -76,11 +78,11 @@ metal organization create -n [name] }, } - createOrganizationCmd.Flags().StringVarP(&name, "name", "n", "", "Name of the organization") - createOrganizationCmd.Flags().StringVarP(&description, "description", "d", "", "Description of the organization") - createOrganizationCmd.Flags().StringVarP(&website, "website", "w", "", "Website URL of the organization") - createOrganizationCmd.Flags().StringVarP(&twitter, "twitter", "t", "", "Twitter URL of the organization") - createOrganizationCmd.Flags().StringVarP(&logo, "logo", "l", "", "Logo URL]") + createOrganizationCmd.Flags().StringVarP(&name, "name", "n", "", "Name of the organization.") + createOrganizationCmd.Flags().StringVarP(&description, "description", "d", "", "Description of the organization.") + createOrganizationCmd.Flags().StringVarP(&website, "website", "w", "", "Website URL of the organization.") + createOrganizationCmd.Flags().StringVarP(&twitter, "twitter", "t", "", "Twitter URL of the organization.") + createOrganizationCmd.Flags().StringVarP(&logo, "logo", "l", "", "A Logo image URL.]") _ = createOrganizationCmd.MarkFlagRequired("name") return createOrganizationCmd diff --git a/internal/organizations/delete.go b/internal/organizations/delete.go index c9713a3d..b80e21d1 100644 --- a/internal/organizations/delete.go +++ b/internal/organizations/delete.go @@ -45,13 +45,17 @@ func (c *Client) Delete() *cobra.Command { // deleteOrganizationCmd represents the deleteOrganization command var deleteOrganizationCmd = &cobra.Command{ - Use: "delete", - Short: "Deletes an organization", - Long: `Example: - -metal organization delete -i [organization_UUID] + Use: `delete -i `, + Short: "Deletes an organization.", + Long: "Deletes an organization. You can not delete an organization that contains projects or has outstanding charges. Only organization owners can delete an organization.", + Example: ` # Deletes an organization, with confirmation: + metal organization delete -i 3bd5bf07-6094-48ad-bd03-d94e8712fdc8 + > + ✔ Are you sure you want to delete organization 3bd5bf07-6094-48ad-bd03-d94e8712fdc8: y + + # Deletes an organization, skipping confirmation: + metal organization delete -i 3bd5bf07-6094-48ad-bd03-d94e8712fdc8 -f`, - `, RunE: func(cmd *cobra.Command, args []string) error { cmd.SilenceUsage = true if !force { @@ -70,8 +74,8 @@ metal organization delete -i [organization_UUID] }, } - deleteOrganizationCmd.Flags().StringVarP(&organizationID, "organization-id", "i", "", "UUID of the organization") + deleteOrganizationCmd.Flags().StringVarP(&organizationID, "organization-id", "i", "", "The UUID of the organization.") _ = deleteOrganizationCmd.MarkFlagRequired("organization-id") - deleteOrganizationCmd.Flags().BoolVarP(&force, "force", "f", false, "Force removal of the organization") + deleteOrganizationCmd.Flags().BoolVarP(&force, "force", "f", false, "Skips confirmation for the removal of the organization.") return deleteOrganizationCmd } diff --git a/internal/organizations/organization.go b/internal/organizations/organization.go index 1f83ee11..cc8faf0f 100644 --- a/internal/organizations/organization.go +++ b/internal/organizations/organization.go @@ -34,10 +34,10 @@ type Client struct { func (c *Client) NewCommand() *cobra.Command { var cmd = &cobra.Command{ - Use: "organization", + Use: `organization`, Aliases: []string{"organizations", "org", "orgs"}, - Short: "Organization operations", - Long: `Organization operations: create, update, delete and get`, + Short: "Organization operations. For more information on Equinix Metal organizations, visit https://metal.equinix.com/developers/docs/accounts/organizations/.", + Long: "Organization operations: create, get, update, payment-methods, and delete.", PersistentPreRun: func(cmd *cobra.Command, args []string) { if root := cmd.Root(); root != nil { diff --git a/internal/organizations/payment.go b/internal/organizations/payment.go index 98cbb811..d12df134 100644 --- a/internal/organizations/payment.go +++ b/internal/organizations/payment.go @@ -29,14 +29,13 @@ func (c *Client) PaymentMethods() *cobra.Command { var organizationID string // paymentMethodsCmd represents the paymentMethods command var paymentMethodsCmd = &cobra.Command{ - Use: "payment-methods", + Use: `payment-methods -i `, Aliases: []string{"payment-method"}, - Short: "Retrieves a list of payment methods for the organization", - Long: `Example: + Short: "Retrieves a list of payment methods.", + Long: "Retrieves a list of payment methods for the specified organization if the current user is a member with the proper role.", + Example: ` # Lists the payment methods for an organization: + metal organization payment-methods --id 3bd5bf07-6094-48ad-bd03-d94e8712fdc8`, -metal organization payment-methods --id [organization_UUID] - -`, RunE: func(cmd *cobra.Command, args []string) error { cmd.SilenceUsage = true paymentMethods, _, err := c.Service.ListPaymentMethods(organizationID) @@ -55,7 +54,7 @@ metal organization payment-methods --id [organization_UUID] }, } - paymentMethodsCmd.Flags().StringVarP(&organizationID, "id", "i", "", "UUID of the organization") + paymentMethodsCmd.Flags().StringVarP(&organizationID, "id", "i", "", "The UUID of the organization.") _ = paymentMethodsCmd.MarkFlagRequired("id") return paymentMethodsCmd } diff --git a/internal/organizations/retrieve.go b/internal/organizations/retrieve.go index 3dffb33d..8295fc64 100644 --- a/internal/organizations/retrieve.go +++ b/internal/organizations/retrieve.go @@ -30,18 +30,16 @@ func (c *Client) Retrieve() *cobra.Command { var organizationID string // retrieveOrganizationCmd represents the retrieveOrganization command var retrieveOrganizationCmd = &cobra.Command{ - Use: "get", + Use: `get -i `, Aliases: []string{"list"}, - Short: "Retrieves an organization or list of organizations", - Long: `Example: - -To retrieve list of all available organizations: -metal organization get + Short: "Retrieves a list of organizations or the details of the specified organization.", + Long: "Retrieves a list of organizations or the details of the specified organization. Details of an organization are only available to its members.", + Example: ` # Retrieves list of the current user's organizations: + metal organization get -To retrieve a single organization: -metal organization get -i [organization-id] + # Retrieves details of an organization: + metal organization get -i 3bd5bf07-6094-48ad-bd03-d94e8712fdc8`, - `, RunE: func(cmd *cobra.Command, args []string) error { cmd.SilenceUsage = true listOpts := c.Servicer.ListOptions(nil, nil) @@ -76,6 +74,6 @@ metal organization get -i [organization-id] }, } - retrieveOrganizationCmd.Flags().StringVarP(&organizationID, "organization-id", "i", "", "UUID of the organization") + retrieveOrganizationCmd.Flags().StringVarP(&organizationID, "organization-id", "i", "", "The UUID of an organization.") return retrieveOrganizationCmd } diff --git a/internal/organizations/update.go b/internal/organizations/update.go index 2cb7a756..525e289c 100644 --- a/internal/organizations/update.go +++ b/internal/organizations/update.go @@ -30,13 +30,12 @@ func (c *Client) Update() *cobra.Command { var organizationID, name, description, twitter, logo, website string // createOrganizationCmd represents the createOrganization command var updateOrganizationCmd = &cobra.Command{ - Use: "update", - Short: "Updates an organization", - Long: `Example: + Use: `update -i [-n ] [-d ] [-w ] [-t ] [-l ]`, + Short: "Updates the specified organization.", + Long: "Updates the specified organization. You can update the name, website, Twitter, or logo.", + Example: ` # Updates the name of an organization: + metal organization update -i 3bd5bf07-6094-48ad-bd03-d94e8712fdc8 --name test-cluster02`, -metal organization update --id [organization_UUID] --name [new_name] - -`, RunE: func(cmd *cobra.Command, args []string) error { cmd.SilenceUsage = true req := &packngo.OrganizationUpdateRequest{} @@ -71,12 +70,12 @@ metal organization update --id [organization_UUID] --name [new_name] }, } - updateOrganizationCmd.Flags().StringVarP(&organizationID, "id", "i", "", "Organization ID") - updateOrganizationCmd.Flags().StringVarP(&name, "name", "n", "", "Name of the organization") - updateOrganizationCmd.Flags().StringVarP(&description, "description", "d", "", "Description of the organization") - updateOrganizationCmd.Flags().StringVarP(&website, "website", "w", "", "Website of the organization") - updateOrganizationCmd.Flags().StringVarP(&twitter, "twitter", "t", "", "Twitter URL of the organization") - updateOrganizationCmd.Flags().StringVarP(&logo, "logo", "l", "", "Logo URL of the organization") + updateOrganizationCmd.Flags().StringVarP(&organizationID, "id", "i", "", "An organization UUID.") + updateOrganizationCmd.Flags().StringVarP(&name, "name", "n", "", "New name for the organization.") + updateOrganizationCmd.Flags().StringVarP(&description, "description", "d", "", "User-friendly description of the organization.") + updateOrganizationCmd.Flags().StringVarP(&website, "website", "w", "", "A website URL for the organization.") + updateOrganizationCmd.Flags().StringVarP(&twitter, "twitter", "t", "", "A Twitter URL of the organization.") + updateOrganizationCmd.Flags().StringVarP(&logo, "logo", "l", "", "A logo image URL for the organization.") _ = updateOrganizationCmd.MarkFlagRequired("id") return updateOrganizationCmd diff --git a/internal/os/os.go b/internal/os/os.go index 862c0c6c..cb715ca4 100644 --- a/internal/os/os.go +++ b/internal/os/os.go @@ -34,10 +34,10 @@ type Client struct { func (c *Client) NewCommand() *cobra.Command { var cmd = &cobra.Command{ - Use: "operating-systems", + Use: `operating-systems`, Aliases: []string{"os"}, - Short: "Operating system operations", - Long: `Operating system operations: get`, + Short: "Operating system operations. For more information on which operating systems Equinix Metal offers, visit https://metal.equinix.com/developers/docs/operating-systems/supported/.", + Long: "Operating system operations: get.", PersistentPreRun: func(cmd *cobra.Command, args []string) { if root := cmd.Root(); root != nil { if root.PersistentPreRun != nil { diff --git a/internal/os/retrieve.go b/internal/os/retrieve.go index edf59aba..5b70d14d 100644 --- a/internal/os/retrieve.go +++ b/internal/os/retrieve.go @@ -27,11 +27,13 @@ import ( func (c *Client) Retrieve() *cobra.Command { return &cobra.Command{ - Use: "get", + Use: `get`, Aliases: []string{"list"}, - Short: "Retrieves a list of available operating systems.", - Long: `Example: + Short: "Retrieves a list of operating systems.", + Long: "Retrieves a list of operating systems available to the current user. Response includes the operating system's slug, distro, version, and name.", + Example: ` # Lists the operating systems available to the current user: metal operating-systems get`, + RunE: func(cmd *cobra.Command, args []string) error { cmd.SilenceUsage = true oss, _, err := c.Service.List()