From 4cbd60b974fa68cab8501e9f3e9edef134eac09b Mon Sep 17 00:00:00 2001 From: ToineSiebelink Date: Thu, 30 Sep 2021 16:53:42 +0100 Subject: Fix issues with SOnar Qube coverage report -removed invalid jacoco exclude -removed strange (generated/accidental?) comment in main pom header -moved manually coded 'models' package (included in coverage now) to separate it from swagger generated package/classes with same name (exluded in coverage) -added some missing test scenarios -increased coverage limit from 70 to 98% to prevent regression Issue-ID: CPS-475 Signed-off-by: ToineSiebelink Change-Id: I2f1c276c543926d2d259e33b418f21de4abfea96 --- .../onap/cps/ncmp/dmi/model/CmHandleOperation.java | 35 ------------------- .../onap/cps/ncmp/dmi/model/CreatedCmHandle.java | 36 ------------------- .../onap/cps/ncmp/dmi/model/ModuleReference.java | 37 -------------------- .../onap/cps/ncmp/dmi/model/ModuleSchemaList.java | 36 ------------------- .../cps/ncmp/dmi/model/ModuleSchemaProperties.java | 40 ---------------------- .../org/onap/cps/ncmp/dmi/model/ModuleSchemas.java | 36 ------------------- .../dmi/rest/controller/DmiRestController.java | 8 +++-- .../org/onap/cps/ncmp/dmi/service/DmiService.java | 4 +-- .../onap/cps/ncmp/dmi/service/DmiServiceImpl.java | 12 +++---- .../ncmp/dmi/service/model/CmHandleOperation.java | 35 +++++++++++++++++++ .../ncmp/dmi/service/model/CreatedCmHandle.java | 36 +++++++++++++++++++ .../ncmp/dmi/service/model/ModuleReference.java | 37 ++++++++++++++++++++ .../ncmp/dmi/service/model/ModuleSchemaList.java | 36 +++++++++++++++++++ .../dmi/service/model/ModuleSchemaProperties.java | 40 ++++++++++++++++++++++ .../cps/ncmp/dmi/service/model/ModuleSchemas.java | 36 +++++++++++++++++++ 15 files changed, 233 insertions(+), 231 deletions(-) delete mode 100644 src/main/java/org/onap/cps/ncmp/dmi/model/CmHandleOperation.java delete mode 100644 src/main/java/org/onap/cps/ncmp/dmi/model/CreatedCmHandle.java delete mode 100644 src/main/java/org/onap/cps/ncmp/dmi/model/ModuleReference.java delete mode 100644 src/main/java/org/onap/cps/ncmp/dmi/model/ModuleSchemaList.java delete mode 100644 src/main/java/org/onap/cps/ncmp/dmi/model/ModuleSchemaProperties.java delete mode 100644 src/main/java/org/onap/cps/ncmp/dmi/model/ModuleSchemas.java create mode 100644 src/main/java/org/onap/cps/ncmp/dmi/service/model/CmHandleOperation.java create mode 100644 src/main/java/org/onap/cps/ncmp/dmi/service/model/CreatedCmHandle.java create mode 100644 src/main/java/org/onap/cps/ncmp/dmi/service/model/ModuleReference.java create mode 100644 src/main/java/org/onap/cps/ncmp/dmi/service/model/ModuleSchemaList.java create mode 100644 src/main/java/org/onap/cps/ncmp/dmi/service/model/ModuleSchemaProperties.java create mode 100644 src/main/java/org/onap/cps/ncmp/dmi/service/model/ModuleSchemas.java (limited to 'src/main/java/org/onap') diff --git a/src/main/java/org/onap/cps/ncmp/dmi/model/CmHandleOperation.java b/src/main/java/org/onap/cps/ncmp/dmi/model/CmHandleOperation.java deleted file mode 100644 index 8ddd42f8..00000000 --- a/src/main/java/org/onap/cps/ncmp/dmi/model/CmHandleOperation.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation - * ================================================================================ - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.cps.ncmp.dmi.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import java.util.List; -import lombok.Getter; -import lombok.Setter; - -@JsonInclude(JsonInclude.Include.NON_NULL) -@Getter -@Setter -public class CmHandleOperation { - - private String dmiPlugin; - private List createdCmHandles; -} \ No newline at end of file diff --git a/src/main/java/org/onap/cps/ncmp/dmi/model/CreatedCmHandle.java b/src/main/java/org/onap/cps/ncmp/dmi/model/CreatedCmHandle.java deleted file mode 100644 index 9198d7da..00000000 --- a/src/main/java/org/onap/cps/ncmp/dmi/model/CreatedCmHandle.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation - * ================================================================================ - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.cps.ncmp.dmi.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import java.util.Map; -import lombok.Getter; -import lombok.Setter; - -@JsonInclude(JsonInclude.Include.NON_NULL) -@Getter -@Setter -public class CreatedCmHandle { - - private String cmHandle; - private Map cmHandleProperties; - -} \ No newline at end of file diff --git a/src/main/java/org/onap/cps/ncmp/dmi/model/ModuleReference.java b/src/main/java/org/onap/cps/ncmp/dmi/model/ModuleReference.java deleted file mode 100644 index cb9b7cbb..00000000 --- a/src/main/java/org/onap/cps/ncmp/dmi/model/ModuleReference.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation - * ================================================================================ - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.cps.ncmp.dmi.model; - -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; - -/** - * Module Reference. - */ -@Getter -@Setter -@EqualsAndHashCode -public class ModuleReference { - - private String name; - private String revision; -} diff --git a/src/main/java/org/onap/cps/ncmp/dmi/model/ModuleSchemaList.java b/src/main/java/org/onap/cps/ncmp/dmi/model/ModuleSchemaList.java deleted file mode 100644 index 1e7dcb0a..00000000 --- a/src/main/java/org/onap/cps/ncmp/dmi/model/ModuleSchemaList.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation - * ================================================================================ - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.cps.ncmp.dmi.model; - -import java.util.List; -import lombok.Getter; -import lombok.Setter; - -/** - * ModuleSchemaList. - */ -@Getter -@Setter -public class ModuleSchemaList { - - private List schema; - -} diff --git a/src/main/java/org/onap/cps/ncmp/dmi/model/ModuleSchemaProperties.java b/src/main/java/org/onap/cps/ncmp/dmi/model/ModuleSchemaProperties.java deleted file mode 100644 index 507758ad..00000000 --- a/src/main/java/org/onap/cps/ncmp/dmi/model/ModuleSchemaProperties.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation - * ================================================================================ - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.cps.ncmp.dmi.model; - -import java.util.List; -import lombok.Getter; -import lombok.Setter; - -/** - * ModuleSchemaProperties. - */ -@Getter -@Setter -public class ModuleSchemaProperties { - - private String identifier; - private String version; - private String format; - private String namespace; - private List location; - -} diff --git a/src/main/java/org/onap/cps/ncmp/dmi/model/ModuleSchemas.java b/src/main/java/org/onap/cps/ncmp/dmi/model/ModuleSchemas.java deleted file mode 100644 index 5945168b..00000000 --- a/src/main/java/org/onap/cps/ncmp/dmi/model/ModuleSchemas.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation - * ================================================================================ - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.cps.ncmp.dmi.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Getter; -import lombok.Setter; - -/** - * ModuleSchemas. - */ -@Getter -@Setter -public class ModuleSchemas { - - @JsonProperty("ietf-netconf-monitoring:schemas") - private ModuleSchemaList schemas; -} diff --git a/src/main/java/org/onap/cps/ncmp/dmi/rest/controller/DmiRestController.java b/src/main/java/org/onap/cps/ncmp/dmi/rest/controller/DmiRestController.java index ff3cefcd..0afefeb0 100644 --- a/src/main/java/org/onap/cps/ncmp/dmi/rest/controller/DmiRestController.java +++ b/src/main/java/org/onap/cps/ncmp/dmi/rest/controller/DmiRestController.java @@ -20,6 +20,8 @@ package org.onap.cps.ncmp.dmi.rest.controller; +import static org.onap.cps.ncmp.dmi.model.DmiModuleReadRequestBody.OperationEnum.READ; + import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import java.util.List; @@ -30,12 +32,12 @@ import org.onap.cps.ncmp.dmi.model.CmHandles; import org.onap.cps.ncmp.dmi.model.DataAccessReadRequest; import org.onap.cps.ncmp.dmi.model.DataAccessWriteRequest; import org.onap.cps.ncmp.dmi.model.DmiModuleReadRequestBody; -import org.onap.cps.ncmp.dmi.model.ModuleReference; import org.onap.cps.ncmp.dmi.model.ModuleSet; import org.onap.cps.ncmp.dmi.model.YangResources; import org.onap.cps.ncmp.dmi.rest.api.DmiPluginApi; import org.onap.cps.ncmp.dmi.rest.api.DmiPluginInternalApi; import org.onap.cps.ncmp.dmi.service.DmiService; +import org.onap.cps.ncmp.dmi.service.model.ModuleReference; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -68,7 +70,7 @@ public class DmiRestController implements DmiPluginApi, DmiPluginInternalApi { public ResponseEntity retrieveModuleResources( final @Valid DmiModuleReadRequestBody dmiModuleReadRequestBody, final String cmHandle) { - if (dmiModuleReadRequestBody.getOperation().toString().equals("read")) { + if (READ.equals(dmiModuleReadRequestBody.getOperation())) { final var moduleReferenceList = convertRestObjectToJavaApiObject(dmiModuleReadRequestBody); final var response = dmiService.getModuleResources(cmHandle, moduleReferenceList); return new ResponseEntity<>(response, HttpStatus.OK); @@ -172,4 +174,4 @@ public class DmiRestController implements DmiPluginApi, DmiPluginInternalApi { .convertValue(dmiModuleSchemaReadRequestBody.getData().getModules(), new TypeReference>() {}); } -} \ No newline at end of file +} diff --git a/src/main/java/org/onap/cps/ncmp/dmi/service/DmiService.java b/src/main/java/org/onap/cps/ncmp/dmi/service/DmiService.java index bd0dc600..753810a2 100644 --- a/src/main/java/org/onap/cps/ncmp/dmi/service/DmiService.java +++ b/src/main/java/org/onap/cps/ncmp/dmi/service/DmiService.java @@ -24,9 +24,9 @@ import java.util.List; import java.util.Map; import javax.validation.constraints.NotNull; import org.onap.cps.ncmp.dmi.exception.DmiException; -import org.onap.cps.ncmp.dmi.model.ModuleReference; import org.onap.cps.ncmp.dmi.model.ModuleSet; import org.onap.cps.ncmp.dmi.model.YangResources; +import org.onap.cps.ncmp.dmi.service.model.ModuleReference; /** * Interface for handling Dmi plugin Data. @@ -108,4 +108,4 @@ public interface DmiService { */ String writeResourceDataPassthroughForCmHandle(String cmHandle, String resourceIdentifier, String dataType, String data); -} \ No newline at end of file +} diff --git a/src/main/java/org/onap/cps/ncmp/dmi/service/DmiServiceImpl.java b/src/main/java/org/onap/cps/ncmp/dmi/service/DmiServiceImpl.java index 182bdd84..844cc4de 100644 --- a/src/main/java/org/onap/cps/ncmp/dmi/service/DmiServiceImpl.java +++ b/src/main/java/org/onap/cps/ncmp/dmi/service/DmiServiceImpl.java @@ -37,16 +37,16 @@ import org.onap.cps.ncmp.dmi.exception.DmiException; import org.onap.cps.ncmp.dmi.exception.ModuleResourceNotFoundException; import org.onap.cps.ncmp.dmi.exception.ModulesNotFoundException; import org.onap.cps.ncmp.dmi.exception.ResourceDataNotFound; -import org.onap.cps.ncmp.dmi.model.CmHandleOperation; -import org.onap.cps.ncmp.dmi.model.CreatedCmHandle; -import org.onap.cps.ncmp.dmi.model.ModuleReference; -import org.onap.cps.ncmp.dmi.model.ModuleSchemaProperties; -import org.onap.cps.ncmp.dmi.model.ModuleSchemas; import org.onap.cps.ncmp.dmi.model.ModuleSet; import org.onap.cps.ncmp.dmi.model.ModuleSetSchemas; import org.onap.cps.ncmp.dmi.model.YangResource; import org.onap.cps.ncmp.dmi.model.YangResources; import org.onap.cps.ncmp.dmi.service.client.NcmpRestClient; +import org.onap.cps.ncmp.dmi.service.model.CmHandleOperation; +import org.onap.cps.ncmp.dmi.service.model.CreatedCmHandle; +import org.onap.cps.ncmp.dmi.service.model.ModuleReference; +import org.onap.cps.ncmp.dmi.service.model.ModuleSchemaProperties; +import org.onap.cps.ncmp.dmi.service.model.ModuleSchemas; import org.onap.cps.ncmp.dmi.service.operation.SdncOperations; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; @@ -269,4 +269,4 @@ public class DmiServiceImpl implements DmiService { return responseBodyAsJsonObject.getAsJsonObject(IETF_NETCONF_MONITORING_OUTPUT).getAsJsonPrimitive("data") .toString(); } -} \ No newline at end of file +} diff --git a/src/main/java/org/onap/cps/ncmp/dmi/service/model/CmHandleOperation.java b/src/main/java/org/onap/cps/ncmp/dmi/service/model/CmHandleOperation.java new file mode 100644 index 00000000..82eac92a --- /dev/null +++ b/src/main/java/org/onap/cps/ncmp/dmi/service/model/CmHandleOperation.java @@ -0,0 +1,35 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2021 Nordix Foundation + * ================================================================================ + * 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. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.cps.ncmp.dmi.service.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import java.util.List; +import lombok.Getter; +import lombok.Setter; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@Getter +@Setter +public class CmHandleOperation { + + private String dmiPlugin; + private List createdCmHandles; +} diff --git a/src/main/java/org/onap/cps/ncmp/dmi/service/model/CreatedCmHandle.java b/src/main/java/org/onap/cps/ncmp/dmi/service/model/CreatedCmHandle.java new file mode 100644 index 00000000..6ab6a01e --- /dev/null +++ b/src/main/java/org/onap/cps/ncmp/dmi/service/model/CreatedCmHandle.java @@ -0,0 +1,36 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2021 Nordix Foundation + * ================================================================================ + * 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. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.cps.ncmp.dmi.service.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import java.util.Map; +import lombok.Getter; +import lombok.Setter; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@Getter +@Setter +public class CreatedCmHandle { + + private String cmHandle; + private Map cmHandleProperties; + +} diff --git a/src/main/java/org/onap/cps/ncmp/dmi/service/model/ModuleReference.java b/src/main/java/org/onap/cps/ncmp/dmi/service/model/ModuleReference.java new file mode 100644 index 00000000..75c37dff --- /dev/null +++ b/src/main/java/org/onap/cps/ncmp/dmi/service/model/ModuleReference.java @@ -0,0 +1,37 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2021 Nordix Foundation + * ================================================================================ + * 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. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.cps.ncmp.dmi.service.model; + +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** + * Module Reference. + */ +@Getter +@Setter +@EqualsAndHashCode +public class ModuleReference { + + private String name; + private String revision; +} diff --git a/src/main/java/org/onap/cps/ncmp/dmi/service/model/ModuleSchemaList.java b/src/main/java/org/onap/cps/ncmp/dmi/service/model/ModuleSchemaList.java new file mode 100644 index 00000000..a4af1761 --- /dev/null +++ b/src/main/java/org/onap/cps/ncmp/dmi/service/model/ModuleSchemaList.java @@ -0,0 +1,36 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2021 Nordix Foundation + * ================================================================================ + * 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. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.cps.ncmp.dmi.service.model; + +import java.util.List; +import lombok.Getter; +import lombok.Setter; + +/** + * ModuleSchemaList. + */ +@Getter +@Setter +public class ModuleSchemaList { + + private List schema; + +} diff --git a/src/main/java/org/onap/cps/ncmp/dmi/service/model/ModuleSchemaProperties.java b/src/main/java/org/onap/cps/ncmp/dmi/service/model/ModuleSchemaProperties.java new file mode 100644 index 00000000..6de7d131 --- /dev/null +++ b/src/main/java/org/onap/cps/ncmp/dmi/service/model/ModuleSchemaProperties.java @@ -0,0 +1,40 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2021 Nordix Foundation + * ================================================================================ + * 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. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.cps.ncmp.dmi.service.model; + +import java.util.List; +import lombok.Getter; +import lombok.Setter; + +/** + * ModuleSchemaProperties. + */ +@Getter +@Setter +public class ModuleSchemaProperties { + + private String identifier; + private String version; + private String format; + private String namespace; + private List location; + +} diff --git a/src/main/java/org/onap/cps/ncmp/dmi/service/model/ModuleSchemas.java b/src/main/java/org/onap/cps/ncmp/dmi/service/model/ModuleSchemas.java new file mode 100644 index 00000000..a7b2430d --- /dev/null +++ b/src/main/java/org/onap/cps/ncmp/dmi/service/model/ModuleSchemas.java @@ -0,0 +1,36 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2021 Nordix Foundation + * ================================================================================ + * 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. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.cps.ncmp.dmi.service.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Getter; +import lombok.Setter; + +/** + * ModuleSchemas. + */ +@Getter +@Setter +public class ModuleSchemas { + + @JsonProperty("ietf-netconf-monitoring:schemas") + private ModuleSchemaList schemas; +} -- cgit 1.2.3-korg