summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x.gitignore1
-rw-r--r--cps-ncmp-rest/docs/openapi/components.yaml47
-rwxr-xr-xcps-ncmp-rest/docs/openapi/ncmp.yml29
-rwxr-xr-xcps-ncmp-rest/docs/openapi/openapi.yml5
-rwxr-xr-xcps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java7
-rwxr-xr-xcps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImpl.java8
-rw-r--r--cps-ri/src/main/java/org/onap/cps/spi/impl/CpsDataPersistenceServiceImpl.java2
-rw-r--r--cps-service/src/main/java/org/onap/cps/notification/CpsDataUpdatedEventFactory.java4
-rw-r--r--docs/admin-guide.rst8
-rwxr-xr-xdocs/conf.py5
-rw-r--r--docs/deployment.rst3
-rwxr-xr-xdocs/index.rst4
12 files changed, 109 insertions, 14 deletions
diff --git a/.gitignore b/.gitignore
index 3da7d4a05..58f1b2b12 100755
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@
*.jar
*.war
*.log
+*.log.zip
cps-application/archunit_store
target/
diff --git a/cps-ncmp-rest/docs/openapi/components.yaml b/cps-ncmp-rest/docs/openapi/components.yaml
index d35919da4..1f55ce199 100644
--- a/cps-ncmp-rest/docs/openapi/components.yaml
+++ b/cps-ncmp-rest/docs/openapi/components.yaml
@@ -19,6 +19,7 @@
components:
schemas:
+ # Common Schemas
ErrorMessage:
type: object
title: Error
@@ -30,6 +31,7 @@ components:
details:
type: string
+ # Request Schemas
RestDmiPluginRegistration:
type: object
properties:
@@ -65,6 +67,51 @@ components:
type: string
example: system-001
+ Conditions:
+ type: object
+ properties:
+ conditions:
+ $ref: '#/components/schemas/ConditionsData'
+ ConditionsData:
+ type: array
+ items:
+ type: object
+ $ref: '#/components/schemas/ConditionProperties'
+ ConditionProperties:
+ properties:
+ name:
+ type: string
+ example: hasAllModules
+ conditionParameters:
+ $ref: '#/components/schemas/ConditionParameters'
+ ConditionParameters:
+ type: array
+ items:
+ type: object
+ $ref: '#/components/schemas/ConditionParameter'
+ ConditionParameter:
+ properties:
+ moduleName:
+ type: string
+ example: someModuleName
+
+ #Response Schemas
+ CmHandles:
+ type: object
+ properties:
+ cmHandles:
+ $ref: '#/components/schemas/CmHandleProperties'
+ CmHandleProperties:
+ type: array
+ items:
+ type: object
+ $ref: '#/components/schemas/CmHandleProperty'
+ CmHandleProperty:
+ properties:
+ cmHandleId:
+ type: string
+ example: someCmHandleId
+
parameters:
cmHandleInPath:
name: cm-handle
diff --git a/cps-ncmp-rest/docs/openapi/ncmp.yml b/cps-ncmp-rest/docs/openapi/ncmp.yml
index 52245c3cc..9e3560a2f 100755
--- a/cps-ncmp-rest/docs/openapi/ncmp.yml
+++ b/cps-ncmp-rest/docs/openapi/ncmp.yml
@@ -283,4 +283,31 @@ fetchModuleReferencesByCmHandle:
403:
$ref: 'components.yaml#/components/responses/Forbidden'
404:
- $ref: 'components.yaml#/components/responses/NotFound' \ No newline at end of file
+ $ref: 'components.yaml#/components/responses/NotFound'
+
+executeCmHandleSearch:
+ post:
+ description: Execute cm handle searches using 'hasAllModules' condition to get all cm handles for the given module names
+ tags:
+ - network-cm-proxy
+ summary: Execute cm handle search using the available conditions
+ operationId: executeCmHandleSearch
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: 'components.yaml#/components/schemas/Conditions'
+ responses:
+ 200:
+ description: OK
+ content:
+ application/json:
+ schema:
+ $ref: 'components.yaml#/components/schemas/CmHandles'
+ 400:
+ $ref: 'components.yaml#/components/responses/BadRequest'
+ 401:
+ $ref: 'components.yaml#/components/responses/Unauthorized'
+ 403:
+ $ref: 'components.yaml#/components/responses/Forbidden' \ No newline at end of file
diff --git a/cps-ncmp-rest/docs/openapi/openapi.yml b/cps-ncmp-rest/docs/openapi/openapi.yml
index 69c2a117d..64a74c593 100755
--- a/cps-ncmp-rest/docs/openapi/openapi.yml
+++ b/cps-ncmp-rest/docs/openapi/openapi.yml
@@ -45,4 +45,7 @@ paths:
$ref: 'ncmp.yml#/resourceDataForPassthroughRunning'
/v1/ch/{cm-handle}/modules:
- $ref: 'ncmp.yml#/fetchModuleReferencesByCmHandle' \ No newline at end of file
+ $ref: 'ncmp.yml#/fetchModuleReferencesByCmHandle'
+
+ /v1/ch/searches:
+ $ref: 'ncmp.yml#/executeCmHandleSearch' \ No newline at end of file
diff --git a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java
index 9b15a7890..14f33d1e2 100755
--- a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java
+++ b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java
@@ -29,6 +29,8 @@ import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import org.onap.cps.ncmp.api.NetworkCmProxyDataService;
import org.onap.cps.ncmp.rest.api.NetworkCmProxyApi;
+import org.onap.cps.ncmp.rest.model.CmHandles;
+import org.onap.cps.ncmp.rest.model.Conditions;
import org.onap.cps.spi.FetchDescendantsOption;
import org.onap.cps.spi.model.DataNode;
import org.onap.cps.spi.model.ModuleReference;
@@ -194,6 +196,11 @@ public class NetworkCmProxyController implements NetworkCmProxyApi {
}
@Override
+ public ResponseEntity<CmHandles> executeCmHandleSearch(final Conditions conditions) {
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+ @Override
public ResponseEntity<Object> getModuleReferencesByCmHandle(final String cmHandle) {
final Collection<ModuleReference>
moduleReferences = networkCmProxyDataService.getYangResourcesModuleReferences(cmHandle);
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImpl.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImpl.java
index d6aaf36d3..11d1a8965 100755
--- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImpl.java
+++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImpl.java
@@ -388,11 +388,11 @@ public class NetworkCmProxyDataServiceImpl implements NetworkCmProxyDataService
prepareModuleSubsets(moduleReferencesFromCmHandle, existingModuleReferences, unknownModuleReferences);
final Map<String, String> newYangResourcesModuleNameToContentMap;
- if (unknownModuleReferences.size() > 0) {
- newYangResourcesModuleNameToContentMap = getNewYangResourcesFromDmi(persistenceCmHandle,
- unknownModuleReferences, cmHandlePropertiesAsMap);
- } else {
+ if (unknownModuleReferences.isEmpty()) {
newYangResourcesModuleNameToContentMap = new HashMap<>();
+ } else {
+ newYangResourcesModuleNameToContentMap = getNewYangResourcesFromDmi(persistenceCmHandle,
+ unknownModuleReferences, cmHandlePropertiesAsMap);
}
cpsModuleService.createSchemaSetFromModules(NF_PROXY_DATASPACE_NAME, persistenceCmHandle.getId(),
newYangResourcesModuleNameToContentMap, existingModuleReferences);
diff --git a/cps-ri/src/main/java/org/onap/cps/spi/impl/CpsDataPersistenceServiceImpl.java b/cps-ri/src/main/java/org/onap/cps/spi/impl/CpsDataPersistenceServiceImpl.java
index f924c7045..2397d3179 100644
--- a/cps-ri/src/main/java/org/onap/cps/spi/impl/CpsDataPersistenceServiceImpl.java
+++ b/cps-ri/src/main/java/org/onap/cps/spi/impl/CpsDataPersistenceServiceImpl.java
@@ -303,7 +303,7 @@ public class CpsDataPersistenceServiceImpl implements CpsDataPersistenceService
final Map<String, FragmentEntity> existingChildrenByXpath = existingFragmentEntity.getChildFragments()
.stream().collect(Collectors.toMap(FragmentEntity::getXpath, childFragmentEntity -> childFragmentEntity));
- final Collection updatedChildFragments = new HashSet<FragmentEntity>();
+ final Collection<FragmentEntity> updatedChildFragments = new HashSet<>();
for (final DataNode submittedChildDataNode : submittedDataNode.getChildDataNodes()) {
final FragmentEntity childFragment;
diff --git a/cps-service/src/main/java/org/onap/cps/notification/CpsDataUpdatedEventFactory.java b/cps-service/src/main/java/org/onap/cps/notification/CpsDataUpdatedEventFactory.java
index 85e5abab0..2985ed53b 100644
--- a/cps-service/src/main/java/org/onap/cps/notification/CpsDataUpdatedEventFactory.java
+++ b/cps-service/src/main/java/org/onap/cps/notification/CpsDataUpdatedEventFactory.java
@@ -34,6 +34,7 @@ import org.onap.cps.spi.FetchDescendantsOption;
import org.onap.cps.spi.model.Anchor;
import org.onap.cps.spi.model.DataNode;
import org.onap.cps.utils.DataMapUtils;
+import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
@Component
@@ -58,7 +59,8 @@ public class CpsDataUpdatedEventFactory {
private final CpsDataService cpsDataService;
private final CpsAdminService cpsAdminService;
- public CpsDataUpdatedEventFactory(final CpsDataService cpsDataService, final CpsAdminService cpsAdminService) {
+ public CpsDataUpdatedEventFactory(@Lazy final CpsDataService cpsDataService,
+ final CpsAdminService cpsAdminService) {
this.cpsDataService = cpsDataService;
this.cpsAdminService = cpsAdminService;
}
diff --git a/docs/admin-guide.rst b/docs/admin-guide.rst
index 3a6f8e255..7689ee5b6 100644
--- a/docs/admin-guide.rst
+++ b/docs/admin-guide.rst
@@ -12,6 +12,9 @@ CPS Admin Guide
.. toctree::
:maxdepth: 1
+.. Below Label is used by documentation for other CPS components to link here, do not remove even if it gives a warning
+.. _cps_common_logging:
+
Logging & Diagnostics
=====================
@@ -44,6 +47,9 @@ Logger configuration is provided as a chart resource :
| ncmp-dmi-plugin | Not yet applicable to DMI-Plugin |
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
+.. Below Label is used by documentation for other CPS components to link here, do not remove even if it gives a warning
+.. _cps_common_monitoring:
+
Monitoring
==========
Once CPS-Core is deployed, information related to the running instance of the application is available
@@ -69,4 +75,4 @@ Prometheus Metrics can be checked at the following endpoint
.. code::
- http://<cps-component-service-name>:8081/manage/prometheus \ No newline at end of file
+ http://<cps-component-service-name>:8081/manage/prometheus
diff --git a/docs/conf.py b/docs/conf.py
index 3aaddd194..84dac1ea2 100755
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -20,14 +20,15 @@
from docutils.parsers.rst import directives
from docs_conf.conf import *
+#change 'latest' to relevant branch-name once branch has been created
branch = 'latest'
doc_url = 'https://docs.onap.org/projects'
master_doc = 'index'
intersphinx_mapping = {}
-# Latest (change to branch)
-intersphinx_mapping['onap-cps'] = ('{}/onap-cps/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-cps-ncmp-dmi-plugin'] = ('{}/onap-cps-ncmp-dmi-plugin/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-cps-cps-temporal'] = ('{}/onap-cps-cps-temporal/en/%s'.format(doc_url) % branch, None)
linkcheck_ignore = [
'http://localhost',
diff --git a/docs/deployment.rst b/docs/deployment.rst
index 61f9ad294..b1839cbb8 100644
--- a/docs/deployment.rst
+++ b/docs/deployment.rst
@@ -98,7 +98,8 @@ Each cps component can be restarted independently by issuing the following comma
kubectl delete pod <cps-component-pod-name> -n <namespace>
-.. _credentials_retrieval:
+.. Below Label is used by documentation for other CPS components to link here, do not remove even if it gives a warning
+.. _cps_common_credentials_retrieval:
Credentials Retrieval
---------------------
diff --git a/docs/index.rst b/docs/index.rst
index cbe1b69d0..b749604ee 100755
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -25,9 +25,9 @@ CPS Documentation
DMI-Plugin Documentation
-----------------------------
-* `DMI-Plugin <https://docs.onap.org/projects/onap-cps-ncmp-dmi-plugin/en/latest/index.html>`_
+* :ref:`DMI-Plugin<onap-cps-ncmp-dmi-plugin:master_index>`
CPS-Temporal Documentation
--------------------------
-* `CPS-Temporal <https://docs.onap.org/projects/onap-cps-cps-temporal/en/latest/index.html>`_
+* :ref:`CPS-Temporal<onap-cps-cps-temporal:master_index>`