commands

package
v1.0.106 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2025 License: Apache-2.0 Imports: 27 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeLdapManager added in v1.0.72

func InitializeLdapManager(baseCommand BaseCFConfigCommand, ldapCommand BaseLDAPCommand) (*ldap.Manager, error)

Types

type ApplyCommand added in v1.0.0

type ApplyCommand struct {
	BaseCFConfigCommand
	BasePeekCommand
	BaseLDAPCommand
}

func (*ApplyCommand) Execute added in v1.0.0

func (c *ApplyCommand) Execute([]string) error

Execute - applies all the config in order

type AssignDefaultSecurityGroups added in v0.0.84

type AssignDefaultSecurityGroups struct {
	BaseCFConfigCommand
	BasePeekCommand
}

func (*AssignDefaultSecurityGroups) Execute added in v0.0.84

Execute - creates security groups

type BaseCFConfigCommand

type BaseCFConfigCommand struct {
	configcommands.BaseConfigCommand
	SystemDomain string `long:"system-domain" env:"SYSTEM_DOMAIN"  description:"system domain"`
	UserID       string `long:"user-id" env:"USER_ID"  description:"user id that has privileges to create/update/delete users, orgs and spaces"`
	Password     string `long:"password" env:"PASSWORD"  description:"password for user account [optional if client secret is provided]"`
	ClientSecret string `` /* 157-byte string literal not displayed */
}

BaseCFConfigCommand - base command that has details to connect to cloud foundry instance

type BaseLDAPCommand

type BaseLDAPCommand struct {
	LdapServer   string `long:"ldap-server" env:"LDAP_SERVER"  description:"LDAP server for binding"`
	LdapPassword string `long:"ldap-password" env:"LDAP_PASSWORD"  description:"LDAP password for binding"`
	LdapUser     string `long:"ldap-user" env:"LDAP_USER"  description:"LDAP user for binding"`
}

BaseLDAPCommand - base command that has ldap password

type BasePeekCommand

type BasePeekCommand struct {
	Peek bool `long:"peek" env:"PEEK"  description:"Preview entities to change without modifying"`
}

BasePeekCommand - base command for non read-only operations

type CFMgmt

type CFMgmt struct {
	UAAManager              uaa.Manager
	OrgReader               organizationreader.Reader
	OrgManager              organization.Manager
	SpaceManager            space.Manager
	UserManager             user.Manager
	QuotaManager            *quota.Manager
	PrivateDomainManager    privatedomain.Manager
	ConfigManager           config.Updater
	ConfigDirectory         string
	SystemDomain            string
	SecurityGroupManager    securitygroup.Manager
	IsolationSegmentManager isosegment.Manager
	ServiceAccessManager    *serviceaccess.Manager
	SharedDomainManager     *shareddomain.Manager
	RoleManager             role.Manager
}

func InitializeManagers

func InitializeManagers(baseCommand BaseCFConfigCommand) (*CFMgmt, error)

func InitializePeekManagers added in v0.0.80

func InitializePeekManagers(baseCommand BaseCFConfigCommand, peek bool, ldapMgr *ldap.Manager) (*CFMgmt, error)

type CfMgmtCommand

