Documentation ¶
Index ¶
- Constants
- Variables
- func AddAccountTag(c *cli.Context)
- func ChangeAmbariPassword(c *cli.Context)
- func Configure(c *cli.Context)
- func CreateAwsCredential(c *cli.Context)
- func CreateAzureCredential(c *cli.Context)
- func CreateBlueprintFromFile(c *cli.Context)
- func CreateBlueprintFromUrl(c *cli.Context)
- func CreateGcpCredential(c *cli.Context)
- func CreateImagecatalogFromUrl(c *cli.Context)
- func CreateLDAP(c *cli.Context) error
- func CreateOpenstackCredential(c *cli.Context)
- func CreateRecipeFromFile(c *cli.Context)
- func CreateRecipeFromUrl(c *cli.Context)
- func CreateStack(c *cli.Context)
- func DeleteAccountTag(c *cli.Context)
- func DeleteBlueprint(c *cli.Context)
- func DeleteCredential(c *cli.Context)
- func DeleteImagecatalog(c *cli.Context)
- func DeleteLdap(c *cli.Context) error
- func DeleteRecipe(c *cli.Context)
- func DeleteStack(c *cli.Context)
- func DescribeBlueprint(c *cli.Context)
- func DescribeCredential(c *cli.Context)
- func DescribeRecipe(c *cli.Context)
- func DescribeStack(c *cli.Context)
- func GenerateAwsStackTemplate(c *cli.Context) error
- func GenerateAzureStackTemplate(c *cli.Context) error
- func GenerateGcpStackTemplate(c *cli.Context) error
- func GenerateOpenstackStackTemplate(c *cli.Context) error
- func GenerateReinstallTemplate(c *cli.Context)
- func GenerateYarnStackTemplate(c *cli.Context) error
- func GetHomeDirectory() string
- func HiddenCommands(app cli.App) []cli.Command
- func ListAccountTags(c *cli.Context)
- func ListAvailabilityZones(c *cli.Context)
- func ListAwsImages(c *cli.Context)
- func ListAwsVolumeTypes(c *cli.Context)
- func ListAzureImages(c *cli.Context)
- func ListAzureVolumeTypes(c *cli.Context)
- func ListBlueprints(c *cli.Context)
- func ListCredentials(c *cli.Context)
- func ListGcpImages(c *cli.Context)
- func ListGcpVolumeTypes(c *cli.Context)
- func ListImagecatalogs(c *cli.Context)
- func ListInstanceTypes(c *cli.Context)
- func ListLdaps(c *cli.Context) error
- func ListOpenstackImages(c *cli.Context)
- func ListRecipes(c *cli.Context)
- func ListRegions(c *cli.Context)
- func ListStacks(c *cli.Context)
- func PrintHelp(out io.Writer, templ string, data interface{})
- func ReinstallStack(c *cli.Context)
- func RepairStack(c *cli.Context)
- func ScaleStack(c *cli.Context)
- func SetDefaultImagecatalog(c *cli.Context)
- func ShowHiddenCommands(c *cli.Context) error
- func StartStack(c *cli.Context)
- func StopStack(c *cli.Context)
- func SyncStack(c *cli.Context)
- type BoolFlag
- type Cloudbreak
- type Config
- type ConfigList
- type ErrorMessage
- type FlagBuilder
- func (fb *FlagBuilder) AddAuthenticationFlags() *FlagBuilder
- func (fb *FlagBuilder) AddFlags(flags ...cli.Flag) *FlagBuilder
- func (fb *FlagBuilder) AddOutputFlag() *FlagBuilder
- func (fb *FlagBuilder) AddResourceDefaultFlags() *FlagBuilder
- func (fb *FlagBuilder) AddResourceFlagsWithOptionalName() *FlagBuilder
- func (fb *FlagBuilder) Build() []cli.Flag
- type RequiredFlag
- type StringFlag
Constants ¶
View Source
const ( Config_dir = ".cb" Config_file = "config" )
View Source
const ( OAUTH2 = "oauth2" BASIC = "basic" )
View Source
const ( AVAILABLE = status("AVAILABLE") STOPPED = status("STOPPED") DELETE_COMPLETED = status("DELETE_COMPLETED") SKIP = status("") )
Variables ¶
View Source
var ( FlDebugOptional = BoolFlag{ RequiredFlag: OPTIONAL, BoolFlag: cli.BoolFlag{ Name: "debug", Usage: "debug mode", EnvVar: "DEBUG", }, } FlWaitOptional = BoolFlag{ RequiredFlag: OPTIONAL, BoolFlag: cli.BoolFlag{ Name: "wait", Usage: "wait for the operation to finish, no argument required", }, } FlInputJson = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "cli-input-json", Usage: "user provided file with json content", }, } FlOutputOptional = StringFlag{ RequiredFlag: OPTIONAL, StringFlag: cli.StringFlag{ Name: "output", Usage: "supported formats: json, yaml, table (default: \"json\")", EnvVar: "CB_OUT_FORMAT", }, } FlProfileOptional = StringFlag{ RequiredFlag: OPTIONAL, StringFlag: cli.StringFlag{ Name: "profile", Usage: "selects a config profile to use", EnvVar: "CB_PROFILE", }, } FlAuthTypeOptional = StringFlag{ RequiredFlag: OPTIONAL, StringFlag: cli.StringFlag{ Name: "auth-type", Usage: "authentication method to use, values: [" + OAUTH2 + ", " + BASIC + "]", EnvVar: "CB_AUTH_TYPE", }, } FlForceOptional = BoolFlag{ RequiredFlag: OPTIONAL, BoolFlag: cli.BoolFlag{ Name: "force", Usage: "force the operation", }, } FlServerOptional = StringFlag{ RequiredFlag: OPTIONAL, StringFlag: cli.StringFlag{ Name: "server", Usage: "server address", EnvVar: "CB_SERVER_ADDRESS", }, } FlServerRequired = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "server", Usage: "server address", EnvVar: "CB_SERVER_ADDRESS", }, } FlUsername = StringFlag{ RequiredFlag: OPTIONAL, StringFlag: cli.StringFlag{ Name: "username", Usage: "user name (e-mail address)", EnvVar: "CB_USER_NAME", }, } FlUsernameRequired = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "username", Usage: "user name (e-mail address)", EnvVar: "CB_USER_NAME", }, } FlPassword = StringFlag{ RequiredFlag: OPTIONAL, StringFlag: cli.StringFlag{ Name: "password", Usage: "password", EnvVar: "CB_PASSWORD", }, } FlName = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "name", Usage: "name of resource", }, } FlNameOptional = StringFlag{ RequiredFlag: OPTIONAL, StringFlag: cli.StringFlag{ Name: "name", Usage: "name of resource", }, } FlDescriptionOptional = StringFlag{ RequiredFlag: OPTIONAL, StringFlag: cli.StringFlag{ Name: "description", Usage: "description of resource", }, } FlPublicOptional = BoolFlag{ RequiredFlag: OPTIONAL, BoolFlag: cli.BoolFlag{ Name: "public", Usage: "public in account", }, } FlRoleARN = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "role-arn", }, } FlAccessKey = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "access-key", }, } FlSecretKey = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "secret-key", }, } FlProjectId = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "project-id", }, } FlServiceAccountId = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "service-account-id", }, } FlServiceAccountPrivateKeyFile = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "service-account-private-key-file", }, } FlTenantUser = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "tenant-user", }, } FlTenantPassword = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "tenant-password", }, } FlTenantName = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "tenant-name", }, } FlEndpoint = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "endpoint", }, } FlKeystoneScopeOptional = StringFlag{ RequiredFlag: OPTIONAL, StringFlag: cli.StringFlag{ Name: "keystone-scope", }, } FlUserDomain = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "user-domain", }, } FlProjectDomainNameOptional = StringFlag{ RequiredFlag: OPTIONAL, StringFlag: cli.StringFlag{ Name: "project-domain-name", }, } FlDomainNameOptional = StringFlag{ RequiredFlag: OPTIONAL, StringFlag: cli.StringFlag{ Name: "domain-name", }, } FlProjectNameOptional = StringFlag{ RequiredFlag: OPTIONAL, StringFlag: cli.StringFlag{ Name: "project-name", }, } FlFacingOptional = StringFlag{ RequiredFlag: OPTIONAL, StringFlag: cli.StringFlag{ Name: "facing", }, } FlSubscriptionId = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "subscription-id", }, } FlTenantId = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "tenant-id", }, } FlAppId = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "app-id", }, } FlAppPassword = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "app-password", }, } FlFile = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "file", Usage: "location of the Ambari blueprint JSON file", }, } FlURL = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "url", Usage: "URL location of the JSON file", }, } FlBlueprintName = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "blueprint-name", Usage: "name of the blueprint", }, } FlBlueprintNameOptional = StringFlag{ RequiredFlag: OPTIONAL, StringFlag: cli.StringFlag{ Name: "blueprint-name", Usage: "name of the blueprint", }, } FlBlueprintFileOptional = StringFlag{ RequiredFlag: OPTIONAL, StringFlag: cli.StringFlag{ Name: "blueprint-file", Usage: "location of the blueprint file", }, } FlExecutionType = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "execution-type", Usage: "type of execution [pre-ambari-start, pre-termination, post-ambari-start, post-cluster-install]", }, } FlAmbariPasswordOptional = StringFlag{ RequiredFlag: OPTIONAL, StringFlag: cli.StringFlag{ Name: "input-json-param-password", Usage: "password of the cluster and ambari", }, } FlGroupName = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "group-name", Usage: "name of the group to scale", }, } FlDesiredNodeCount = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "desired-node-count", Usage: "desired number of nodes", }, } FlOldPassword = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "old-password", Usage: "old password of ambari", }, } FlNewPassword = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "new-password", Usage: "new password of ambari", }, } FlAmbariUser = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "ambari-user", Usage: "user of ambari", }, } FlLdapServer = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "ldap-server", Usage: "address of the ldap server (e.g: ldap://10.0.0.1:384)", }, } FlLdapDomain = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "ldap-domain", Usage: "ldap domain (e.g: ad.cb.com)", }, } FlLdapBindDN = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "ldap-bind-dn", Usage: "ldap bind dn (e.g: CN=Administrator,CN=Users,DC=ad,DC=cb,DC=com)", }, } FlLdapUserNameAttribute = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "ldap-user-name-attribute", Usage: "ldap user name attribute", }, } FlLdapUserObjectClass = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "ldap-user-object-class", Usage: "ldap user object class", }, } FlLdapGroupMemberAttribute = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "ldap-group-member-attribute", Usage: "ldap group member attribute", }, } FlLdapGroupNameAttribute = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "ldap-group-name-attribute", Usage: "ldap group name attribute", }, } FlLdapGroupObjectClass = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "ldap-group-object-class", Usage: "ldap group object class", }, } FlLdapBindPassword = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "ldap-bind-password", Usage: "ldap bind password", }, } FlLdapDirectoryType = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "ldap-directory-type", Usage: "ldap directory type (LDAP or ACTIVE_DIRECTORY)", }, } FlLdapUserSearchBase = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "ldap-user-search-base", Usage: "ldap user search base (e.g: CN=Users,DC=ad,DC=cb,DC=com)", }, } FlLdapGroupSearchBase = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "ldap-group-search-base", Usage: "ldap group search base (e.g: OU=scopes,DC=ad,DC=cb,DC=com)", }, } FlLdapAdminGroup = StringFlag{ RequiredFlag: OPTIONAL, StringFlag: cli.StringFlag{ Name: "ldap-admin-group", Usage: "ldap group of administrators", }, } FlKerberosPasswordOptional = StringFlag{ RequiredFlag: OPTIONAL, StringFlag: cli.StringFlag{ Name: "kerberos-password", Usage: "kerberos password", }, } FlKerberosPrincipalOptional = StringFlag{ RequiredFlag: OPTIONAL, StringFlag: cli.StringFlag{ Name: "kerberos-principal", Usage: "kerberos principal", }, } FlCredential = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "credential", Usage: "name of the credential", }, } FlRegion = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "region", Usage: "name of the region", }, } FlAvailabilityZoneOptional = StringFlag{ RequiredFlag: OPTIONAL, StringFlag: cli.StringFlag{ Name: "availability-zone", Usage: "name of the availability zone", }, } FlImageCatalog = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "imagecatalog", Usage: "name of the imagecatalog", }, } FlKey = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "key", Usage: "key of the tag", }, } FlValue = StringFlag{ RequiredFlag: REQUIRED, StringFlag: cli.StringFlag{ Name: "value", Usage: "value of the tag", }, } )
View Source
var ( Version string BuildTime string )
View Source
var AppHelpTemplate = `` /* 725-byte string literal not displayed */
View Source
var CommandHelpTemplate = `` /* 478-byte string literal not displayed */
View Source
var HiddenAppHelpTemplate = `` /* 632-byte string literal not displayed */
View Source
var LdapHeader = []string{"Name", "Server", "Domain", "BindDn", "DirectoryType",
"UserSearchBase", "UserNameAttribute", "UserObjectClass",
"GroupMemberAttribute", "GroupNameAttribute", "GroupObjectClass", "GroupSearchBase"}
View Source
var LoggedTransportConfig = httplogger.NewLoggedTransport(TransportConfig, newLogger())
View Source
var OPTIONAL = RequiredFlag{false}
View Source
var PREFIX_TRIM = []string{"http://", "https://"}
View Source
var REQUIRED = RequiredFlag{true}
View Source
var StackTemplateDescription = `` /* 720-byte string literal not displayed */
View Source
var SubCommandHelpTemplate = `` /* 592-byte string literal not displayed */
View Source
var TransportConfig = &http.Transport{ Proxy: http.ProxyFromEnvironment, TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, Dial: (&net.Dialer{ Timeout: 30 * time.Second, KeepAlive: 30 * time.Second, }).Dial, TLSHandshakeTimeout: 10 * time.Second, ExpectContinueTimeout: 1 * time.Second, }
This is nearly identical with http.DefaultTransport
Functions ¶
func AddAccountTag ¶
func ChangeAmbariPassword ¶
func CreateAwsCredential ¶
func CreateAzureCredential ¶
func CreateBlueprintFromFile ¶
func CreateBlueprintFromUrl ¶
func CreateGcpCredential ¶
func CreateLDAP ¶
func CreateRecipeFromFile ¶
func CreateRecipeFromUrl ¶
func CreateStack ¶
func DeleteAccountTag ¶
func DeleteBlueprint ¶
func DeleteCredential ¶
func DeleteImagecatalog ¶
func DeleteLdap ¶
func DeleteRecipe ¶
func DeleteStack ¶
func DescribeBlueprint ¶
func DescribeCredential ¶
func DescribeRecipe ¶
func DescribeStack ¶
func GetHomeDirectory ¶
func GetHomeDirectory() string
func ListAccountTags ¶
func ListAvailabilityZones ¶
func ListAwsImages ¶
func ListAwsVolumeTypes ¶
func ListAzureImages ¶
func ListAzureVolumeTypes ¶
func ListBlueprints ¶
func ListCredentials ¶
func ListGcpImages ¶
func ListGcpVolumeTypes ¶
func ListImagecatalogs ¶
func ListInstanceTypes ¶
func ListOpenstackImages ¶
func ListRecipes ¶
func ListRegions ¶
func ListStacks ¶
func ReinstallStack ¶
func RepairStack ¶
func ScaleStack ¶
func SetDefaultImagecatalog ¶
func ShowHiddenCommands ¶
func StartStack ¶
Types ¶
type BoolFlag ¶
type BoolFlag struct { cli.BoolFlag RequiredFlag }
type Cloudbreak ¶
type Cloudbreak struct {
Cloudbreak *apiclient.Cloudbreak
}
func NewCloudbreakHTTPClient ¶
func NewCloudbreakHTTPClient(address, username, password, authType string) *Cloudbreak
func NewCloudbreakHTTPClientFromContext ¶
func NewCloudbreakHTTPClientFromContext(c *cli.Context) *Cloudbreak
type Config ¶
type Config struct { Username string `json:"username" yaml:"username"` Password string `json:"password,omitempty" yaml:"password,omitempty"` Server string `json:"server" yaml:"server"` AuthType string `json:"authType,omitempty" yaml:"authType,omitempty"` Output string `json:"output,omitempty" yaml:"output,omitempty"` }
type ConfigList ¶
func (ConfigList) Json ¶
func (c ConfigList) Json() string
func (ConfigList) Yaml ¶
func (c ConfigList) Yaml() string
type ErrorMessage ¶
type ErrorMessage struct { Message string `json:"message"` ValidationError map[string]string `json:"validationErrors"` }
func (*ErrorMessage) String ¶
func (e *ErrorMessage) String() string
type FlagBuilder ¶
type FlagBuilder struct {
// contains filtered or unexported fields
}
func NewFlagBuilder ¶
func NewFlagBuilder() *FlagBuilder
func (*FlagBuilder) AddAuthenticationFlags ¶
func (fb *FlagBuilder) AddAuthenticationFlags() *FlagBuilder
func (*FlagBuilder) AddFlags ¶
func (fb *FlagBuilder) AddFlags(flags ...cli.Flag) *FlagBuilder
func (*FlagBuilder) AddOutputFlag ¶
func (fb *FlagBuilder) AddOutputFlag() *FlagBuilder
func (*FlagBuilder) AddResourceDefaultFlags ¶
func (fb *FlagBuilder) AddResourceDefaultFlags() *FlagBuilder
func (*FlagBuilder) AddResourceFlagsWithOptionalName ¶
func (fb *FlagBuilder) AddResourceFlagsWithOptionalName() *FlagBuilder
func (*FlagBuilder) Build ¶
func (fb *FlagBuilder) Build() []cli.Flag
type RequiredFlag ¶
type RequiredFlag struct {
Required bool
}
type StringFlag ¶
type StringFlag struct { cli.StringFlag RequiredFlag }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.