create

package
v0.54.0-alpha2 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FlagProvider is a flag representing an provider ID
	FlagProvider = "provider"
	// FlagRegion is a flag representing an region ID
	FlagRegion = "region"
	// FlagSize is a flag representing an size ID
	FlagSize = "size"
	// FlagMarketPlaceAcctID is a flag representing a marketplace cloud account ID used to purchase the instance
	FlagMarketPlaceAcctID = "marketplace-account-id"
	// FlagMarketPlace is a flag representing marketplace where the instance is purchased on
	FlagMarketPlace = "marketplace"
	// FlagMarketPlace is a flag representing billing model of the instance
	FlagBillingModel = "billing-model"
)

Variables

This section is empty.

Functions

func CreateNullableString

func CreateNullableString(str *string) kafkamgmtclient.NullableString

func FetchInstanceTypes added in v0.51.1

func FetchInstanceTypes(f *factory.Factory, providerID string, regionId string) ([]kafkamgmtclient.SupportedKafkaInstanceType, error)

func FetchSupportedBillingModels added in v0.46.0

func FetchSupportedBillingModels(userQuotas *accountmgmtutil.OrgQuotas, provider string) []string

func FetchValidKafkaSizes added in v0.43.0

func FetchValidKafkaSizes(f *factory.Factory,
	providerID string, regionId string, amsType accountmgmtutil.QuotaSpec) ([]kafkamgmtclient.SupportedKafkaSize, error)

FetchValidKafkaSizes returns list of the valid instance sizes for the specified region and ams instance types

func FetchValidKafkaSizesLabels added in v0.43.0

func FetchValidKafkaSizesLabels(f *factory.Factory,
	providerID string, regionId string, amsType accountmgmtutil.QuotaSpec) ([]string, error)

func FetchValidMarketplaceAccounts added in v0.46.0

func FetchValidMarketplaceAccounts(amsTypes []accountmgmtutil.QuotaSpec, marketplace string) []string

func FetchValidMarketplaces added in v0.46.0

func FetchValidMarketplaces(amsTypes []accountmgmtutil.QuotaSpec, provider string) []string

func GetBillingModelCompletionValues added in v0.46.0

func GetBillingModelCompletionValues(f *factory.Factory) (availableBillingModels []string, directive cobra.ShellCompDirective)

func GetCloudProviderCompletionValues added in v0.42.0

func GetCloudProviderCompletionValues(f *factory.Factory) (validProviders []string, directive cobra.ShellCompDirective)

GetCloudProviderCompletionValues returns the list of supported cloud providers for creating a Kafka instance This is used in the cmd.RegisterFlagCompletionFunc for dynamic completion of --provider

func GetCloudProviderRegionCompletionValues added in v0.42.0

func GetCloudProviderRegionCompletionValues(f *factory.Factory, providerID string) (validRegions []string, directive cobra.ShellCompDirective)

GetCloudProviderRegionCompletionValues returns the list of region IDs for a particular cloud provider

func GetEnabledCloudProviderNames added in v0.42.0

func GetEnabledCloudProviderNames(f *factory.Factory) ([]string, error)

GetEnabledCloudProviderNames returns a list of cloud provider names from the enabled cloud providers

func GetEnabledCloudRegionIDs added in v0.42.0

func GetEnabledCloudRegionIDs(f *factory.Factory, providerID string, userAllowedAMSInstanceType *accountmgmtutil.QuotaSpec) ([]string, error)

GetEnabledCloudRegionIDs extracts and returns a slice of the unique IDs of all enabled regions

func GetKafkaSizeCompletionValues added in v0.42.0

func GetKafkaSizeCompletionValues(f *factory.Factory, providerID string, regionId string) (validSizes []string, directive cobra.ShellCompDirective)

GetKafkaSizeCompletionValues returns a list of valid kafka sizes for the specified region and ams instance types

func GetMarketplaceAccountCompletionValues added in v0.46.0

func GetMarketplaceAccountCompletionValues(f *factory.Factory, marketplace string) (validMarketplaceAcctIDs []string, directive cobra.ShellCompDirective)

func GetMarketplaceCompletionValues added in v0.44.0

func GetMarketplaceCompletionValues(f *factory.Factory) (validSizes []string, directive cobra.ShellCompDirective)

func GetValidKafkaSizesLabels added in v0.43.0

func GetValidKafkaSizesLabels(sizes []kafkamgmtclient.SupportedKafkaSize) []string

func IsRegionAllowed added in v0.42.0

func IsRegionAllowed(region *kafkamgmtclient.CloudRegion, userInstanceType *accountmgmtutil.QuotaSpec) bool

func NewCreateCommand

func NewCreateCommand(f *factory.Factory) *cobra.Command

NewCreateCommand creates a new command for creating kafkas. nolint: funlen

func ValidateBillingModel added in v0.46.0

func ValidateBillingModel(billingModel string) error

ValidateBillingModel validates if user provided a supported billing model

Types

type CloudProviderId added in v0.42.0

type CloudProviderId = string

Types we use on backend to map AMS Quotas

const (
	// Matches QuotaTrialType = trial
	DeveloperType CloudProviderId = "developer"

	// Matches QuotaStandardType = standard
	StandardType CloudProviderId = "standard"

	// Deprecated by DeveloperType
	TrialType CloudProviderId = "eval"
)

Additional types that are used in backend to match AMS Quota instance types

type ValidatorInput added in v0.42.0

type ValidatorInput struct {
	// contains filtered or unexported fields
}

func (*ValidatorInput) ValidateProviderAndRegion added in v0.42.0

func (input *ValidatorInput) ValidateProviderAndRegion() error

func (*ValidatorInput) ValidateSize added in v0.42.0

func (input *ValidatorInput) ValidateSize() error

Jump to

Keyboard shortcuts

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