type CfMgmtCommand struct {
	Version                          configcommands.VersionCommand    `command:"version" description:"Print version information and exit"`
	CreateOrgsCommand                CreateOrgsCommand                `command:"create-orgs" description:"creates organizations for each orgConfig.yml"`
	CreateSecurityGroupsCommand      CreateSecurityGroupsCommand      `command:"create-security-groups" description:"creates named security groups that can be assigned to spaces"`
	AssignDefaultSecurityGroups      AssignDefaultSecurityGroups      `command:"assign-default-security-groups" description:"assigns security groups to default running or default staging"`
	CreatePrivateDomainsCommand      CreatePrivateDomainsCommand      `command:"create-org-private-domains" description:"creates private domains for an org"`
	DeleteOrgsCommand                DeleteOrgsCommand                `command:"delete-orgs" description:"deletes orgs not in the configuration"`
	UpdateOrgQuotasCommand           UpdateOrgQuotasCommand           `command:"update-org-quotas" description:"updates org quotas"`
	UpdateOrgUsersCommand            UpdateOrgUsersCommand            `command:"update-org-users" description:"update org user roles"`
	CleanupOrgUsersCommand           CleanupOrgUsersCommand           `command:"cleanup-org-users" description:"removes any users from org that don't have a role"`
	CreateSpacesCommand              CreateSpacesCommand              `command:"create-spaces" description:"creates spaces in configuration"`
	DeleteSpacesCommand              DeleteSpacesCommand              `command:"delete-spaces" description:"deletes spaces not in configurtion"`
	UpdateSpacesCommand              UpdateSpacesCommand              `command:"update-spaces" description:"enables/disables ssh access at space level"`
	UpdateSpacesMetadataCommand      UpdateSpacesMetadataCommand      `command:"update-spaces-metadata" description:"adds metadata for a space"`
	UpdateSpaceQuotasCommand         UpdateSpaceQuotasCommand         `command:"update-space-quotas" description:"updates spaces quotas"`
	UpdateSpaceUsersCommand          UpdateSpaceUsersCommand          `command:"update-space-users" description:"update space user roles"`
	CreateSpaceSecurityGroupsCommand CreateSpaceSecurityGroupsCommand `command:"update-space-security-groups" description:"updates space specific security groups"`
	IsolationSegmentsCommand         IsolationSegmentsCommand         `command:"isolation-segments" description:"assigns isolations segments to orgs and spaces"`
	SharePrivateDomainsCommand       SharePrivateDomainsCommand       `command:"share-org-private-domains" description:"shares an existing private domain with the specified org"`
	ServiceAccessCommand             ServiceAccessCommand             `command:"service-access" description:"enables/disables service access for orgs"`
	SharedDomainsCommand             SharedDomainsCommand             `command:"shared-domains" description:"adds/removes shared domains"`
	UpdateOrgsMetadataCommand        UpdateOrgsMetadataCommand        `command:"update-orgs-metadata" description:"updates organizations metadata for each orgConfig.yml"`
	ApplyCommand                     ApplyCommand                     `command:"apply" description:"applies the configuration to your target foundation"`
	ExportConfigurationCommand       ExportConfigurationCommand       `` /* 176-byte string literal not displayed */
	ExportServiceAccessCommand       ExportServiceAccessCommand       `` /* 145-byte string literal not displayed */
}
var CfMgmt CfMgmtCommand

type CleanupOrgUsersCommand added in v1.0.8

type CleanupOrgUsersCommand struct {
	BaseCFConfigCommand
	BasePeekCommand
}

func (*CleanupOrgUsersCommand) Execute added in v1.0.8

func (c *CleanupOrgUsersCommand) Execute([]string) error

Execute - removes org users

type CreateOrgsCommand

type CreateOrgsCommand struct {
	BaseCFConfigCommand
	BasePeekCommand
}

func (*CreateOrgsCommand) Execute

func (c *CreateOrgsCommand) Execute([]string) error

Execute - creates organizations

type CreatePrivateDomainsCommand

type CreatePrivateDomainsCommand struct {
	BaseCFConfigCommand
	BasePeekCommand
}

func (*CreatePrivateDomainsCommand) Execute

Execute - creates private domains

type CreateSecurityGroupsCommand

type CreateSecurityGroupsCommand struct {
	BaseCFConfigCommand
	BasePeekCommand
}

func (*CreateSecurityGroupsCommand) Execute

Execute - creates security groups

type CreateSpaceSecurityGroupsCommand

type CreateSpaceSecurityGroupsCommand struct {
	BaseCFConfigCommand
	BasePeekCommand
}

func (*CreateSpaceSecurityGroupsCommand) Execute

Execute - creates space specific security groups

type CreateSpacesCommand

type CreateSpacesCommand struct {
	BaseCFConfigCommand
	BasePeekCommand
}

func (*CreateSpacesCommand) Execute

func (c *CreateSpacesCommand) Execute([]string) error

Execute - creates spaces

type DeleteOrgsCommand

type DeleteOrgsCommand struct {
	BaseCFConfigCommand
	BasePeekCommand
}

func (*DeleteOrgsCommand) Execute

func (c *DeleteOrgsCommand) Execute([]string) error

Execute - deletes orgs

type DeleteSpacesCommand

type DeleteSpacesCommand struct {
	BaseCFConfigCommand
	BasePeekCommand
}

func (*DeleteSpacesCommand) Execute

func (c *DeleteSpacesCommand) Execute([]string) error

Execute - deletes spaces

type ExportConfigurationCommand

