github.com/mook-as/cf-cli@v7.0.0-beta.28.0.20200120190804-b91c115fae48+incompatible/command/common/command_list_v6.go (about)

     1  // +build !V7
     2  
     3  package common
     4  
     5  import (
     6  	"reflect"
     7  
     8  	"code.cloudfoundry.org/cli/command/plugin"
     9  	v6 "code.cloudfoundry.org/cli/command/v6"
    10  )
    11  
    12  var Commands commandList
    13  var FallbackCommands V2CommandList
    14  
    15  type V2CommandList struct {
    16  }
    17  
    18  type commandList struct {
    19  	VerboseOrVersion bool `short:"v" long:"version" description:"verbose and version flag"`
    20  
    21  	App                                v6.V3AppCommand                              `command:"app" description:"Display health and status for an app"`
    22  	V3Apps                             v6.V3AppsCommand                             `command:"v3-apps" description:"List all apps in the target space"`
    23  	V3ApplyManifest                    v6.V3ApplyManifestCommand                    `command:"v3-apply-manifest" description:"Applies manifest properties to an application"`
    24  	V3CancelZdtPush                    v6.V3CancelZdtPushCommand                    `command:"v3-cancel-zdt-push" description:"Cancel the most recent deployment for an app"`
    25  	V3CreateApp                        v6.V3CreateAppCommand                        `command:"v3-create-app" description:"Create a V3 App"`
    26  	V3CreatePackage                    v6.V3CreatePackageCommand                    `command:"v3-create-package" description:"Uploads a V3 Package"`
    27  	V3DeleteApp                        v6.V3DeleteCommand                           `command:"v3-delete" description:"Delete a V3 App"`
    28  	V3Droplets                         v6.V3DropletsCommand                         `command:"v3-droplets" description:"List droplets of an app"`
    29  	V3Env                              v6.V3EnvCommand                              `command:"v3-env" description:"Show all env variables for an app"`
    30  	V3GetHealthCheck                   v6.V3GetHealthCheckCommand                   `command:"v3-get-health-check" description:"Show the type of health check performed on an app"`
    31  	V3Packages                         v6.V3PackagesCommand                         `command:"v3-packages" description:"List packages of an app"`
    32  	V3Push                             v6.V3PushCommand                             `command:"v3-push" description:"Push a new app or sync changes to an existing app"`
    33  	V3ZdtPush                          v6.V3ZeroDowntimePushCommand                 `command:"v3-zdt-push" description:"Update an app with zero down time"`
    34  	V3Restart                          v6.V3RestartCommand                          `command:"v3-restart" description:"Stop all instances of the app, then start them again. This causes downtime."`
    35  	V3RestartAppInstance               v6.V3RestartAppInstanceCommand               `command:"v3-restart-app-instance" description:"Terminate, then instantiate an app instance"`
    36  	V3ZdtRestart                       v6.V3ZeroDowntimeRestartCommand              `command:"v3-zdt-restart" description:"Sequentially restart each instance of an app."`
    37  	V3Scale                            v6.V3ScaleCommand                            `command:"v3-scale" description:"Change or view the instance count, disk space limit, and memory limit for an app"`
    38  	V3SetDroplet                       v6.V3SetDropletCommand                       `command:"v3-set-droplet" description:"Set the droplet used to run an app"`
    39  	V3SetEnv                           v6.V3SetEnvCommand                           `command:"v3-set-env" description:"Set an env variable for an app"`
    40  	V3SetHealthCheck                   v6.V3SetHealthCheckCommand                   `command:"v3-set-health-check" description:"Change type of health check performed on an app's process"`
    41  	V3Stage                            v6.V3StageCommand                            `command:"v3-stage" description:"Create a new droplet for an app"`
    42  	V3Start                            v6.V3StartCommand                            `command:"v3-start" description:"Start an app"`
    43  	V3Stop                             v6.V3StopCommand                             `command:"v3-stop" description:"Stop an app"`
    44  	V3UnsetEnv                         v6.V3UnsetEnvCommand                         `command:"v3-unset-env" description:"Remove an env variable from an app"`
    45  	V3SSH                              v6.V3SSHCommand                              `command:"v3-ssh" description:"SSH to an application container instance"`
    46  	AddPluginRepo                      plugin.AddPluginRepoCommand                  `command:"add-plugin-repo" description:"Add a new plugin repository"`
    47  	AddNetworkPolicy                   v6.AddNetworkPolicyCommand                   `command:"add-network-policy" description:"Create policy to allow direct network traffic from one app to another"`
    48  	AllowSpaceSSH                      v6.AllowSpaceSSHCommand                      `command:"allow-space-ssh" description:"Allow SSH access for the space"`
    49  	API                                v6.APICommand                                `command:"api" description:"Set or view target api url"`
    50  	Apps                               v6.AppsCommand                               `command:"apps" alias:"a" description:"List all apps in the target space"`
    51  	Auth                               v6.AuthCommand                               `command:"auth" description:"Authenticate non-interactively"`
    52  	BindRouteService                   v6.BindRouteServiceCommand                   `command:"bind-route-service" alias:"brs" description:"Bind a service instance to an HTTP route"`
    53  	BindRunningSecurityGroup           v6.BindRunningSecurityGroupCommand           `command:"bind-running-security-group" description:"Bind a security group to the list of security groups to be used for running applications"`
    54  	BindSecurityGroup                  v6.BindSecurityGroupCommand                  `command:"bind-security-group" description:"Bind a security group to a particular space, or all existing spaces of an org"`
    55  	BindService                        v6.BindServiceCommand                        `command:"bind-service" alias:"bs" description:"Bind a service instance to an app"`
    56  	BindStagingSecurityGroup           v6.BindStagingSecurityGroupCommand           `command:"bind-staging-security-group" description:"Bind a security group to the list of security groups to be used for staging applications"`
    57  	Buildpacks                         v6.BuildpacksCommand                         `command:"buildpacks" description:"List all buildpacks"`
    58  	CheckRoute                         v6.CheckRouteCommand                         `command:"check-route" description:"Perform a simple check to determine whether a route currently exists or not"`
    59  	Config                             v6.ConfigCommand                             `command:"config" description:"Write default values to the config"`
    60  	CopySource                         v6.CopySourceCommand                         `command:"copy-source" description:"Copies the source code of an application to another existing application (and restarts that application)"`
    61  	CreateAppManifest                  v6.CreateAppManifestCommand                  `command:"create-app-manifest" description:"Create an app manifest for an app that has been pushed successfully"`
    62  	CreateBuildpack                    v6.CreateBuildpackCommand                    `command:"create-buildpack" description:"Create a buildpack"`
    63  	CreateDomain                       v6.CreateDomainCommand                       `command:"create-domain" description:"Create a domain in an org for later use"`
    64  	CreateIsolationSegment             v6.CreateIsolationSegmentCommand             `command:"create-isolation-segment" description:"Create an isolation segment"`
    65  	CreateOrg                          v6.CreateOrgCommand                          `command:"create-org" alias:"co" description:"Create an org"`
    66  	CreateQuota                        v6.CreateQuotaCommand                        `command:"create-quota" description:"Define a new resource quota"`
    67  	CreateRoute                        v6.CreateRouteCommand                        `command:"create-route" description:"Create a url route in a space for later use"`
    68  	CreateSecurityGroup                v6.CreateSecurityGroupCommand                `command:"create-security-group" description:"Create a security group"`
    69  	CreateServiceAuthToken             v6.CreateServiceAuthTokenCommand             `command:"create-service-auth-token" description:"Create a service auth token"`
    70  	CreateServiceBroker                v6.CreateServiceBrokerCommand                `command:"create-service-broker" alias:"csb" description:"Create a service broker"`
    71  	CreateServiceKey                   v6.CreateServiceKeyCommand                   `command:"create-service-key" alias:"csk" description:"Create key for a service instance"`
    72  	CreateService                      v6.CreateServiceCommand                      `command:"create-service" alias:"cs" description:"Create a service instance"`
    73  	CreateSharedDomain                 v6.CreateSharedDomainCommand                 `command:"create-shared-domain" description:"Create a domain that can be used by all orgs (admin-only)"`
    74  	CreateSpaceQuota                   v6.CreateSpaceQuotaCommand                   `command:"create-space-quota" description:"Define a new space resource quota"`
    75  	CreateSpace                        v6.CreateSpaceCommand                        `command:"create-space" description:"Create a space"`
    76  	CreateUserProvidedService          v6.CreateUserProvidedServiceCommand          `command:"create-user-provided-service" alias:"cups" description:"Make a user-provided service instance available to CF apps"`
    77  	CreateUser                         v6.CreateUserCommand                         `command:"create-user" description:"Create a new user"`
    78  	Curl                               v6.CurlCommand                               `command:"curl" description:"Executes a request to the targeted API endpoint"`
    79  	DeleteBuildpack                    v6.DeleteBuildpackCommand                    `command:"delete-buildpack" description:"Delete a buildpack"`
    80  	DeleteDomain                       v6.DeleteDomainCommand                       `command:"delete-domain" description:"Delete a domain"`
    81  	DeleteIsolationSegment             v6.DeleteIsolationSegmentCommand             `command:"delete-isolation-segment" description:"Delete an isolation segment"`
    82  	DeleteOrg                          v6.DeleteOrgCommand                          `command:"delete-org" description:"Delete an org"`
    83  	DeleteOrphanedRoutes               v6.DeleteOrphanedRoutesCommand               `command:"delete-orphaned-routes" description:"Delete all orphaned routes in the currently targeted space (i.e. those that are not mapped to an app)"`
    84  	DeleteQuota                        v6.DeleteQuotaCommand                        `command:"delete-quota" description:"Delete a quota"`
    85  	DeleteRoute                        v6.DeleteRouteCommand                        `command:"delete-route" description:"Delete a route"`
    86  	DeleteSecurityGroup                v6.DeleteSecurityGroupCommand                `command:"delete-security-group" description:"Deletes a security group"`
    87  	DeleteServiceAuthToken             v6.DeleteServiceAuthTokenCommand             `command:"delete-service-auth-token" description:"Delete a service auth token"`
    88  	DeleteServiceBroker                v6.DeleteServiceBrokerCommand                `command:"delete-service-broker" description:"Delete a service broker"`
    89  	DeleteServiceKey                   v6.DeleteServiceKeyCommand                   `command:"delete-service-key" alias:"dsk" description:"Delete a service key"`
    90  	DeleteService                      v6.DeleteServiceCommand                      `command:"delete-service" alias:"ds" description:"Delete a service instance"`
    91  	DeleteSharedDomain                 v6.DeleteSharedDomainCommand                 `command:"delete-shared-domain" description:"Delete a shared domain"`
    92  	DeleteSpaceQuota                   v6.DeleteSpaceQuotaCommand                   `command:"delete-space-quota" description:"Delete a space quota definition and unassign the space quota from all spaces"`
    93  	DeleteSpace                        v6.DeleteSpaceCommand                        `command:"delete-space" description:"Delete a space"`
    94  	DeleteUser                         v6.DeleteUserCommand                         `command:"delete-user" description:"Delete a user"`
    95  	Delete                             v6.DeleteCommand                             `command:"delete" alias:"d" description:"Delete an app"`
    96  	DisableFeatureFlag                 v6.DisableFeatureFlagCommand                 `command:"disable-feature-flag" description:"Prevent use of a feature"`
    97  	DisableOrgIsolation                v6.DisableOrgIsolationCommand                `command:"disable-org-isolation" description:"Revoke an organization's entitlement to an isolation segment"`
    98  	DisableServiceAccess               v6.DisableServiceAccessCommand               `command:"disable-service-access" description:"Disable access to a service or service plan for one or all orgs"`
    99  	DisableSSH                         v6.DisableSSHCommand                         `command:"disable-ssh" description:"Disable ssh for the application"`
   100  	DisallowSpaceSSH                   v6.DisallowSpaceSSHCommand                   `command:"disallow-space-ssh" description:"Disallow SSH access for the space"`
   101  	Domains                            v6.DomainsCommand                            `command:"domains" description:"List domains in the target org"`
   102  	EnableFeatureFlag                  v6.EnableFeatureFlagCommand                  `command:"enable-feature-flag" description:"Allow use of a feature"`
   103  	EnableOrgIsolation                 v6.EnableOrgIsolationCommand                 `command:"enable-org-isolation" description:"Entitle an organization to an isolation segment"`
   104  	EnableServiceAccess                v6.EnableServiceAccessCommand                `command:"enable-service-access" description:"Enable access to a service or service plan for one or all orgs"`
   105  	EnableSSH                          v6.EnableSSHCommand                          `command:"enable-ssh" description:"Enable ssh for the application"`
   106  	Env                                v6.EnvCommand                                `command:"env" alias:"e" description:"Show all env variables for an app"`
   107  	Events                             v6.EventsCommand                             `command:"events" description:"Show recent app events"`
   108  	FeatureFlags                       v6.FeatureFlagsCommand                       `command:"feature-flags" description:"Retrieve list of feature flags with status"`
   109  	FeatureFlag                        v6.FeatureFlagCommand                        `command:"feature-flag" description:"Retrieve an individual feature flag with status"`
   110  	Files                              v6.FilesCommand                              `command:"files" alias:"f" description:"Print out a list of files in a directory or the contents of a specific file of an app running on the DEA backend"`
   111  	GetHealthCheck                     v6.GetHealthCheckCommand                     `command:"get-health-check" description:"Show the type of health check performed on an app"`
   112  	Help                               HelpCommand                                  `command:"help" alias:"h" description:"Show help"`
   113  	InstallPlugin                      InstallPluginCommand                         `command:"install-plugin" description:"Install CLI plugin"`
   114  	IsolationSegments                  v6.IsolationSegmentsCommand                  `command:"isolation-segments" description:"List all isolation segments"`
   115  	NetworkPolicies                    v6.NetworkPoliciesCommand                    `command:"network-policies" description:"List direct network traffic policies"`
   116  	ListPluginRepos                    plugin.ListPluginReposCommand                `command:"list-plugin-repos" description:"List all the added plugin repositories"`
   117  	Login                              v6.LoginCommand                              `command:"login" alias:"l" description:"Log user in"`
   118  	Logout                             v6.LogoutCommand                             `command:"logout" alias:"lo" description:"Log user out"`
   119  	Logs                               v6.LogsCommand                               `command:"logs" description:"Tail or show recent logs for an app"`
   120  	MapRoute                           v6.MapRouteCommand                           `command:"map-route" description:"Add a url route to an app"`
   121  	Marketplace                        v6.MarketplaceCommand                        `command:"marketplace" alias:"m" description:"List available offerings in the marketplace"`
   122  	MigrateServiceInstances            v6.MigrateServiceInstancesCommand            `command:"migrate-service-instances" description:"Migrate service instances from one service plan to another"`
   123  	OauthToken                         v6.OauthTokenCommand                         `command:"oauth-token" description:"Retrieve and display the OAuth token for the current session"`
   124  	Orgs                               v6.OrgsCommand                               `command:"orgs" alias:"o" description:"List all orgs"`
   125  	OrgUsers                           v6.OrgUsersCommand                           `command:"org-users" description:"Show org users by role"`
   126  	Org                                v6.OrgCommand                                `command:"org" description:"Show org info"`
   127  	Passwd                             v6.PasswdCommand                             `command:"passwd" alias:"pw" description:"Change user password"`
   128  	Plugins                            plugin.PluginsCommand                        `command:"plugins" description:"List commands of installed plugins"`
   129  	PurgeServiceInstance               v6.PurgeServiceInstanceCommand               `command:"purge-service-instance" description:"Recursively remove a service instance and child objects from Cloud Foundry database without making requests to a service broker"`
   130  	PurgeServiceOffering               v6.PurgeServiceOfferingCommand               `command:"purge-service-offering" description:"Recursively remove a service and child objects from Cloud Foundry database without making requests to a service broker"`
   131  	Push                               v6.PushCommand                               `command:"push" alias:"p" description:"Push a new app or sync changes to an existing app"`
   132  	Quotas                             v6.QuotasCommand                             `command:"quotas" description:"List available usage quotas"`
   133  	Quota                              v6.QuotaCommand                              `command:"quota" description:"Show quota info"`
   134  	RemoveNetworkPolicy                v6.RemoveNetworkPolicyCommand                `command:"remove-network-policy" description:"Remove network traffic policy of an app"`
   135  	RemovePluginRepo                   plugin.RemovePluginRepoCommand               `command:"remove-plugin-repo" description:"Remove a plugin repository"`
   136  	RenameBuildpack                    v6.RenameBuildpackCommand                    `command:"rename-buildpack" description:"Rename a buildpack"`
   137  	RenameOrg                          v6.RenameOrgCommand                          `command:"rename-org" description:"Rename an org"`
   138  	RenameServiceBroker                v6.RenameServiceBrokerCommand                `command:"rename-service-broker" description:"Rename a service broker"`
   139  	RenameService                      v6.RenameServiceCommand                      `command:"rename-service" description:"Rename a service instance"`
   140  	RenameSpace                        v6.RenameSpaceCommand                        `command:"rename-space" description:"Rename a space"`
   141  	Rename                             v6.RenameCommand                             `command:"rename" description:"Rename an app"`
   142  	RepoPlugins                        plugin.RepoPluginsCommand                    `command:"repo-plugins" description:"List all available plugins in specified repository or in all added repositories"`
   143  	ResetOrgDefaultIsolationSegment    v6.ResetOrgDefaultIsolationSegmentCommand    `command:"reset-org-default-isolation-segment" description:"Reset the default isolation segment used for apps in spaces of an org"`
   144  	ResetSpaceIsolationSegment         v6.ResetSpaceIsolationSegmentCommand         `command:"reset-space-isolation-segment" description:"Reset the space's isolation segment to the org default"`
   145  	Restage                            v6.RestageCommand                            `command:"restage" alias:"rg" description:"Recreate the app's executable artifact using the latest pushed app files and the latest environment (variables, service bindings, buildpack, stack, etc.). This action will cause app downtime."`
   146  	RestartAppInstance                 v6.RestartAppInstanceCommand                 `command:"restart-app-instance" description:"Terminate, then restart an app instance"`
   147  	Restart                            v6.RestartCommand                            `command:"restart" alias:"rs" description:"Stop all instances of the app, then start them again. This causes downtime."`
   148  	RouterGroups                       v6.RouterGroupsCommand                       `command:"router-groups" description:"List router groups"`
   149  	Routes                             v6.RoutesCommand                             `command:"routes" alias:"r" description:"List all routes in the current space or the current organization"`
   150  	RunningEnvironmentVariableGroup    v6.RunningEnvironmentVariableGroupCommand    `command:"running-environment-variable-group" alias:"revg" description:"Retrieve the contents of the running environment variable group"`
   151  	RunningSecurityGroups              v6.RunningSecurityGroupsCommand              `command:"running-security-groups" description:"List security groups in the set of security groups for running applications"`
   152  	RunTask                            v6.RunTaskCommand                            `command:"run-task" alias:"rt" description:"Run a one-off task on an app"`
   153  	Scale                              v6.ScaleCommand                              `command:"scale" description:"Change or view the instance count, disk space limit, and memory limit for an app"`
   154  	SecurityGroups                     v6.SecurityGroupsCommand                     `command:"security-groups" description:"List all security groups"`
   155  	SecurityGroup                      v6.SecurityGroupCommand                      `command:"security-group" description:"Show a single security group"`
   156  	ServiceAccess                      v6.ServiceAccessCommand                      `command:"service-access" description:"List service access settings"`
   157  	ServiceAuthTokens                  v6.ServiceAuthTokensCommand                  `command:"service-auth-tokens" description:"List service auth tokens"`
   158  	ServiceBrokers                     v6.ServiceBrokersCommand                     `command:"service-brokers" description:"List service brokers"`
   159  	ServiceKeys                        v6.ServiceKeysCommand                        `command:"service-keys" alias:"sk" description:"List keys for a service instance"`
   160  	ServiceKey                         v6.ServiceKeyCommand                         `command:"service-key" description:"Show service key info"`
   161  	Services                           v6.ServicesCommand                           `command:"services" alias:"s" description:"List all service instances in the target space"`
   162  	Service                            v6.ServiceCommand                            `command:"service" description:"Show service instance info"`
   163  	SetEnv                             v6.SetEnvCommand                             `command:"set-env" alias:"se" description:"Set an env variable for an app"`
   164  	SetHealthCheck                     v6.SetHealthCheckCommand                     `command:"set-health-check" description:"Change type of health check performed on an app"`
   165  	SetOrgDefaultIsolationSegment      v6.SetOrgDefaultIsolationSegmentCommand      `command:"set-org-default-isolation-segment" description:"Set the default isolation segment used for apps in spaces in an org"`
   166  	SetOrgRole                         v6.SetOrgRoleCommand                         `command:"set-org-role" description:"Assign an org role to a user"`
   167  	SetQuota                           v6.SetQuotaCommand                           `command:"set-quota" description:"Assign a quota to an org"`
   168  	SetRunningEnvironmentVariableGroup v6.SetRunningEnvironmentVariableGroupCommand `command:"set-running-environment-variable-group" alias:"srevg" description:"Pass parameters as JSON to create a running environment variable group"`
   169  	SetSpaceIsolationSegment           v6.SetSpaceIsolationSegmentCommand           `command:"set-space-isolation-segment" description:"Assign the isolation segment for a space"`
   170  	SetSpaceQuota                      v6.SetSpaceQuotaCommand                      `command:"set-space-quota" description:"Assign a space quota definition to a space"`
   171  	SetSpaceRole                       v6.SetSpaceRoleCommand                       `command:"set-space-role" description:"Assign a space role to a user"`
   172  	SetStagingEnvironmentVariableGroup v6.SetStagingEnvironmentVariableGroupCommand `command:"set-staging-environment-variable-group" alias:"ssevg" description:"Pass parameters as JSON to create a staging environment variable group"`
   173  	SharePrivateDomain                 v6.SharePrivateDomainCommand                 `command:"share-private-domain" description:"Share a private domain with an org"`
   174  	ShareService                       v6.ShareServiceCommand                       `command:"share-service" description:"Share a service instance with another space"`
   175  	SpaceQuotas                        v6.SpaceQuotasCommand                        `command:"space-quotas" description:"List available space resource quotas"`
   176  	SpaceQuota                         v6.SpaceQuotaCommand                         `command:"space-quota" description:"Show space quota info"`
   177  	SpaceSSHAllowed                    v6.SpaceSSHAllowedCommand                    `command:"space-ssh-allowed" description:"Reports whether SSH is allowed in a space"`
   178  	Spaces                             v6.SpacesCommand                             `command:"spaces" description:"List all spaces in an org"`
   179  	SpaceUsers                         v6.SpaceUsersCommand                         `command:"space-users" description:"Show space users by role"`
   180  	Space                              v6.SpaceCommand                              `command:"space" description:"Show space info"`
   181  	SSHCode                            v6.SSHCodeCommand                            `command:"ssh-code" description:"Get a one time password for ssh clients"`
   182  	SSHEnabled                         v6.SSHEnabledCommand                         `command:"ssh-enabled" description:"Reports whether SSH is enabled on an application container instance"`
   183  	SSH                                v6.SSHCommand                                `command:"ssh" description:"SSH to an application container instance"`
   184  	Stacks                             v6.StacksCommand                             `command:"stacks" description:"List all stacks (a stack is a pre-built file system, including an operating system, that can run apps)"`
   185  	Stack                              v6.StackCommand                              `command:"stack" description:"Show information for a stack (a stack is a pre-built file system, including an operating system, that can run apps)"`
   186  	StagingEnvironmentVariableGroup    v6.StagingEnvironmentVariableGroupCommand    `command:"staging-environment-variable-group" alias:"sevg" description:"Retrieve the contents of the staging environment variable group"`
   187  	StagingSecurityGroups              v6.StagingSecurityGroupsCommand              `command:"staging-security-groups" description:"List security groups in the staging set for applications"`
   188  	Start                              v6.StartCommand                              `command:"start" alias:"st" description:"Start an app"`
   189  	Stop                               v6.StopCommand                               `command:"stop" alias:"sp" description:"Stop an app"`
   190  	Target                             v6.TargetCommand                             `command:"target" alias:"t" description:"Set or view the targeted org or space"`
   191  	Tasks                              v6.TasksCommand                              `command:"tasks" description:"List tasks of an app"`
   192  	TerminateTask                      v6.TerminateTaskCommand                      `command:"terminate-task" description:"Terminate a running task of an app"`
   193  	UnbindRouteService                 v6.UnbindRouteServiceCommand                 `command:"unbind-route-service" alias:"urs" description:"Unbind a service instance from an HTTP route"`
   194  	UnbindRunningSecurityGroup         v6.UnbindRunningSecurityGroupCommand         `command:"unbind-running-security-group" description:"Unbind a security group from the set of security groups for running applications"`
   195  	UnbindSecurityGroup                v6.UnbindSecurityGroupCommand                `command:"unbind-security-group" description:"Unbind a security group from a space"`
   196  	UnbindService                      v6.UnbindServiceCommand                      `command:"unbind-service" alias:"us" description:"Unbind a service instance from an app"`
   197  	UnbindStagingSecurityGroup         v6.UnbindStagingSecurityGroupCommand         `command:"unbind-staging-security-group" description:"Unbind a security group from the set of security groups for staging applications"`
   198  	UninstallPlugin                    plugin.UninstallPluginCommand                `command:"uninstall-plugin" description:"Uninstall CLI plugin"`
   199  	UnmapRoute                         v6.UnmapRouteCommand                         `command:"unmap-route" description:"Remove a url route from an app"`
   200  	UnsetEnv                           v6.UnsetEnvCommand                           `command:"unset-env" alias:"ue" description:"Remove an env variable from an app"`
   201  	UnsetOrgRole                       v6.UnsetOrgRoleCommand                       `command:"unset-org-role" description:"Remove an org role from a user"`
   202  	UnsetSpaceQuota                    v6.UnsetSpaceQuotaCommand                    `command:"unset-space-quota" description:"Unassign a quota from a space"`
   203  	UnsetSpaceRole                     v6.UnsetSpaceRoleCommand                     `command:"unset-space-role" description:"Remove a space role from a user"`
   204  	UnsharePrivateDomain               v6.UnsharePrivateDomainCommand               `command:"unshare-private-domain" description:"Unshare a private domain with an org"`
   205  	UnshareService                     v6.UnshareServiceCommand                     `command:"unshare-service" description:"Unshare a shared service instance from a space"`
   206  	UpdateBuildpack                    v6.UpdateBuildpackCommand                    `command:"update-buildpack" description:"Update a buildpack"`
   207  	UpdateQuota                        v6.UpdateQuotaCommand                        `command:"update-quota" description:"Update an existing resource quota"`
   208  	UpdateSecurityGroup                v6.UpdateSecurityGroupCommand                `command:"update-security-group" description:"Update a security group"`
   209  	UpdateServiceAuthToken             v6.UpdateServiceAuthTokenCommand             `command:"update-service-auth-token" description:"Update a service auth token"`
   210  	UpdateServiceBroker                v6.UpdateServiceBrokerCommand                `command:"update-service-broker" description:"Update a service broker"`
   211  	UpdateService                      v6.UpdateServiceCommand                      `command:"update-service" description:"Update a service instance"`
   212  	UpdateSpaceQuota                   v6.UpdateSpaceQuotaCommand                   `command:"update-space-quota" description:"Update an existing space quota"`
   213  	UpdateUserProvidedService          v6.UpdateUserProvidedServiceCommand          `command:"update-user-provided-service" alias:"uups" description:"Update user-provided service instance"`
   214  	Version                            VersionCommand                               `command:"version" description:"Print the version"`
   215  }
   216  
   217  // HasCommand returns true if the command name is in the command list.
   218  func (c commandList) HasCommand(name string) bool {
   219  	if name == "" {
   220  		return false
   221  	}
   222  
   223  	cType := reflect.TypeOf(c)
   224  	_, found := cType.FieldByNameFunc(
   225  		func(fieldName string) bool {
   226  			field, _ := cType.FieldByName(fieldName)
   227  			return field.Tag.Get("command") == name
   228  		},
   229  	)
   230  
   231  	return found
   232  }
   233  
   234  // HasAlias returns true if the command alias is in the command list.
   235  func (c commandList) HasAlias(alias string) bool {
   236  	if alias == "" {
   237  		return false
   238  	}
   239  
   240  	cType := reflect.TypeOf(c)
   241  	_, found := cType.FieldByNameFunc(
   242  		func(fieldName string) bool {
   243  			field, _ := cType.FieldByName(fieldName)
   244  			return field.Tag.Get("alias") == alias
   245  		},
   246  	)
   247  
   248  	return found
   249  }