diff options
author | herbert <herbert.eiselt@highstreet-technologies.com> | 2020-02-28 13:19:20 +0100 |
---|---|---|
committer | herbert <herbert.eiselt@highstreet-technologies.com> | 2020-02-28 13:20:47 +0100 |
commit | ac2749ef5c0de23a9874c049e043eb7eda2b1168 (patch) | |
tree | 66ee02e72d69b2810275463a786e3c6b2e8360bb /sdnr/wt/devicemanager-onf | |
parent | ee75b19ee79f49b28a3137b6dcfdf02d6120f3de (diff) |
Update devicemanager components
Adjust license and add
Issue-ID: SDNC-1091
Signed-off-by: herbert <herbert.eiselt@highstreet-technologies.com>
Change-Id: Ic0eb5ff731c6c9cc982b9867d6731a9e470a9597
Diffstat (limited to 'sdnr/wt/devicemanager-onf')
38 files changed, 722 insertions, 630 deletions
diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/NetworkElementCoreData.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/NetworkElementCoreData.java index ddfeac227..0537ec828 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/NetworkElementCoreData.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/NetworkElementCoreData.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf; import java.util.Optional; diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ONFCoreNetworkElementCallback.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ONFCoreNetworkElementCallback.java index 55765d7c3..ce91ae301 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ONFCoreNetworkElementCallback.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ONFCoreNetworkElementCallback.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf; public interface ONFCoreNetworkElementCallback<T> { diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ONFCoreNetworkElementRepresentation.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ONFCoreNetworkElementRepresentation.java index 163c4a4f1..4122a7190 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ONFCoreNetworkElementRepresentation.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ONFCoreNetworkElementRepresentation.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf; import org.onap.ccsdk.features.sdnr.wt.devicemanager.ne.service.DeviceMonitoredNe; diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/OnfInterfacePac.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/OnfInterfacePac.java index 65b06a037..4d9c8b14d 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/OnfInterfacePac.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/OnfInterfacePac.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac; import org.eclipse.jdt.annotation.NonNull; diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/WrapperPTPModelRev170208.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/WrapperPTPModelRev170208.java index 7df39c747..1d25b4be0 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/WrapperPTPModelRev170208.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/WrapperPTPModelRev170208.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac; import java.util.List; diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/ExtendedEquipment.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/ExtendedEquipment.java index 4993b5e4a..56e616e9b 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/ExtendedEquipment.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/ExtendedEquipment.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.equipment; import java.util.ArrayList; diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/ONFCoreNetworkElement12Equipment.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/ONFCoreNetworkElement12Equipment.java index c67efe3df..aa88d98ad 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/ONFCoreNetworkElement12Equipment.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/ONFCoreNetworkElement12Equipment.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.equipment; import java.util.ArrayList; diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/ValueNameList.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/ValueNameList.java index a3361a0fe..1deb4fa1e 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/ValueNameList.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/ValueNameList.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.equipment; import java.util.HashMap; diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/WrapperEquipmentPacRev170402.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/WrapperEquipmentPacRev170402.java index 229f88cfa..28042668c 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/WrapperEquipmentPacRev170402.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/WrapperEquipmentPacRev170402.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.equipment; import java.lang.reflect.Constructor; diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/Helper.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/Helper.java index d200530fc..98b55b3ae 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/Helper.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/Helper.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.microwave; import org.eclipse.jdt.annotation.NonNull; diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/LinkIdentifyingObject.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/LinkIdentifyingObject.java index 4429473cf..97bf3fbe5 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/LinkIdentifyingObject.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/LinkIdentifyingObject.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.microwave; public interface LinkIdentifyingObject { diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/OnfMicrowaveModel.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/OnfMicrowaveModel.java index c2ca542a2..79e95cc59 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/OnfMicrowaveModel.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/OnfMicrowaveModel.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.microwave; import org.eclipse.jdt.annotation.NonNull; diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev170324.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev170324.java index 08783ecef..8aad824b0 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev170324.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev170324.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.microwave; diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev180907.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev180907.java index bee11b6be..0f200e91c 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev180907.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev180907.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.microwave; diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev181010.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev181010.java index 633f24d96..2531baaac 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev181010.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev181010.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.microwave; diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/pm/PerformanceDataAirInterface170324Builder.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/pm/PerformanceDataAirInterface170324Builder.java index a24f235a3..6f9fd63c4 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/pm/PerformanceDataAirInterface170324Builder.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/pm/PerformanceDataAirInterface170324Builder.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.microwave.pm; import java.util.Optional; diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/pm/PerformanceDataAirInterface180907Builder.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/pm/PerformanceDataAirInterface180907Builder.java index 62382e326..022f3f160 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/pm/PerformanceDataAirInterface180907Builder.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/pm/PerformanceDataAirInterface180907Builder.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.microwave.pm; import java.util.Optional; diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/pm/PerformanceDataAirInterface181010Builder.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/pm/PerformanceDataAirInterface181010Builder.java index 2b80a13ad..83e3e72fd 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/pm/PerformanceDataAirInterface181010Builder.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/pm/PerformanceDataAirInterface181010Builder.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.microwave.pm; import java.util.Optional; diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/impl/DeviceManagerOnfConfiguration.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/impl/DeviceManagerOnfConfiguration.java new file mode 100644 index 000000000..85303d89c --- /dev/null +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/impl/DeviceManagerOnfConfiguration.java @@ -0,0 +1,53 @@ +/* + * ============LICENSE_START======================================================================== + * ONAP : ccsdk feature sdnr wt + * ================================================================================================= + * Copyright (C) 2019 highstreet technologies GmbH 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========================================================================== + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.impl; + +import org.onap.ccsdk.features.sdnr.wt.common.configuration.Configuration; +import org.onap.ccsdk.features.sdnr.wt.common.configuration.ConfigurationFileRepresentation; + +public class DeviceManagerOnfConfiguration implements Configuration { + + private static final String SECTION_MARKER_DMONF = "dmonf"; + + private static final String DEFAULT_VALUE_ENABLED = String.valueOf(false); + private static final String PROPERTY_KEY_POLLALARMS = "pollAlarms"; + + private final ConfigurationFileRepresentation configuration; + + public DeviceManagerOnfConfiguration(ConfigurationFileRepresentation configuration) { + this.configuration = configuration; + this.configuration.addSection(SECTION_MARKER_DMONF); + defaults(); + } + + public boolean isPollAlarmsEnabled() { + return configuration.getPropertyBoolean(SECTION_MARKER_DMONF, PROPERTY_KEY_POLLALARMS); + } + + @Override + public String getSectionName() { + return SECTION_MARKER_DMONF; + } + + @Override + public void defaults() { + //Add default if not available + configuration.setPropertyIfNotAvailable(SECTION_MARKER_DMONF, PROPERTY_KEY_POLLALARMS, DEFAULT_VALUE_ENABLED); + } + +} diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/impl/DeviceManagerOnfImpl.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/impl/DeviceManagerOnfImpl.java index 04c3bc57b..3d7ff88c7 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/impl/DeviceManagerOnfImpl.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/impl/DeviceManagerOnfImpl.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.impl; import org.onap.ccsdk.features.sdnr.wt.common.database.HtDatabaseClient; @@ -33,6 +33,7 @@ public class DeviceManagerOnfImpl implements AutoCloseable { private HtDatabaseClient htDatabaseClient; private Boolean devicemanagerInitializationOk = false; private FactoryRegistration<ONFCoreNetworkElementFactory> resOnf; + private DeviceManagerOnfConfiguration configuration; // Blueprint begin public DeviceManagerOnfImpl() { @@ -48,7 +49,8 @@ public class DeviceManagerOnfImpl implements AutoCloseable { LOG.info("Session Initiated start {}", APPLICATIONNAME); - resOnf = netconfNetworkElementService.registerNetworkElementFactory(new ONFCoreNetworkElementFactory()); + configuration = new DeviceManagerOnfConfiguration(netconfNetworkElementService.getServiceProvider().getConfigurationFileRepresentation()); + resOnf = netconfNetworkElementService.registerNetworkElementFactory(new ONFCoreNetworkElementFactory(configuration)); netconfNetworkElementService.writeToEventLog(APPLICATIONNAME, "startup", "done"); diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/impl/ONFCoreNetworkElementFactory.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/impl/ONFCoreNetworkElementFactory.java index f9434f88c..3d2e04e87 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/impl/ONFCoreNetworkElementFactory.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/impl/ONFCoreNetworkElementFactory.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.impl; import java.util.Optional; @@ -43,6 +43,13 @@ public class ONFCoreNetworkElementFactory implements NetworkElementFactory { private static final Logger log = LoggerFactory.getLogger(ONFCoreNetworkElementFactory.class); + private final @NonNull DeviceManagerOnfConfiguration configuration; + + public ONFCoreNetworkElementFactory(@NonNull DeviceManagerOnfConfiguration configuration) { + this.configuration = configuration; + } + + @Override public Optional<org.onap.ccsdk.features.sdnr.wt.devicemanager.ne.service.NetworkElement> create( @NonNull NetconfAccessor acessor, @NonNull DeviceManagerServiceProvider serviceProvider) { @@ -63,9 +70,9 @@ public class ONFCoreNetworkElementFactory implements NetworkElementFactory { } if (onfMicrowaveModel != null) { - return Optional.of(new ONFCoreNetworkElement12Microwave(acessor, serviceProvider, onfMicrowaveModel)); + return Optional.of(new ONFCoreNetworkElement12Microwave(acessor, serviceProvider, configuration, onfMicrowaveModel)); } else { - return Optional.of(new ONFCoreNetworkElement12Basic(acessor, serviceProvider)); + return Optional.of(new ONFCoreNetworkElement12Basic(acessor, serviceProvider, configuration)); } } diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Base.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Base.java index 9fc0c9599..0b405d002 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Base.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Base.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ne; import java.util.ArrayList; diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Basic.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Basic.java index b152824ee..de6947dd4 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Basic.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Basic.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,10 +14,11 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ne; import org.eclipse.jdt.annotation.NonNull; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.impl.DeviceManagerOnfConfiguration; import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.AaiService; import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider; import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.EquipmentService; @@ -62,6 +63,7 @@ public class ONFCoreNetworkElement12Basic extends ONFCoreNetworkElement12Base { private final @NonNull String mountPointNodeName; private final @NonNull NetconfAccessor acessor; + private final @NonNull DeviceManagerOnfConfiguration pollAlarmConfig; /*----------------------------------------------------------------------------- * Construction @@ -73,11 +75,12 @@ public class ONFCoreNetworkElement12Basic extends ONFCoreNetworkElement12Base { * @param serviceProvider to get devicemanager services */ public ONFCoreNetworkElement12Basic(@NonNull NetconfAccessor acessor, - @NonNull DeviceManagerServiceProvider serviceProvider) { + @NonNull DeviceManagerServiceProvider serviceProvider, DeviceManagerOnfConfiguration configuration) { super(acessor); this.mountPointNodeName = acessor.getNodeId().getValue(); this.acessor = acessor; + this.pollAlarmConfig = configuration; this.faultService = serviceProvider.getFaultService(); this.equipmentService = serviceProvider.getEquipmentService(); @@ -100,7 +103,7 @@ public class ONFCoreNetworkElement12Basic extends ONFCoreNetworkElement12Base { public void prepareCheck() { synchronized (dmLock) { boolean change = readNetworkElementAndInterfaces(); - if (change) { + if (change || pollAlarmConfig.isPollAlarmsEnabled()) { int problems = faultService.removeAllCurrentProblemsOfNode(nodeId); FaultData resultList = readAllCurrentProblemsOfNode(); faultService.initCurrentProblemStatus(nodeId, resultList); @@ -198,7 +201,7 @@ public class ONFCoreNetworkElement12Basic extends ONFCoreNetworkElement12Base { @Override public void close() throws Exception { - // Close to be implemented + // Close to be implemented } diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Microwave.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Microwave.java index 505e0ca12..ebdb8ccf1 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Microwave.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Microwave.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ne; import java.util.List; @@ -23,6 +23,7 @@ import org.eclipse.jdt.annotation.NonNull; import org.eclipse.jdt.annotation.Nullable; import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.microwave.Helper; import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.microwave.OnfMicrowaveModel; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.impl.DeviceManagerOnfConfiguration; import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.notifications.NotificationActor; import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.notifications.NotificationWorker; import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.util.ONFLayerProtocolName; @@ -81,10 +82,12 @@ public class ONFCoreNetworkElement12Microwave extends ONFCoreNetworkElement12Bas * @param serviceProvider to get services * @param onfMicrowaveModel handling ofmicrosoft model data */ - public ONFCoreNetworkElement12Microwave(@NonNull NetconfAccessor acessor, - @NonNull DeviceManagerServiceProvider serviceProvider, @NonNull OnfMicrowaveModel onfMicrowaveModel) { + public ONFCoreNetworkElement12Microwave(@NonNull NetconfAccessor acessor, + @NonNull DeviceManagerServiceProvider serviceProvider, + DeviceManagerOnfConfiguration configuration, + OnfMicrowaveModel onfMicrowaveModel) { - super(acessor, serviceProvider); + super(acessor, serviceProvider,configuration); this.microwaveModel = onfMicrowaveModel; this.microwaveEventListener = serviceProvider.getFaultService(); @@ -100,6 +103,12 @@ public class ONFCoreNetworkElement12Microwave extends ONFCoreNetworkElement12Bas */ /** + * @param acessor + * @param serviceProvider + * @param configuration + * @param onfMicrowaveModel + */ + /** * DeviceMonitor Prepare check by updating NE state and reading all interfaces. */ @Override diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElementBase.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElementBase.java index 5bbeb74ef..1b03f8acb 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElementBase.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElementBase.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ /** * */ diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/notifications/NotificationActor.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/notifications/NotificationActor.java index e216cff38..0fc9397ee 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/notifications/NotificationActor.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/notifications/NotificationActor.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.notifications; import org.eclipse.jdt.annotation.NonNull; diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/notifications/NotificationWorker.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/notifications/NotificationWorker.java index 5de65642b..ed6497c0f 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/notifications/NotificationWorker.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/notifications/NotificationWorker.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.notifications; import java.util.concurrent.BlockingQueue; diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/util/ONFLayerProtocolName.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/util/ONFLayerProtocolName.java index f9e5ea688..a768da078 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/util/ONFLayerProtocolName.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/util/ONFLayerProtocolName.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.util; import org.eclipse.jdt.annotation.NonNull; diff --git a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/test/TestExtendedEquipment.java b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/test/TestExtendedEquipment.java index f55ef4afc..cda0f5366 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/test/TestExtendedEquipment.java +++ b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/test/TestExtendedEquipment.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.equipment.test; import static org.junit.Assert.*; diff --git a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/test/TestONFCoreNetworkElement12Equipment.java b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/test/TestONFCoreNetworkElement12Equipment.java index c5107364f..ff2969eac 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/test/TestONFCoreNetworkElement12Equipment.java +++ b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/test/TestONFCoreNetworkElement12Equipment.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.equipment.test; import static org.junit.Assert.*; diff --git a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestHelper.java b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestHelper.java index 5d14e7d26..cae28f4fe 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestHelper.java +++ b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestHelper.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.microwave.test; import static org.junit.Assert.*; diff --git a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev170324.java b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev170324.java index 99e426adc..0140eaa59 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev170324.java +++ b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev170324.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.microwave.test; import static org.junit.Assert.*; diff --git a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev180907.java b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev180907.java index 64c857173..e4d89f28f 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev180907.java +++ b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev180907.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.microwave.test; import static org.junit.Assert.*; diff --git a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev181010.java b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev181010.java index 32d9849d8..eac003dac 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev181010.java +++ b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev181010.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.microwave.test; import static org.junit.Assert.*; diff --git a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/test/TestWrapperPTPModelRev170208.java b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/test/TestWrapperPTPModelRev170208.java index 55db66a1a..bf9337291 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/test/TestWrapperPTPModelRev170208.java +++ b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/test/TestWrapperPTPModelRev170208.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.test; import static org.junit.Assert.*; diff --git a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/impl/test/TestONFCoreNetworkElementFactory.java b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/impl/test/TestONFCoreNetworkElementFactory.java index 6713a7821..93e65c0b9 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/impl/test/TestONFCoreNetworkElementFactory.java +++ b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/impl/test/TestONFCoreNetworkElementFactory.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,20 +14,24 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.impl.test; import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; +import java.io.File; import java.io.IOException; import org.junit.After; +import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; +import org.onap.ccsdk.features.sdnr.wt.common.configuration.ConfigurationFileRepresentation; import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.microwave.WrapperMicrowaveModelRev170324; import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.microwave.WrapperMicrowaveModelRev180907; import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.microwave.WrapperMicrowaveModelRev181010; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.impl.DeviceManagerOnfConfiguration; import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.impl.ONFCoreNetworkElementFactory; import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.Capabilities; @@ -39,61 +43,76 @@ import org.opendaylight.yangtools.yang.common.QName; public class TestONFCoreNetworkElementFactory { - static NetconfAccessor accessor; - static DeviceManagerServiceProvider serviceProvider; - static Capabilities capabilities; - static DataBroker dataBroker; - static NodeId nNodeId; - QName qCapability; - - @BeforeClass - public static void init() throws InterruptedException, IOException { - capabilities = mock(Capabilities.class); - accessor = mock(NetconfAccessor.class); - serviceProvider = mock(DeviceManagerServiceProvider.class); - dataBroker = mock(DataBroker.class); - - when(accessor.getCapabilites()).thenReturn(capabilities); - //when(serviceProvider.getDataProvider()).thenReturn(dataProvider); - nNodeId = new NodeId("nSky"); - when(accessor.getNodeId()).thenReturn(nNodeId); - - - } - - @Test - public void testCreateMWModelRev170324() throws Exception { - when(accessor.getCapabilites().isSupportingNamespaceAndRevision(NetworkElement.QNAME)).thenReturn(true); - when(accessor.getCapabilites().isSupportingNamespaceAndRevision(WrapperMicrowaveModelRev170324.QNAME)).thenReturn(true); - when(accessor.getCapabilites().isSupportingNamespaceAndRevision(WrapperMicrowaveModelRev180907.QNAME)).thenReturn(false); - when(accessor.getCapabilites().isSupportingNamespaceAndRevision(WrapperMicrowaveModelRev181010.QNAME)).thenReturn(false); - ONFCoreNetworkElementFactory factory = new ONFCoreNetworkElementFactory(); - assertTrue((factory.create(accessor, serviceProvider)).isPresent()); - } - - @Test - public void testCreateMWModelRev180907() throws Exception { - when(accessor.getCapabilites().isSupportingNamespaceAndRevision(NetworkElement.QNAME)).thenReturn(true); - when(accessor.getCapabilites().isSupportingNamespaceAndRevision(WrapperMicrowaveModelRev170324.QNAME)).thenReturn(false); - when(accessor.getCapabilites().isSupportingNamespaceAndRevision(WrapperMicrowaveModelRev180907.QNAME)).thenReturn(true); - when(accessor.getCapabilites().isSupportingNamespaceAndRevision(WrapperMicrowaveModelRev181010.QNAME)).thenReturn(false); - ONFCoreNetworkElementFactory factory = new ONFCoreNetworkElementFactory(); - assertTrue(factory.create(accessor, serviceProvider).isPresent()); - } - - @Test - public void testCreateMWModelRev181010() throws Exception { - when(accessor.getCapabilites().isSupportingNamespaceAndRevision(NetworkElement.QNAME)).thenReturn(true); - when(accessor.getCapabilites().isSupportingNamespaceAndRevision(WrapperMicrowaveModelRev170324.QNAME)).thenReturn(false); - when(accessor.getCapabilites().isSupportingNamespaceAndRevision(WrapperMicrowaveModelRev180907.QNAME)).thenReturn(false); - when(accessor.getCapabilites().isSupportingNamespaceAndRevision(WrapperMicrowaveModelRev181010.QNAME)).thenReturn(true); - ONFCoreNetworkElementFactory factory = new ONFCoreNetworkElementFactory(); - assertTrue(factory.create(accessor, serviceProvider).isPresent()); - } - - @After - public void cleanUp() throws Exception { - - } + static NetconfAccessor accessor; + static DeviceManagerServiceProvider serviceProvider; + static Capabilities capabilities; + static DataBroker dataBroker; + static NodeId nNodeId; + static DeviceManagerOnfConfiguration configuration; + QName qCapability; + static File configFile; + + + @BeforeClass + public static void init() throws InterruptedException, IOException { + + capabilities = mock(Capabilities.class); + accessor = mock(NetconfAccessor.class); + serviceProvider = mock(DeviceManagerServiceProvider.class); + dataBroker = mock(DataBroker.class); + + configFile = new File("devicemanager.properties"); + ConfigurationFileRepresentation configFileRep = new ConfigurationFileRepresentation(configFile); + configuration = new DeviceManagerOnfConfiguration(configFileRep); + + when(accessor.getCapabilites()).thenReturn(capabilities); + //when(serviceProvider.getDataProvider()).thenReturn(dataProvider); + nNodeId = new NodeId("nSky"); + when(accessor.getNodeId()).thenReturn(nNodeId); + + + } + + @AfterClass + public static void after() { + configFile.delete(); + } + + @Test + public void testCreateMWModelRev170324() throws Exception { + + + when(accessor.getCapabilites().isSupportingNamespaceAndRevision(NetworkElement.QNAME)).thenReturn(true); + when(accessor.getCapabilites().isSupportingNamespaceAndRevision(WrapperMicrowaveModelRev170324.QNAME)).thenReturn(true); + when(accessor.getCapabilites().isSupportingNamespaceAndRevision(WrapperMicrowaveModelRev180907.QNAME)).thenReturn(false); + when(accessor.getCapabilites().isSupportingNamespaceAndRevision(WrapperMicrowaveModelRev181010.QNAME)).thenReturn(false); + ONFCoreNetworkElementFactory factory = new ONFCoreNetworkElementFactory(configuration); + assertTrue(factory.create(accessor, serviceProvider).isPresent()); + } + + @Test + public void testCreateMWModelRev180907() throws Exception { + when(accessor.getCapabilites().isSupportingNamespaceAndRevision(NetworkElement.QNAME)).thenReturn(true); + when(accessor.getCapabilites().isSupportingNamespaceAndRevision(WrapperMicrowaveModelRev170324.QNAME)).thenReturn(false); + when(accessor.getCapabilites().isSupportingNamespaceAndRevision(WrapperMicrowaveModelRev180907.QNAME)).thenReturn(true); + when(accessor.getCapabilites().isSupportingNamespaceAndRevision(WrapperMicrowaveModelRev181010.QNAME)).thenReturn(false); + ONFCoreNetworkElementFactory factory = new ONFCoreNetworkElementFactory(configuration); + assertTrue(factory.create(accessor, serviceProvider).isPresent()); + } + + @Test + public void testCreateMWModelRev181010() throws Exception { + when(accessor.getCapabilites().isSupportingNamespaceAndRevision(NetworkElement.QNAME)).thenReturn(true); + when(accessor.getCapabilites().isSupportingNamespaceAndRevision(WrapperMicrowaveModelRev170324.QNAME)).thenReturn(false); + when(accessor.getCapabilites().isSupportingNamespaceAndRevision(WrapperMicrowaveModelRev180907.QNAME)).thenReturn(false); + when(accessor.getCapabilites().isSupportingNamespaceAndRevision(WrapperMicrowaveModelRev181010.QNAME)).thenReturn(true); + ONFCoreNetworkElementFactory factory = new ONFCoreNetworkElementFactory(configuration); + assertTrue(factory.create(accessor, serviceProvider).isPresent()); + } + + @After + public void cleanUp() throws Exception { + + } } diff --git a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/test/TestONFCoreNetworkElement12Basic.java b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/test/TestONFCoreNetworkElement12Basic.java index a09d6fcfc..ba295f6ce 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/test/TestONFCoreNetworkElement12Basic.java +++ b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/test/TestONFCoreNetworkElement12Basic.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,20 +14,18 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ne.test; -import static org.junit.Assert.*; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import java.util.List; -import java.util.Optional; - import org.eclipse.jdt.annotation.Nullable; import org.junit.Before; import org.junit.Test; import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.microwave.OnfMicrowaveModel; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.impl.DeviceManagerOnfConfiguration; import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ne.ONFCoreNetworkElement12Basic; import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ne.ONFCoreNetworkElement12Microwave; import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider; @@ -60,236 +58,238 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; public class TestONFCoreNetworkElement12Basic { - NetconfAccessor accessor; - DeviceManagerServiceProvider serviceProvider; - Capabilities capabilities; - TransactionUtils transactionUtils; - NetworkElement optionalNe; - OnfMicrowaveModel onfMicrowaveModel; - FaultService faultService; - EquipmentService equipmentService; - - protected static final InstanceIdentifier<NetworkElement> NETWORKELEMENT_IID = InstanceIdentifier - .builder(NetworkElement.class).build(); - - @Before - public void init() { - accessor = mock(NetconfAccessor.class); - serviceProvider = mock(DeviceManagerServiceProvider.class); - capabilities = mock(Capabilities.class); - transactionUtils = mock(TransactionUtils.class); - onfMicrowaveModel = mock(OnfMicrowaveModel.class); - faultService = mock(FaultService.class); - equipmentService = mock(EquipmentService.class); - - when(accessor.getCapabilites()).thenReturn(capabilities); - when(serviceProvider.getFaultService()).thenReturn(faultService); - when(serviceProvider.getEquipmentService()).thenReturn(equipmentService); - - NodeId nNodeId = new NodeId("nSky"); - when(accessor.getNodeId()).thenReturn(nNodeId); - when(accessor.getCapabilites().isSupportingNamespaceAndRevision(NetworkElementPac.QNAME)).thenReturn(true); - when(accessor.getTransactionUtils()).thenReturn(transactionUtils); - - } - - @Test - public void test() { - optionalNe = new NetworkElement() { - - @Override - public @Nullable List<Label> getLabel() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable List<Extension> getExtension() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable OperationalState getOperationalState() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable LifecycleState getLifecycleState() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable AdministrativeState getAdministrativeState() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable AdministrativeControl getAdministrativeControl() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable List<Name> getName() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable UniversalId getUuid() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable List<LocalId> getLocalId() { - // TODO Auto-generated method stub - return null; - } - - @Override - public <E$$ extends Augmentation<NetworkElement>> @Nullable E$$ augmentation(Class<E$$> augmentationType) { - // TODO Auto-generated method stub - return null; - } - - @Override - public Class<? extends DataContainer> getImplementedInterface() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable List<Ltp> getLtp() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable List<Fd> getFd() { - // TODO Auto-generated method stub - return null; - } - }; - - when(accessor.getTransactionUtils().readData(accessor.getDataBroker(), LogicalDatastoreType.OPERATIONAL, - NETWORKELEMENT_IID)).thenReturn(optionalNe); - - ONFCoreNetworkElement12Basic onfCoreNetworkElement12Basic = new ONFCoreNetworkElement12Basic(accessor, - serviceProvider); - onfCoreNetworkElement12Basic.prepareCheck(); - - /* - * EventlogEntity eventlogEntity = new EventlogEntity() { - * - * @Override public @Nullable String getId() { // TODO Auto-generated method - * stub return null; } - * - * @Override public @Nullable DateAndTime getTimestamp() { // TODO - * Auto-generated method stub return null; } - * - * @Override public @Nullable String getObjectId() { // TODO Auto-generated - * method stub return "ABCD"; } - * - * @Override public @Nullable String getNodeId() { // TODO Auto-generated method - * stub return null; } - * - * @Override public @Nullable Integer getCounter() { // TODO Auto-generated - * method stub return null; } - * - * @Override public @Nullable SourceType getSourceType() { // TODO - * Auto-generated method stub return null; } - * - * @Override public @Nullable String getNewValue() { // TODO Auto-generated - * method stub return null; } - * - * @Override public @Nullable String getAttributeName() { // TODO Auto-generated - * method stub return - * "/network-element/extension[value-name=\"top-level-equipment\"]/value"; // - * "/equipment-pac/equipment-current-problems"; } - * - * @Override public Class<? extends DataContainer> getImplementedInterface() { - * // TODO Auto-generated method stub return null; } }; - * - * onfCoreNetworkElement12Basic.notificationActor(eventlogEntity); - */ - - } - - - @Test - public void test1() - { - when (accessor.getTransactionUtils().readData(accessor.getDataBroker(), - LogicalDatastoreType.OPERATIONAL, NETWORKELEMENT_IID)).thenReturn(null); - - ONFCoreNetworkElement12Microwave onfCoreNetworkElement12MW = - new ONFCoreNetworkElement12Microwave(accessor, serviceProvider, - onfMicrowaveModel); onfCoreNetworkElement12MW.prepareCheck(); - - EventlogEntity eventlogEntity = new EventlogEntity() { - - @Override - public @Nullable String getId() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable DateAndTime getTimestamp() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable String getObjectId() { - // TODO Auto-generated method stub - return "ABCD"; - } - - @Override - public @Nullable String getNodeId() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable Integer getCounter() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable SourceType getSourceType() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable String getNewValue() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable String getAttributeName() { - // TODO Auto-generated method stub - return "/equipment-pac/equipment-current-problems"; - } - - @Override - public Class<? extends DataContainer> getImplementedInterface() { - // TODO Auto-generated method stub - return null; - } - }; - - onfCoreNetworkElement12MW.notificationActor(eventlogEntity); - } + NetconfAccessor accessor; + DeviceManagerServiceProvider serviceProvider; + Capabilities capabilities; + TransactionUtils transactionUtils; + NetworkElement optionalNe; + OnfMicrowaveModel onfMicrowaveModel; + FaultService faultService; + EquipmentService equipmentService; + DeviceManagerOnfConfiguration configuration; + + protected static final InstanceIdentifier<NetworkElement> NETWORKELEMENT_IID = InstanceIdentifier + .builder(NetworkElement.class).build(); + + @Before + public void init() { + accessor = mock(NetconfAccessor.class); + serviceProvider = mock(DeviceManagerServiceProvider.class); + capabilities = mock(Capabilities.class); + transactionUtils = mock(TransactionUtils.class); + onfMicrowaveModel = mock(OnfMicrowaveModel.class); + faultService = mock(FaultService.class); + equipmentService = mock(EquipmentService.class); + configuration = mock(DeviceManagerOnfConfiguration.class); + + when(accessor.getCapabilites()).thenReturn(capabilities); + when(serviceProvider.getFaultService()).thenReturn(faultService); + when(serviceProvider.getEquipmentService()).thenReturn(equipmentService); + + NodeId nNodeId = new NodeId("nSky"); + when(accessor.getNodeId()).thenReturn(nNodeId); + when(accessor.getCapabilites().isSupportingNamespaceAndRevision(NetworkElementPac.QNAME)).thenReturn(true); + when(accessor.getTransactionUtils()).thenReturn(transactionUtils); + + } + + @Test + public void test() { + optionalNe = new NetworkElement() { + + @Override + public @Nullable List<Label> getLabel() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable List<Extension> getExtension() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable OperationalState getOperationalState() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable LifecycleState getLifecycleState() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable AdministrativeState getAdministrativeState() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable AdministrativeControl getAdministrativeControl() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable List<Name> getName() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable UniversalId getUuid() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable List<LocalId> getLocalId() { + // TODO Auto-generated method stub + return null; + } + + @Override + public <E$$ extends Augmentation<NetworkElement>> @Nullable E$$ augmentation(Class<E$$> augmentationType) { + // TODO Auto-generated method stub + return null; + } + + @Override + public Class<? extends DataContainer> getImplementedInterface() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable List<Ltp> getLtp() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable List<Fd> getFd() { + // TODO Auto-generated method stub + return null; + } + }; + + when(accessor.getTransactionUtils().readData(accessor.getDataBroker(), LogicalDatastoreType.OPERATIONAL, + NETWORKELEMENT_IID)).thenReturn(optionalNe); + + ONFCoreNetworkElement12Basic onfCoreNetworkElement12Basic = new ONFCoreNetworkElement12Basic(accessor, + serviceProvider,configuration); + onfCoreNetworkElement12Basic.prepareCheck(); + + /* + * EventlogEntity eventlogEntity = new EventlogEntity() { + * + * @Override public @Nullable String getId() { // TODO Auto-generated method + * stub return null; } + * + * @Override public @Nullable DateAndTime getTimestamp() { // TODO + * Auto-generated method stub return null; } + * + * @Override public @Nullable String getObjectId() { // TODO Auto-generated + * method stub return "ABCD"; } + * + * @Override public @Nullable String getNodeId() { // TODO Auto-generated method + * stub return null; } + * + * @Override public @Nullable Integer getCounter() { // TODO Auto-generated + * method stub return null; } + * + * @Override public @Nullable SourceType getSourceType() { // TODO + * Auto-generated method stub return null; } + * + * @Override public @Nullable String getNewValue() { // TODO Auto-generated + * method stub return null; } + * + * @Override public @Nullable String getAttributeName() { // TODO Auto-generated + * method stub return + * "/network-element/extension[value-name=\"top-level-equipment\"]/value"; // + * "/equipment-pac/equipment-current-problems"; } + * + * @Override public Class<? extends DataContainer> getImplementedInterface() { + * // TODO Auto-generated method stub return null; } }; + * + * onfCoreNetworkElement12Basic.notificationActor(eventlogEntity); + */ + + } + + + @Test + public void test1() + { + when (accessor.getTransactionUtils().readData(accessor.getDataBroker(), + LogicalDatastoreType.OPERATIONAL, NETWORKELEMENT_IID)).thenReturn(null); + + ONFCoreNetworkElement12Microwave onfCoreNetworkElement12MW = + new ONFCoreNetworkElement12Microwave(accessor, serviceProvider, configuration, + onfMicrowaveModel); onfCoreNetworkElement12MW.prepareCheck(); + + EventlogEntity eventlogEntity = new EventlogEntity() { + + @Override + public @Nullable String getId() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable DateAndTime getTimestamp() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable String getObjectId() { + // TODO Auto-generated method stub + return "ABCD"; + } + + @Override + public @Nullable String getNodeId() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable Integer getCounter() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable SourceType getSourceType() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable String getNewValue() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable String getAttributeName() { + // TODO Auto-generated method stub + return "/equipment-pac/equipment-current-problems"; + } + + @Override + public Class<? extends DataContainer> getImplementedInterface() { + // TODO Auto-generated method stub + return null; + } + }; + + onfCoreNetworkElement12MW.notificationActor(eventlogEntity); + } } diff --git a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/test/TestONFCoreNetworkElement12Microwave.java b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/test/TestONFCoreNetworkElement12Microwave.java index 63b31b717..a5462d6f1 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/test/TestONFCoreNetworkElement12Microwave.java +++ b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/test/TestONFCoreNetworkElement12Microwave.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,21 +14,18 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ne.test; -import static org.junit.Assert.*; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import java.util.List; -import java.util.Optional; - import org.eclipse.jdt.annotation.Nullable; import org.junit.Before; import org.junit.Test; import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.microwave.OnfMicrowaveModel; -import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ne.ONFCoreNetworkElement12Basic; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.impl.DeviceManagerOnfConfiguration; import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ne.ONFCoreNetworkElement12Microwave; import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider; import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.EquipmentService; @@ -60,260 +57,262 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; public class TestONFCoreNetworkElement12Microwave { - NetconfAccessor accessor; - DeviceManagerServiceProvider serviceProvider; - Capabilities capabilities; - TransactionUtils transactionUtils; - NetworkElement optionalNe; - OnfMicrowaveModel onfMicrowaveModel; - FaultService faultService; - EquipmentService equipmentService; - - protected static final InstanceIdentifier<NetworkElement> NETWORKELEMENT_IID = InstanceIdentifier - .builder(NetworkElement.class).build(); - - @Before - public void init() { - accessor = mock(NetconfAccessor.class); - serviceProvider = mock(DeviceManagerServiceProvider.class); - capabilities = mock(Capabilities.class); - transactionUtils = mock(TransactionUtils.class); - onfMicrowaveModel = mock(OnfMicrowaveModel.class); - faultService = mock(FaultService.class); - equipmentService = mock(EquipmentService.class); - - when(accessor.getCapabilites()).thenReturn(capabilities); - when(serviceProvider.getFaultService()).thenReturn(faultService); - when(serviceProvider.getEquipmentService()).thenReturn(equipmentService); - - NodeId nNodeId = new NodeId("nSky"); - when(accessor.getNodeId()).thenReturn(nNodeId); - when(accessor.getCapabilites().isSupportingNamespaceAndRevision(NetworkElementPac.QNAME)).thenReturn(true); - when(accessor.getTransactionUtils()).thenReturn(transactionUtils); - - } - - @Test - public void test() { - optionalNe = new NetworkElement() { - - @Override - public @Nullable List<Label> getLabel() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable List<Extension> getExtension() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable OperationalState getOperationalState() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable LifecycleState getLifecycleState() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable AdministrativeState getAdministrativeState() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable AdministrativeControl getAdministrativeControl() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable List<Name> getName() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable UniversalId getUuid() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable List<LocalId> getLocalId() { - // TODO Auto-generated method stub - return null; - } - - @Override - public <E$$ extends Augmentation<NetworkElement>> @Nullable E$$ augmentation(Class<E$$> augmentationType) { - // TODO Auto-generated method stub - return null; - } - - @Override - public Class<? extends DataContainer> getImplementedInterface() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable List<Ltp> getLtp() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable List<Fd> getFd() { - // TODO Auto-generated method stub - return null; - } - }; - - when(accessor.getTransactionUtils().readData(accessor.getDataBroker(), LogicalDatastoreType.OPERATIONAL, - NETWORKELEMENT_IID)).thenReturn(optionalNe); - - ONFCoreNetworkElement12Microwave onfCoreNetworkElement12MW = new ONFCoreNetworkElement12Microwave(accessor, - serviceProvider, onfMicrowaveModel); - onfCoreNetworkElement12MW.prepareCheck(); - - EventlogEntity eventlogEntity = new EventlogEntity() { - - @Override - public @Nullable String getId() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable DateAndTime getTimestamp() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable String getObjectId() { - // TODO Auto-generated method stub - return "ABCD"; - } - - @Override - public @Nullable String getNodeId() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable Integer getCounter() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable SourceType getSourceType() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable String getNewValue() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable String getAttributeName() { - // TODO Auto-generated method stub - return "/network-element/extension[value-name=\"top-level-equipment\"]/value"; // "/equipment-pac/equipment-current-problems"; - } - - @Override - public Class<? extends DataContainer> getImplementedInterface() { - // TODO Auto-generated method stub - return null; - } - }; - - onfCoreNetworkElement12MW.notificationActor(eventlogEntity); - - } - - - @Test - public void test1() - { - when (accessor.getTransactionUtils().readData(accessor.getDataBroker(), - LogicalDatastoreType.OPERATIONAL, NETWORKELEMENT_IID)).thenReturn(null); - - ONFCoreNetworkElement12Microwave onfCoreNetworkElement12MW = - new ONFCoreNetworkElement12Microwave(accessor, serviceProvider, - onfMicrowaveModel); onfCoreNetworkElement12MW.prepareCheck(); - - EventlogEntity eventlogEntity = new EventlogEntity() { - - @Override - public @Nullable String getId() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable DateAndTime getTimestamp() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable String getObjectId() { - // TODO Auto-generated method stub - return "ABCD"; - } - - @Override - public @Nullable String getNodeId() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable Integer getCounter() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable SourceType getSourceType() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable String getNewValue() { - // TODO Auto-generated method stub - return null; - } - - @Override - public @Nullable String getAttributeName() { - // TODO Auto-generated method stub - return "/equipment-pac/equipment-current-problems"; - } - - @Override - public Class<? extends DataContainer> getImplementedInterface() { - // TODO Auto-generated method stub - return null; - } - }; - - onfCoreNetworkElement12MW.notificationActor(eventlogEntity); - } + NetconfAccessor accessor; + DeviceManagerServiceProvider serviceProvider; + Capabilities capabilities; + TransactionUtils transactionUtils; + NetworkElement optionalNe; + OnfMicrowaveModel onfMicrowaveModel; + FaultService faultService; + EquipmentService equipmentService; + DeviceManagerOnfConfiguration configuration; + + protected static final InstanceIdentifier<NetworkElement> NETWORKELEMENT_IID = InstanceIdentifier + .builder(NetworkElement.class).build(); + + @Before + public void init() { + accessor = mock(NetconfAccessor.class); + serviceProvider = mock(DeviceManagerServiceProvider.class); + capabilities = mock(Capabilities.class); + transactionUtils = mock(TransactionUtils.class); + onfMicrowaveModel = mock(OnfMicrowaveModel.class); + faultService = mock(FaultService.class); + equipmentService = mock(EquipmentService.class); + configuration = mock(DeviceManagerOnfConfiguration.class); + + when(accessor.getCapabilites()).thenReturn(capabilities); + when(serviceProvider.getFaultService()).thenReturn(faultService); + when(serviceProvider.getEquipmentService()).thenReturn(equipmentService); + + NodeId nNodeId = new NodeId("nSky"); + when(accessor.getNodeId()).thenReturn(nNodeId); + when(accessor.getCapabilites().isSupportingNamespaceAndRevision(NetworkElementPac.QNAME)).thenReturn(true); + when(accessor.getTransactionUtils()).thenReturn(transactionUtils); + + } + + @Test + public void test() { + optionalNe = new NetworkElement() { + + @Override + public @Nullable List<Label> getLabel() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable List<Extension> getExtension() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable OperationalState getOperationalState() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable LifecycleState getLifecycleState() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable AdministrativeState getAdministrativeState() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable AdministrativeControl getAdministrativeControl() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable List<Name> getName() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable UniversalId getUuid() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable List<LocalId> getLocalId() { + // TODO Auto-generated method stub + return null; + } + + @Override + public <E$$ extends Augmentation<NetworkElement>> @Nullable E$$ augmentation(Class<E$$> augmentationType) { + // TODO Auto-generated method stub + return null; + } + + @Override + public Class<? extends DataContainer> getImplementedInterface() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable List<Ltp> getLtp() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable List<Fd> getFd() { + // TODO Auto-generated method stub + return null; + } + }; + + when(accessor.getTransactionUtils().readData(accessor.getDataBroker(), LogicalDatastoreType.OPERATIONAL, + NETWORKELEMENT_IID)).thenReturn(optionalNe); + + ONFCoreNetworkElement12Microwave onfCoreNetworkElement12MW = new ONFCoreNetworkElement12Microwave(accessor, + serviceProvider, configuration, onfMicrowaveModel); + onfCoreNetworkElement12MW.prepareCheck(); + + EventlogEntity eventlogEntity = new EventlogEntity() { + + @Override + public @Nullable String getId() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable DateAndTime getTimestamp() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable String getObjectId() { + // TODO Auto-generated method stub + return "ABCD"; + } + + @Override + public @Nullable String getNodeId() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable Integer getCounter() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable SourceType getSourceType() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable String getNewValue() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable String getAttributeName() { + // TODO Auto-generated method stub + return "/network-element/extension[value-name=\"top-level-equipment\"]/value"; // "/equipment-pac/equipment-current-problems"; + } + + @Override + public Class<? extends DataContainer> getImplementedInterface() { + // TODO Auto-generated method stub + return null; + } + }; + + onfCoreNetworkElement12MW.notificationActor(eventlogEntity); + + } + + + @Test + public void test1() + { + when (accessor.getTransactionUtils().readData(accessor.getDataBroker(), + LogicalDatastoreType.OPERATIONAL, NETWORKELEMENT_IID)).thenReturn(null); + + ONFCoreNetworkElement12Microwave onfCoreNetworkElement12MW = + new ONFCoreNetworkElement12Microwave(accessor, serviceProvider, configuration, + onfMicrowaveModel); onfCoreNetworkElement12MW.prepareCheck(); + + EventlogEntity eventlogEntity = new EventlogEntity() { + + @Override + public @Nullable String getId() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable DateAndTime getTimestamp() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable String getObjectId() { + // TODO Auto-generated method stub + return "ABCD"; + } + + @Override + public @Nullable String getNodeId() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable Integer getCounter() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable SourceType getSourceType() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable String getNewValue() { + // TODO Auto-generated method stub + return null; + } + + @Override + public @Nullable String getAttributeName() { + // TODO Auto-generated method stub + return "/equipment-pac/equipment-current-problems"; + } + + @Override + public Class<? extends DataContainer> getImplementedInterface() { + // TODO Auto-generated method stub + return null; + } + }; + + onfCoreNetworkElement12MW.notificationActor(eventlogEntity); + } } |