ibm

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2018 License: MPL-2.0 Imports: 65 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IBMComputeTimeFormat                                 = string("2006-01-02T15:04:05-07:00")
	IBMCOMPUTE_SCALE_POLICY_TRIGGER_TYPE_ID_RESOURCE_USE = 1
	IBMCOMPUTE_SCALE_POLICY_TRIGGER_TYPE_ID_REPEATING    = 2
	IBMCOMPUTE_SCALE_POLICY_TRIGGER_TYPE_ID_ONE_TIME     = 3
)
View Source
const (
	LB_LARGE_150000_CONNECTIONS = 150000
	LB_SMALL_15000_CONNECTIONS  = 15000

	LbLocalPackageType = "ADDITIONAL_SERVICES_LOAD_BALANCER"
)
View Source
const (
	PACKAGE_ID_APPLICATION_DELIVERY_CONTROLLER = 192
	DELIMITER                                  = "_"
)
View Source
const (
	AdditionalServicesGlobalIpAddressesPackageType = "ADDITIONAL_SERVICES_GLOBAL_IP_ADDRESSES"

	GlobalIpMask = "id,ipAddress[ipAddress,id,note],destinationIpAddress[ipAddress]"
)
View Source
const (
	AdditionalServicesPackageType            = "ADDITIONAL_SERVICES"
	AdditionalServicesNetworkVlanPackageType = "ADDITIONAL_SERVICES_NETWORK_VLAN"

	VlanMask = "id,name,primaryRouter[datacenter[name]],primaryRouter[hostname],vlanNumber," +
		"billingItem[recurringFee],guestNetworkComponentCount,subnets[networkIdentifier,cidr,subnetType],tagReferences[id,tag[name]]"
)
View Source
const (
	BareMetalMask = "globalIdentifier,hostname,domain,bandwidthAllocation,provisionDate,id," +
		"primaryIpAddress,primaryBackendIpAddress,privateNetworkOnlyFlag," +
		"notes,userData[value],tagReferences[id,tag[name]]," +
		"allowedNetworkStorage[id,nasType]," +
		"hourlyBillingFlag," +
		"datacenter[id,name,longName]," +
		"primaryNetworkComponent[primarySubnet[networkVlan[id,primaryRouter,vlanNumber],id],maxSpeed," +
		"primaryIpAddressRecord[id]," +
		"primaryVersion6IpAddressRecord[subnet,id]]," +
		"primaryBackendNetworkComponent[primarySubnet[networkVlan[id,primaryRouter,vlanNumber],id]," +
		"primaryIpAddressRecord[id]," +
		"maxSpeed,redundancyEnabledFlag]," +
		"memoryCapacity,powerSupplyCount," +
		"operatingSystem[softwareLicense[softwareDescription[referenceCode]]]"
)
View Source
const (
	FwHardwareDedicatedPackageType = "ADDITIONAL_SERVICES_FIREWALL"
)
View Source
const GATEWAY_APPLIANCE_CLUSTER = "NETWORK_GATEWAY_APPLIANCE_CLUSTER"
View Source
const HEALTH_CHECK_TYPE_HTTP_CUSTOM = "HTTP-CUSTOM"
View Source
const NOT_FOUND = "SoftLayer_Exception_Network_LBaaS_ObjectNotFound"
View Source
const PUBLIC_SUBNET_TYPE = "public"
View Source
const RetryAPIDelay = 5 * time.Second

RetryDelay

View Source
const SoftlayerRestEndpoint = "https://api.softlayer.com/rest/v3"

SoftlayerRestEndpoint rest endpoint of SoftLayer

View Source
const (
	SubnetMask = "id,addressSpace,subnetType,version,ipAddressCount," +
		"networkIdentifier,cidr,note,endPointIpAddress[ipAddress],networkVlan[id],totalIpAddresses"
)
View Source
const (
	VPX_VERSION_10_1 = "10.1"
)

Variables

View Source
var BluemixRegion string

BluemixRegion ...

View Source
var IBMComputeAutoScaleGroupObjectMask = []string{
	"id",
	"name",
	"minimumMemberCount",
	"maximumMemberCount",
	"cooldown",
	"status[keyName]",
	"regionalGroup[id,name]",
	"terminationPolicy[keyName]",
	"virtualGuestMemberTemplate[blockDeviceTemplateGroup,primaryNetworkComponent[networkVlan[id]],primaryBackendNetworkComponent[networkVlan[id]]]",
	"loadBalancers[id,port,virtualServerId,healthCheck[id]]",
	"networkVlans[id,networkVlanId,networkVlan[vlanNumber,primaryRouter[hostname]]]",
	"loadBalancers[healthCheck[healthCheckTypeId,type[keyname],attributes[value,type[id,keyname]]]]",
}
View Source
var IBMComputeAutoScalePolicyObjectMask = []string{
	"cooldown",
	"id",
	"name",
	"scaleActions",
	"scaleGroupId",
	"oneTimeTriggers",
	"repeatingTriggers",
	"resourceUseTriggers.watches",
	"triggers",
}

Functions

func CloudName added in v0.10.0

func CloudName(region models.Region) string

func CloudType added in v0.10.0

func CloudType(region models.Region) string

func FunctionClient added in v0.7.0

func FunctionClient(c *bluemix.Config, namespace string) (*whisk.Client, error)

func GenerateBoundToCRN added in v0.10.0

func GenerateBoundToCRN(region models.Region, accountID string) crn.CRN

func HashInt

func HashInt(v interface{}) int

HashInt ...

func NewQualifiedNameError added in v0.7.0

func NewQualifiedNameError(entityName string, err error) error

NewQualifiedNameError(entityName, err) returns specific whisk error

for invalid qualified names.

func Provider

func Provider() terraform.ResourceProvider

Provider returns a terraform.ResourceProvider.

func WaitForClusterAvailable

func WaitForClusterAvailable(d *schema.ResourceData, meta interface{}, target v1.ClusterTargetHeader) (interface{}, error)

WaitForClusterAvailable Waits for cluster creation

func WaitForClusterVersionUpdate added in v0.8.0

func WaitForClusterVersionUpdate(d *schema.ResourceData, meta interface{}, target v1.ClusterTargetHeader) (interface{}, error)

WaitForClusterVersionUpdate Waits for cluster creation

func WaitForNoActiveTransactions

func WaitForNoActiveTransactions(d *schema.ResourceData, meta interface{}) (interface{}, error)

WaitForNoActiveTransactions Wait for no active transactions

func WaitForOrderCompletion

func WaitForOrderCompletion(
	receipt *datatypes.Container_Product_Order_Receipt, meta interface{}) (datatypes.Billing_Order_Item, error)

func WaitForStorageAvailable

func WaitForStorageAvailable(d *schema.ResourceData, meta interface{}) (interface{}, error)

Waits for storage provisioning

func WaitForSubnetAvailable

func WaitForSubnetAvailable(d *schema.ResourceData, meta interface{}, target v1.ClusterTargetHeader) (interface{}, error)

func WaitForUpgradeTransactionsToAppear

func WaitForUpgradeTransactionsToAppear(d *schema.ResourceData, meta interface{}) (interface{}, error)

WaitForUpgradeTransactionsToAppear Wait for upgrade transactions

func WaitForVSAvailable added in v0.10.0

func WaitForVSAvailable(d *schema.ResourceData, meta interface{}, timeout time.Duration) (interface{}, error)

WaitForVirtualGuestAvailable Waits for virtual guest creation

func WaitForVirtualGuestAvailable

func WaitForVirtualGuestAvailable(d *schema.ResourceData, meta interface{}) (interface{}, error)

WaitForVirtualGuestAvailable Waits for virtual guest creation

func WaitForWorkerAvailable

func WaitForWorkerAvailable(d *schema.ResourceData, meta interface{}, target v1.ClusterTargetHeader) (interface{}, error)

WaitForWorkerAvailable Waits for worker creation

func WaitForWorkerDelete added in v0.11.0

func WaitForWorkerDelete(clusterNameOrID, workerPoolNameOrID string, meta interface{}, timeout time.Duration) (interface{}, error)

func WaitForWorkerNormal added in v0.11.0

func WaitForWorkerNormal(clusterNameOrID, workerPoolNameOrID string, meta interface{}, timeout time.Duration) (interface{}, error)

func WaitForWorkerZoneDeleted added in v0.11.0

func WaitForWorkerZoneDeleted(clusterNameOrID, workerPoolNameOrID, zone string, meta interface{}, timeout time.Duration) (interface{}, error)

func WaitForWorkerZoneNormal added in v0.11.0

func WaitForWorkerZoneNormal(clusterNameOrID, workerPoolNameOrID, zone string, meta interface{}, timeout time.Duration) (interface{}, error)

Types

type AuthError added in v0.7.0

type AuthError struct {
	Error string
}

AuthError ...

type AuthPayload added in v0.7.0

type AuthPayload struct {
	AccessToken  string `json:"accessToken"`
	RefreshToken string `json:"refreshToken"`
}

AuthPayload ...

type AuthResponse added in v0.7.0

type AuthResponse struct {
	Namespaces []struct {
		Name string
		Key  string
		UUID string
	}
}

AuthResponse ...

type ClientSession

type ClientSession interface {
	SoftLayerSession() *slsession.Session
	BluemixSession() (*bxsession.Session, error)
	ContainerAPI() (containerv1.ContainerServiceAPI, error)
	IAMAPI() (iamv1.IAMServiceAPI, error)
	IAMPAPAPI() (iampapv1.IAMPAPAPI, error)
	MccpAPI() (mccpv2.MccpServiceAPI, error)
	BluemixAcccountAPI() (accountv2.AccountServiceAPI, error)
	BluemixAcccountv1API() (accountv1.AccountServiceAPI, error)
	BluemixUserDetails() (*UserConfig, error)
	FunctionClient() (*whisk.Client, error)
	ResourceCatalogAPI() (catalog.ResourceCatalogAPI, error)
	ResourceManagementAPI() (management.ResourceManagementAPI, error)
	ResourceControllerAPI() (controller.ResourceControllerAPI, error)
}

ClientSession ...

type Config

type Config struct {
	//BluemixAPIKey is the Bluemix api key
	BluemixAPIKey string
	//Bluemix region
	Region string
	//Bluemix API timeout
	BluemixTimeout time.Duration

	//Softlayer end point url
	SoftLayerEndpointURL string

	//Softlayer API timeout
	SoftLayerTimeout time.Duration

	// Softlayer User Name
	SoftLayerUserName string

	// Softlayer API Key
	SoftLayerAPIKey string

	//Retry Count for API calls
	//Unexposed in the schema at this point as they are used only during session creation for a few calls
	//When sdk implements it we an expose them for expected behaviour
	//https://github.com/softlayer/softlayer-go/issues/41
	RetryCount int
	//Constant Retry Delay for API calls
	RetryDelay time.Duration

	// FunctionNameSpace ...
	FunctionNameSpace string
}

Config stores user provider input

func (*Config) ClientSession

func (c *Config) ClientSession() (interface{}, error)

ClientSession configures and returns a fully initialized ClientSession

type QualifiedName added in v0.7.0

type QualifiedName struct {
	EntityName string // pkg+entity
	// contains filtered or unexported fields
}

func NewQualifiedName added in v0.7.0

func NewQualifiedName(name string) (*QualifiedName, error)

NewQualifiedName(name) initializes and constructs a (possibly fully qualified)

QualifiedName struct.

NOTE: If the given qualified name is None, then this is a default qualified
    name and it is resolved from properties.
NOTE: If the namespace is missing from the qualified name, the namespace
    is also resolved from the property file.

Examples:

foo => qualifiedName {namespace: "_", entityName: foo}
pkg/foo => qualifiedName {namespace: "_", entityName: pkg/foo}
/ns/foo => qualifiedName {namespace: ns, entityName: foo}
/ns/pkg/foo => qualifiedName {namespace: ns, entityName: pkg/foo}

func (*QualifiedName) GetEntity added in v0.7.0

func (qualifiedName *QualifiedName) GetEntity() string

GetEntity() returns the name of entity in qualifiedName without a leading '/'

func (*QualifiedName) GetEntityName added in v0.7.0

func (qualifiedName *QualifiedName) GetEntityName() string

GetEntityName() returns the entity name ([package/]entity) of qualifiedName

without a leading '/'

func (*QualifiedName) GetFullQualifiedName added in v0.7.0

func (qualifiedName *QualifiedName) GetFullQualifiedName() string

GetFullQualifiedName() returns a full qualified name in proper string format

from qualifiedName with proper syntax.

Example: /namespace/[package/]entity

func (*QualifiedName) GetNamespace added in v0.7.0

func (qualifiedName *QualifiedName) GetNamespace() string

GetNamespace() returns the name of the namespace in qualifiedName without

a leading '/'

func (*QualifiedName) GetPackageName added in v0.7.0

func (qualifiedName *QualifiedName) GetPackageName() string

GetPackageName() returns the package name from qualifiedName without a

leading '/'

type Session

type Session struct {
	// SoftLayerSesssion is the the SoftLayer session used to connect to the SoftLayer API
	SoftLayerSession *slsession.Session

	// BluemixSession is the the Bluemix session used to connect to the Bluemix API
	BluemixSession *bxsession.Session
}

Session stores the information required for communication with the SoftLayer and Bluemix API

type UserConfig added in v0.6.0

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

UserConfig ...

Source Files

Jump to

Keyboard shortcuts

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