Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSupportedCloudProviderTypes ¶
func GetSupportedCloudProviderTypes() []runtimev1alpha1.CloudProvider
Types ¶
type AccountMgmtInterface ¶
type AccountMgmtInterface interface { // AddProviderAccount adds and initializes given account of a cloud provider. AddProviderAccount(client client.Client, account *crdv1alpha1.CloudProviderAccount) error // RemoveProviderAccount removes and cleans up any resources of given account of a cloud provider. RemoveProviderAccount(namespacedName *types.NamespacedName) // AddAccountResourceSelector adds account specific resource selector. AddAccountResourceSelector(accNamespacedName *types.NamespacedName, selector *crdv1alpha1.CloudEntitySelector) error // RemoveAccountResourcesSelector removes account specific resource selector. RemoveAccountResourcesSelector(accNamespacedName, selectorNamespacedName *types.NamespacedName) // GetAccountStatus gets accounts status. GetAccountStatus(accNamespacedName *types.NamespacedName) (*crdv1alpha1.CloudProviderAccountStatus, error) // DoInventoryPoll calls cloud API to get cloud resources. DoInventoryPoll(accountNamespacedName *types.NamespacedName) error // ResetInventoryCache resets cloud snapshot and poll stats to nil. ResetInventoryCache(accountNamespacedName *types.NamespacedName) error }
AccountMgmtInterface is an abstract providing set of methods to manage cloud account details to be implemented by cloud providers.
type CloudInterface ¶
type CloudInterface interface { // ProviderType returns the cloud provider type (aws, azure, gce etc). ProviderType() (providerType runtimev1alpha1.CloudProvider) AccountMgmtInterface ComputeInterface SecurityInterface }
CloudInterface is an abstract providing set of methods to be implemented by cloud providers.
func GetCloudInterface ¶
func GetCloudInterface(providerType runtimev1alpha1.CloudProvider) (CloudInterface, error)
GetCloudInterface returns an instance of the crd.v1alpha1 cloud Provider type, or nil if the type is unknown. The error return is only used if the named provider was known but failed to initialize.
type ComputeInterface ¶
type ComputeInterface interface { // GetCloudInventory gets VPC and VM inventory from plugin snapshot for a given cloud provider account. GetCloudInventory(accountNamespacedName *types.NamespacedName) (*nephetypes.CloudInventory, error) }
ComputeInterface is an abstract providing set of methods to get inventory details to be implemented by cloud providers.
type SecurityInterface ¶
type SecurityInterface interface { // CreateSecurityGroup creates cloud security group corresponding to provided security group, if it does not already exist. // If it exists, returns the existing cloud SG ID. CreateSecurityGroup(securityGroupIdentifier *cloudresource.CloudResource, membershipOnly bool) (*string, error) // UpdateSecurityGroupRules updates cloud security group corresponding to provided appliedTo group with provided rules. // addRules and rmRules are the changed rules, allRules are rules from all nps of the security group. UpdateSecurityGroupRules(appliedToGroupIdentifier *cloudresource.CloudResource, addRules, rmRules []*cloudresource.CloudRule) error // UpdateSecurityGroupMembers updates membership of cloud security group corresponding to provided security group. Only // provided computeResources will remain attached to cloud security group. UpdateSecurityGroupMembers will also make sure that // after membership update, if compute resource is no longer attached to any nephe created cloud security group, then // compute resource will get moved to cloud default security group. UpdateSecurityGroupMembers(securityGroupIdentifier *cloudresource.CloudResource, computeResourceIdentifier []*cloudresource.CloudResource, membershipOnly bool) error // DeleteSecurityGroup will delete the cloud security group corresponding to provided security group. DeleteSecurityGroup expects that // UpdateSecurityGroupMembers and UpdateSecurityGroupRules is called prior to calling delete. DeleteSecurityGroup as part of delete, // do the best effort to find resources using this security group and detach the cloud security group from those resources. Also, if the // compute resource is attached to only this security group, it will be moved to cloud default security group. DeleteSecurityGroup(securityGroupIdentifier *cloudresource.CloudResource, membershipOnly bool) error // GetEnforcedSecurity returns the cloud view of enforced security. GetEnforcedSecurity() []cloudresource.SynchronizationContent }
Click to show internal directories.
Click to hide internal directories.