func (cmd ListApps) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) { reqs = []requirements.Requirement{ requirementsFactory.NewLoginRequirement(), requirementsFactory.NewTargetedSpaceRequirement(), } return }
func (cmd *DisableServiceAccess) GetRequirements(requirementsFactory requirements.Factory, context *cli.Context) ([]requirements.Requirement, error) { if len(context.Args()) != 1 { cmd.ui.FailWithUsage(context) } return []requirements.Requirement{requirementsFactory.NewLoginRequirement()}, nil }
func (cmd *Restage) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) { if len(c.Args()) != 1 { cmd.ui.FailWithUsage(c) } return []requirements.Requirement{requirementsFactory.NewLoginRequirement()}, nil }
func (cmd ListServices) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) { reqs = append(reqs, requirementsFactory.NewLoginRequirement(), requirementsFactory.NewTargetedSpaceRequirement(), ) return }
func (cmd *RenameBuildpack) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) { if len(c.Args()) != 2 { cmd.ui.FailWithUsage(c) } reqs = []requirements.Requirement{requirementsFactory.NewLoginRequirement()} return }
func (cmd Authenticate) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) { if len(c.Args()) != 2 { cmd.ui.FailWithUsage(c) } reqs = append(reqs, requirementsFactory.NewApiEndpointRequirement()) return }
func (cmd UpdateSecurityGroup) GetRequirements(requirementsFactory requirements.Factory, context *cli.Context) ([]requirements.Requirement, error) { if len(context.Args()) != 2 { cmd.ui.FailWithUsage(context) } requirements := []requirements.Requirement{requirementsFactory.NewLoginRequirement()} return requirements, nil }
func (cmd CreateUserProvidedService) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) { if len(c.Args()) != 1 { cmd.ui.FailWithUsage(c) } reqs = append(reqs, requirementsFactory.NewLoginRequirement()) return }
func (cmd PurgeServiceOffering) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) { if len(c.Args()) != 1 { cmd.ui.FailWithUsage(c) } reqs = []requirements.Requirement{requirementsFactory.NewLoginRequirement()} return }
func (cmd *DeleteApp) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) { if len(c.Args()) == 0 { cmd.ui.FailWithUsage(c) } reqs = []requirements.Requirement{requirementsFactory.NewLoginRequirement()} return }
func (cmd BindSecurityGroup) GetRequirements(requirementsFactory requirements.Factory, context *cli.Context) (reqs []requirements.Requirement, err error) { if len(context.Args()) != 3 { cmd.ui.FailWithUsage(context) } reqs = append(reqs, requirementsFactory.NewLoginRequirement()) return }
func (cmd DeleteServiceBroker) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) { if len(c.Args()) != 1 { cmd.ui.FailWithUsage(c) } reqs = append(reqs, requirementsFactory.NewLoginRequirement()) return }
func (cmd *unbindFromRunningGroup) GetRequirements(requirementsFactory requirements.Factory, context *cli.Context) ([]requirements.Requirement, error) { if len(context.Args()) != 1 { cmd.ui.FailWithUsage(context) } return []requirements.Requirement{ requirementsFactory.NewLoginRequirement(), }, nil }
func (cmd UnbindSecurityGroup) GetRequirements(requirementsFactory requirements.Factory, context *cli.Context) ([]requirements.Requirement, error) { argLength := len(context.Args()) if argLength == 0 || argLength == 2 || argLength >= 4 { cmd.ui.FailWithUsage(context) } requirements := []requirements.Requirement{requirementsFactory.NewLoginRequirement()} return requirements, nil }
func (cmd CreateQuota) GetRequirements(requirementsFactory requirements.Factory, context *cli.Context) ([]requirements.Requirement, error) { if len(context.Args()) != 1 { cmd.ui.FailWithUsage(context) } return []requirements.Requirement{ requirementsFactory.NewLoginRequirement(), }, nil }
func (cmd *Stop) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) { if len(c.Args()) != 1 { cmd.ui.FailWithUsage(c) } cmd.appReq = requirementsFactory.NewApplicationRequirement(c.Args()[0]) reqs = []requirements.Requirement{requirementsFactory.NewLoginRequirement(), cmd.appReq} return }
func (cmd SetRunningEnvironmentVariableGroup) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) ([]requirements.Requirement, error) { if len(c.Args()) != 1 { cmd.ui.FailWithUsage(c) } reqs := []requirements.Requirement{ requirementsFactory.NewLoginRequirement(), } return reqs, nil }
func (cmd DisableFeatureFlag) GetRequirements(requirementsFactory requirements.Factory, context *cli.Context) ([]requirements.Requirement, error) { if len(context.Args()) != 1 { cmd.ui.FailWithUsage(context) } reqs := []requirements.Requirement{ requirementsFactory.NewLoginRequirement(), } return reqs, nil }
func (cmd UpdateServiceAuthTokenFields) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) { if len(c.Args()) != 3 { cmd.ui.FailWithUsage(c) } reqs = []requirements.Requirement{ requirementsFactory.NewLoginRequirement(), } return }
func (cmd SetSpaceQuota) GetRequirements(requirementsFactory requirements.Factory, context *cli.Context) ([]requirements.Requirement, error) { if len(context.Args()) != 2 { cmd.ui.FailWithUsage(context) } return []requirements.Requirement{ requirementsFactory.NewLoginRequirement(), requirementsFactory.NewTargetedOrgRequirement(), }, nil }
func (cmd *CreateSharedDomain) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) { if len(c.Args()) != 1 { cmd.ui.FailWithUsage(c) } reqs = []requirements.Requirement{ requirementsFactory.NewLoginRequirement(), } return }
func (cmd DeleteUser) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) { if len(c.Args()) != 1 { err = errors.New(T("Invalid usage")) cmd.ui.FailWithUsage(c) return } reqs = append(reqs, requirementsFactory.NewLoginRequirement()) return }
func (cmd *SpaceUsers) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) { if len(c.Args()) != 2 { cmd.ui.FailWithUsage(c) } orgName := c.Args()[0] cmd.orgReq = requirementsFactory.NewOrganizationRequirement(orgName) reqs = append(reqs, requirementsFactory.NewLoginRequirement(), cmd.orgReq) return }
func (cmd *CopySource) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) { if len(c.Args()) != 2 { cmd.ui.FailWithUsage(c) } reqs = []requirements.Requirement{ requirementsFactory.NewLoginRequirement(), requirementsFactory.NewTargetedSpaceRequirement(), } return }
func (cmd *UpdateSpaceQuota) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) { if len(c.Args()) != 1 { cmd.ui.FailWithUsage(c) } reqs = []requirements.Requirement{ requirementsFactory.NewLoginRequirement(), requirementsFactory.NewTargetedOrgRequirement(), } return }
func (cmd *MigrateServiceInstances) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) { if len(c.Args()) != 5 { cmd.ui.FailWithUsage(c) return } reqs = []requirements.Requirement{ requirementsFactory.NewLoginRequirement(), } return }
func (cmd *Curl) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) { if len(c.Args()) != 1 { err = errors.New(T("Incorrect number of arguments")) cmd.ui.FailWithUsage(c) return } reqs = []requirements.Requirement{ requirementsFactory.NewLoginRequirement(), } return }
func (cmd *CreateDomain) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) { if len(c.Args()) != 2 { cmd.ui.FailWithUsage(c) } cmd.orgReq = requirementsFactory.NewOrganizationRequirement(c.Args()[0]) reqs = []requirements.Requirement{ requirementsFactory.NewLoginRequirement(), cmd.orgReq, } return }
func (cmd CreateSpace) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) { if len(c.Args()) == 0 { cmd.ui.FailWithUsage(c) } reqs = []requirements.Requirement{requirementsFactory.NewLoginRequirement()} if c.String("o") == "" { reqs = append(reqs, requirementsFactory.NewTargetedOrgRequirement()) } return }
func (cmd *ListDomains) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) { if len(c.Args()) > 0 { cmd.ui.FailWithUsage(c) } cmd.orgReq = requirementsFactory.NewTargetedOrgRequirement() reqs = []requirements.Requirement{ requirementsFactory.NewLoginRequirement(), cmd.orgReq, } return }