diff options
Diffstat (limited to 'src/test/resources')
-rw-r--r-- | src/test/resources/application-test.yaml | 64 | ||||
-rw-r--r-- | src/test/resources/json/LICENSE.txt | 19 | ||||
-rw-r--r-- | src/test/resources/json/aainfvoResponse.json | 10 | ||||
-rw-r--r-- | src/test/resources/json/createNsReq.json | 56 | ||||
-rw-r--r-- | src/test/resources/json/createNsRsp.json | 3 | ||||
-rw-r--r-- | src/test/resources/json/createNsSol005Response.json | 210 | ||||
-rw-r--r-- | src/test/resources/json/deleteNsReq.json | 7 | ||||
-rw-r--r-- | src/test/resources/json/instantiateNsReq.json | 32 | ||||
-rw-r--r-- | src/test/resources/json/instantiateNsRsp.json | 3 | ||||
-rw-r--r-- | src/test/resources/json/lcmOperRsp.json | 7 | ||||
-rw-r--r-- | src/test/resources/json/queryJobReq.json | 7 | ||||
-rw-r--r-- | src/test/resources/json/queryJobRsp.json | 10 | ||||
-rw-r--r-- | src/test/resources/json/terminateNsReq.json | 7 | ||||
-rw-r--r-- | src/test/resources/json/terminateNsRsp.json | 3 | ||||
-rw-r--r-- | src/test/resources/logback-test.xml | 42 |
15 files changed, 480 insertions, 0 deletions
diff --git a/src/test/resources/application-test.yaml b/src/test/resources/application-test.yaml new file mode 100644 index 0000000..b43d382 --- /dev/null +++ b/src/test/resources/application-test.yaml @@ -0,0 +1,64 @@ + +server: + port: 8080 + tomcat: + max-threads: 50 +ssl-enable: false +mso: + adapters: + requestDb: + auth: Basic YnBlbDptc28tZGItMTUwNyE= + endpoint: http://localhost:8081 + logPath: logs + site-name: localSite + infra-requests: + archived: + period: 1 +spring: + datasource: + jdbc-url: jdbc:mariadb://localhost:3307/requestdb + username: root + password: password + driver-class-name: org.mariadb.jdbc.Driver + initialize: true + initialization-mode: never + jpa: + generate-ddl: false + show-sql: false + hibernate: + ddl-auto: validate + naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy + enable-lazy-load-no-trans: true + database-platform: org.hibernate.dialect.MySQL5InnoDBDialect + security: + usercredentials: + - + username: test + password: '$2a$12$Zi3AuYcZoZO/gBQyUtST2.F5N6HqcTtaNci2Et.ufsQhski56srIu' + role: BPEL-Client +mariaDB4j: + dataDir: + port: 3307 + databaseName: requestdb + +#Actuator +management: + endpoints: + web: + base-path: /manage + server: + servlet: + context-path: /manage + metrics: + se-global-registry: false + export: + prometheus: + enabled: true # Whether exporting of metrics to Prometheus is enabled. + step: 1m # Step size (i.e. reporting frequency) to use. + + +flyway: + baseline-on-migrate: false + url: jdbc:mariadb://localhost:3307/requestdb + user: root + password: password diff --git a/src/test/resources/json/LICENSE.txt b/src/test/resources/json/LICENSE.txt new file mode 100644 index 0000000..bc40e66 --- /dev/null +++ b/src/test/resources/json/LICENSE.txt @@ -0,0 +1,19 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * 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========================================================= + */
\ No newline at end of file diff --git a/src/test/resources/json/aainfvoResponse.json b/src/test/resources/json/aainfvoResponse.json new file mode 100644 index 0000000..35047a9 --- /dev/null +++ b/src/test/resources/json/aainfvoResponse.json @@ -0,0 +1,10 @@ +{ + "nfvoId":"6ee79fe2-9579-475a-9bb9-20cf4358a19e", + "name":"external_nfvo", + "api-root":"xyz", + "vendor":"vz", + "version":"v1.0", + "url":"http://sample.com/", + "userName":"admin", + "password":"sacjnasnc" +}
\ No newline at end of file diff --git a/src/test/resources/json/createNsReq.json b/src/test/resources/json/createNsReq.json new file mode 100644 index 0000000..aec8ae8 --- /dev/null +++ b/src/test/resources/json/createNsReq.json @@ -0,0 +1,56 @@ +{ + "nsServiceName":"vcpe_e2e_vnf_test2", + "nsServiceDescription":"null", + "nsServiceModelUUID":"c9f0a95e-dea0-4698-96e5-5a79bc5a233d", + "nsOperationKey":{ + "globalSubscriberId":"Demonstration", + "serviceType":"vCPE", + "serviceId":"996fadbb-e806-4a19-b0e5-3454ad6ac29e", + "operationId":"1f1dd6b2-b027-4008-a9df-3b6c8274fb24", + "nodeTemplateUUID":"4d3a835c-29c8-4a63-83a4-50de5f7ffe16" + }, + "nsParameters":{ + "locationConstraints":[ + { + "locationConstraints":{ + "vimId":"CloudOwner_regionOne" + }, + "vnfProfileId":"b1bb0ce7-2222-4fa7-95ed-4840d70a1101" + }, + { + "locationConstraints":{ + "vimId":"CloudOwner_regionOne" + }, + "vnfProfileId":"0408f076-e6c0-4c82-9940-272fddbb82de" + }, + { + "locationConstraints":{ + "vimId":"CloudOwner_regionOne" + }, + "vnfProfileId":"b1bb0ce7-2222-4fa7-95ed-4840d70a1100" + }, + { + "locationConstraints":{ + "vimId":"CloudOwner_regionOne" + }, + "vnfProfileId":"b1bb0ce7-2222-4fa7-95ed-4840d70a1102" + }, + { + "locationConstraints":{ + "vimId":"CloudOwner_regionOne" + }, + "vnfProfileId":"3fca3543-07f5-492f-812c-ed462e4f94f4" + } + ], + "additionalParamForNs":{ + "orchestrator":"", + "nfvo":"b1bb0ce7-2222-4fa7-95ed-4840d70a1101", + "nf_naming":"true", + "multi_stage_design":"false", + "availability_zone_max_count":"1", + "xyz":"123", + "nsd0_providing_service_invariant_uuid":"12204a12-7da2-4ddf-8c2f-992a1a1acebf", + "nsd0_providing_service_uuid":"5791dbeb-19d4-43e8-bf44-5b327ccf6bca" + } + } +} diff --git a/src/test/resources/json/createNsRsp.json b/src/test/resources/json/createNsRsp.json new file mode 100644 index 0000000..ccd1d66 --- /dev/null +++ b/src/test/resources/json/createNsRsp.json @@ -0,0 +1,3 @@ +{ + "nsInstanceId": "9b9f02c0-298b-458a-bc9c-be3692e4f354" +}
\ No newline at end of file diff --git a/src/test/resources/json/createNsSol005Response.json b/src/test/resources/json/createNsSol005Response.json new file mode 100644 index 0000000..938969a --- /dev/null +++ b/src/test/resources/json/createNsSol005Response.json @@ -0,0 +1,210 @@ +{ + "_links":{ + "heal":{ + "href":"" + }, + "instantiate":{ + "href":"" + }, + "nestedNsInstances":{ + "href":"" + }, + "scale":{ + "href":"" + }, + "self":{ + "href":"" + }, + "terminate":{ + "href":"" + }, + "update":{ + "href":"" + } + }, + "additionalAffinityOrAntiAffiniityRule":[ + { + "Scope":"", + "affinityOrAntiAffiinty":"", + "vnfInstanceId":[ + + ], + "vnfProfileId":[ + + ], + "vnfdId":[ + + ] + } + ], + "flavourId":"", + "id":"c9f0a95e-dea0-4698-96e5-5a79bc5a233d", + "nestedNsInstanceId":[ + + ], + "nsInstanceDescription":"", + "nsInstanceName":"", + "nsScaleStatus":[ + { + "nsScaleLevelId":"", + "nsScalingAspectId":"" + } + ], + "nsState":"", + "nsdId":"", + "nsdInfoId":"", + "pnfInfo":[ + { + "cpInfo":[ + { + "cpInstanceId":"", + "cpProtocolData":{ + "ipOverEthernet":{ + "ipAddresses":{ + "addressRange":{ + "maxAddress":"", + "minAddress":"" + }, + "fixedAddresses":"", + "numDynamicAddresses":1, + "subnetId":"", + "type":"" + }, + "macAddress":{ + + } + }, + "layerProtocol":"IP_OVER_ETHERNET" + }, + "cpdId":"" + } + ], + "pnfId":"", + "pnfName":"", + "pnfProfileId":"", + "pnfdId":"", + "pnfdInfoId":"" + } + ], + "sapInfo":[ + { + "description":"", + "id":"", + "sapName":"", + "sapProtocolInfo":{ + "ipOverEthernet":{ + "ipAddresses":{ + "addressRange":{ + "maxAddress":"", + "minAddress":"" + }, + "fixedAddresses":"", + "numDynamicAddresses":1, + "subnetId":"", + "type":"" + }, + "macAddress":"" + }, + "layerProtocol":"IP_OVER_ETHERNET" + }, + "sapdId":"" + } + ], + "virtualLinkInfo":[ + { + "id":"", + "linkPort":[ + { + "id":"", + "resourceHandle":{ + "resourceId":"", + "resourceProviderId":"", + "vimId":"", + "vimLevelResourceType":"" + } + } + ], + "nsVirtualLinkDescId":"", + "resourceHandle":[ + { + "resourceId":"", + "resourceProviderId":"", + "vimId":"", + "vimLevelResourceType":"" + } + ] + } + ], + "vnfInstance":[ + { + "vnfInstanceId":"", + "vnfProfileId":"" + } + ], + "vnffgInfo":[ + { + "id":"", + "nfpInfo":[ + { + "description":"", + "id":"", + "nfpName":"", + "nfpRule":{ + "destinationIpAddressPrefix":"", + "destinationPortRange":"", + "dscp":"", + "etherDestinationAddress":"", + "etherSourceAddress":"", + "etherType":"", + "extendedCriteria":[ + { + "length":1, + "startingPoint":1, + "value":"" + } + ], + "protocol":"", + "sourceIpAddressPrefix":"", + "sourcePortRange":"", + "vlanTag":[ + + ] + }, + "nfpState":"", + "nfpdId":"", + "nscpHandle":[ + { + "nsInstanceId":"", + "nsSapInstanceId":"", + "pnfExtCpInstanceId":"", + "pnfInfoId":"", + "vnfExtCpInstanceId":"", + "vnfInstanceId":"" + } + ], + "totalCp":1 + } + ], + "nsCpHandle":[ + { + "nsInstanceId":"", + "nsSapInstanceId":"", + "pnfExtCpInstanceId":"", + "pnfInfoId":"", + "vnfExtCpInstanceId":"", + "vnfInstanceId":"" + } + ], + "nsVirtualLinkInfoId":[ + + ], + "pnfInfoId":[ + + ], + "vnfInstanceId":[ + + ], + "vnffgdId":"" + } + ] +}
\ No newline at end of file diff --git a/src/test/resources/json/deleteNsReq.json b/src/test/resources/json/deleteNsReq.json new file mode 100644 index 0000000..ac095e6 --- /dev/null +++ b/src/test/resources/json/deleteNsReq.json @@ -0,0 +1,7 @@ +{ + "globalSubscriberId":"9b9f02c0-298b-458a-bc9c-be3692e4f350", + "serviceType":"service", + "serviceId":"9b9f02c0-298b-458a-bc9c-be3692e4f351", + "operationId":"9b9f02c0-298b-458a-bc9c-be3692e4f352", + "nodeTemplateUUID":"9b9f02c0-298b-458a-bc9c-be3692e4f353" +}
\ No newline at end of file diff --git a/src/test/resources/json/instantiateNsReq.json b/src/test/resources/json/instantiateNsReq.json new file mode 100644 index 0000000..047c810 --- /dev/null +++ b/src/test/resources/json/instantiateNsReq.json @@ -0,0 +1,32 @@ +{ + "nsServiceName":"vIMS", + "nsServiceDescription":"vIMS NS", + "nsOperationKey":{ + "globalSubscriberId":"9b9f02c0-298b-458a-bc9c-be3692e4f350", + "serviceType":"service", + "serviceId":"9b9f02c0-298b-458a-bc9c-be3692e4f351", + "operationId":"9b9f02c0-298b-458a-bc9c-be3692e4f352", + "nodeTemplateUUID":"9b9f02c0-298b-458a-bc9c-be3692e4f353" + }, + "nsParameters":{ + "locationConstraints":[ + { + "vnfProfileId":"zte-CSCF-1.0", + "locationConstraints":{ + "vimId":"1" + } + } + ], + "additionalParamForNs":{ + "externalDataNetworkName":"Flow_out_net", + "m6000_mng_ip":"192.168.20.2", + "externalCompanyFtpDataNetworkName":"Flow_out_net", + "externalPluginManageNetworkName":"plugin_net_2014", + "externalManageNetworkName":"mng_net_2017", + "sfc_data_network":"sfc_data_net_2016", + "NatIpRange":"210.1.1.10-210.1.1.20", + "location":"4050083f-465f-4838-af1e-47a545222ad0", + "sdncontroller":"9b9f02c0-298b-458a-bc9c-be3692e4f35e" + } + } +}
\ No newline at end of file diff --git a/src/test/resources/json/instantiateNsRsp.json b/src/test/resources/json/instantiateNsRsp.json new file mode 100644 index 0000000..51e4d01 --- /dev/null +++ b/src/test/resources/json/instantiateNsRsp.json @@ -0,0 +1,3 @@ +{ + "jobId":"1" +}
\ No newline at end of file diff --git a/src/test/resources/json/lcmOperRsp.json b/src/test/resources/json/lcmOperRsp.json new file mode 100644 index 0000000..111afc1 --- /dev/null +++ b/src/test/resources/json/lcmOperRsp.json @@ -0,0 +1,7 @@ +{ + "id":"12204a12-7da2-4ddf-8c2f-992a1a1acebf", + "lcmOperationType":"INSTANTIATE", + "nsInstanceId":"c9f0a95e-dea0-4698-96e5-5a79bc5a233d", + "operationState":"PROCESSING", + "statusEnteredTime":"Time" +}
\ No newline at end of file diff --git a/src/test/resources/json/queryJobReq.json b/src/test/resources/json/queryJobReq.json new file mode 100644 index 0000000..ac095e6 --- /dev/null +++ b/src/test/resources/json/queryJobReq.json @@ -0,0 +1,7 @@ +{ + "globalSubscriberId":"9b9f02c0-298b-458a-bc9c-be3692e4f350", + "serviceType":"service", + "serviceId":"9b9f02c0-298b-458a-bc9c-be3692e4f351", + "operationId":"9b9f02c0-298b-458a-bc9c-be3692e4f352", + "nodeTemplateUUID":"9b9f02c0-298b-458a-bc9c-be3692e4f353" +}
\ No newline at end of file diff --git a/src/test/resources/json/queryJobRsp.json b/src/test/resources/json/queryJobRsp.json new file mode 100644 index 0000000..9238b47 --- /dev/null +++ b/src/test/resources/json/queryJobRsp.json @@ -0,0 +1,10 @@ +{ + "jobId": "1", + "responseDescriptor": { + "progress": "100", + "status": "finished", + "statusDescription": "OMC VMs are decommissioned in VIM", + "errorCode": "", + "responseId": "22" + } +}
\ No newline at end of file diff --git a/src/test/resources/json/terminateNsReq.json b/src/test/resources/json/terminateNsReq.json new file mode 100644 index 0000000..ac095e6 --- /dev/null +++ b/src/test/resources/json/terminateNsReq.json @@ -0,0 +1,7 @@ +{ + "globalSubscriberId":"9b9f02c0-298b-458a-bc9c-be3692e4f350", + "serviceType":"service", + "serviceId":"9b9f02c0-298b-458a-bc9c-be3692e4f351", + "operationId":"9b9f02c0-298b-458a-bc9c-be3692e4f352", + "nodeTemplateUUID":"9b9f02c0-298b-458a-bc9c-be3692e4f353" +}
\ No newline at end of file diff --git a/src/test/resources/json/terminateNsRsp.json b/src/test/resources/json/terminateNsRsp.json new file mode 100644 index 0000000..51e4d01 --- /dev/null +++ b/src/test/resources/json/terminateNsRsp.json @@ -0,0 +1,3 @@ +{ + "jobId":"1" +}
\ No newline at end of file diff --git a/src/test/resources/logback-test.xml b/src/test/resources/logback-test.xml new file mode 100644 index 0000000..c2e0098 --- /dev/null +++ b/src/test/resources/logback-test.xml @@ -0,0 +1,42 @@ +<!-- ============LICENSE_START======================================================= + ONAP SO ================================================================================ + Copyright (C) 2017 Huawei Intellectual Property. All rights reserved. ================================================================================ + 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> + + + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern>%d{MM/dd-HH:mm:ss.SSS}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}||%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}||%X{Timer}|%msg%n</pattern> + </encoder> + </appender> + + + <logger name="com.att.eelf.audit" level="info" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> + + <logger name="com.att.eelf.metrics" level="info" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> + + <logger name="com.att.eelf.error" level="trace" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> + <logger name="org.onap" level="${so.log.level:-DEBUG}" + additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> + <root level="info"> + <appender-ref ref="STDOUT" /> + </root> + + +</configuration> |