Documentation ¶
Index ¶
- Constants
- Variables
- func GetServerNetworkIP(networks map[string][]string, netmatch string) (string, error)
- func GetUserDataFromOSResource(ctx context.Context, stackTemplate *OSHeatStackTemplate) (map[string]string, error)
- func IsUserDataSame(ctx context.Context, userdata1, userdata2 string) bool
- func NewPlatform() platform.Platform
- type APIStats
- type NeutronErrorDetail
- type NeutronErrorType
- type OSAZone
- type OSAllocationPool
- type OSConsoleUrl
- type OSExternalGateway
- type OSFixedIP
- type OSFlavor
- type OSFlavorDetail
- type OSFloatingIP
- type OSHeatStackDetail
- type OSHeatStackTemplate
- type OSImage
- type OSImageDetail
- type OSLimit
- type OSMetricMeasurement
- type OSMetricResource
- type OSNetwork
- type OSNetworkDetail
- type OSPort
- type OSPortDetail
- type OSProject
- type OSRouter
- type OSRouterDetail
- type OSRouterInterface
- type OSSecurityGroup
- type OSSecurityGroupName
- type OSSecurityGroupRule
- type OSServer
- type OSServerDetail
- type OSServerOpt
- type OSStackResource
- type OSSubnet
- type OSSubnetDetail
- type OpenstackPlatform
- func (o OpenstackPlatform) ActiveChanged(ctx context.Context, platformActive bool) error
- func (o *OpenstackPlatform) AddImageIfNotPresent(ctx context.Context, imageInfo *infracommon.ImageInfo, ...) error
- func (s *OpenstackPlatform) AddRouterSubnet(ctx context.Context, routerName, subnetName string) error
- func (s *OpenstackPlatform) AddSecurityRuleCIDR(ctx context.Context, cidr string, proto string, groupName string, port string) error
- func (o *OpenstackPlatform) AddSecurityRulesForRemoteGroup(ctx context.Context, groupId, remoteGroupId, protocol, direction string) error
- func (s *OpenstackPlatform) AttachPortToServer(ctx context.Context, serverName string, subnetNames vmlayer.SubnetNames, ...) error
- func (s *OpenstackPlatform) AttachSecurityGroupToPort(ctx context.Context, portID, groupName string) error
- func (s *OpenstackPlatform) CheckServerReady(ctx context.Context, client ssh.Client, serverName string) error
- func (o *OpenstackPlatform) ConfigureCloudletSecurityRules(ctx context.Context, egressRestricted bool, TrustPolicy *edgeproto.TrustPolicy, ...) error
- func (o *OpenstackPlatform) ConfigureTrustPolicyExceptionSecurityRules(ctx context.Context, TrustPolicyException *edgeproto.TrustPolicyException, ...) error
- func (o *OpenstackPlatform) CreateHeatStackFromTemplate(ctx context.Context, templateData interface{}, ...) error
- func (s *OpenstackPlatform) CreateImage(ctx context.Context, imageName, fileName string) error
- func (s *OpenstackPlatform) CreateImageFromUrl(ctx context.Context, imageName, imageUrl, md5Sum string) error
- func (s *OpenstackPlatform) CreateNetwork(ctx context.Context, name, netType, availabilityZone string) error
- func (o *OpenstackPlatform) CreateOrUpdateCloudletSecgrpStack(ctx context.Context, egressRestricted bool, TrustPolicy *edgeproto.TrustPolicy, ...) error
- func (o *OpenstackPlatform) CreateOrUpdateSecgrpStack(ctx context.Context, grpName string, egressRestricted bool, ...) error
- func (o *OpenstackPlatform) CreateOrUpdateTrustPolicyExceptionSecgrpStack(ctx context.Context, egressRestricted bool, ...) error
- func (s *OpenstackPlatform) CreateRouter(ctx context.Context, routerName string) error
- func (s *OpenstackPlatform) CreateSecurityGroup(ctx context.Context, groupName string) error
- func (s *OpenstackPlatform) CreateServer(ctx context.Context, opts *OSServerOpt) error
- func (s *OpenstackPlatform) CreateServerImage(ctx context.Context, serverName, imageName string) error
- func (s *OpenstackPlatform) CreateSubnet(ctx context.Context, netRange, networkName, gatewayAddr, subnetName string, ...) error
- func (o *OpenstackPlatform) CreateVMs(ctx context.Context, ...) error
- func (o *OpenstackPlatform) DeleteCloudletSecgrpStack(ctx context.Context, updateCallback edgeproto.CacheUpdateCallback) error
- func (s *OpenstackPlatform) DeleteImage(ctx context.Context, folder, imageName string) error
- func (s *OpenstackPlatform) DeleteNetwork(ctx context.Context, name string) error
- func (o *OpenstackPlatform) DeleteResources(ctx context.Context, resourceGroupName string) error
- func (s *OpenstackPlatform) DeleteRouter(ctx context.Context, routerName string) error
- func (s *OpenstackPlatform) DeleteSecurityGroupRule(ctx context.Context, ruleID string) error
- func (s *OpenstackPlatform) DeleteServer(ctx context.Context, id string) error
- func (s *OpenstackPlatform) DeleteSubnet(ctx context.Context, subnetName string) error
- func (o *OpenstackPlatform) DeleteTrustPolicyExceptionSecgrpStack(ctx context.Context, tpeKey *edgeproto.TrustPolicyExceptionKey, ...) error
- func (o *OpenstackPlatform) DeleteVMs(ctx context.Context, vmGroupName, ownerID string) error
- func (s *OpenstackPlatform) DetachPortFromServer(ctx context.Context, serverName string, subnetNames vmlayer.SubnetNames, ...) error
- func (s *OpenstackPlatform) DetachSecurityGroupFromPort(ctx context.Context, portID, groupName string) error
- func (o *OpenstackPlatform) GatherCloudletInfo(ctx context.Context, info *edgeproto.CloudletInfo) error
- func (s *OpenstackPlatform) GetActiveServerDetails(ctx context.Context, name string) (*OSServerDetail, error)
- func (o *OpenstackPlatform) GetApiEndpointAddr(ctx context.Context) (string, error)
- func (o *OpenstackPlatform) GetCloudletImageSuffix(ctx context.Context) string
- func (o *OpenstackPlatform) GetCloudletInfraResourcesInfo(ctx context.Context) ([]edgeproto.InfraResource, error)
- func (o *OpenstackPlatform) GetCloudletManifest(ctx context.Context, name string, cloudletImagePath string, ...) (string, error)
- func (o *OpenstackPlatform) GetCloudletProjectName() string
- func (o *OpenstackPlatform) GetCloudletSubnets(ctx context.Context) ([]string, error)
- func (o *OpenstackPlatform) GetClusterAdditionalResourceMetric(ctx context.Context, cloudlet *edgeproto.Cloudlet, resMetric *edgeproto.Metric, ...) error
- func (o *OpenstackPlatform) GetClusterAdditionalResources(ctx context.Context, cloudlet *edgeproto.Cloudlet, ...) map[string]edgeproto.InfraResource
- func (o *OpenstackPlatform) GetConsoleType() string
- func (o *OpenstackPlatform) GetConsoleUrl(ctx context.Context, serverName string) (string, error)
- func (s *OpenstackPlatform) GetExternalGateway(ctx context.Context, extNetName string) (string, error)
- func (o *OpenstackPlatform) GetFeatures() *edgeproto.PlatformFeatures
- func (s *OpenstackPlatform) GetFlavorInfo(ctx context.Context) ([]*edgeproto.FlavorInfo, []OSAZone, []OSImage, error)
- func (o *OpenstackPlatform) GetFlavorList(ctx context.Context) ([]*edgeproto.FlavorInfo, error)
- func (p *OpenstackPlatform) GetGPUSetupStage(ctx context.Context) vmlayer.GPUSetupStage
- func (s *OpenstackPlatform) GetImageDetail(ctx context.Context, name string) (*OSImageDetail, error)
- func (s *OpenstackPlatform) GetInternalCIDR(name string, srvs []OSServer) (string, error)
- func (s *OpenstackPlatform) GetInternalIP(name string, srvs []OSServer) (string, error)
- func (o *OpenstackPlatform) GetInternalPortPolicy() vmlayer.InternalPortAttachPolicy
- func (o *OpenstackPlatform) GetNetworkDetail(ctx context.Context, networkName string) (*vmlayer.NetworkDetail, error)
- func (o *OpenstackPlatform) GetNetworkList(ctx context.Context) ([]string, error)
- func (s *OpenstackPlatform) GetNumberOfFloatingIps(ctx context.Context) (int, int, error)
- func (s *OpenstackPlatform) GetOSNetworkDetail(ctx context.Context, networkName string) (*OSNetworkDetail, error)
- func (o *OpenstackPlatform) GetOpenRCVars(ctx context.Context, accessApi platform.AccessApi) error
- func (s *OpenstackPlatform) GetOpenStackRouterDetail(ctx context.Context, routerName string) (*OSRouterDetail, error)
- func (s *OpenstackPlatform) GetOpenstackServerDetails(ctx context.Context, name string) (*OSServerDetail, error)
- func (s *OpenstackPlatform) GetPlatformResourceInfo(ctx context.Context) (*vmlayer.PlatformResources, error)
- func (s *OpenstackPlatform) GetPortDetails(ctx context.Context, name string) (*OSPortDetail, error)
- func (o *OpenstackPlatform) GetResourceID(ctx context.Context, resourceType vmlayer.ResourceType, resourceName string) (string, error)
- func (o *OpenstackPlatform) GetRouterDetail(ctx context.Context, routerName string) (*vmlayer.RouterDetail, error)
- func (s *OpenstackPlatform) GetSecurityGroupIDForName(ctx context.Context, groupName string) (string, error)
- func (s *OpenstackPlatform) GetSecurityGroupIDForProject(ctx context.Context, grpname string, projectID string) (string, error)
- func (o *OpenstackPlatform) GetServerDetail(ctx context.Context, serverName string) (*vmlayer.ServerDetail, error)
- func (o *OpenstackPlatform) GetServerExternalIP(networks map[string][]string) (string, error)
- func (o *OpenstackPlatform) GetServerGroupResources(ctx context.Context, name string) (*edgeproto.InfraResources, error)
- func (o *OpenstackPlatform) GetServerInternalIP(networks map[string][]string) (string, error)
- func (s *OpenstackPlatform) GetSubnetDetail(ctx context.Context, subnetName string) (*OSSubnetDetail, error)
- func (s *OpenstackPlatform) GetVMStats(ctx context.Context, appInst *edgeproto.AppInst) (*vmlayer.VMMetrics, error)
- func (o *OpenstackPlatform) GetVMSubnetDetail(ctx context.Context, ossd *OSSubnetDetail) (*vmlayer.SubnetDetail, error)
- func (o *OpenstackPlatform) HeatCreateVMs(ctx context.Context, ...) error
- func (o *OpenstackPlatform) HeatDeleteStack(ctx context.Context, stackName string) error
- func (o *OpenstackPlatform) HeatUpdateVMs(ctx context.Context, ...) error
- func (o *OpenstackPlatform) IdSanitize(name string) string
- func (o *OpenstackPlatform) InitApiAccessProperties(ctx context.Context, accessApi platform.AccessApi, vars map[string]string) error
- func (o *OpenstackPlatform) InitData(ctx context.Context, caches *platform.Caches)
- func (a *OpenstackPlatform) InitOperationContext(ctx context.Context, operationStage vmlayer.OperationInitStage) (context.Context, vmlayer.OperationInitResult, error)
- func (o *OpenstackPlatform) InitProvider(ctx context.Context, caches *platform.Caches, stage vmlayer.ProviderInitStage, ...) error
- func (o *OpenstackPlatform) InitResourceReservations(ctx context.Context)
- func (p *OpenstackPlatform) InternalCloudletUpdatedCallback(ctx context.Context, old *edgeproto.CloudletInternal, ...)
- func (s *OpenstackPlatform) ListAZones(ctx context.Context) ([]OSAZone, error)
- func (s *OpenstackPlatform) ListFlavors(ctx context.Context) ([]OSFlavorDetail, error)
- func (s *OpenstackPlatform) ListFloatingIPs(ctx context.Context, network string) ([]OSFloatingIP, error)
- func (s *OpenstackPlatform) ListImages(ctx context.Context) ([]OSImage, error)
- func (s *OpenstackPlatform) ListImagesDetail(ctx context.Context) ([]OSImageDetail, error)
- func (s *OpenstackPlatform) ListNetworks(ctx context.Context) ([]OSNetwork, error)
- func (s *OpenstackPlatform) ListPorts(ctx context.Context) ([]OSPort, error)
- func (s *OpenstackPlatform) ListPortsServer(ctx context.Context, server string) ([]OSPort, error)
- func (s *OpenstackPlatform) ListPortsServerNetwork(ctx context.Context, server, network string) ([]OSPort, error)
- func (s *OpenstackPlatform) ListProjects(ctx context.Context) ([]OSProject, error)
- func (s *OpenstackPlatform) ListRouters(ctx context.Context) ([]OSRouter, error)
- func (s *OpenstackPlatform) ListSecurityGroupRules(ctx context.Context, secGrp string) ([]OSSecurityGroupRule, error)
- func (s *OpenstackPlatform) ListSecurityGroups(ctx context.Context) ([]OSSecurityGroup, error)
- func (s *OpenstackPlatform) ListServers(ctx context.Context) (map[string]OSServer, error)
- func (s *OpenstackPlatform) ListSubnets(ctx context.Context, netName string) ([]OSSubnet, error)
- func (o *OpenstackPlatform) NameSanitize(name string) string
- func (s *OpenstackPlatform) OSFindResourceByInstId(ctx context.Context, resourceType, instId, name string) (*OSMetricResource, error)
- func (s *OpenstackPlatform) OSGetAllLimits(ctx context.Context) ([]OSLimit, error)
- func (s *OpenstackPlatform) OSGetConsoleUrl(ctx context.Context, serverName string) (*OSConsoleUrl, error)
- func (s *OpenstackPlatform) OSGetLimits(ctx context.Context, info *edgeproto.CloudletInfo) error
- func (s *OpenstackPlatform) OSGetMetricsRangeForId(ctx context.Context, resId string, metric string, startTime time.Time) ([]OSMetricMeasurement, error)
- func (o *OpenstackPlatform) PrepNetwork(ctx context.Context, updateCallback edgeproto.CacheUpdateCallback) error
- func (o *OpenstackPlatform) PrepareRootLB(ctx context.Context, client ssh.Client, rootLBName string, secGrpName string, ...) error
- func (o *OpenstackPlatform) RemoveDuplicateImages(ctx context.Context, imageName string) error
- func (s *OpenstackPlatform) RemoveRouterSubnet(ctx context.Context, routerName, subnetName string) error
- func (o *OpenstackPlatform) RemoveWhitelistSecurityRules(ctx context.Context, client ssh.Client, wlParams *infracommon.WhiteListParams) error
- func (s *OpenstackPlatform) SaveImage(ctx context.Context, saveName, imageName string) error
- func (s *OpenstackPlatform) SetPowerState(ctx context.Context, serverName, serverAction string) error
- func (s *OpenstackPlatform) SetRouter(ctx context.Context, routerName, networkName string) error
- func (s *OpenstackPlatform) SetServerProperty(ctx context.Context, name, property string) error
- func (o *OpenstackPlatform) SetVMProperties(vmProperties *vmlayer.VMProperties)
- func (s *OpenstackPlatform) ShowFlavor(ctx context.Context, flavor string) (details OSFlavorDetail, err error)
- func (s *OpenstackPlatform) TimedOpenStackCommand(ctx context.Context, name string, a ...string) ([]byte, error)
- func (o *OpenstackPlatform) UpdateHeatStackFromTemplate(ctx context.Context, templateData interface{}, ...) error
- func (o *OpenstackPlatform) UpdateServerIPs(ctx context.Context, addresses map[string][]string, ports []OSPort, ...) error
- func (o *OpenstackPlatform) UpdateVMs(ctx context.Context, ...) error
- func (o *OpenstackPlatform) ValidateAdditionalNetworks(ctx context.Context, additionalNets map[string]vmlayer.NetworkType) error
- func (o *OpenstackPlatform) ValidateNetwork(ctx context.Context) error
- func (s *OpenstackPlatform) VerifyVMs(ctx context.Context, vms []edgeproto.VM) error
- func (o *OpenstackPlatform) VmAppChangedCallback(ctx context.Context, appInst *edgeproto.AppInst, ...)
- func (o *OpenstackPlatform) WhitelistSecurityRules(ctx context.Context, client ssh.Client, wlParams *infracommon.WhiteListParams) error
- type OpenstackResources
- type ReservedResources
Constants ¶
const ( OS_AUTH_URL = "OS_AUTH_URL" OS_USERNAME = "OS_USERNAME" OS_PASSWORD = "OS_PASSWORD" OS_CACERT_DATA = "OS_CACERT_DATA" OS_CACERT = "OS_CACERT" // file path on disk OS_REGION_NAME = "OS_REGION_NAME" OS_USER_DOMAIN_NAME = "OS_USER_DOMAIN_NAME" OS_IDENTITY_API_VERSION = "OS_IDENTITY_API_VERSION" OS_PROJECT_NAME = "OS_PROJECT_NAME" OS_PROJECT_DOMAIN_NAME = "OS_PROJECT_DOMAIN_NAME" )
const DuplicateResourceFound string = "More than one resource exists"
const ImageNotFound string = "No Image found"
const SecgrpDoesNotExist string = "Security group does not exist"
const SecgrpRuleAlreadyExists string = "Security group rule already exists"
const StackAlreadyExists string = "already exists"
const StackNotFound string = "Stack not found"
Variables ¶
var AccessVarProps = map[string]*edgeproto.PropertyInfo{ OS_AUTH_URL: { Name: "Openstack auth URL", Description: "Openstack auth URL", Mandatory: true, }, OS_USERNAME: { Name: "Openstack user name", Description: "Openstack user name", Mandatory: true, }, OS_PASSWORD: { Name: "Openstack user password", Description: "Openstack user password", Mandatory: true, }, OS_CACERT_DATA: { Name: "Certificate authority file data", Description: "If the Auth URL is using https and the API endpoint's certificate is privately issued, this is the issuing authority's cert that can validate the server's public cert. May be multiple certs in PEM format.", }, OS_PROJECT_NAME: { Name: "Openstack project name", Description: "Openstack project name", }, OS_REGION_NAME: { Name: "Openstack region name", Description: "Openstack region name", }, OS_USER_DOMAIN_NAME: { Name: "User domain name", Description: "User domain name", Value: "default", }, OS_IDENTITY_API_VERSION: { Name: "Openstack server API version", Description: "Openstack server API version", Value: "3", }, OS_PROJECT_DOMAIN_NAME: { Name: "Openstack project domain name", Description: "Openstack project domain name", Value: "default", }, }
var CloudletSecurityGroupIDMap = make(map[string]string)
CloudletSecurityGroupIDMap is a cache of cloudlet to security group id
var OpenstackProps = map[string]*edgeproto.PropertyInfo{
"MEX_CONSOLE_TYPE": {
Name: "Openstack console type",
Description: "Openstack supported console type: novnc, xvpvnc, spice, rdp, serial, mks",
Value: "novnc",
},
}
var QuotaProps = cloudcommon.GetCommonResourceQuotaProps( cloudcommon.ResourceInstances, cloudcommon.ResourceFloatingIPs, )
var VmGroupTemplate = `` /* 6319-byte string literal not displayed */
Functions ¶
func GetServerNetworkIP ¶
func NewPlatform ¶
Types ¶
type NeutronErrorDetail ¶
type NeutronErrorType ¶
type NeutronErrorType struct {
NeutronError NeutronErrorDetail
}
type OSAllocationPool ¶
type OSConsoleUrl ¶
type OSConsoleUrl struct {
Url string `json:"url"`
}
type OSExternalGateway ¶
type OSExternalGateway struct { NetworkID string `json:"network_id"` //subnet of external net EnableSNAT bool `json:"enable_snat"` ExternalFixedIPs []OSFixedIP `json:"external_fixed_ips"` //gateway between extnet and privnet }
func GetRouterDetailExternalGateway ¶
func GetRouterDetailExternalGateway(rd *OSRouterDetail) (*OSExternalGateway, error)
GetRouterDetailExternalGateway is different than GetExternalGateway. This function gets the gateway interface in the subnet within external network. This is accessible from private networks to route packets to the external network. The GetExternalGateway gets the gateway for the outside network. This is for the packets to be routed out to the external network, i.e. internet.
type OSFlavorDetail ¶
type OSFlavorDetail struct { Name string `json:"name"` ID string `json:"id"` RAM int `json:"ram"` Ephemeral int `json:"OS-FLV-EXT-DATA:ephemeral"` VCPUs int `json:"vcpus"` Disk int `json:"disk"` Public bool `json:"os-flavor-access:is_public"` Properties map[string]string `json:"properties"` Swap util.EmptyStringJsonNumber `json:"swap"` RXTX_Factor util.EmptyStringJsonNumber `json:"rxtx_factor"` }
type OSFloatingIP ¶
type OSHeatStackDetail ¶
type OSHeatStackTemplate ¶
type OSHeatStackTemplate struct {
Resources map[string]OSStackResource `json:"resources" yaml:"resources"`
}
type OSImageDetail ¶
type OSMetricMeasurement ¶
type OSMetricMeasurement struct { Timestamp string `json:"timestamp"` Value float64 `json:"value"` Granularity float64 `json:"granularity"` }
Ceilometer-based tsdb measurements
type OSMetricResource ¶
type OSMetricResource struct { StartedAt string `json:"started_at"` UserID string `json:"user_id"` RevisionEnd string `json:"revision_end"` Creator string `json:"creator"` RevisionStart string `json:"revision_start"` InstanceId string `json:"instance_id"` OriginalResourceId string `json:"original_resource_id"` EndedAt string `json:"ended_at"` ProjectId string `json:"project_id"` Type string `json:"type"` Id string `json:"id"` Name string `json:"name"` }
instance_network_interface details
type OSNetworkDetail ¶
type OSNetworkDetail struct { ID string `json:"id"` Name string `json:"name"` ProviderPhysicalNetwork string `json:"provider:physical_network"` IPv6AddressScope string `json:"ipv6_address_scope"` DNSDomain string `json:"dns_domain"` IsVLANTransparent bool `json:"is_vlan_transparent"` ProviderNetworkType string `json:"provider:network_type"` External bool `json:"router:external"` AvailabilityZones []string `json:"availability_zones"` Segments string `json:"segments"` IPv4AddressScope string `json:"ipv4_address_scope"` ProjectID string `json:"project_id"` Status string `json:"status"` Subnets []string `json:"subnets"` Description string `json:"description"` UpdatedAt string `json:"updated_at"` ProviderSegmentationID int `json:"provider:segmentation_id"` QOSPolicyID string `json:"qos_policy_id"` AdminStateUp bool `json:"admin_state_up"` CreatedAt string `json:"created_at"` RevisionNumber int `json:"revision_number"` MTU int `json:"mtu"` PortSecurityEnabled bool `json:"port_security_enabled"` IsDefault bool `json:"is_default"` }
type OSPortDetail ¶
type OSRouterDetail ¶
type OSRouterDetail struct { ID string `json:"id"` Name string `json:"name"` ExternalGatewayInfo string `json:"external_gateway_info"` Status string `json:"status"` Description string `json:"description"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` InterfacesInfo string `json:"interfaces_info"` ProjectID string `json:"project_id"` FlavorID string `json:"flavor_id"` Routes string `json:"routes"` Distributed bool `json:"distributed"` HA bool `json:"ha"` RevisionNumber int `json:"revision_number"` }
type OSRouterInterface ¶
type OSRouterInterface struct { SubnetID string `json:"subnet_id"` //attached privnet IPAddress string `json:"ip_address"` //router for the privnet side on the subnet CIDR, usually X.X.X.1 but should really confirm by reading this PortID string `json:"port_id"` }
func GetRouterDetailInterfaces ¶
func GetRouterDetailInterfaces(ctx context.Context, rd *OSRouterDetail) ([]OSRouterInterface, error)
GetRouterDetailInterfaces gets the list of interfaces on the router. For example, each private subnet connected to the router will be listed here with own interface definition.
type OSSecurityGroup ¶
type OSSecurityGroupName ¶
type OSSecurityGroupName struct {
Name string `json:"name"`
}
type OSSecurityGroupRule ¶
type OSServerDetail ¶
type OSServerDetail struct { TaskState string `json:"OS-EXT-STS:task_state"` Addresses map[string][]string `json:"addresses"` Image string `json:"image"` VMState string `json:"OS-EXT-STS:vm_state"` LaunchedAt string `json:"OS-SRV-USG:launched_at"` Flavor string `json:"flavor"` ID string `json:"id"` SecurityGroups []OSSecurityGroupName `json:"security_groups"` UserID string `json:"user_id"` DiskConfig string `json:"OS-DCF:diskConfig"` AccessIPv4 string `json:"accessIPv4"` AccessIPv6 string `json:"accessIPv6"` Progress int `json:"progress"` PowerState int `json:"OS-EXT-STS:power_state"` ProjectID string `json:"project_id"` ConfigDrive string `json:"config_drive"` Status string `json:"status"` Updated string `json:"updated"` HostID string `json:"hostId"` TerminatedAt string `json:"OS-SRV-USG:terminated_at"` KeyName string `json:"key_name"` AvailabilityZone string `json:"OS-EXT-AZ:availability_zone"` Name string `json:"name"` Created string `json:"created"` Properties map[string]interface{} `json:"properties"` }
type OSServerOpt ¶
type OSStackResource ¶
type OSSubnetDetail ¶
type OSSubnetDetail struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` EnableDHCP bool `json:"enable_dhcp"` SegmentID string `json:"segment_id"` NetworkID string `json:"network_id"` CreatedAt string `json:"created_at"` DNSNameServers []string `json:"dns_nameservers"` UpdatedAt string `json:"updated_at"` IPv6RAMode string `json:"ipv6_ra_mode"` AllocationPools []OSAllocationPool `json:"allocation_pools"` GatewayIP string `json:"gateway_ip"` RevisionNumber int `json:"revision_number"` IPv6AddressMode string `json:"ipv6_address_mode"` IPVersion int `json:"ip_version"` CIDR string `json:"cidr"` ProjectID string `json:"project_id"` SubnetPoolID string `json:"subnetpool_id"` }
type OpenstackPlatform ¶
type OpenstackPlatform struct { VMProperties *vmlayer.VMProperties // contains filtered or unexported fields }
func (OpenstackPlatform) ActiveChanged ¶
func (o OpenstackPlatform) ActiveChanged(ctx context.Context, platformActive bool) error
func (*OpenstackPlatform) AddImageIfNotPresent ¶
func (o *OpenstackPlatform) AddImageIfNotPresent(ctx context.Context, imageInfo *infracommon.ImageInfo, updateCallback edgeproto.CacheUpdateCallback) error
func (*OpenstackPlatform) AddRouterSubnet ¶
func (s *OpenstackPlatform) AddRouterSubnet(ctx context.Context, routerName, subnetName string) error
AddRouterSubnet will connect subnet to another network, possibly external, via a router
func (*OpenstackPlatform) AddSecurityRuleCIDR ¶
func (*OpenstackPlatform) AddSecurityRulesForRemoteGroup ¶
func (o *OpenstackPlatform) AddSecurityRulesForRemoteGroup(ctx context.Context, groupId, remoteGroupId, protocol, direction string) error
func (*OpenstackPlatform) AttachPortToServer ¶
func (s *OpenstackPlatform) AttachPortToServer(ctx context.Context, serverName string, subnetNames vmlayer.SubnetNames, portName string, ips infracommon.IPs, action vmlayer.ActionType) error
AttachPortToServer attaches a port to a server
func (*OpenstackPlatform) AttachSecurityGroupToPort ¶
func (s *OpenstackPlatform) AttachSecurityGroupToPort(ctx context.Context, portID, groupName string) error
func (*OpenstackPlatform) CheckServerReady ¶
func (*OpenstackPlatform) ConfigureCloudletSecurityRules ¶
func (o *OpenstackPlatform) ConfigureCloudletSecurityRules(ctx context.Context, egressRestricted bool, TrustPolicy *edgeproto.TrustPolicy, rootLbClients map[string]platform.RootLBClient, action vmlayer.ActionType, updateCallback edgeproto.CacheUpdateCallback) error
PrepareCloudletSecurityGroup creates the cloudlet group if it does not exist and ensures that the remote-group rules are present to allow platform components to communicate
func (*OpenstackPlatform) ConfigureTrustPolicyExceptionSecurityRules ¶
func (o *OpenstackPlatform) ConfigureTrustPolicyExceptionSecurityRules(ctx context.Context, TrustPolicyException *edgeproto.TrustPolicyException, rootLbClients map[string]platform.RootLBClient, action vmlayer.ActionType, updateCallback edgeproto.CacheUpdateCallback) error
func (*OpenstackPlatform) CreateHeatStackFromTemplate ¶
func (o *OpenstackPlatform) CreateHeatStackFromTemplate(ctx context.Context, templateData interface{}, stackName, templateString string, updateCallback edgeproto.CacheUpdateCallback) error
CreateHeatStackFromTemplate fills the template from templateData and creates the stack
func (*OpenstackPlatform) CreateImage ¶
func (s *OpenstackPlatform) CreateImage(ctx context.Context, imageName, fileName string) error
CreateImage puts images into glance
func (*OpenstackPlatform) CreateImageFromUrl ¶
func (s *OpenstackPlatform) CreateImageFromUrl(ctx context.Context, imageName, imageUrl, md5Sum string) error
CreateImageFromUrl downloads image from URL and then puts into glance
func (*OpenstackPlatform) CreateNetwork ¶
func (s *OpenstackPlatform) CreateNetwork(ctx context.Context, name, netType, availabilityZone string) error
CreateNetwork creates a network with a name.
func (*OpenstackPlatform) CreateOrUpdateCloudletSecgrpStack ¶
func (o *OpenstackPlatform) CreateOrUpdateCloudletSecgrpStack(ctx context.Context, egressRestricted bool, TrustPolicy *edgeproto.TrustPolicy, updateCallback edgeproto.CacheUpdateCallback) error
func (*OpenstackPlatform) CreateOrUpdateSecgrpStack ¶
func (o *OpenstackPlatform) CreateOrUpdateSecgrpStack(ctx context.Context, grpName string, egressRestricted bool, rules []edgeproto.SecurityRule, updateCallback edgeproto.CacheUpdateCallback) error
func (*OpenstackPlatform) CreateOrUpdateTrustPolicyExceptionSecgrpStack ¶
func (o *OpenstackPlatform) CreateOrUpdateTrustPolicyExceptionSecgrpStack(ctx context.Context, egressRestricted bool, TrustPolicyException *edgeproto.TrustPolicyException, updateCallback edgeproto.CacheUpdateCallback) error
func (*OpenstackPlatform) CreateRouter ¶
func (s *OpenstackPlatform) CreateRouter(ctx context.Context, routerName string) error
CreateRouter creates new router. A router can be attached to network and subnets.
func (*OpenstackPlatform) CreateSecurityGroup ¶
func (s *OpenstackPlatform) CreateSecurityGroup(ctx context.Context, groupName string) error
func (*OpenstackPlatform) CreateServer ¶
func (s *OpenstackPlatform) CreateServer(ctx context.Context, opts *OSServerOpt) error
CreateServer instantiates a new server instance, which is a KVM instance based on a qcow2 image from glance
func (*OpenstackPlatform) CreateServerImage ¶
func (s *OpenstackPlatform) CreateServerImage(ctx context.Context, serverName, imageName string) error
CreateServerImage snapshots running service into a qcow2 image
func (*OpenstackPlatform) CreateSubnet ¶
func (s *OpenstackPlatform) CreateSubnet(ctx context.Context, netRange, networkName, gatewayAddr, subnetName string, dhcpEnable bool) error
CreateSubnet creates a subnet within a network. A subnet is assigned ranges. Optionally DHCP can be enabled.
func (*OpenstackPlatform) CreateVMs ¶
func (o *OpenstackPlatform) CreateVMs(ctx context.Context, vmGroupOrchestrationParams *vmlayer.VMGroupOrchestrationParams, updateCallback edgeproto.CacheUpdateCallback) error
func (*OpenstackPlatform) DeleteCloudletSecgrpStack ¶
func (o *OpenstackPlatform) DeleteCloudletSecgrpStack(ctx context.Context, updateCallback edgeproto.CacheUpdateCallback) error
func (*OpenstackPlatform) DeleteImage ¶
func (s *OpenstackPlatform) DeleteImage(ctx context.Context, folder, imageName string) error
DeleteImage deletes the named image from glance. Sometimes backing store is still busy and will refuse to honor the request. Like most things in Openstack, wait for a while and try again.
func (*OpenstackPlatform) DeleteNetwork ¶
func (s *OpenstackPlatform) DeleteNetwork(ctx context.Context, name string) error
DeleteNetwork destroys a named network
Sometimes it will fail. Openstack will refuse if there are resources attached.
func (*OpenstackPlatform) DeleteResources ¶
func (o *OpenstackPlatform) DeleteResources(ctx context.Context, resourceGroupName string) error
func (*OpenstackPlatform) DeleteRouter ¶
func (s *OpenstackPlatform) DeleteRouter(ctx context.Context, routerName string) error
DeleteRouter removes the named router. The router needs to not be in use at the time of deletion.
func (*OpenstackPlatform) DeleteSecurityGroupRule ¶
func (s *OpenstackPlatform) DeleteSecurityGroupRule(ctx context.Context, ruleID string) error
func (*OpenstackPlatform) DeleteServer ¶
func (s *OpenstackPlatform) DeleteServer(ctx context.Context, id string) error
DeleteServer destroys a KVM instance
sometimes it is not possible to destroy. Like most things in Openstack, try again.
func (*OpenstackPlatform) DeleteSubnet ¶
func (s *OpenstackPlatform) DeleteSubnet(ctx context.Context, subnetName string) error
DeleteSubnet deletes the subnet. If this fails, remove any attached resources, like router, and try again.
func (*OpenstackPlatform) DeleteTrustPolicyExceptionSecgrpStack ¶
func (o *OpenstackPlatform) DeleteTrustPolicyExceptionSecgrpStack(ctx context.Context, tpeKey *edgeproto.TrustPolicyExceptionKey, updateCallback edgeproto.CacheUpdateCallback) error
func (*OpenstackPlatform) DeleteVMs ¶
func (o *OpenstackPlatform) DeleteVMs(ctx context.Context, vmGroupName, ownerID string) error
func (*OpenstackPlatform) DetachPortFromServer ¶
func (s *OpenstackPlatform) DetachPortFromServer(ctx context.Context, serverName string, subnetNames vmlayer.SubnetNames, portName string) error
DetachPortFromServer removes a port from a server
func (*OpenstackPlatform) DetachSecurityGroupFromPort ¶
func (s *OpenstackPlatform) DetachSecurityGroupFromPort(ctx context.Context, portID, groupName string) error
func (*OpenstackPlatform) GatherCloudletInfo ¶
func (o *OpenstackPlatform) GatherCloudletInfo(ctx context.Context, info *edgeproto.CloudletInfo) error
func (*OpenstackPlatform) GetActiveServerDetails ¶
func (s *OpenstackPlatform) GetActiveServerDetails(ctx context.Context, name string) (*OSServerDetail, error)
GetActiveServerDetails returns details of the KVM instance waiting for it to be ACTIVE
func (*OpenstackPlatform) GetApiEndpointAddr ¶
func (o *OpenstackPlatform) GetApiEndpointAddr(ctx context.Context) (string, error)
func (*OpenstackPlatform) GetCloudletImageSuffix ¶
func (o *OpenstackPlatform) GetCloudletImageSuffix(ctx context.Context) string
func (*OpenstackPlatform) GetCloudletInfraResourcesInfo ¶
func (o *OpenstackPlatform) GetCloudletInfraResourcesInfo(ctx context.Context) ([]edgeproto.InfraResource, error)
func (*OpenstackPlatform) GetCloudletManifest ¶
func (o *OpenstackPlatform) GetCloudletManifest(ctx context.Context, name string, cloudletImagePath string, vmgp *vmlayer.VMGroupOrchestrationParams) (string, error)
func (*OpenstackPlatform) GetCloudletProjectName ¶
func (o *OpenstackPlatform) GetCloudletProjectName() string
func (*OpenstackPlatform) GetCloudletSubnets ¶
func (o *OpenstackPlatform) GetCloudletSubnets(ctx context.Context) ([]string, error)
GetCloudletSubnets returns subnets inside MEX Network
func (*OpenstackPlatform) GetClusterAdditionalResourceMetric ¶
func (o *OpenstackPlatform) GetClusterAdditionalResourceMetric(ctx context.Context, cloudlet *edgeproto.Cloudlet, resMetric *edgeproto.Metric, resources []edgeproto.VMResource) error
func (*OpenstackPlatform) GetClusterAdditionalResources ¶
func (o *OpenstackPlatform) GetClusterAdditionalResources(ctx context.Context, cloudlet *edgeproto.Cloudlet, vmResources []edgeproto.VMResource, infraResMap map[string]edgeproto.InfraResource) map[string]edgeproto.InfraResource
called by controller, make sure it doesn't make any calls to infra API
func (*OpenstackPlatform) GetConsoleType ¶
func (o *OpenstackPlatform) GetConsoleType() string
func (*OpenstackPlatform) GetConsoleUrl ¶
func (*OpenstackPlatform) GetExternalGateway ¶
func (s *OpenstackPlatform) GetExternalGateway(ctx context.Context, extNetName string) (string, error)
GetExternalGateway retrieves Gateway IP from the external network information. It first gets external
network information. Using that it further gets subnet information. Inside that subnet information there should be gateway IP if the network is set up correctly.
Not to be confused with GetRouterDetailExternalGateway.
func (*OpenstackPlatform) GetFeatures ¶
func (o *OpenstackPlatform) GetFeatures() *edgeproto.PlatformFeatures
func (*OpenstackPlatform) GetFlavorInfo ¶
func (s *OpenstackPlatform) GetFlavorInfo(ctx context.Context) ([]*edgeproto.FlavorInfo, []OSAZone, []OSImage, error)
func (*OpenstackPlatform) GetFlavorList ¶
func (o *OpenstackPlatform) GetFlavorList(ctx context.Context) ([]*edgeproto.FlavorInfo, error)
func (*OpenstackPlatform) GetGPUSetupStage ¶
func (p *OpenstackPlatform) GetGPUSetupStage(ctx context.Context) vmlayer.GPUSetupStage
func (*OpenstackPlatform) GetImageDetail ¶
func (s *OpenstackPlatform) GetImageDetail(ctx context.Context, name string) (*OSImageDetail, error)
GetImageDetail show of a given image from Glance
func (*OpenstackPlatform) GetInternalCIDR ¶
func (s *OpenstackPlatform) GetInternalCIDR(name string, srvs []OSServer) (string, error)
GetInternalCIDR returns CIDR of server
func (*OpenstackPlatform) GetInternalIP ¶
func (s *OpenstackPlatform) GetInternalIP(name string, srvs []OSServer) (string, error)
GetInternalIP returns IP of the server
func (*OpenstackPlatform) GetInternalPortPolicy ¶
func (o *OpenstackPlatform) GetInternalPortPolicy() vmlayer.InternalPortAttachPolicy
func (*OpenstackPlatform) GetNetworkDetail ¶
func (o *OpenstackPlatform) GetNetworkDetail(ctx context.Context, networkName string) (*vmlayer.NetworkDetail, error)
func (*OpenstackPlatform) GetNetworkList ¶
func (o *OpenstackPlatform) GetNetworkList(ctx context.Context) ([]string, error)
func (*OpenstackPlatform) GetNumberOfFloatingIps ¶
GetNumberOfFloatingIps returns allocated,used
func (*OpenstackPlatform) GetOSNetworkDetail ¶
func (s *OpenstackPlatform) GetOSNetworkDetail(ctx context.Context, networkName string) (*OSNetworkDetail, error)
GetNetworkDetail returns details about a network. It is used, for example, by GetExternalGateway.
func (*OpenstackPlatform) GetOpenRCVars ¶
func (*OpenstackPlatform) GetOpenStackRouterDetail ¶
func (s *OpenstackPlatform) GetOpenStackRouterDetail(ctx context.Context, routerName string) (*OSRouterDetail, error)
GetRouterDetail returns details per router
func (*OpenstackPlatform) GetOpenstackServerDetails ¶
func (s *OpenstackPlatform) GetOpenstackServerDetails(ctx context.Context, name string) (*OSServerDetail, error)
func (*OpenstackPlatform) GetPlatformResourceInfo ¶
func (s *OpenstackPlatform) GetPlatformResourceInfo(ctx context.Context) (*vmlayer.PlatformResources, error)
func (*OpenstackPlatform) GetPortDetails ¶
func (s *OpenstackPlatform) GetPortDetails(ctx context.Context, name string) (*OSPortDetail, error)
GetPortDetails gets details of the specified port
func (*OpenstackPlatform) GetResourceID ¶
func (o *OpenstackPlatform) GetResourceID(ctx context.Context, resourceType vmlayer.ResourceType, resourceName string) (string, error)
func (*OpenstackPlatform) GetRouterDetail ¶
func (o *OpenstackPlatform) GetRouterDetail(ctx context.Context, routerName string) (*vmlayer.RouterDetail, error)
func (*OpenstackPlatform) GetSecurityGroupIDForName ¶
func (s *OpenstackPlatform) GetSecurityGroupIDForName(ctx context.Context, groupName string) (string, error)
GetSecurityGroupIDForName gets the group ID for the given security group name. It handles duplicate names by finding the one for the project.
func (*OpenstackPlatform) GetSecurityGroupIDForProject ¶
func (*OpenstackPlatform) GetServerDetail ¶
func (o *OpenstackPlatform) GetServerDetail(ctx context.Context, serverName string) (*vmlayer.ServerDetail, error)
func (*OpenstackPlatform) GetServerExternalIP ¶
func (o *OpenstackPlatform) GetServerExternalIP(networks map[string][]string) (string, error)
func (*OpenstackPlatform) GetServerGroupResources ¶
func (o *OpenstackPlatform) GetServerGroupResources(ctx context.Context, name string) (*edgeproto.InfraResources, error)
func (*OpenstackPlatform) GetServerInternalIP ¶
func (o *OpenstackPlatform) GetServerInternalIP(networks map[string][]string) (string, error)
func (*OpenstackPlatform) GetSubnetDetail ¶
func (s *OpenstackPlatform) GetSubnetDetail(ctx context.Context, subnetName string) (*OSSubnetDetail, error)
GetSubnetDetail returns details for the subnet. This is useful when getting router/gateway
IP for a given subnet. The gateway info is used for creating a server. Also useful in general, like other `detail` functions, to get the ID map for the name of subnet.
func (*OpenstackPlatform) GetVMStats ¶
func (*OpenstackPlatform) GetVMSubnetDetail ¶
func (o *OpenstackPlatform) GetVMSubnetDetail(ctx context.Context, ossd *OSSubnetDetail) (*vmlayer.SubnetDetail, error)
func (*OpenstackPlatform) HeatCreateVMs ¶
func (o *OpenstackPlatform) HeatCreateVMs(ctx context.Context, VMGroupOrchestrationParams *vmlayer.VMGroupOrchestrationParams, updateCallback edgeproto.CacheUpdateCallback) error
func (*OpenstackPlatform) HeatDeleteStack ¶
func (o *OpenstackPlatform) HeatDeleteStack(ctx context.Context, stackName string) error
HeatDeleteStack deletes the VM resources
func (*OpenstackPlatform) HeatUpdateVMs ¶
func (o *OpenstackPlatform) HeatUpdateVMs(ctx context.Context, VMGroupOrchestrationParams *vmlayer.VMGroupOrchestrationParams, updateCallback edgeproto.CacheUpdateCallback) error
func (*OpenstackPlatform) IdSanitize ¶
func (o *OpenstackPlatform) IdSanitize(name string) string
Openstack IdSanitize is the same as NameSanitize
func (*OpenstackPlatform) InitApiAccessProperties ¶
func (*OpenstackPlatform) InitData ¶
func (o *OpenstackPlatform) InitData(ctx context.Context, caches *platform.Caches)
func (*OpenstackPlatform) InitOperationContext ¶
func (a *OpenstackPlatform) InitOperationContext(ctx context.Context, operationStage vmlayer.OperationInitStage) (context.Context, vmlayer.OperationInitResult, error)
func (*OpenstackPlatform) InitProvider ¶
func (o *OpenstackPlatform) InitProvider(ctx context.Context, caches *platform.Caches, stage vmlayer.ProviderInitStage, updateCallback edgeproto.CacheUpdateCallback) error
func (*OpenstackPlatform) InitResourceReservations ¶
func (o *OpenstackPlatform) InitResourceReservations(ctx context.Context)
func (*OpenstackPlatform) InternalCloudletUpdatedCallback ¶
func (p *OpenstackPlatform) InternalCloudletUpdatedCallback(ctx context.Context, old *edgeproto.CloudletInternal, new *edgeproto.CloudletInternal)
func (*OpenstackPlatform) ListAZones ¶
func (s *OpenstackPlatform) ListAZones(ctx context.Context) ([]OSAZone, error)
func (*OpenstackPlatform) ListFlavors ¶
func (s *OpenstackPlatform) ListFlavors(ctx context.Context) ([]OSFlavorDetail, error)
ListFlavors lists flavors known to the platform. The ones matching the flavorMatchPattern are returned
func (*OpenstackPlatform) ListFloatingIPs ¶
func (s *OpenstackPlatform) ListFloatingIPs(ctx context.Context, network string) ([]OSFloatingIP, error)
func (*OpenstackPlatform) ListImages ¶
func (s *OpenstackPlatform) ListImages(ctx context.Context) ([]OSImage, error)
ListImages lists avilable images in glance
func (*OpenstackPlatform) ListImagesDetail ¶
func (s *OpenstackPlatform) ListImagesDetail(ctx context.Context) ([]OSImageDetail, error)
fetch tags + properties etc of all images for resource mapping
func (*OpenstackPlatform) ListNetworks ¶
func (s *OpenstackPlatform) ListNetworks(ctx context.Context) ([]OSNetwork, error)
ListNetworks lists networks known to the platform. Some created by the operator, some by users.
func (*OpenstackPlatform) ListPorts ¶
func (s *OpenstackPlatform) ListPorts(ctx context.Context) ([]OSPort, error)
ListPorts returns a list of ports
func (*OpenstackPlatform) ListPortsServer ¶
ListPortsServerNetwork returns ports for a particular server on any network
func (*OpenstackPlatform) ListPortsServerNetwork ¶
func (s *OpenstackPlatform) ListPortsServerNetwork(ctx context.Context, server, network string) ([]OSPort, error)
ListPortsServerNetwork returns ports for a particular server on a given network
func (*OpenstackPlatform) ListProjects ¶
func (s *OpenstackPlatform) ListProjects(ctx context.Context) ([]OSProject, error)
ListProjects returns a list of projects we can see
func (*OpenstackPlatform) ListRouters ¶
func (s *OpenstackPlatform) ListRouters(ctx context.Context) ([]OSRouter, error)
ListRouters returns a list of routers available
func (*OpenstackPlatform) ListSecurityGroupRules ¶
func (s *OpenstackPlatform) ListSecurityGroupRules(ctx context.Context, secGrp string) ([]OSSecurityGroupRule, error)
ListSecurityGroups returns a list of security groups
func (*OpenstackPlatform) ListSecurityGroups ¶
func (s *OpenstackPlatform) ListSecurityGroups(ctx context.Context) ([]OSSecurityGroup, error)
ListSecurityGroups returns a list of security groups
func (*OpenstackPlatform) ListServers ¶
ListServers returns a map of servers keyed by name
func (*OpenstackPlatform) ListSubnets ¶
ListSubnets returns a list of subnets available
func (*OpenstackPlatform) NameSanitize ¶
func (o *OpenstackPlatform) NameSanitize(name string) string
alphanumeric plus -_. first char must be alpha, <= 255 chars.
func (*OpenstackPlatform) OSFindResourceByInstId ¶
func (s *OpenstackPlatform) OSFindResourceByInstId(ctx context.Context, resourceType, instId, name string) (*OSMetricResource, error)
Finds a resource by name by instance id. There are resources that are metered for instance-id, which are resources of their own The examples are instance_network_interface and instance_disk Openstack example call:
<openstack metric resource search --type instance_network_interface instance_id=dc32daa6-0d0a-4512-a9fa-2b989e913014>
We only use the the first found result
func (*OpenstackPlatform) OSGetAllLimits ¶
func (s *OpenstackPlatform) OSGetAllLimits(ctx context.Context) ([]OSLimit, error)
func (*OpenstackPlatform) OSGetConsoleUrl ¶
func (s *OpenstackPlatform) OSGetConsoleUrl(ctx context.Context, serverName string) (*OSConsoleUrl, error)
func (*OpenstackPlatform) OSGetLimits ¶
func (s *OpenstackPlatform) OSGetLimits(ctx context.Context, info *edgeproto.CloudletInfo) error
Get resource limits
func (*OpenstackPlatform) OSGetMetricsRangeForId ¶
func (s *OpenstackPlatform) OSGetMetricsRangeForId(ctx context.Context, resId string, metric string, startTime time.Time) ([]OSMetricMeasurement, error)
Get openstack metrics from ceilometer tsdb Example openstack call:
<openstack metric measures show --resource-id a9bf10cf-a709-5a47-8b69-da920b8f65cd network.incoming.bytes>
This will return a range of measurements from the startTime
func (*OpenstackPlatform) PrepNetwork ¶
func (o *OpenstackPlatform) PrepNetwork(ctx context.Context, updateCallback edgeproto.CacheUpdateCallback) error
PrepNetwork validates and does the work needed to ensure MEX network setup
func (*OpenstackPlatform) PrepareRootLB ¶
func (o *OpenstackPlatform) PrepareRootLB(ctx context.Context, client ssh.Client, rootLBName string, secGrpName string, TrustPolicy *edgeproto.TrustPolicy, updateCallback edgeproto.CacheUpdateCallback) error
func (*OpenstackPlatform) RemoveDuplicateImages ¶
func (o *OpenstackPlatform) RemoveDuplicateImages(ctx context.Context, imageName string) error
RemoveDuplicateImages is called when more than one image is found with the same name. This can happen in rare situations in which the an app was created twice at the same time on the same cloudlet (no longer possible due as this condition is now checked in PerformOrchestrationForVMApp), or if there are 2 cloudlets using the same openstack tenant (still possible in labs and PoC deployments) Cleanup logic is as follows:
- The first "active" image found is retained
- All images not in "active" state are removed. This could result in no images at all being left but at least this is a recoverable situation
func (*OpenstackPlatform) RemoveRouterSubnet ¶
func (s *OpenstackPlatform) RemoveRouterSubnet(ctx context.Context, routerName, subnetName string) error
RemoveRouterSubnet is useful to remove the router from the subnet before deletion. Otherwise subnet cannot
be deleted.
func (*OpenstackPlatform) RemoveWhitelistSecurityRules ¶
func (o *OpenstackPlatform) RemoveWhitelistSecurityRules(ctx context.Context, client ssh.Client, wlParams *infracommon.WhiteListParams) error
func (*OpenstackPlatform) SaveImage ¶
func (s *OpenstackPlatform) SaveImage(ctx context.Context, saveName, imageName string) error
SaveImage takes the image name available in glance, as a result of for example the above create image. It will then save that into a local file. The image transfer happens from glance into your own laptop or whatever. This can take a while, transferring all the data.
func (*OpenstackPlatform) SetPowerState ¶
func (s *OpenstackPlatform) SetPowerState(ctx context.Context, serverName, serverAction string) error
func (*OpenstackPlatform) SetRouter ¶
func (s *OpenstackPlatform) SetRouter(ctx context.Context, routerName, networkName string) error
SetRouter assigns the router to a particular network. The network needs to be attached to a real external network. This is intended only for routing to external network for now. No internal routers. Sometimes, oftentimes, it will fail if the network is not external.
func (*OpenstackPlatform) SetServerProperty ¶
func (s *OpenstackPlatform) SetServerProperty(ctx context.Context, name, property string) error
SetServerProperty sets properties for the server
func (*OpenstackPlatform) SetVMProperties ¶
func (o *OpenstackPlatform) SetVMProperties(vmProperties *vmlayer.VMProperties)
func (*OpenstackPlatform) ShowFlavor ¶
func (s *OpenstackPlatform) ShowFlavor(ctx context.Context, flavor string) (details OSFlavorDetail, err error)
ShowFlavor returns the details of a given flavor.
func (*OpenstackPlatform) TimedOpenStackCommand ¶
func (*OpenstackPlatform) UpdateHeatStackFromTemplate ¶
func (o *OpenstackPlatform) UpdateHeatStackFromTemplate(ctx context.Context, templateData interface{}, stackName, templateString string, updateCallback edgeproto.CacheUpdateCallback) error
UpdateHeatStackFromTemplate fills the template from templateData and creates the stack
func (*OpenstackPlatform) UpdateServerIPs ¶
func (o *OpenstackPlatform) UpdateServerIPs(ctx context.Context, addresses map[string][]string, ports []OSPort, serverDetail *vmlayer.ServerDetail) error
UpdateServerIPs gets the ServerIPs for the given network from the addresses and ports
func (*OpenstackPlatform) UpdateVMs ¶
func (o *OpenstackPlatform) UpdateVMs(ctx context.Context, VMGroupOrchestrationParams *vmlayer.VMGroupOrchestrationParams, updateCallback edgeproto.CacheUpdateCallback) error
func (*OpenstackPlatform) ValidateAdditionalNetworks ¶
func (o *OpenstackPlatform) ValidateAdditionalNetworks(ctx context.Context, additionalNets map[string]vmlayer.NetworkType) error
ValidateAdditionalNetworks ensures that any specified additional networks have just one subnet with no default GW and DHCP must be enabled
func (*OpenstackPlatform) ValidateNetwork ¶
func (o *OpenstackPlatform) ValidateNetwork(ctx context.Context) error
func (*OpenstackPlatform) VmAppChangedCallback ¶
func (o *OpenstackPlatform) VmAppChangedCallback(ctx context.Context, appInst *edgeproto.AppInst, newState edgeproto.TrackedState)
func (*OpenstackPlatform) WhitelistSecurityRules ¶
func (o *OpenstackPlatform) WhitelistSecurityRules(ctx context.Context, client ssh.Client, wlParams *infracommon.WhiteListParams) error