resources

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: Apache-2.0 Imports: 31 Imported by: 1

Documentation

Index

Constants

View Source
const (
	OwnerClusterKey      = "ownerCluster"
	ScaleSetOwnerKey     = "aks-managed-poolName"
	ClusterNodeSSHKeyKey = "sshkey"
	ClusterAdminKey      = "clusterAdmin"
)
View Source
const (
	CBVirtualNetworkName = "CB-VNet"
	CBVnetDefaultCidr    = "130.0.0.0/16"
	CBVMUser             = "cb-user"
)
View Source
const (
	AzureNetworkCategory          AzureResourceCategory = "Microsoft.Network"
	AzureComputeCategory          AzureResourceCategory = "Microsoft.Compute"
	AzureContainerServiceCategory AzureResourceCategory = "Microsoft.ContainerService"

	AzureVirtualNetworks          AzureResourceKind = "virtualNetworks"
	AzureSubnet                   AzureResourceKind = "subnets"
	AzureSSHPublicKeys            AzureResourceKind = "sshPublicKeys"
	AzureSecurityGroups           AzureResourceKind = "networkSecurityGroups"
	AzurePublicIPAddresses        AzureResourceKind = "publicIPAddresses"
	AzureFrontendIPConfigurations AzureResourceKind = "frontendIPConfigurations"
	AzureLoadBalancers            AzureResourceKind = "loadBalancers"
	AzureNetworkInterfaces        AzureResourceKind = "networkInterfaces"
	AzureContainerService         AzureResourceKind = "managedClusters"
)
View Source
const (
	FrontEndIPConfigPrefix                                       = "frontEndIp"
	LoadBalancingRulesPrefix                                     = "lbrule"
	ProbeNamePrefix                                              = "probe"
	BackEndAddressPoolPrefix                                     = "backend"
	BackendAddressesIPAddressRef       BackendAddressesIPRefType = "IPADDRESS"
	BackendAddressesIPConfigurationRef BackendAddressesIPRefType = "IPCONFIGURATION"
	NLBPublicType                      NLBType                   = "PUBLIC"
	NLBInternalType                    NLBType                   = "INTERNAL"
	NLBGlobalType                      NLBScope                  = "GLOBAL"
	NLBRegionType                      NLBScope                  = "REGION"
)
View Source
const (
	ICMP          = "icmp"
	SecurityGroup = "SECURITYGROUP"
)
View Source
const (
	ProvisioningStateCode string = "ProvisioningState/succeeded"
	VM                           = "VM"
	PremiumSSD                   = "PremiumSSD"
	StandardSSD                  = "StandardSSD"
	StandardHDD                  = "StandardHDD"
	WindowBaseUser               = "Administrator"
	WindowBaseGroup              = "Administrators"
	WindowBuitinUser             = CBVMUser
)
View Source
const AzurePriceApiEndpoint = "https://prices.azure.com/api/retail/prices"
View Source
const (
	Image = "IMAGE"
)
View Source
const (
	KeyPair = "KEYPAIR"
)
View Source
const (
	VMSpec = "VMSPEC"
)
View Source
const (
	VPC = "VPC"
)

Variables

This section is empty.

Functions

func Attach added in v0.6.12

func Attach(diskIID irs.IID, ownerVM irs.IID, credentialInfo idrv.CredentialInfo, region idrv.RegionInfo, ctx context.Context, vmClient *armcompute.VirtualMachinesClient, diskClient *armcompute.DisksClient) (armcompute.Disk, error)

func AttachList added in v0.6.12

func AttachList(diskIIDList []irs.IID, ownerVM irs.IID, credentialInfo idrv.CredentialInfo, region idrv.RegionInfo, ctx context.Context, vmClient *armcompute.VirtualMachinesClient, diskClient *armcompute.DisksClient) (armcompute.VirtualMachine, error)

func CheckAttachStatus added in v0.6.12

func CheckAttachStatus(disk *armcompute.Disk) error

func CheckExistDisk added in v0.6.7

func CheckExistDisk(diskIID irs.IID, resourceGroup string, client *armcompute.DisksClient, ctx context.Context) (bool, error)

func CheckExistKey added in v0.4.15

func CheckExistKey(keypairIId irs.IID, resourceGroup string, client *armcompute.SSHPublicKeysClient, ctx context.Context) (bool, error)

func CheckExistMyImage added in v0.6.9

func CheckExistMyImage(myImageIID irs.IID, client *armcompute.ImagesClient, ctx context.Context) (bool, error)

func CheckExistPublicIp added in v0.5.3

func CheckExistPublicIp(publicIPId string, resourceGroup string, client *armnetwork.PublicIPAddressesClient, ctx context.Context) (bool, error)

func CheckExistVM added in v0.5.3

func CheckExistVM(vmIID irs.IID, resourceGroup string, client *armcompute.VirtualMachinesClient, ctx context.Context) (bool, error)

func CheckExistVMDisk added in v0.5.3

func CheckExistVMDisk(osDiskName string, client *armcompute.DisksClient, ctx context.Context) (bool, error)

func CheckExistVNic added in v0.5.3

func CheckExistVNic(networkInterfaceName string, resourceGroup string, client *armnetwork.InterfacesClient, ctx context.Context) (bool, error)

func CheckIIDValidation added in v0.4.15

func CheckIIDValidation(IId irs.IID) bool

func CheckVMReqInfoOSType added in v0.6.15

func CheckVMReqInfoOSType(vmReqInfo irs.VMReqInfo, imageClient *armcompute.ImagesClient, credentialInfo idrv.CredentialInfo, region idrv.RegionInfo, ctx context.Context) (irs.Platform, error)

func ConvertDiskIID added in v0.6.7

func ConvertDiskIID(diskIID irs.IID, credentialInfo idrv.CredentialInfo, regionInfo idrv.RegionInfo) (irs.IID, error)

func ConvertMyImageIID added in v0.6.9

func ConvertMyImageIID(myImageIID irs.IID, credentialInfo idrv.CredentialInfo, regionInfo idrv.RegionInfo) (irs.IID, error)

func ConvertVMIID added in v0.5.3

func ConvertVMIID(vmIID irs.IID, credentialInfo idrv.CredentialInfo, regionInfo idrv.RegionInfo) (irs.IID, error)

func CreatePublicIP added in v0.1.3

func CreatePublicIP(vmHandler *AzureVMHandler, vmReqInfo irs.VMReqInfo) (irs.IID, error)

VM 생성 시 Public IP 자동 생성 (nested flow 적용)

func CreateVNic

func CreateVNic(vmHandler *AzureVMHandler, vmReqInfo irs.VMReqInfo, publicIPIId irs.IID) (irs.IID, error)

VM 생성 시 VNic 자동 생성 (nested flow 적용)

func FindIdByName added in v0.9.2

func FindIdByName(credentailInfo idrv.CredentialInfo, resIID irs.IID) (string, error)

find SystemId by NameId

func GetCallLogScheme added in v0.2.1

func GetCallLogScheme(region idrv.RegionInfo, resourceType call.RES_TYPE, resourceName string, apiName string) call.CLOUDLOGSCHEMA

func GetClusterIdByName added in v0.6.15

func GetClusterIdByName(credentialInfo idrv.CredentialInfo, regionInfo idrv.RegionInfo, clusterName string) string

func GetClusterNameById added in v0.6.15

func GetClusterNameById(clusterId string) (string, error)

func GetDiskInfoType added in v0.6.7

func GetDiskInfoType(diskType armcompute.DiskStorageAccountTypes) string

DiskType

func GetDiskTypeInitType added in v0.6.7

func GetDiskTypeInitType(diskType string) (armcompute.DiskStorageAccountTypes, error)

DiskType

func GetNetworksResourceIdByName added in v0.5.9

func GetNetworksResourceIdByName(credentialInfo idrv.CredentialInfo, regionInfo idrv.RegionInfo, resourceKind AzureResourceKind, name string) string

func GetRawDisk added in v0.6.7

func GetRawDisk(diskIID irs.IID, resourceGroup string, client *armcompute.DisksClient, ctx context.Context) (armcompute.Disk, error)

func GetRawKey added in v0.4.15

func GetRawKey(keypairIId irs.IID, resourceGroup string, client *armcompute.SSHPublicKeysClient, ctx context.Context) (armcompute.SSHPublicKeyResource, error)

func GetRawScaleSetVM added in v0.9.7

func GetRawScaleSetVM(systemID string, subscriptionID string, client *armcompute.VirtualMachineScaleSetVMsClient, ctx context.Context) (vm armcompute.VirtualMachineScaleSetVM, resourceGroup string, err error)

func GetRawVM added in v0.5.3

func GetRawVM(vmIID irs.IID, resourceGroup string, client *armcompute.VirtualMachinesClient, ctx context.Context) (armcompute.VirtualMachine, error)

func GetResourceNameById added in v0.5.9

func GetResourceNameById(id string) string

func GetScaleSetVMDiskInfoType added in v0.9.7

func GetScaleSetVMDiskInfoType(diskType armcompute.StorageAccountTypes) string

func GetSecGroupIdByName

func GetSecGroupIdByName(credentialInfo idrv.CredentialInfo, regionInfo idrv.RegionInfo, secGroupName string) string

func GetSshKeyIdByName added in v0.4.15

func GetSshKeyIdByName(credentialInfo idrv.CredentialInfo, regionInfo idrv.RegionInfo, keyName string) string

func GetSshKeyNameById added in v0.4.15

func GetSshKeyNameById(sshId string) (string, error)

func GetVMDiskInfoType added in v0.6.7

func GetVMDiskInfoType(diskType *armcompute.StorageAccountTypes) string

VMBootDiskType

func GetVMDiskTypeInitType added in v0.6.7

func GetVMDiskTypeInitType(diskType string) armcompute.StorageAccountTypes

VMBootDiskType

func GetVMNameById added in v0.6.7

func GetVMNameById(vmId string) (string, error)

func GetVPCNameById added in v0.6.15

func GetVPCNameById(vpcId string) (string, error)

func InitLog added in v0.2.1

func InitLog()

func LoggingError added in v0.2.1

func LoggingError(hiscallInfo call.CLOUDLOGSCHEMA, err error)

func LoggingInfo added in v0.2.1

func LoggingInfo(hiscallInfo call.CLOUDLOGSCHEMA, start time.Time)

Types

type AzureClusterHandler added in v0.6.15

type AzureClusterHandler struct {
	CredentialInfo                  idrv.CredentialInfo
	Region                          idrv.RegionInfo
	Ctx                             context.Context
	ManagedClustersClient           *armcontainerservice.ManagedClustersClient
	VirtualNetworksClient           *armnetwork.VirtualNetworksClient
	AgentPoolsClient                *armcontainerservice.AgentPoolsClient
	VirtualMachineScaleSetsClient   *armcompute.VirtualMachineScaleSetsClient
	VirtualMachineScaleSetVMsClient *armcompute.VirtualMachineScaleSetVMsClient
	SubnetClient                    *armnetwork.SubnetsClient
	SecurityGroupsClient            *armnetwork.SecurityGroupsClient
	SecurityRulesClient             *armnetwork.SecurityRulesClient
	VirtualMachineSizesClient       *armcompute.VirtualMachineSizesClient
	SSHPublicKeysClient             *armcompute.SSHPublicKeysClient
}

func (*AzureClusterHandler) AddNodeGroup added in v0.6.15

func (ac *AzureClusterHandler) AddNodeGroup(clusterIID irs.IID, nodeGroupReqInfo irs.NodeGroupInfo) (nodeInfo irs.NodeGroupInfo, addNodeErr error)

func (*AzureClusterHandler) ChangeNodeGroupScaling added in v0.6.15

func (ac *AzureClusterHandler) ChangeNodeGroupScaling(clusterIID irs.IID, nodeGroupIID irs.IID, DesiredNodeSize int, MinNodeSize int, MaxNodeSize int) (nodeGroupInfo irs.NodeGroupInfo, changeErr error)

func (*AzureClusterHandler) CreateCluster added in v0.6.15

func (ac *AzureClusterHandler) CreateCluster(clusterReqInfo irs.ClusterInfo) (info irs.ClusterInfo, createErr error)

func (*AzureClusterHandler) DeleteCluster added in v0.6.15

func (ac *AzureClusterHandler) DeleteCluster(clusterIID irs.IID) (deleteResult bool, delErr error)

func (*AzureClusterHandler) GetCluster added in v0.6.15

func (ac *AzureClusterHandler) GetCluster(clusterIID irs.IID) (info irs.ClusterInfo, getErr error)

func (*AzureClusterHandler) ListCluster added in v0.6.15

func (ac *AzureClusterHandler) ListCluster() (listInfo []*irs.ClusterInfo, getErr error)

func (*AzureClusterHandler) ListIID added in v0.9.6

func (ac *AzureClusterHandler) ListIID() ([]*irs.IID, error)

func (*AzureClusterHandler) RemoveNodeGroup added in v0.6.15

func (ac *AzureClusterHandler) RemoveNodeGroup(clusterIID irs.IID, nodeGroupIID irs.IID) (result bool, delErr error)

func (*AzureClusterHandler) SetNodeGroupAutoScaling added in v0.6.15

func (ac *AzureClusterHandler) SetNodeGroupAutoScaling(clusterIID irs.IID, nodeGroupIID irs.IID, on bool) (result bool, setErr error)

func (*AzureClusterHandler) UpgradeCluster added in v0.6.15

func (ac *AzureClusterHandler) UpgradeCluster(clusterIID irs.IID, newVersion string) (info irs.ClusterInfo, upgradeErr error)

------ Upgrade K8S

type AzureDiskHandler added in v0.6.7

