utils

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetK8sVMName

func GetK8sVMName(osType api.OSType, isAKS bool, nameSuffix, agentPoolName string, agentPoolIndex, agentIndex int) (string, error)

GetK8sVMName reconstructs VM name

func GetVMNameIndex

func GetVMNameIndex(osType compute.OperatingSystemTypes, vmName string) (int, error)

GetVMNameIndex return VM index of a node in the Kubernetes cluster

func K8sLinuxVMNameParts

func K8sLinuxVMNameParts(vmName string) (poolIdentifier, nameSuffix string, agentIndex int, err error)

K8sLinuxVMNameParts returns parts of Linux VM name e.g: k8s-agentpool1-11290731-0

func ResourceName

func ResourceName(ID string) (string, error)

ResourceName returns the last segment (the resource name) for the specified resource identifier.

func SplitBlobURI

func SplitBlobURI(URI string) (string, string, string, error)

SplitBlobURI returns a decomposed blob URI parts: accountName, containerName, blobName.

func VmssNameParts

func VmssNameParts(vmssName string) (poolIdentifier, nameSuffix string, err error)

VmssNameParts returns parts of Linux VM name e.g: k8s-agentpool1-11290731-0

func WindowsVMNameParts

func WindowsVMNameParts(vmName string) (poolPrefix string, acsStr string, poolIndex int, agentIndex int, err error)

WindowsVMNameParts returns parts of Windows VM name e.g: 50621k8s9000

func WindowsVMSSNameParts added in v0.18.0

func WindowsVMSSNameParts(vmssName string) (poolPrefix string, acsStr string, poolIndex int, err error)

WindowsVMSSNameParts returns parts of Windows VM name e.g: 50621k8s900

Types

This section is empty.

Jump to

Keyboard shortcuts

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