Work in Progress
Lifecycle Management Interface
This interface allows the CNF Manager (CNFM) client to invoke AS-CNF lifecycle management operations of AS-CNF instances towards the CNFM.
The operations provide through this interface are:
- Create AS Identifier
- Instantiate AS
Terminate AS- Delete AS Identifier
- Update AS
note: register and unregister of K8S cluster(s) are under consideration. May use existing AAI interface??? TBD.
Create AS Instance Resource
The creation of an "individual" AS instance resource.
REST Interfaces
- POST .../as_instances (CreateAsRequest)
- 201 Created (AsInstance)
- // Send AsIdentifierCreationNotification
post condition: upon successful completion, AS instance is created in NOT_INSTANTIATED state.
For the response AsInstance structure, see the AsInstance section below, ASD LCM RESTful Protocols for SO CNF Manager .
The caller of SO CNFM (in this case, BPMN Infra) need to use the return asInstanceId for invoking an AS Instance Instantiate.
Note: KeyValuePairs data type is typically realized as Hashmap or Hashtable
CreateAsRequest
Attribute Name | Data Type | Cardinality | Description |
---|---|---|---|
asdId | Identifier (UUID) | 1 | Identifier that identifies the ASD which defines the AS instance to be created. |
asInstanceName | String | 0..1 | Human-readable name of the AS instance to be created. |
asInstanceDescription | String | 0..1 | Human-readable description of the AS instance to be created. |
additionalParams1, 3 | KeyValuePairs | 0..1 | Additional input parameters for the instantiation process (this is a pace holder to hold any additional parameters the server) |
Note:
- additional parameters can be passed to define custom values. All keys that are separated by dots are handled as separate values. Passing a value file content is under consideration. Special characters are allowed to represent \n, \., etc.
- If some of the parameters required for instantiation are complex and cannot fit into the additionalParams section of the JSON request body, In this case, the deploymentItems can be used.
- the target cluster name could be passed thru additionalParams if the client wants to select the target cluster.
AsInstance (response)
see the AsInstance section below, ASD LCM RESTful Protocols for SO CNF Manager .
Instantiate AS Instance Resource
Before SO CNFM invokes As Instance Instantiate, SO CNFM may need to query for an asInstance based on the asInstanceId parameter.
REST Interfaces
- POST .../as_instances/{asInstanceId}/instantiate (InstantiateAsRequest)
- 202 Accepted ()
- Send asLcmOperationOccurrenceNotification (STARTING/PROCESSING/COMPLETED)
- 200 OK (AsLcmOpOcc:operationState=COMPLETED)
InstantiateAsRequest
Attribute Name | Data Type | Cardinality | Description |
---|---|---|---|
asdExtCpdInputParams | ExtCpdParams | 0..N | contains ext cpd parameter instance-level values |
deploymentItems2 | DeploymentItems | 1..N | contains lifecycle parameters for deploymentItems |
additionalParams1, 3 | KeyValuePairs | 0..1 | Additional input parameters for the instantiation process (this is a pace holder to hold any additional parameters the server) |
Note:
- additional parameters can be passed to define custom values. All keys that are separated by dots are handled as separate values. Passing a value file content is under consideration. Special characters are allowed to represent \n, \., etc.
- If some of the parameters required for instantiation are complex and cannot fit into the additionalParams section of the JSON request body, In this case, the deploymentItems can be used.
- the target cluster name could be passed thru additionalParams if the client wants to select the target cluster.
ExtCpdParams
extCpdId | UUID | 1 | identifier |
loadbalancerIP | String | 0..1 | contains the IP address to configure the loadBalancer of the K8s service or ingress controller that the ExtCpd represents |
externalIPs | String | 0..N | contains external IPs |
nadNames | String | 0..N | contains a list of nad names |
nadNamespace | String | 0..1 | contains a nad namespace |
DeploymentItems
Attribute Name | Data Type | Cardinality | Description |
---|---|---|---|
deploymentItemId | Identifier | 1 | Identifies which deploymentItem |
lifecycleParameterKeyValues | KeyValuesPairs | 0..N | provides lifecycle parameter keys and values |
Terminate AS Instance Resource
The termination of an individual AS instance resource.
REST Interfaces
POST .../as_instances/{asInstanceId}/instantiate (InstantiateAsRequest)202 Accepted ()Send asLcmOperationOccurrenceNotification (STARTING/PROCESSING/COMPLETED)200 OK (AsLcmOpOcc:operationState=COMPLETED)
TerminateAsRequest
| |||
Delete AS Instance Resource
The deletion of an individual AS instance resource.
REST Interfaces
- DELETE .../as_instances/{asInstanceId}
- 204 No Content
- // Send AsIdentifierDeletionNotification to Client
Update AS
TBD
Query Individual AS
REST Interfaces
- GET .../as_instances/{asInstanceId}
- 200 OK (AsInstance)
AsInstance for Create and Query
Attribute Name | Data Type | Cardinality | Description |
---|---|---|---|
asInstanceId | Identifier | 1 | Identifier of the AS instance |
asInstanceName | String | 0..1 | Name of the AS instance. This attribute can be modified with the PATCH method. |
asInstanceDescription | String | 0..1 | Human-readable description of the AS instance. This attribute can be modified with the PATCH method. |
asdId | Identifier | 1 | Identifier of the VNFD on which the VNF instance is based. |
asProvider | String | 1 | Provider of the AS instance. The value is copied from the ASD. |
asProductName | String | 1 | Name to identify the AS product. The value is copied from the ASD ? |
asApplicationName | String | 1 | Name to identify the AS instance. |
asSchemaVersion | Version | 1 | Specifies the version of the ASD’s schema (if we modify an ASD field definition, add/remove field definitions, etc.). |
asApplicationVersion | Version | 1 | Specifies the version of the Application (so, if software, DeploymentArtifacts , ASD values, ... change, this changes). |
asApplicationInfoName | String | 0..1 | Human readable name for the Application service instance. |
asInfoDescription | String | 0..1 | Human readable description of the AS instance |
asdExtCpd | datatype.ExtCpd | 0..N | Describes the externally exposed connection points of the application. |
enhancedClusterCapabilities | datatype. enhancedClusterCapabilities | 0..N | A list of expected capabilities of the target Kubernetes cluster to aid placement of the application service on a suitable cluster. |
deploymentItems | DeploymentItems | 1..N | Deployment artifacts |
instantiationState | String of Enum;
| 0..1 | Instantiation State |
instantiationAsInfo | datatype.instantiationAsInfo | 0..1 | Information specific to an instantiated AS Instance |
metadata | object (key value pair) | 0..1 | represents a list of key-value pairs |
extensions | object (key value pair) | 0..1 | Additional AS-specific attributes that affect the lifecycle management of this AS instance |
_links | datatype._links | Links to resources related to this resource | |
datatype.instantiationAsInfo
Attribute Name | Data Type | Cardinality | Description |
---|---|---|---|
asState | String of Enum;
| 1 | Identifier of the AS instance |
localizationLanguage | String | 0..1 | Information about localization language of the AS |
datatype._links
Attribute Name | Data Type | Cardinality | Description |
---|---|---|---|
self | object | 0..1 | represents a link to a resource using an absolute URI |
>href | String | 1 | string formatted according to IETF RFC 3986 |
indicators | object | 0..1 | represents a link to a resource using an absolute URI |
>href | String | 1 | string formatted according to IETF RFC 3986 |
instantiate | object | 0..1 | represents a link to a resource using an absolute URI |
>href | String | 1 | string formatted according to IETF RFC 3986 |
terminate | object | 0..1 | represents a link to a resource using an absolute URI |
>href | String | 1 | string formatted according to IETF RFC 3986 |
operate | object | 0..1 | represents a link to a resource using an absolute URI |
>href | String | 1 | string formatted according to IETF RFC 3986 |
Register K8S Clusters
To instantiate an AS on an non-ONAP K8S cluster, a cluster configuration file that is specific to the cluster must be uploaded.
To add a cluster configuration file of a cluster, create a POST request .../aslcm/v1/clusterconfigs will be performed.
- CNFM receives the clusterconfigs info and creates a cluster configuration file (cluster name + "." + "config" to the ./kube directory.
The kubectl configuration file is used to the body of the request to define external K8S clusters.
The cluster configuration file for a particular cluster must be retrieved from the cluster administrator.
Should the cluster configuration file change for any reason, e.g., CA certificate rotation on the target cluster or client key expires, then the cluster file registered in SO CNFM/AAI shall need to be updated.
The target cluster server and port must be reachable from the SO CNFM.
- to verify the connectdion to the target cluster, run the following command from the ONAP K8S cluster
- kubectl --kubeconfig ${PATH_TO_TARGET_CLUSTER_CONFIGURATION_FILE} get namespaces
Deregister K8S Clusters
To remove a cluster configruation file, create a DELETE request. .../aslcm/v1/clusterconfig/{configName}
CNFM will remove the "configName" + "." + "config" file from the .kube directory.
The command returns the HTTP status code 204 No Content
List Registered K8S Clusters
To get details about registered clusters, create a GET request .../aslcm/v1/clusterconfigs
The API returns a paginated response, but if a customized response is needed, additional parameters for page, size, sor and filtering could be applied.
Swagger File
The following is ASD LCM Restful API Swagger file (work in progress)