type AzureDiskHandler struct {
	CredentialInfo idrv.CredentialInfo
	Region         idrv.RegionInfo
	Ctx            context.Context
	VMClient       *armcompute.VirtualMachinesClient
	DiskClient     *armcompute.DisksClient
}

func (*AzureDiskHandler) AttachDisk added in v0.6.7

func (diskHandler *AzureDiskHandler) AttachDisk(diskIID irs.IID, ownerVM irs.IID) (irs.DiskInfo, error)

func (*AzureDiskHandler) ChangeDiskSize added in v0.6.7

func (diskHandler *AzureDiskHandler) ChangeDiskSize(diskIID irs.IID, size string) (bool, error)

func (*AzureDiskHandler) CreateDisk added in v0.6.7

func (diskHandler *AzureDiskHandler) CreateDisk(DiskReqInfo irs.DiskInfo) (diskInfo irs.DiskInfo, createErr error)

func (*AzureDiskHandler) DeleteDisk added in v0.6.7

func (diskHandler *AzureDiskHandler) DeleteDisk(diskIID irs.IID) (bool, error)

func (*AzureDiskHandler) DetachDisk added in v0.6.7

func (diskHandler *AzureDiskHandler) DetachDisk(diskIID irs.IID, ownerVM irs.IID) (bool, error)

func (*AzureDiskHandler) GetDisk added in v0.6.7

func (diskHandler *AzureDiskHandler) GetDisk(diskIID irs.IID) (irs.DiskInfo, error)

func (*AzureDiskHandler) ListDisk added in v0.6.7

func (diskHandler *AzureDiskHandler) ListDisk() ([]*irs.DiskInfo, error)

func (*AzureDiskHandler) ListIID added in v0.9.6

func (diskHandler *AzureDiskHandler) ListIID() ([]*irs.IID, error)

type AzureImageHandler

type AzureImageHandler struct {
	Region        idrv.RegionInfo
	Ctx           context.Context
	Client        *armcompute.ImagesClient
	VMImageClient *armcompute.VirtualMachineImagesClient
}

func (*AzureImageHandler) CheckWindowsImage added in v0.6.15

func (imageHandler *AzureImageHandler) CheckWindowsImage(imageIID irs.IID) (bool, error)

func (*AzureImageHandler) CreateImage

func (imageHandler *AzureImageHandler) CreateImage(imageReqInfo irs.ImageReqInfo) (irs.ImageInfo, error)

func (*AzureImageHandler) DeleteImage

func (imageHandler *AzureImageHandler) DeleteImage(imageIID irs.IID) (bool, error)

func (*AzureImageHandler) GetImage

func (imageHandler *AzureImageHandler) GetImage(imageIID irs.IID) (irs.ImageInfo, error)

func (*AzureImageHandler) ListImage

func (imageHandler *AzureImageHandler) ListImage() ([]*irs.ImageInfo, error)

type AzureKeyPairHandler

type AzureKeyPairHandler struct {
	CredentialInfo idrv.CredentialInfo
	Region         idrv.RegionInfo
	Ctx            context.Context
	Client         *armcompute.SSHPublicKeysClient
}

func (*AzureKeyPairHandler) CreateKey

func (keyPairHandler *AzureKeyPairHandler) CreateKey(keyPairReqInfo irs.KeyPairReqInfo) (irs.KeyPairInfo, error)

func (*AzureKeyPairHandler) DeleteKey

func (keyPairHandler *AzureKeyPairHandler) DeleteKey(keyIID irs.IID) (bool, error)

func (*AzureKeyPairHandler) GetKey

func (keyPairHandler *AzureKeyPairHandler) GetKey(keyIID irs.IID) (irs.KeyPairInfo, error)

func (*AzureKeyPairHandler) ListIID added in v0.9.6

func (keyPairHandler *AzureKeyPairHandler) ListIID() ([]*irs.IID, error)

func (*AzureKeyPairHandler) ListKey

func (keyPairHandler *AzureKeyPairHandler) ListKey() ([]*irs.KeyPairInfo, error)

type AzureMyImageHandler added in v0.6.9

type AzureMyImageHandler struct {
	CredentialInfo                  idrv.CredentialInfo
	Region                          idrv.RegionInfo
	Ctx                             context.Context
	VMClient                        *armcompute.VirtualMachinesClient
	ImageClient                     *armcompute.ImagesClient
	VirtualMachineRunCommandsClient *armcompute.VirtualMachineRunCommandsClient
}

func (*AzureMyImageHandler) CheckWindowsImage added in v0.6.15

func (myImageHandler *AzureMyImageHandler) CheckWindowsImage(myImageIID irs.IID) (bool, error)

func (*AzureMyImageHandler) DeleteMyImage added in v0.6.9

func (myImageHandler *AzureMyImageHandler) DeleteMyImage(myImageIID irs.IID) (bool, error)