type ExportConfigurationCommand struct {
	BaseCFConfigCommand
	ExcludedOrgs          []string `long:"excluded-org" description:"Org to be excluded from export. Repeat the flag to specify multiple orgs"`
	ExcludedSpaces        []string `long:"excluded-space" description:"Space to be excluded from export. Repeat the flag to specify multiple spaces"`
	SkipSpaces            bool     `long:"skip-spaces" description:"Will not export space configurations"`
	SkipRoutingGroups     bool     `long:"skip-routing-groups" description:"Will not export routing groups. Set to true if tcp routing is not configured"`
	DisableMetadataPrefix bool     `long:"disable-metadata-prefix" description:"Disable using metadata prefixes"`
}

func (*ExportConfigurationCommand) Execute

func (c *ExportConfigurationCommand) Execute([]string) error

Execute - initializes cf-mgmt configuration

type ExportServiceAccessCommand added in v1.0.31

type ExportServiceAccessCommand struct {
	BaseCFConfigCommand
}

func (*ExportServiceAccessCommand) Execute added in v1.0.31

func (c *ExportServiceAccessCommand) Execute([]string) error

ExportServiceAccessCommand - updates commands to reverse engineer service access into cf-mgmt.yml and remove from orgConfig.yml if present

type Initialize

type Initialize struct {
	ConfigDir, SystemDomain, UserID, Password, ClientSecret, LdapPwd string
	Peek                                                             bool
}

type IsolationSegmentsCommand

type IsolationSegmentsCommand struct {
	BaseCFConfigCommand
	BasePeekCommand
}

func (*IsolationSegmentsCommand) Execute

func (c *IsolationSegmentsCommand) Execute([]string) error

Execute - updates spaces

type ServiceAccessCommand added in v1.0.8

type ServiceAccessCommand struct {
	BaseCFConfigCommand
	BasePeekCommand
}

func (*ServiceAccessCommand) Execute added in v1.0.8

func (c *ServiceAccessCommand) Execute([]string) error

Execute - enables/disables service access

type SharePrivateDomainsCommand added in v0.0.74

type SharePrivateDomainsCommand struct {
	BaseCFConfigCommand
	BasePeekCommand
}

func (*SharePrivateDomainsCommand) Execute added in v0.0.74

func (c *SharePrivateDomainsCommand) Execute([]string) error

Execute - creates private domains

type SharedDomainsCommand added in v1.0.12

type SharedDomainsCommand struct {
	BaseCFConfigCommand
	BasePeekCommand
}

func (*SharedDomainsCommand) Execute added in v1.0.12

func (c *SharedDomainsCommand) Execute([]string) error

Execute - adds/removes shared domains

type UpdateOrgQuotasCommand

type UpdateOrgQuotasCommand struct {
	BaseCFConfigCommand
	BasePeekCommand
}

func (*UpdateOrgQuotasCommand) Execute

func (c *UpdateOrgQuotasCommand) Execute([]string) error

Execute - updates orgs quotas

type UpdateOrgUsersCommand

type UpdateOrgUsersCommand struct {
	BaseCFConfigCommand
	BaseLDAPCommand
	BasePeekCommand
}

func (*UpdateOrgUsersCommand) Execute

func (c *UpdateOrgUsersCommand) Execute([]string) error

Execute - updates orgs quotas

type UpdateOrgsMetadataCommand added in v1.0.26

type UpdateOrgsMetadataCommand struct {
	BaseCFConfigCommand
	BasePeekCommand
}

func (*UpdateOrgsMetadataCommand) Execute added in v1.0.26

func (c *UpdateOrgsMetadataCommand) Execute([]string) error

Execute - updates organizations metadata

type UpdateSpaceQuotasCommand

type UpdateSpaceQuotasCommand struct {
	BaseCFConfigCommand
	BasePeekCommand
}

func (*UpdateSpaceQuotasCommand) Execute

func (c *UpdateSpaceQuotasCommand) Execute([]string) error

Execute - updates space quotas

type UpdateSpaceUsersCommand

type UpdateSpaceUsersCommand struct {
	BaseCFConfigCommand
	BaseLDAPCommand
	BasePeekCommand
}

func (*UpdateSpaceUsersCommand) Execute

func (c *UpdateSpaceUsersCommand) Execute([]string) error

Execute - updates space users

type UpdateSpacesCommand

type UpdateSpacesCommand struct {
	BaseCFConfigCommand
	BasePeekCommand
}

func (*UpdateSpacesCommand) Execute

func (c *UpdateSpacesCommand) Execute([]string) error

Execute - updates spaces

type UpdateSpacesMetadataCommand added in v1.0.26

type UpdateSpacesMetadataCommand struct {
	BaseCFConfigCommand
	BasePeekCommand
}

func (*UpdateSpacesMetadataCommand) Execute added in v1.0.26

Execute - updates spaces metadata

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL