data

package
v0.14.8 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2026 License: Apache-2.0 Imports: 16 Imported by: 1 module, 0 packages

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

View Source
const (

	// Values for the offering select scope, as accepted by the
	// GetConsumptionOfferings 'select' query parameter.
	OfferingSelectAll     = "all"
	OfferingSelectPublic  = "public"
	OfferingSelectPrivate = "private"
)
View Source
const (
	VPC_ARCH_X86_64 vpcArch = "amd64"
	VPC_ARCH_IBMZ   vpcArch = "s390x"
)

Variables

This section is empty.

Functions

func GetCatalogOfferingVersionCRN added in v0.14.6

func GetCatalogOfferingVersionCRN(offeringName, offeringSelect string) (string, error)

GetCatalogOfferingVersionCRN returns the version CRN for the offering with the exact given name. offeringSelect controls which offerings are scanned: OfferingSelectPrivate restricts the scan to the account's private catalogs (much smaller than the default all, which includes the full public catalog), while OfferingSelectPublic or OfferingSelectAll may be used for offerings published to the public catalog.

func GetImage

func GetImage(mCtx *mc.Context, args *PiImageArgs) (*string, error)

func GetImageIDByCatalogOfferingCRN added in v0.14.8

func GetImageIDByCatalogOfferingCRN(catalogOfferingCRN string) (string, error)

GetImageIDByCatalogOfferingCRN returns the ID of the VPC image that belongs to the catalog offering version.

A bare metal server needs an image ID: BareMetalServerPrototype has no catalog offering field, unlike the virtual server instance prototype. The image is the one published for the offering, so the bare metal server runs the same SNC bundle as the instance.

func GetLatestCatalogOfferingVersionCRN added in v0.14.6

func GetLatestCatalogOfferingVersionCRN(arch, offeringSelect string) (string, string, error)

GetLatestCatalogOfferingVersionCRN returns the latest version (by semver) and its CRN among the openshift-local offerings for the given arch. offeringSelect has the same meaning as in GetCatalogOfferingVersionCRN.

func GetVPCImage

func GetVPCImage(args *VPCImageArgs) (*string, error)

func ProfileSupportsSpot added in v0.14.5

func ProfileSupportsSpot(name string) (bool, error)

ProfileSupportsSpot returns true when the named profile permits spot (preemptible) instances. Profiles with a fixed availability class of "standard" only cannot be used with spot.

Types

type BareMetalSelector added in v0.14.8

type BareMetalSelector struct{}

BareMetalSelector selects IBM Cloud VPC bare metal server profiles.

IBM Cloud provides nested virtualization (KVM) to the guest on bare metal servers only. A virtual server instance cannot expose /dev/kvm, so OpenShift Virtualization does not work on it. The selector reads the same ComputeRequestArgs fields as the instance selector and returns a metal profile.

func NewBareMetalSelector added in v0.14.8

func NewBareMetalSelector() *BareMetalSelector

func (*BareMetalSelector) CheckCapacity added in v0.14.8

func (c *BareMetalSelector) CheckCapacity(profile, zone string) error

CheckCapacity returns an error when IBM Cloud has no free bare metal server of the profile in the zone.

IBM Cloud allocates bare metal servers from a limited pool in each zone, so the check turns a late create failure into a clear error before the stack starts.

func (*BareMetalSelector) Select added in v0.14.8

Select returns the smallest IBM Cloud VPC bare metal profile that satisfies the requested core count, memory size, architecture and optional family allowlist. The profile names come from ListBareMetalServerProfiles.

type ComputeSelector added in v0.14.5

type ComputeSelector struct{}

func NewComputeSelector added in v0.14.5

func NewComputeSelector() *ComputeSelector

func (*ComputeSelector) Select added in v0.14.5

Select returns the smallest IBM Cloud VPC instance profile name satisfying the requested CPUs, memory, and optional family restrictions. The profile must support the amd64 architecture.

type PiImageArgs

type PiImageArgs struct {
	CloudInstanceId string
	Name            string
}

type SubnetInfo added in v0.14.8

type SubnetInfo struct {
	ID       string
	VPCID    string
	Zone     string
	IPv4CIDR string
	Name     string
}

SubnetInfo is the subset of an IBM Cloud VPC subnet the actions need before Pulumi starts.

func GetSubnet added in v0.14.8

func GetSubnet(subnetID string) (*SubnetInfo, error)

GetSubnet fetches an existing VPC subnet by ID through the IBM Cloud VPC API. It is used before Pulumi starts — e.g. to resolve the zone of a user-provided subnet for a capacity check. The existence of the subnet is validated again, inside the stack, by the network module.

type VPCImageArgs

type VPCImageArgs struct {
	Name string
	Arch vpcArch
}

Jump to

Keyboard shortcuts

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