func (*AzureMyImageHandler) GetMyImage added in v0.6.9

func (myImageHandler *AzureMyImageHandler) GetMyImage(myImageIID irs.IID) (irs.MyImageInfo, error)

func (*AzureMyImageHandler) ListIID added in v0.9.6

func (myImageHandler *AzureMyImageHandler) ListIID() ([]*irs.IID, error)

func (*AzureMyImageHandler) ListMyImage added in v0.6.9

func (myImageHandler *AzureMyImageHandler) ListMyImage() ([]*irs.MyImageInfo, error)

func (*AzureMyImageHandler) SnapshotVM added in v0.6.9

func (myImageHandler *AzureMyImageHandler) SnapshotVM(snapshotReqInfo irs.MyImageInfo) (myImageInfo irs.MyImageInfo, snapshotErr error)

type AzureNLBHandler added in v0.5.9

type AzureNLBHandler struct {
	CredentialInfo               idrv.CredentialInfo
	Region                       idrv.RegionInfo
	Ctx                          context.Context
	NLBClient                    *armnetwork.LoadBalancersClient
	NLBBackendAddressPoolsClient *armnetwork.LoadBalancerBackendAddressPoolsClient
	VNicClient                   *armnetwork.InterfacesClient
	PublicIPClient               *armnetwork.PublicIPAddressesClient
	VMClient                     *armcompute.VirtualMachinesClient
	SubnetClient                 *armnetwork.SubnetsClient
	IPConfigClient               *armnetwork.InterfaceIPConfigurationsClient
	NLBLoadBalancingRulesClient  *armnetwork.LoadBalancerLoadBalancingRulesClient
	MetricClient                 *azquery.MetricsClient
}

func (*AzureNLBHandler) AddVMs added in v0.5.9

func (nlbHandler *AzureNLBHandler) AddVMs(nlbIID irs.IID, vmIIDs *[]irs.IID) (irs.VMGroupInfo, error)

func (*AzureNLBHandler) ChangeHealthCheckerInfo added in v0.5.9

func (nlbHandler *AzureNLBHandler) ChangeHealthCheckerInfo(nlbIID irs.IID, healthChecker irs.HealthCheckerInfo) (irs.HealthCheckerInfo, error)

func (*AzureNLBHandler) ChangeListener added in v0.5.9

func (nlbHandler *AzureNLBHandler) ChangeListener(nlbIID irs.IID, listener irs.ListenerInfo) (irs.ListenerInfo, error)

------ Frontend Control ------ Backend Control

func (*AzureNLBHandler) ChangeVMGroupInfo added in v0.5.9

func (nlbHandler *AzureNLBHandler) ChangeVMGroupInfo(nlbIID irs.IID, vmGroup irs.VMGroupInfo) (irs.VMGroupInfo, error)

func (*AzureNLBHandler) CreateNLB added in v0.5.9

func (nlbHandler *AzureNLBHandler) CreateNLB(nlbReqInfo irs.NLBInfo) (createNLB irs.NLBInfo, createError error)

------ NLB Management

func (*AzureNLBHandler) DeleteNLB added in v0.5.9

func (nlbHandler *AzureNLBHandler) DeleteNLB(nlbIID irs.IID) (bool, error)

func (*AzureNLBHandler) GetNLB added in v0.5.9

func (nlbHandler *AzureNLBHandler) GetNLB(nlbIID irs.IID) (irs.NLBInfo, error)

func (*AzureNLBHandler) GetVMGroupHealthInfo added in v0.5.9

func (nlbHandler *AzureNLBHandler) GetVMGroupHealthInfo(nlbIID irs.IID) (irs.HealthInfo, error)

func (*AzureNLBHandler) ListIID added in v0.9.6

func (nlbHandler *AzureNLBHandler) ListIID() ([]*irs.IID, error)

func (*AzureNLBHandler) ListNLB added in v0.5.9

func (nlbHandler *AzureNLBHandler) ListNLB() ([]*irs.NLBInfo, error)

func (*AzureNLBHandler) NLBCleaner added in v0.5.9

func (nlbHandler *AzureNLBHandler) NLBCleaner(nlbIID irs.IID) (bool, error)

func (*AzureNLBHandler) RemoveVMs added in v0.5.9

func (nlbHandler *AzureNLBHandler) RemoveVMs(nlbIID irs.IID, vmIIDs *[]irs.IID) (bool, error)

type AzurePriceInfoHandler added in v0.8.1

type AzurePriceInfoHandler struct {
	CredentialInfo     idrv.CredentialInfo
	Region             idrv.RegionInfo
	Ctx                context.Context
	ResourceSkusClient *armcompute.ResourceSKUsClient
}

