[Operational] Go API client for fedewapi
Introduction
RESTful APIs that allow an OP to share the edge cloud resources and capabilities securely to other partner OPs over E/WBI.
API Scope
APIs defined in this version of the specification can be categorized into the following areas:
- FederationAPIManagement - Retrieves federation resources and methods a partner OP support on E/WBI
- FederationManagement - Create and manage directed federation relationship with a partner OP
- AvailabilityZoneInfoSynchronization - Management of resources of partner OP zones and status updates
- ArtefactManagement - Upload, remove, retrieve and update application descriptors, charts and packages over E/WBI towards a partner OP
- FileManagement - Upload, remove, retrieve and update application binaries over E/WBI towards a partner OP
- ApplicationOnboardingManagement - Register, retrieve, update and remove applications over E/WBI towards a partner OP
- ApplicationDeploymentManagement - Create, update, retrieve and terminate application instances over E/WBI towards a partner OP
- AppProviderResourceManagement - Static resource reservation for an application provider over E/WBI for partner OP zones
- EdgeNodeSharing - Edge discovery procedures towards partner OP over E/WBI.
- ServiceAPIManagement - Service APIs capability sharing, forwarding, notification and API context management
- SubscribeMonitoringInfo - The Originating OP subscribe for receiving the resource utilization reports periodically from the partner OP for existing federation
- FaultManagement - The Partner OP performs the alarm reporting and clearances to the Originating OP on existing federation
- EventsReporting - The Partner OP notifies the detection of events as created by the Originating OP on the existing federation
- NetworkEventsReporting - The Partner OP notifies the network events applied for offered network capabilities on the existing federation
- ApplicationEventsReporting - The Partner OP notifies the applications events of the federated applications
- ApplicationPolicyManagement - The application-level policy requested by Originating OP for federated applications
- OperationPolicyManagement - The operation-level policy requested by Originating OP for federated edge cloud resources
Definitions
This section provides definitions of terminologies commonly referred to throughout the API descriptions.
- Accepted Zones - List of partner OP zones, which the originating OP has confirmed to use for its edge applications
- Anchoring - Partner OP capability to serve application clients (still in their home location) from application instances running on partner zones.
- Application Provider - An application developer, onboarding his/her edge application on a partner operator platform (MEC).
- Artefact - Descriptor, charts or any other package associated with the application.
- Availability Zone - Zones that partner OP can offer to share with originating OP.
- Device - Refers to user equipment like mobile phone, tablet, IOT kit, AR/VR device etc. In context of MEC users use these devices to access edge applications
- Directed Federation - A Federation between two OP instances A and B, in which edge compute resources are shared by B to A, but not from A to B.
- Edge Application - Application designed to run on MEC edge cloud
- Edge Discovery Service - Partner OP service responsible to select most optimal edge( within partner OP) for edge application instantiation. Edge discovery service is defined as HTTP based API endpoint identified by a well-defined FQDN or IP.
- E/WBI - East west bound interface.
- Federation - Relationship among member OPs who agrees to offer services and capabilities to the application providers and end users of member OPs
- FederationContextId - Partner OP defined string identifier representing a certain federation relationship.
- Federation Identifier - Identify an operator platform in federation context.
- FileId - An OP defined string identifier representing a certain application image uploaded by an application provider
- Flavour - A group of compute, network and storage resources that can be requested or granted as a single unit
- FlavourIdentifier - An OP defined string identifier representing a set of compute, storage and networking resources
- Home OP - Used in federation context to identify the OP with which the application developers or user clients are registered.
- Home Routing - Partner OP capability to direct roaming user client traffic towards application instances running on home OP zones.
- Instance - Application process running on an edge
- LCM Service - Partner OP service responsible for life cycle management of edge applications. LCM service is defined as HTTP based API endpoint identified by a well-defined FQDN or IP.
- Offered Zones - Zones that partner OP offer to share to the Originating OP based on the prior agreement and local configuration.
- Onboarding - Submitting an application to MEC platform
- OP - Operator platform.
- OperatorIdentifier - String identifier representing the owner of MEC platform. Owner could be an enterprise, a TSP or some other organization
- Originating OP - The OP when initiating the federation creation request towards the partner OP is defined as the Originating OP
- Partner OP - Operator Platform which offers its Edge Cloud capabilities to the other Operator Platforms via E/WBI.
- Resource - Compute, networking and storage resources.
- Resource Pool - A group of compute, networking and storage resources. Application provider pre-reserve resources on partner OP zone, these resources are reserved in terms of flavours.
- ZoneIdentifier - An OP defined string identifier representing a certain geographical or logical area where edge resources and services are provided
- Zone Confirmation - Procedure via which originating OP acknowledges partner OP about the partner zones it wishes to use.
- User Clients - Lightweight client applications used to access edge applications. Application users run these clients on their devices (UE, IOT device, AR/VR device etc)
- ServiceAPIManagement - Service APIs capability sharing, forwarding, notification and API context management
API Operations
FederationManagement
- CreateFederation - Creates a directed federation relationship with a partner OP
- GetFederationDetails - Retrieves details about the federation relationship with the partner OP. The response shall provide info about the zones offered by the partner, partner OP network codes, information about edge discovery and LCM service etc.
- DeleteFederationDetails - Remove existing federation with the partner OP
- NotifyFederationUpdates - Call back notification used by partner OP to update originating OP about any change in existing federation relationship
- UpdateFederation - API used by the Originating OP towards the partner OP, to update the parameters associated to the existing federation
- QueryFederationContext - The Originating OP retrieves federationContextId from the partner OP
- HealthCheckFederation - The Originating OP sends health check message to the partner OP to check the health of the the existing federation
- RenewFederation - The Originating OP requests the partner OP to renew the existing federation relationship
- GetNetworkCapabilities - The Originating OP requests the partner OP to share the offered network capabilities information
AvailabilityZoneInfoSynchronization
- ZoneSubscribe - Informs partner OP that originating OP is willing to access the specified zones and partner OP shall reserve compute and network resources for these zones.
- ZoneUnsubscribe - Informs partner OP that originating OP will no longer access the specified partner OP zone.
- GetZoneData - Retrieves details about the computation and network resources that partner OP has reserved for an partner OP zone.
- Notify Zone Information - Call back notification used by partner OP to update originating OP about changes in the resources reserved on a partner zone.
ArtefactManagement
- UploadArtefact - Uploads application artefact on partner operator platform.
- RemoveArtefact - Removes an artefact from partner operator platform.
- GetArtefact - Retrieves details about an artefact from partner operator platform.
- UploadFile Upload application binaries to partner operator platform
- RemoveFile - Removes application binaries from partner operator platform
- ViewFile - Retrieves details about binaries associated with an application from partner operator platform
ApplicationOnboardingManagement
- OnboardApplication - Submits an application details to a partner OP. Based on the details provided, partner OP shall do bookkeeping, resource validation and other pre-deployment operations
- UpdateApplication - Updates partner OP about changes in application compute resource requirements, QOS Profile, associated descriptor or change in associated components
- DeboardApplication - Removes an application from partner OP
- ViewApplication - Retrieves application details from partner OP
- OnboardExistingAppNewZones - Make an application available on new additional zones
- LockUnlockApplicationZone - Forbid or permit instantiation of application on a zone
Application Instance Lifecycle Management
- InstallApp - Instantiates an application on a partner OP zone.
- GetAppInstanceDetails - Retrieves an application instance details from partner OP.
- RemoveApp - Terminate an application instance on a partner OP zone.
- GetAllAppInstances - Retrieves details about all instances of the application running on partner OP zones.
AppProviderResourceManagement
- CreateResourcePools - Reserves resources (compute, network and storage) on a partner OP zone. ISVs registered with home OP reserves resources on a partner OP zone.
- UpdateISVResPool - Updates resources reserved for a pool by an ISV
- ViewISVResPool - Retrieves the resource pool reserved by an ISV
- RemoveISVResPool - Deletes the resource pool reserved by an ISV
EdgeNodeSharing *GetCandidateZones - Edge discovery procedures towards partner OP over E/WBI. Originating OP request partner OP to provide a list of candidate zones where an application instance can be created.
ServiceAPIManagement *ServiceAPIRequestForwarding - Forward the NBI Service API requests to Partner OP over E/WBI. *RemoveServiceAPISession - Remove the existing Service API session with Partner OP over E/WBI. *ServiceAPIRequestForwarding - Retrieve Service API session context with Partner OP over E/WBI.
ConsumptionReportingManagement *SubscribeForResourceConsumption - Originating OP Subscription for edge resource consumption reporting by Partner OP over E/WBI.
EventManagement *SubscribeForEventNotifications - Originating OP Subscription for edge services related events reporting by Partner OP over E/WBI.
Alarm Management *SubscribeForAlarmManagement - Originating OP Subscription for reporting of alarms by Partner OP over E/WBI.
Network Capabilities Event Management *SubscribeForNetworkCapabilitiesNotifications - Originating OP Subscription for reporting of network events for application of network capabilities by Partner OP over E/WBI.
Applications Event Notifications Management *SubscribeForApplicationEventsNotifications - Originating OP Subscription for reporting of application-level events by Partner OP over E/WBI.
© 2024 GSM Association. All rights reserved.
Overview
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: 1.4.0
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen
Installation
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
Put the package under your project folder and add the following in import:
import fedewapi "github.com/GIT_USER_ID/GIT_REPO_ID"
To use a proxy, set the environment variable HTTP_PROXY:
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
Configuration of Server URL
Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.
Select Server Configuration
For using other server than the one defined on index 0 set context value sw.ContextServerIndex of type int.
ctx := context.WithValue(context.Background(), fedewapi.ContextServerIndex, 1)
Templated Server URL
Templated server URL is formatted using default variables from configuration or from context value sw.ContextServerVariables of type map[string]string.
ctx := context.WithValue(context.Background(), fedewapi.ContextServerVariables, map[string]string{
"basePath": "v2",
})
Note, enum values are always validated and all unused variables are silently ignored.
URLs Configuration per Operation
Each operation can use different server URL defined using OperationServers map in the Configuration.
An operation is uniquely identified by "{classname}Service.{nickname}" string.
Similar rules for overriding default operation server index and variables applies by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.
ctx := context.WithValue(context.Background(), fedewapi.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), fedewapi.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})
Documentation for API Endpoints
All URIs are relative to https://operatorplatform.com/operatorplatform/federation/v1
Class | Method | HTTP request | Description ------------ | ------------- | ------------- | -------------
Documentation For Models
- APIForwardingRequest
- AccessPointInfoInner
- ActionType
- AffectedService
- AggrApplEventsList
- AlarmDetails
- AlarmIdentifier
- AlarmObjectInfo
- AlarmRaisedTime
- AlarmType
- AlarmUpdateOps
- AlarmedObject
- ApiContentType
- AppAggrResUtil
- AppComponentSpecsInner
- AppComponentsInner
- AppEventTypes
- AppIdLocList
- AppInstNetworkCapList
- AppInstNetworkCapListAppInstanceNwCapInfoInner
- AppLocation
- AppMetaData
- AppPolicyTemplate
- AppQoSProfile
- ApplConcretePolicy
- ApplEventsList
- ApplEventsSubsInfo
- ApplInstEventTypeInfo
- ApplInstEventsContainer
- ApplInstEventsList
- ApplPolicyMetaInfo
- ApplPolicyScope
- ApplPolicyType
- AppsForNotif
- AppsResUtilizeInfo
- AppsResUtilizeMetrics
- ArtefactDescriptorType
- ArtefactFileFormat
- ArtefactVirtType
- AssocApplPolicies
- AssocOpsPolicies
- AvailZoneIdLocList
- BinaryRuleOperatorType
- CPUArchType
- CallbackCredentials
- CapabilityID
- ClientLocation
- ClientLocationRadLocationInner
- CommandLineParams
- CompEnvParams
- ComponentSpec
- ComputeResourceInfo
- ComputeResourceProfile
- CpuUtilization
- CreateAlarmReportingSubscriptionRequest
- CreateApplicationEventSubscription200Response
- CreateApplicationEventSubscriptionRequest
- CreateApplicationPolicySubscription200Response
- CreateEventCriterionRequest
- CreateEventSubscriptionRequest
- CreateNetworkCapEvent200Response
- CreateNetworkCapEventRequest
- CreateNetworkCapsEventSubscriptionRequest
- CreateOperationPolicySubscription200Response
- CreateResourcePoolsRequest
- CreateResourcePoolsRequestResRequest
- CreateResourcePoolsRequestResRequestFlavoursInner
- DeploymentConfig
- DetectedEvent
- DeviceConnStatusChangeCap
- DiscoveredAppInstsInner
- DiscoveredAppInstsInnerAppInstancesInner
- DiscoveredAppInstsInnerAppInstancesInnerInstancesInfo
- DiscoveredEdgeNodesInner
- DiskUtilization
- DynamicQoSCap
- EdgeComputeMetrics
- EdgeResUtilizeMetrics
- EventCriterion
- EventInfo
- EventSubscription
- EventSubscriptionInfo
- ExpiryInterval
- FederationAPINames
- FederationAPIResources
- FederationContextIdAlarmsPost200Response
- FederationContextIdApiserviceServiceAPINameValPostRequest
- FederationContextIdApplicationLcmPostRequest
- FederationContextIdApplicationLcmPostRequestAppInstanceInfo
- FederationContextIdApplicationOnboardingPostRequest
- FederationContextIdApplicationOnboardingPostRequestStatusInfoInner
- FederationContextIdIsvResourceZoneZoneIdAppProviderAppProviderIdGetRequest
- FederationContextIdIsvResourceZoneZoneIdAppProviderAppProviderIdGetRequestGrantedFlavoursInner
- FederationContextIdMonioringSubscriptionsPostRequest
- FederationContextIdZonesGetRequest
- FederationContextIdZonesGetRequestZoneResUpdInfoInner
- FederationContextIdZonesGetRequestZoneResUpdInfoInnerAvailableNetResources
- FederationHealthInfo
- FederationRequestData
- FederationResponseData
- FederationSupportedAPIs
- Flavour
- FlavourMetrics
- GenericPolicyRule
- GetAlarmsList200Response
- GetAllAppInstances200ResponseInner
- GetAllAppInstances200ResponseInnerAppInstanceInfoInner
- GetAppInstanceDetails200Response
- GetArtefact200Response
- GetCandidateZonesRequest
- GetCandidateZonesRequestEdgeDiscoveryFilters
- GetEventsList200Response
- GetFederationAPIs200Response
- GetFederationContextId200Response
- GetFederationDetails200Response
- GetFederationHealth200Response
- GetNetworkCapsSubscribedList200Response
- GetPlatformCapabilities200Response
- GetServiceAPISessionInfo200Response
- GetServiceAPIsDetails200Response
- GpuInfo
- HttpMethods
- HttpResources
- HugePage
- InstallAppRequest
- InstallAppRequestZoneInfo
- InstanceDetailsInner
- InstanceDetailsInnerAppInstanceInfo
- InstanceState
- InterfaceDetails
- InvalidParam
- LatencyConstraints
- LatencyRanges
- LocationRetrievalCap
- MemUtilization
- MobileNetworkIds
- ModifyApplEventNotifSubscriptionRequest
- MonitoringSubsType
- MultiUserClients
- NetworkCapAppInfoListInner
- NetworkCapInvoked
- NetworkCapSubsInfo
- NetworkCaps
- NetworkUtilization
- NodeDiscoveryResponse
- OSType
- ObjectRepoLocation
- OnboardApplicationRequest
- OnboardStatusInfo
- OpsConcretePolicy
- OpsPolicyRule
- OpsPolicyScope
- OpsPolicyTemplate
- OpsPolicyType
- OpslPolicyMetaInfo
- PartnerPostRequest
- PartnerPostRequestZoneStatusInner
- PatchableParams
- PerceivedSeverity
- PeriodicNotifConfig
- PeriodicityInterval
- PersistentVolumeDetails
- ProbableCause
- ProblemDetails
- RegisterApplicationPolicy200Response
- RegisterApplicationPolicyRequest
- RegisterOperationPolicy200Response
- RegisterOperationPolicyRequest
- RemoveServiceAPISession200Response
- RenewFederation200Response
- RepoType
- ResourceReservationDuration
- ResourceSpec
- ResourceSubscriptionInfo
- ResourceType
- RetrieveAppPolicyTemplates200Response
- RetrieveOpsPolicyTemplates200Response
- RuleActionType
- RuleLHSParamType
- RuleOperatorType
- RuleRHSParamVal
- ServiceAPIContent
- ServiceAPIEventDef
- ServiceAPINameVal
- ServiceAPINetworkEvent
- ServiceAPIResponse
- ServiceAffecting
- ServiceEndpoint
- ServiceType
- SourceSystemId
- SpecificProblem
- State
- Status
- StringRuleOperatorType
- SubscribeApplsEvtNotif200Response
- SubscribeApplsEvtNotifRequest
- SubscribeMonitoringInfoRequest
- SubscriptionIdentifier
- SvcEventType
- TargetUserContext
- ThresholdVal
- UpdateApplicationRequest
- UpdateApplicationRequestAppUpdQoSProfile
- UpdateFederation200Response
- UpdateFederationRequest
- UpdateISVResPoolRequestInner
- UpdatedAlarmParameters
- UpdatedParam
- UploadArtefactRequest
- UploadFileRequest
- UserPlaneMgmtEvtCap
- UtilizationValue
- ViewApplication200Response
- ViewApplication200ResponseAppDeploymentZonesInner
- ViewFile200Response
- ViewISVResPool200ResponseInner
- ViewISVResPool200ResponseInnerReservedFlavoursInner
- VirtImageType
- ZoneDetails
- ZoneLevelApplEventsList
- ZoneRegisteredData
- ZoneRegisteredDataNetworkResources
- ZoneRegisteredDataZoneServiceLevelObjsInfo
- ZoneRegisteredDataZoneServiceLevelObjsInfoJitterRanges
- ZoneRegisteredDataZoneServiceLevelObjsInfoLatencyRanges
- ZoneRegisteredDataZoneServiceLevelObjsInfoThroughputRanges
- ZoneRegistrationRequestData
- ZoneRegistrationResponseData
Documentation For Authorization
notifClientCredentials
- Type: OAuth
- Flow: application
- Authorization URL:
- Scopes:
- fed-mgmt-notif: Access to the federation notification APIs
Example
auth := context.WithValue(context.Background(), sw.ContextAccessToken, "ACCESSTOKENSTRING")
r, err := client.Service.Operation(auth, args)
Or via OAuth2 module to automatically refresh tokens and perform user authentication.
import "golang.org/x/oauth2"
/* Perform OAuth2 round trip request and obtain a token */
tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
auth := context.WithValue(oauth2.NoContext, sw.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)
oAuth2ClientCredentials
- Type: OAuth
- Flow: application
- Authorization URL:
- Scopes:
- fed-mgmt: Access to the federation APIs
Example
auth := context.WithValue(context.Background(), sw.ContextAccessToken, "ACCESSTOKENSTRING")
r, err := client.Service.Operation(auth, args)
Or via OAuth2 module to automatically refresh tokens and perform user authentication.
import "golang.org/x/oauth2"
/* Perform OAuth2 round trip request and obtain a token */
tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
auth := context.WithValue(oauth2.NoContext, sw.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)
Documentation for Utility Methods
Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:
PtrBoolPtrIntPtrInt32PtrInt64PtrFloatPtrFloat32PtrFloat64PtrStringPtrTime