Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 3
Next »
Overview
Network Discovery Context Builder (NDCTX Builder) is a MicroService (MS) responsible to aggregate information for network resources which is gathered from primary sources (e,g, openStack , A&AI, ...). The NorthBound for the MS is POMBA Context Aggregaotr and in the southbound it works with 2 MSs:
- Service Decomposition (SD) MS
- Network Discovery (ND) MS
Service Decomposition (SD) MS
A query (GetContext) is sent to NDCTX builder from Context Aggregator with a serviceInstanceId. Then SD MS acts to discover different resources of that service. Because a service could be tied to several resources, SD MS runs one query against each resources type. Supported list of the resource types are defined in configuration files for NDCTX MS and SD MS.
SD MS does a lookup to A&AI with serviceInstanceId to discover resources and finds number of relationships for the supported resource types. Consequently, for each relationship, SD MS send a query to A&AI to find more details. The results are then passed to NDCTX builder.
Network Discovery (ND) MS
Next step is to send APIs to ND MS. The GET APIs from NDCTX builder to ND MS includes combination of "resource type" and its "resource Id(s)".
a) If the API received by ND MS meets the requirements (includes mandatory headers and a valid resource type), it first responses with 200 OK and ackFinalIndicator=false. This means there will be second response upon completion of query from southbound. The second response is asynchronous. As it may take a while to get results from OpenStack.
b) If the API received by ND MS does not meets the requirements (e.g. missing mandatory header, unsupported resource type), it will be rejected with ackFinalIndicator=true with a proper response code (see Interface/API section below for more details on response codes). This will be the end of it and there will not be any query to southbound.
Configuration
Each of 3 MSs has a configuration file (application.properties), which is loaded during MS startup.
MS | Config file |
---|
NDCTX Builder |
spring.jersey.type=filter
spring.mvc.urls=swagger,docs,prometheus,auditevents,info,heapdump,autoconfig,beans,loggers,dump,env,trace,health,configprops,mappings,metrics,webjars
server.contextPath=/network-discovery
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
#This property is used to set the Tomcat connector attributes.developers can define multiple attributes separated by comma
#tomcat.connector.attributes=allowTrace-true
#The max number of active threads in this pool
server.tomcat.max-threads=200
#The minimum number of threads always kept alive
server.tomcat.min-Spare-Threads=25
#The number of milliseconds before an idle thread shutsdown, unless the number of active threads are less or equal to minSpareThreads
server.tomcat.max-idle-time=60000
# Network Discovery Context Builder REST Service
networkDiscoveryCtxBuilder.httpProtocol=http
networkDiscoveryCtxBuilder.port=8080
# Basic Authorization credentials for Network Discovery Context Builder REST Service
networkDiscoveryCtxBuilder.userId=admin
networkDiscoveryCtxBuilder.password=OBF:1u2a1toa1w8v1tok1u30
networkDiscoveryCtxBuilder.resourceList=vnfcs,vservers,l3-networks
# Resource Type mapping from ServiceDecomposition type to CtxBuilder type
networkDiscoveryCtxBuilder.resourceTypeMapping.vnfcs=vnfc
networkDiscoveryCtxBuilder.resourceTypeMapping.vservers=vserver
networkDiscoveryCtxBuilder.resourceTypeMapping.l3-networks=l3-network
# Service Decomposition REST Client Configuration
serviceDecomposition.httpProtocol=http
serviceDecomposition.host=10.147.112.136
serviceDecomposition.port=8080
serviceDecomposition.serviceInstancePath=/service-decomposition/service/context
#Basic Authorization Client credentials for Service Decomposition REST service
serviceDecomposition.userId=admin
serviceDecomposition.password=OBF:1u2a1toa1w8v1tok1u30
# Network Discovery Micro Service REST Client Configuration
networkDiscoveryMicroService.host=10.147.112.148
networkDiscoveryMicroService.port=8080
networkDiscoveryMicroService.httpProtocol=http
networkDiscoveryMicroService.networkDiscoveryPath=/network-discovery/v1/network/resource
# Wait for Network Discovery MicroService response in milliseconds
networkDiscoveryMicroService.responseTimeOutInMilliseconds=60000
# Basic Authorization credentials for Network Discovery Micro Service Rest Service
networkDiscoveryMicroService.userId=admin
networkDiscoveryMicroService.password=OBF:1u2a1toa1w8v1tok1u30
#Servlet context parameters
server.context_parameters.p-name=value #context parameter with p-name as key and value as value.
|
SD |
spring.jersey.type=filter
spring.mvc.urls=swagger,docs,prometheus,auditevents,info,heapdump,autoconfig,beans,loggers,dump,env,trace,health,configprops,mappings,metrics,webjars
server.contextPath=/service-decomposition
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
#This property is used to set the Tomcat connector attributes.developers can define multiple attributes separated by comma
#tomcat.connector.attributes=allowTrace-true
#The max number of active threads in this pool
server.tomcat.max-threads=200
#The minimum number of threads always kept alive
server.tomcat.min-Spare-Threads=25
#The number of milliseconds before an idle thread shutsdown, unless the number of active threads are less or equal to minSpareThreads
server.tomcat.max-idle-time=60000
basicAuth.username=admin
basicAuth.password=OBF:1u2a1toa1w8v1tok1u30
# AAI REST Client Configuration
aai.host=135.63.125.59
aai.port=8443
aai.httpProtocol=http
aai.trustStorePath=tomcat_keystore
aai.keyStorePath=aai-client-cert.p12
aai.keyStorePassword=OBF:1i9a1u2a1unz1lr61wn51wn11lss1unz1u301i6o
aai.keyManagerFactoryAlgorithm=SunX509
aai.keyStoreType=PKCS12
aai.securityProtocol=TLS
aai.connectionTimeout=5000
aai.readTimeout=1000
aai.resourceList=vnfc,vserver,l3-network
aai.serviceInstancePath=/aai/v13/nodes/service-instance/{0}
#Servlet context parameters
server.context_parameters.p-name=value #context parameter with p-name as key and value as value.
|
ND |
spring.jersey.type=filter
spring.mvc.urls=swagger,docs,prometheus,auditevents,info,heapdump,autoconfig,beans,loggers,dump,env,trace,health,configprops,mappings,metrics,webjars
server.contextPath=/network-discovery
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
#This property is used to set the Tomcat connector attributes.developers can define multiple attributes separated by comma
#tomcat.connector.attributes=allowTrace-true
#The max number of active threads in this pool
server.tomcat.max-threads=200
#The minimum number of threads always kept alive
server.tomcat.min-Spare-Threads=25
#The number of milliseconds before an idle thread shutsdown, unless the number of active threads are less or equal to minSpareThreads
server.tomcat.max-idle-time=60000
#Servlet context parameters
server.context_parameters.p-name=value #context parameter with p-name as key and value as value.
# Basic Authentication
basicAuth.username=admin
basicAuth.password=OBF:1u2a1toa1w8v1tok1u30
# A&AI Enircher REST Client Configuration
enricher.url=https://d2enrichment:9505
enricher.connectionTimeout=5000
enricher.readTimeout=60000
enricher.keyStorePath=config/auth/enricher-client-cert.p12
enricher.keyStorePassword=OBF:1i9a1u2a1unz1lr61wn51wn11lss1unz1u301i6o
enricher.types = vserver, l3-network
enricher.type.vserver.url = /enricher/v11/cloud-infrastructure/vservers/vserver/{0}?sot=!aai
enricher.type.l3-network.url = /enricher/v11/network/l3-networks/l3-network/{0}?sot=!aai
# Mapping from Enricher Attribute name to POMBA Attribute name in the format
# <Enricher Attribute Name>:<Pomba Attribute Name>; and separated by semicolon ";"
# for example,
# vserser-id:id;
# means Attribute name "vserer-id" from Enricher will be converted to "id" in POMBA.
enricher.attributeNameMappingList=Id:id;id:id;vserver-id:id;name:name;locked:inMaintenance; \
hostname:hostname;status:status;vm_state:vmState;vm-state:vmState;admin_state_up:AdminState; \
favor.disk:flavorDisk;flavor.ephemeral:flavorEphemoral;flavor.extra_specs.hw.cpu_model:flavorHwCpuModel; \
flavor.extra_specs.hw.cpu_policy:flavorHwCpuPolicy;flavor.extra_specs.hw.mem_page_size:flavorHwMemPageSize; \
flavor.original_name:flavorOriginalName;flavor.ram:flavorRam;flavor.swap:flavorSwag;flavorvcpus:flavorVcpus; \
image.id:imageId;hostId:hostId;host:host;host_status:hostStatus;security_group.name:securityGroupName; \
serverName:serverName;metadata.myservername:otherServerName;shared:sharedNetwork;subnets:subnets; \
userId:userId;tenant_id:tenantId
|
Interfaces/API
GET request at url = http://<NDCTX-Builder>:<port>/network-discovery/service/context/<serviceInstanceId>
include headers: a) X-ONAP-PartnerName , b) X-ONAP-RequestId
Microservice | response code | details |
---|
ND
| 200 | Request has completed and no more information is forthcoming |
202 | Request has been accepted and more information will be posted to notificationURL |
400 | Missing mandatory field in the request or HTTP header |
404 | Requested resource was not found |
500 | Request failed due to internal error |
SD | 200 | OK |
400 | Bad Request |
404 | Service not available |
500 | Unexpected Runtime error |
NDCTX builder | 200 | OK |
404 | Service not available |
500 | Unexpected Runtime error |