summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorTait,Trevor(rt0435) <rtait@amdocs.com>2018-10-26 13:27:54 -0400
committerLeigh, Phillip (pl876u) <phillip.leigh@amdocs.com>2018-10-26 15:28:46 -0400
commitf6a725a0b5b6864c09443e7f328927772a78ea05 (patch)
tree9a7aec7d4a93059e28ea1b15eee2576f1ad87c5a /config
parentb5f75d3996fbfd270e301abbe38766a9f6cf3a40 (diff)
SDNC context builder API Mapping Configuration
Issue-ID: LOG-421 Add code to use the VNF-API on SDNC where required. This involves using the api-mapping logic to select the VNF-API over the GNERIC-RESOURCES-API as well as adding the code to extract the information required by the VNF-API from AAI and adding the code to parse the VNF-API resonse into ModelContext. Change-Id: I4447a14d7fa39b2c5d9b655c2b20e651e56d3d77 Signed-off-by: Tait,Trevor(rt0435) <rtait@amdocs.com>
Diffstat (limited to 'config')
-rw-r--r--config/application.properties31
-rw-r--r--config/logback.xml18
-rw-r--r--config/rules/api-mapping-rules.drl4
-rw-r--r--config/sdncgenericresource.spec (renamed from config/sdnccontextbuilder.spec)20
-rw-r--r--config/vnflist.spec19
5 files changed, 49 insertions, 43 deletions
diff --git a/config/application.properties b/config/application.properties
index 8fc2503..6084aa0 100644
--- a/config/application.properties
+++ b/config/application.properties
@@ -1,27 +1,10 @@
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2018 Amdocs
- * ============================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=====================================================
- */
spring.jersey.type=filter
spring.mvc.urls=swagger,docs,prometheus,auditevents,info,heapdump,autoconfig,beans,loggers,dump,env,trace,health,configprops,mappings,metrics,webjars
camel.springboot.xmlRoutes = file:config/dynamic/routes/*.route
service.xml.beans = config/dynamic/conf/*.xml
-server.contextPath=/sdnccontextbuilder/v1
+server.contextPath=/sdnccontextbuilder
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
@@ -36,21 +19,22 @@ sdncCtxBuilder.userId=admin
sdncCtxBuilder.password=OBF:1u2a1toa1w8v1tok1u30
# SDNC REST Client Configuration
-sdnc.serviceName=10.69.100.139
-sdnc.servicePort=30202
+sdnc.serviceName=10.147.112.136
+sdnc.servicePort=9506
sdnc.httpProtocol=http
sdnc.user=admin
sdnc.password=OBF:1ks51l8d1o3i1pcc1r2r1e211r391kls1pyj1z7u1njf1lx51go21hnj1y0k1mli1sop1k8o1j651vu91mxw1vun1mze1vv11j8x1k5i1sp11mjc1y161hlr1gm41m111nkj1z781pw31kku1r4p1e391r571pbm1o741l4x1ksp
sdnc.connectionTimeout=5000
sdnc.readTimeout=1000
sdnc.genericResourcePath=/restconf/config/GENERIC-RESOURCE-API:services/service/{0}
+sdnc.vnfPath=/restconf/config/VNF-API:vnfs/vnf-list/{0}
#Servlet context parameters
server.context_parameters.p-name=value #context parameter with p-name as key and value as value.
# AAI REST Client Configuration
-aai.serviceName=10.12.6.120
-aai.servicePort=30233
+aai.serviceName=10.147.112.136
+aai.servicePort=9507
aai.username=AAI
aai.password=OBF:1gfr1ev31gg7
aai.httpProtocol=https
@@ -63,4 +47,7 @@ aai.http.password=OBF:1u2a1toa1w8v1tok1u30
aai.searchNodeQuery=/aai/v11/search/nodes-query?search-node-type=service-instance&filter=service-instance-id:EQUALS:
aai.customerQuery=/aai/v11/business/customers/customer/
+aai.serviceInstancePath=/aai/v11/business/customers/customer/{0}/service-subscriptions/service-subscription/{1}/service-instances/service-instance/{2}
+
+
diff --git a/config/logback.xml b/config/logback.xml
index 2f53172..8074057 100644
--- a/config/logback.xml
+++ b/config/logback.xml
@@ -1,21 +1,3 @@
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2018 Amdocs
- * ============================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=====================================================
- */
-
<configuration>
<property name="p_tim" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;, UTC}"/>
<property name="p_lvl" value="%level"/>
diff --git a/config/rules/api-mapping-rules.drl b/config/rules/api-mapping-rules.drl
index 6278d48..629d683 100644
--- a/config/rules/api-mapping-rules.drl
+++ b/config/rules/api-mapping-rules.drl
@@ -23,7 +23,7 @@ rule "ApiMapping-1"
no-loop true
lock-on-active true
when
- $s : ServiceEntity( serviceType not contains "vFW" )
+ $s : ServiceEntity( (serviceType not contains "vFW") && (serviceType not contains "vDNS") )
then
$s.setApiName("GENERIC-RESOURCE-API");
end
@@ -33,7 +33,7 @@ rule "ApiMapping-2"
no-loop true
lock-on-active true
when
- $s : ServiceEntity( serviceType contains "vFW" )
+ $s : ServiceEntity( (serviceType contains "vFW") || (serviceType contains "vDNS") )
then
$s.setApiName("VNF-API");
end
diff --git a/config/sdnccontextbuilder.spec b/config/sdncgenericresource.spec
index 1f15b22..652afb9 100644
--- a/config/sdnccontextbuilder.spec
+++ b/config/sdncgenericresource.spec
@@ -3,7 +3,7 @@
// any changes to this file
{
- // This section converts the updated json from service-decompostion
+ // This section converts the GENERIC-RESOURCES-API response from sdnc
// to org.onap.pomba.common.datatypes.ModelContext
"operation": "shift",
"spec": {
@@ -67,6 +67,24 @@
}
}
}
+ },
+ "networks": {
+ "network": {
+ "*": {
+ "network-data": {
+ "network-topology": {
+ "onap-model-information": {
+ "model-uuid": "vfList[0].vfModuleList[0].networkList[&4].uuid",
+ "model-invariant-uuid": "vfList[0].vfModuleList[0].networkList[&4].invariantUUID"
+ },
+ "network-topology-identifier-structure": {
+ "network-type": "vfList[0].vfModuleList[0].networkList[&4].type",
+ "network-name": "vfList[0].vfModuleList[0].networkList[&4].name"
+ }
+ }
+ }
+ }
+ }
}
}
}
diff --git a/config/vnflist.spec b/config/vnflist.spec
new file mode 100644
index 0000000..49c2434
--- /dev/null
+++ b/config/vnflist.spec
@@ -0,0 +1,19 @@
+[
+ // Use https://jolt-demo.appspot.com/#inception to develop/test
+ // any changes to this file
+
+ {
+ // This section converts aai response for GET VNF-API from SDNC
+ // to org.onap.pomba.common.datatypes.VF
+ "operation": "shift",
+ "spec": {
+ "vnfs": {
+ "vnf-list": {
+ "*": {
+ "*": "vnf-list[&1].&"
+ }
+ }
+ }
+ }
+ }
+ ]