Versions in this module Expand all Collapse all v1 v1.2.5 Sep 23, 2024 Changes in this version + const DuplicateResourceFound + const ImageNotFound + const OS_AUTH_URL + const OS_CACERT + const OS_CACERT_DATA + const OS_IDENTITY_API_VERSION + const OS_PASSWORD + const OS_PROJECT_DOMAIN_NAME + const OS_PROJECT_NAME + const OS_REGION_NAME + const OS_USERNAME + const OS_USER_DOMAIN_NAME + const SecgrpDoesNotExist + const SecgrpRuleAlreadyExists + const StackAlreadyExists + const StackNotFound + var AccessVarProps = map[string]*edgeproto.PropertyInfo + var CloudletSecurityGroupIDMap = make(map[string]string) + var OpenstackProps = map[string]*edgeproto.PropertyInfo + var QuotaProps = cloudcommon.GetCommonResourceQuotaProps(cloudcommon.ResourceInstances, cloudcommon.ResourceFloatingIPs) + var VmGroupTemplate = ... + 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 struct + DiscoveryErrs uint64 + OtherErrs uint64 + Successful uint64 + type NeutronErrorDetail struct + Detail string + Message string + Type string + type NeutronErrorType struct + NeutronError NeutronErrorDetail + type OSAZone struct + Name string + Status string + type OSAllocationPool struct + End string + Start string + type OSConsoleUrl struct + Url string + type OSExternalGateway struct + EnableSNAT bool + ExternalFixedIPs []OSFixedIP + NetworkID string + func GetRouterDetailExternalGateway(rd *OSRouterDetail) (*OSExternalGateway, error) + type OSFixedIP struct + IPAddress string + SubnetID string + type OSFlavor struct + Disk int + Ephemeral int + ID string + Name string + RAM int + VCPUs int + type OSFlavorDetail struct + Disk int + Ephemeral int + ID string + Name string + Properties map[string]string + Public bool + RAM int + RXTX_Factor util.EmptyStringJsonNumber + Swap util.EmptyStringJsonNumber + VCPUs int + type OSFloatingIP struct + FixedIPAddress string + FloatingIPAddress string + FloatingNetwork string + ID string + Port string + Project string + type OSHeatStackDetail struct + Description string + ID string + Parameters map[string]string + StackName string + StackStatus string + StackStatusReason string + type OSHeatStackTemplate struct + Resources map[string]OSStackResource + type OSImage struct + ID string + Name string + Status string + type OSImageDetail struct + Checksum string + DiskFormat string + ID string + Name string + Properties map[string]interface{} + Status string + Tags string + UpdatedAt string + type OSLimit struct + Name string + Value int + type OSMetricMeasurement struct + Granularity float64 + Timestamp string + Value float64 + type OSMetricResource struct + Creator string + EndedAt string + Id string + InstanceId string + Name string + OriginalResourceId string + ProjectId string + RevisionEnd string + RevisionStart string + StartedAt string + Type string + UserID string + type OSNetwork struct + ID string + Name string + Subnets []string + type OSNetworkDetail struct + AdminStateUp bool + AvailabilityZones []string + CreatedAt string + DNSDomain string + Description string + External bool + ID string + IPv4AddressScope string + IPv6AddressScope string + IsDefault bool + IsVLANTransparent bool + MTU int + Name string + PortSecurityEnabled bool + ProjectID string + ProviderNetworkType string + ProviderPhysicalNetwork string + ProviderSegmentationID int + QOSPolicyID string + RevisionNumber int + Segments string + Shared bool + Status string + Subnets []string + UpdatedAt string + type OSPort struct + FixedIPs []OSFixedIP + ID string + MACAddress string + Name string + Status string + type OSPortDetail struct + DeviceID string + FixedIPs []OSFixedIP + ID string + MACAddress string + Name string + Status string + type OSProject struct + ID string + Name string + type OSRouter struct + Distributed bool + HA bool + ID string + Name string + Project string + State string + Status string + type OSRouterDetail struct + CreatedAt string + Description string + Distributed bool + ExternalGatewayInfo string + FlavorID string + HA bool + ID string + InterfacesInfo string + Name string + ProjectID string + RevisionNumber int + Routes string + Status string + UpdatedAt string + type OSRouterInterface struct + IPAddress string + PortID string + SubnetID string + func GetRouterDetailInterfaces(ctx context.Context, rd *OSRouterDetail) ([]OSRouterInterface, error) + type OSSecurityGroup struct + ID string + Name string + Project string + type OSSecurityGroupName struct + Name string + type OSSecurityGroupRule struct + ID string + IPRange string + PortRange string + Protocol string + type OSServer struct + Flavor string + ID string + Image string + Name string + Networks map[string][]string + Status string + type OSServerDetail struct + AccessIPv4 string + AccessIPv6 string + Addresses map[string][]string + AvailabilityZone string + ConfigDrive string + Created string + DiskConfig string + Flavor string + HostID string + ID string + Image string + KeyName string + LaunchedAt string + Name string + PowerState int + Progress int + ProjectID string + Properties map[string]interface{} + SecurityGroups []OSSecurityGroupName + Status string + TaskState string + TerminatedAt string + Updated string + UserID string + VMState string + type OSServerOpt struct + AvailabilityZone string + Flavor string + Image string + Name string + NetIDs []string + Properties []string + UserData string + type OSStackResource struct + Properties map[string]interface{} + Type string + type OSSubnet struct + ID string + Name string + Network string + Subnet string + type OSSubnetDetail struct + AllocationPools []OSAllocationPool + CIDR string + CreatedAt string + DNSNameServers []string + Description string + EnableDHCP bool + GatewayIP string + ID string + IPVersion int + IPv6AddressMode string + IPv6RAMode string + Name string + NetworkID string + ProjectID string + RevisionNumber int + SegmentID string + SubnetPoolID string + UpdatedAt string + type OpenstackPlatform struct + VMProperties *vmlayer.VMProperties + func (a *OpenstackPlatform) InitOperationContext(ctx context.Context, operationStage vmlayer.OperationInitStage) (context.Context, vmlayer.OperationInitResult, error) + func (o *OpenstackPlatform) AddImageIfNotPresent(ctx context.Context, imageInfo *infracommon.ImageInfo, ...) error + func (o *OpenstackPlatform) AddSecurityRulesForRemoteGroup(ctx context.Context, groupId, remoteGroupId, protocol, direction 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 (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 (o *OpenstackPlatform) CreateVMs(ctx context.Context, ...) error + func (o *OpenstackPlatform) DeleteCloudletSecgrpStack(ctx context.Context, updateCallback edgeproto.CacheUpdateCallback) error + func (o *OpenstackPlatform) DeleteResources(ctx context.Context, resourceGroupName 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 (o *OpenstackPlatform) GatherCloudletInfo(ctx context.Context, info *edgeproto.CloudletInfo) 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 (o *OpenstackPlatform) GetFeatures() *edgeproto.PlatformFeatures + func (o *OpenstackPlatform) GetFlavorList(ctx context.Context) ([]*edgeproto.FlavorInfo, 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 (o *OpenstackPlatform) GetOpenRCVars(ctx context.Context, accessApi platform.AccessApi) 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 (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 (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 (o *OpenstackPlatform) InitProvider(ctx context.Context, caches *platform.Caches, stage vmlayer.ProviderInitStage, ...) error + func (o *OpenstackPlatform) InitResourceReservations(ctx context.Context) + func (o *OpenstackPlatform) NameSanitize(name string) string + 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 (o *OpenstackPlatform) RemoveWhitelistSecurityRules(ctx context.Context, client ssh.Client, wlParams *infracommon.WhiteListParams) error + func (o *OpenstackPlatform) SetVMProperties(vmProperties *vmlayer.VMProperties) + 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 (o *OpenstackPlatform) VmAppChangedCallback(ctx context.Context, appInst *edgeproto.AppInst, ...) + func (o *OpenstackPlatform) WhitelistSecurityRules(ctx context.Context, client ssh.Client, wlParams *infracommon.WhiteListParams) error + func (o OpenstackPlatform) ActiveChanged(ctx context.Context, platformActive bool) error + func (p *OpenstackPlatform) GetGPUSetupStage(ctx context.Context) vmlayer.GPUSetupStage + func (p *OpenstackPlatform) InternalCloudletUpdatedCallback(ctx context.Context, old *edgeproto.CloudletInternal, ...) + 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 (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 (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 (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 (s *OpenstackPlatform) DeleteImage(ctx context.Context, folder, imageName string) error + func (s *OpenstackPlatform) DeleteNetwork(ctx context.Context, name 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 (s *OpenstackPlatform) DetachPortFromServer(ctx context.Context, serverName string, subnetNames vmlayer.SubnetNames, ...) error + func (s *OpenstackPlatform) DetachSecurityGroupFromPort(ctx context.Context, portID, groupName string) error + func (s *OpenstackPlatform) GetActiveServerDetails(ctx context.Context, name string) (*OSServerDetail, error) + func (s *OpenstackPlatform) GetExternalGateway(ctx context.Context, extNetName string) (string, error) + func (s *OpenstackPlatform) GetFlavorInfo(ctx context.Context) ([]*edgeproto.FlavorInfo, []OSAZone, []OSImage, error) + 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 (s *OpenstackPlatform) GetNumberOfFloatingIps(ctx context.Context) (int, int, error) + func (s *OpenstackPlatform) GetOSNetworkDetail(ctx context.Context, networkName string) (*OSNetworkDetail, 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 (s *OpenstackPlatform) GetSecurityGroupIDForName(ctx context.Context, groupName string) (string, error) + func (s *OpenstackPlatform) GetSecurityGroupIDForProject(ctx context.Context, grpname string, projectID 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 (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 (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 (s *OpenstackPlatform) RemoveRouterSubnet(ctx context.Context, routerName, subnetName string) 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 (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 (s *OpenstackPlatform) VerifyVMs(ctx context.Context, vms []edgeproto.VM) error + type OpenstackResources struct + FloatingIPsUsed uint64 + InstancesUsed uint64 + SecGrpsUsed uint64 + type ReservedResources struct + FloatingIpIds map[string]string + Subnets map[string]string