func (*AzurePriceInfoHandler) GetPriceInfo added in v0.8.1

func (priceInfoHandler *AzurePriceInfoHandler) GetPriceInfo(productFamily string, regionName string, filterList []irs.KeyValue) (string, error)

func (*AzurePriceInfoHandler) ListProductFamily added in v0.8.1

func (priceInfoHandler *AzurePriceInfoHandler) ListProductFamily(regionName string) ([]string, error)

type AzureRegionZoneHandler added in v0.7.6

type AzureRegionZoneHandler struct {
	CredentialInfo      idrv.CredentialInfo
	Region              idrv.RegionInfo
	Ctx                 context.Context
	SubscriptionsClient *armsubscription.SubscriptionsClient
	GroupsClient        *armresources.ResourceGroupsClient
	ResourceSkusClient  *armcompute.ResourceSKUsClient
}

func (*AzureRegionZoneHandler) GetRegionZone added in v0.7.6

func (regionZoneHandler *AzureRegionZoneHandler) GetRegionZone(Name string) (irs.RegionZoneInfo, error)

func (*AzureRegionZoneHandler) ListOrgRegion added in v0.7.6

func (regionZoneHandler *AzureRegionZoneHandler) ListOrgRegion() (string, error)

func (*AzureRegionZoneHandler) ListOrgZone added in v0.7.6

func (regionZoneHandler *AzureRegionZoneHandler) ListOrgZone() (string, error)

func (*AzureRegionZoneHandler) ListRegionZone added in v0.7.6

func (regionZoneHandler *AzureRegionZoneHandler) ListRegionZone() ([]*irs.RegionZoneInfo, error)

type AzureResourceCategory added in v0.5.9

type AzureResourceCategory string

type AzureResourceKind added in v0.5.9

type AzureResourceKind string

type AzureSecurityHandler

type AzureSecurityHandler struct {
	Region     idrv.RegionInfo
	Ctx        context.Context
	Client     *armnetwork.SecurityGroupsClient
	RuleClient *armnetwork.SecurityRulesClient
}

func (*AzureSecurityHandler) AddRules added in v0.5.4

func (securityHandler *AzureSecurityHandler) AddRules(sgIID irs.IID, securityRules *[]irs.SecurityRuleInfo) (irs.SecurityInfo, error)

func (*AzureSecurityHandler) CreateSecurity

func (securityHandler *AzureSecurityHandler) CreateSecurity(securityReqInfo irs.SecurityReqInfo) (irs.SecurityInfo, error)

func (*AzureSecurityHandler) DeleteSecurity

func (securityHandler *AzureSecurityHandler) DeleteSecurity(securityIID irs.IID) (bool, error)

func (*AzureSecurityHandler) GetSecurity

func (securityHandler *AzureSecurityHandler) GetSecurity(securityIID irs.IID) (irs.SecurityInfo, error)

func (*AzureSecurityHandler) ListIID added in v0.9.6

func (securityHandler *AzureSecurityHandler) ListIID() ([]*irs.IID, error)

func (*AzureSecurityHandler) ListSecurity

func (securityHandler *AzureSecurityHandler) ListSecurity() ([]*irs.SecurityInfo, error)

func (*AzureSecurityHandler) RemoveRules added in v0.5.4

func (securityHandler *AzureSecurityHandler) RemoveRules(sgIID irs.IID, securityRules *[]irs.SecurityRuleInfo) (bool, error)

type AzureTagHandler added in v0.9.2

type AzureTagHandler struct {
	CredentialInfo idrv.CredentialInfo
	Region         idrv.RegionInfo
	Ctx            context.Context
	Client         *armresources.TagsClient
}

func (*AzureTagHandler) AddTag added in v0.9.2

func (tagHandler *AzureTagHandler) AddTag(resType irs.RSType, resIID irs.IID, tag irs.KeyValue) (irs.KeyValue, error)

AddTag adds a tag to the specified resource

func (*AzureTagHandler) FindTag added in v0.9.2

func (tagHandler *AzureTagHandler) FindTag(resType irs.RSType, keyword string) ([]*irs.TagInfo, error)

FindTag finds tags by key or value

func (*AzureTagHandler) GetTag added in v0.9.2

func (tagHandler *AzureTagHandler) GetTag(resType irs.RSType, resIID irs.IID, key string) (irs.KeyValue, error)

GetTag gets a specific tag of the specified resource

func (*AzureTagHandler) ListTag added in v0.9.2

func (tagHandler *AzureTagHandler) ListTag(resType irs.RSType, resIID irs.IID) ([]irs.KeyValue, error)

func (*AzureTagHandler) RemoveTag added in v0.9.2

