Casablanca Release

The Network Discovery Context Builder microservice was first introduced in Casablanca.

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:

  1. Service Decomposition (SD) MS
  2. 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)". 

The Network Discovery Micro-service is implemented under the SDNC APPS project. Documentation can be found here: Network Discovery Microservice (Dublin release)



a) If the API received by ND MS meets the requirements (includes mandatory headers and a valid resource type), it will respond with 200 OK .

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 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. 

Post any changes on application.properties , the corresponding MS need to be restarted.

MSConfig file
NDCTX Builder
application.properties for 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

application.properties for 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

#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

openstack.identity.url = http://10.69.36.11:5000/v3/auth/tokens
openstack.identity.user = ralph
openstack.identity.password = OBF:1w951ugg1vun1uha1w8l

openstack.types = vserver, l3-network
openstack.type.vserver.url = http://10.69.36.11:8774/v2.1/servers/{0}
openstack.type.l3-network.url = http://10.69.36.11:9696/v2.0/networks/{0}

openstack.api.microversion = 2.42

Interfaces/API

GET request at url = https://<NDCTX-Builder>:<port>/network-discovery/service/context/<serviceInstanceId> 

include headers: a) X-ONAP-PartnerName ,  b) X-ONAP-RequestId


Microserviceresponse codedetails
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
SD200
OK
400
Bad Request
404
Service not available
500
Unexpected Runtime error
NDCTX builder200
OK
404
Service not available
500
Unexpected Runtime error





  • No labels

1 Comment

  1. Need this to expand on using POMBA as a query on openstack connectivity and state