Documentation ¶
Index ¶
- Constants
- func CompressAndEncodeString(str string) (string, error)
- func NetworkExists(net capcv1.Network) bool
- type Account
- type AffinityGroup
- type AffinityGroupIface
- type Client
- type Config
- type Domain
- type IsoNetworkIface
- type NetworkIface
- type ResourceType
- type TagIface
- type User
- type UserCredIFace
- type VMIface
- type ZoneIFace
Constants ¶
View Source
const ( AntiAffinityGroupType = "host anti-affinity" AffinityGroupType = "host affinity" )
View Source
const ( NetOffering = "DefaultIsolatedNetworkOfferingWithSourceNatService" K8sDefaultAPIPort = 6443 NetworkTypeIsolated = "Isolated" NetworkProtocolTCP = "tcp" )
View Source
const ( ClusterTagNamePrefix = "CAPC_cluster_" CreatedByCAPCTagName = "created_by_CAPC" ResourceTypeNetwork ResourceType = "Network" ResourceTypeIPAddress ResourceType = "PublicIpAddress" )
View Source
const GLOBAL = "Global"
Variables ¶
This section is empty.
Functions ¶
func CompressAndEncodeString ¶
func NetworkExists ¶
NetworkExists checks that the network already exists based on the presence of all fields. Assumes that the a fetch has been done on network statuses prior.
Types ¶
type AffinityGroup ¶
type AffinityGroupIface ¶
type AffinityGroupIface interface { FetchAffinityGroup(*AffinityGroup) error GetOrCreateAffinityGroup(*AffinityGroup) error DeleteAffinityGroup(*AffinityGroup) error AssociateAffinityGroup(*infrav1.CloudStackMachine, AffinityGroup) error DisassociateAffinityGroup(*infrav1.CloudStackMachine, AffinityGroup) error }
type Client ¶
type Client interface { VMIface NetworkIface AffinityGroupIface TagIface ZoneIFace IsoNetworkIface UserCredIFace NewClientFromSpec(Config) (Client, error) }
func NewClientFromCSAPIClient ¶
func NewClientFromCSAPIClient(cs *cloudstack.CloudStackClient) Client
type Config ¶
type Config struct { APIURL string `ini:"api-url"` APIKey string `ini:"api-key"` SecretKey string `ini:"secret-key"` VerifySSL bool `ini:"verify-ssl"` }
cloud-config ini structure.
type IsoNetworkIface ¶
type IsoNetworkIface interface { GetOrCreateIsolatedNetwork(*capcv1.CloudStackZone, *capcv1.CloudStackIsolatedNetwork, *capcv1.CloudStackCluster) error AssociatePublicIPAddress(*capcv1.CloudStackZone, *capcv1.CloudStackIsolatedNetwork, *capcv1.CloudStackCluster) error GetOrCreateLoadBalancerRule(*capcv1.CloudStackZone, *capcv1.CloudStackIsolatedNetwork, *capcv1.CloudStackCluster) error OpenFirewallRules(*capcv1.CloudStackIsolatedNetwork) error GetPublicIP(*capcv1.CloudStackZone, *capcv1.CloudStackIsolatedNetwork, *capcv1.CloudStackCluster) (*cloudstack.PublicIpAddress, error) ResolveLoadBalancerRuleDetails(*capcv1.CloudStackZone, *capcv1.CloudStackIsolatedNetwork, *capcv1.CloudStackCluster) error AssignVMToLoadBalancerRule(isoNet *capcv1.CloudStackIsolatedNetwork, instanceID string) error DeleteNetwork(capcv1.Network) error DisposeIsoNetResources(*capcv1.CloudStackZone, *capcv1.CloudStackIsolatedNetwork, *capcv1.CloudStackCluster) error }
type NetworkIface ¶
type ResourceType ¶
type ResourceType string
type TagIface ¶
type TagIface interface { AddClusterTag(ResourceType, string, *infrav1.CloudStackCluster) error DeleteClusterTag(ResourceType, string, *infrav1.CloudStackCluster) error AddCreatedByCAPCTag(ResourceType, string) error DeleteCreatedByCAPCTag(ResourceType, string) error DoClusterTagsAllowDisposal(ResourceType, string) (bool, error) AddTags(ResourceType, string, map[string]string) error GetTags(ResourceType, string) (map[string]string, error) DeleteTags(ResourceType, string, map[string]string) error }
type UserCredIFace ¶
type VMIface ¶
type VMIface interface { GetOrCreateVMInstance(*infrav1.CloudStackMachine, *capiv1.Machine, *infrav1.CloudStackCluster, *infrav1.CloudStackZone, *infrav1.CloudStackAffinityGroup, string) error ResolveVMInstanceDetails(*infrav1.CloudStackMachine) error DestroyVMInstance(*infrav1.CloudStackMachine) error }
type ZoneIFace ¶
type ZoneIFace interface { ResolveZone(*infrav1.CloudStackZone) error ResolveNetworkForZone(*infrav1.CloudStackZone) error }
Click to show internal directories.
Click to hide internal directories.