func (tagHandler *AzureTagHandler) RemoveTag(resType irs.RSType, resIID irs.IID, key string) (bool, error)

RemoveTag removes a specific tag from the specified resource

type AzureVMHandler

type AzureVMHandler struct {
	CredentialInfo                  idrv.CredentialInfo
	Region                          idrv.RegionInfo
	Ctx                             context.Context
	Client                          *armcompute.VirtualMachinesClient
	ScaleSetVMsClient               *armcompute.VirtualMachineScaleSetVMsClient
	SubnetClient                    *armnetwork.SubnetsClient
	NicClient                       *armnetwork.InterfacesClient
	PublicIPClient                  *armnetwork.PublicIPAddressesClient
	DiskClient                      *armcompute.DisksClient
	SshKeyClient                    *armcompute.SSHPublicKeysClient
	ImageClient                     *armcompute.ImagesClient
	VirtualMachineRunCommandsClient *armcompute.VirtualMachineRunCommandsClient
}

func (*AzureVMHandler) GetVM

func (vmHandler *AzureVMHandler) GetVM(vmIID irs.IID) (vmInfo irs.VMInfo, err error)

func (*AzureVMHandler) GetVMStatus

func (vmHandler *AzureVMHandler) GetVMStatus(vmIID irs.IID) (irs.VMStatus, error)

func (*AzureVMHandler) ListIID added in v0.9.6

func (vmHandler *AzureVMHandler) ListIID() ([]*irs.IID, error)

func (*AzureVMHandler) ListVM

func (vmHandler *AzureVMHandler) ListVM() ([]*irs.VMInfo, error)

func (*AzureVMHandler) ListVMStatus

func (vmHandler *AzureVMHandler) ListVMStatus() ([]*irs.VMStatusInfo, error)

func (*AzureVMHandler) RebootVM

func (vmHandler *AzureVMHandler) RebootVM(vmIID irs.IID) (irs.VMStatus, error)

func (*AzureVMHandler) ResumeVM

func (vmHandler *AzureVMHandler) ResumeVM(vmIID irs.IID) (irs.VMStatus, error)

func (*AzureVMHandler) StartVM

func (vmHandler *AzureVMHandler) StartVM(vmReqInfo irs.VMReqInfo) (irs.VMInfo, error)

func (*AzureVMHandler) SuspendVM

func (vmHandler *AzureVMHandler) SuspendVM(vmIID irs.IID) (irs.VMStatus, error)

func (*AzureVMHandler) TerminateVM

func (vmHandler *AzureVMHandler) TerminateVM(vmIID irs.IID) (irs.VMStatus, error)

type AzureVPCHandler added in v0.1.3

type AzureVPCHandler struct {
	Region       idrv.RegionInfo
	Ctx          context.Context
	Client       *armnetwork.VirtualNetworksClient
	SubnetClient *armnetwork.SubnetsClient
}

func (*AzureVPCHandler) AddSubnet added in v0.2.1

func (vpcHandler *AzureVPCHandler) AddSubnet(vpcIID irs.IID, subnetInfo irs.SubnetInfo) (irs.VPCInfo, error)

func (*AzureVPCHandler) CreateVPC added in v0.1.3

func (vpcHandler *AzureVPCHandler) CreateVPC(vpcReqInfo irs.VPCReqInfo) (irs.VPCInfo, error)

func (*AzureVPCHandler) DeleteVPC added in v0.1.3

func (vpcHandler *AzureVPCHandler) DeleteVPC(vpcIID irs.IID) (bool, error)

func (*AzureVPCHandler) GetVPC added in v0.1.3

func (vpcHandler *AzureVPCHandler) GetVPC(vpcIID irs.IID) (irs.VPCInfo, error)

func (*AzureVPCHandler) ListIID added in v0.9.6

func (vpcHandler *AzureVPCHandler) ListIID() ([]*irs.IID, error)

func (*AzureVPCHandler) ListVPC added in v0.1.3

func (vpcHandler *AzureVPCHandler) ListVPC() ([]*irs.VPCInfo, error)

func (*AzureVPCHandler) RemoveSubnet added in v0.2.1

func (vpcHandler *AzureVPCHandler) RemoveSubnet(vpcIID irs.IID, subnetIID irs.IID) (bool, error)

type AzureVmSpecHandler

type AzureVmSpecHandler struct {
	Region idrv.RegionInfo
	Ctx    context.Context
	Client *armcompute.VirtualMachineSizesClient
}

func (*AzureVmSpecHandler) GetOrgVMSpec

func (vmSpecHandler *AzureVmSpecHandler) GetOrgVMSpec(Name string) (string, error)

func (*AzureVmSpecHandler) GetVMSpec

func (vmSpecHandler *AzureVmSpecHandler) GetVMSpec(Name string) (irs.VMSpecInfo, error)

func (*AzureVmSpecHandler) ListOrgVMSpec

func (vmSpecHandler *AzureVmSpecHandler) ListOrgVMSpec() (string, error)

func (*AzureVmSpecHandler) ListVMSpec

func (vmSpecHandler *AzureVmSpecHandler) ListVMSpec() ([]*irs.VMSpecInfo, error)

type BackendAddressesIPRefType added in v0.5.9

type BackendAddressesIPRefType string

type CleanVMClientRequestResource added in v0.5.3

type CleanVMClientRequestResource struct {
	PublicIPName         string
	NetworkInterfaceName string
	VmDiskName           string
}

type CleanVMClientSet added in v0.5.3

type CleanVMClientSet struct {
	VPCName    string
	SubnetName string
}

type ClusterInfoWithError added in v0.6.15

type ClusterInfoWithError struct {
	ClusterInfo irs.ClusterInfo
	// contains filtered or unexported fields
}

type Item added in v0.8.1

type Item struct {
	CurrencyCode         string  `json:"currencyCode"`
	TierMinimumUnits     float64 `json:"tierMinimumUnits"`
	RetailPrice          float64 `json:"retailPrice"`
	UnitPrice            float64 `json:"unitPrice"`
	ArmRegionName        string  `json:"armRegionName"`
	Location             string  `json:"location"`
	EffectiveStartDate   string  `json:"effectiveStartDate"`
	MeterID              string  `json:"meterId"`
	MeterName            string  `json:"meterName"`
	ProductID            string  `json:"productId"`
	SkuID                string  `json:"skuId"`
	ProductName          string  `json:"productName"`
	SkuName              string  `json:"skuName"`
	ServiceName          string  `json:"serviceName"`
	ServiceID            string  `json:"serviceId"`
	ServiceFamily        string  `json:"serviceFamily"`
	UnitOfMeasure        string  `json:"unitOfMeasure"`
	Type                 string  `json:"type"`
	IsPrimaryMeterRegion bool    `json:"isPrimaryMeterRegion"`
	ArmSkuName           string  `json:"armSkuName"`
	ReservationTerm      string  `json:"reservationTerm,omitempty"`
	EffectiveEndDate     string  `json:"effectiveEndDate,omitempty"`
}

type NLBScope added in v0.5.9

type NLBScope string

type NLBType added in v0.5.9

type NLBType string

type NodePoolPair added in v0.6.15

type NodePoolPair struct {
	AgentPool armcontainerservice.AgentPool
	// contains filtered or unexported fields
}

type PriceInfo added in v0.8.1

type PriceInfo struct {
	BillingCurrency    string `json:"BillingCurrency"`
	CustomerEntityID   string `json:"CustomerEntityId"`
	CustomerEntityType string `json:"CustomerEntityType"`
	Items              []Item `json:"items"`
	NextPageLink       string `json:"NextPageLink"`
	Count              int    `json:"Count"`
}

type Resource added in v0.9.2

type Resource struct {
	Id   string            `json:"id"`
	Name string            `json:"name"`
	Type string            `json:"type"`
	Tags map[string]string `json:"tags"`
}

type Response added in v0.9.2

type Response struct {
	Value []Resource `json:"value"`
}

func GetResourceInfo added in v0.9.2

func GetResourceInfo(credentailInfo idrv.CredentialInfo, url string) (*Response, error)

find all resource by subscription ID

type ServerKubeConfig added in v0.6.15

type ServerKubeConfig struct {
	Clusters []struct {
		Cluster struct {
			Server                   string `yaml:"server"`
			CertificateAuthorityData string `yaml:"certificate-authority-data"`
		} `yaml:"cluster"`
		Name string `yaml:"name"`
	} `yaml:"clusters"`
	Context []struct {
		Context struct {
			Cluster string `yaml:"cluster"`
			User    string `yaml:"user"`
		} `yaml:"context"`
		Name string `yaml:"name"`
	} `yaml:"contexts"`
	CurrentContext string `yaml:"current-context"`
	Kind           string `yaml:"kind"`
	Users          []struct {
		User struct {
			ClientCertificateData string `yaml:"client-certificate-data"`
			ClientKeyData         string `yaml:"client-key-data"`
			Token                 string `yaml:"token"`
		}
		Name string `yaml:"name"`
	} `yaml:"users"`
}

type VMCleanRelatedResource added in v0.5.3

type VMCleanRelatedResource struct {
	CleanTargetResource CleanVMClientRequestResource
	RequiredSet         CleanVMClientSet
}

Jump to

Keyboard shortcuts

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