diff options
author | herbert <herbert.eiselt@highstreet-technologies.com> | 2020-01-30 10:15:11 +0100 |
---|---|---|
committer | KAPIL SINGAL <ks220y@att.com> | 2020-01-31 19:42:37 +0000 |
commit | d77d01bae41b5c8331a6de6eff1a64e08cd9e279 (patch) | |
tree | b0863c9c34916a0fab99d044ad9f8925597bfbc3 /sdnr/wt/data-provider/model | |
parent | 913eea4f5e7bdb32f9fa42767ccbc9b1cf04f5ef (diff) |
SDN-R add updated app
add updated data-provider
Issue-ID: SDNC-1026
Signed-off-by: herbert <herbert.eiselt@highstreet-technologies.com>
Change-Id: I641f8144955fcfb196d0cb19d57452c1d1a69a92
Signed-off-by: herbert <herbert.eiselt@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/data-provider/model')
10 files changed, 1925 insertions, 0 deletions
diff --git a/sdnr/wt/data-provider/model/pom.xml b/sdnr/wt/data-provider/model/pom.xml new file mode 100644 index 000000000..b84639e39 --- /dev/null +++ b/sdnr/wt/data-provider/model/pom.xml @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + + * ============LICENSE_START======================================================= + * ONAP : CCSDK.sdnr.wt.data-provider.model + * ================================================================================ + * Copyright (C) 2018 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========================================================= + +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.ccsdk.parent</groupId> + <artifactId>binding-parent</artifactId> + <version>1.5.2-SNAPSHOT</version> + <relativePath /> + </parent> + + <groupId>org.onap.ccsdk.features.sdnr.wt</groupId> + <artifactId>sdnr-wt-data-provider-model</artifactId> + <version>0.7.1-SNAPSHOT</version> + <packaging>bundle</packaging> + + <name>ccsdk-features :: ${project.artifactId}</name> + <licenses> + <license> + <name>Apache License, Version 2.0</name> + <url>http://www.apache.org/licenses/LICENSE-2.0</url> + </license> + </licenses> + + <properties> + <maven.javadoc.skip>true</maven.javadoc.skip> + </properties> + + <dependencies> + <dependency> + <groupId>org.opendaylight.netconf</groupId> + <artifactId>sal-netconf-connector</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>sdnr-wt-common</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.jacoco</groupId> + <artifactId>jacoco-maven-plugin</artifactId> + <configuration> + <excludes> + <exclude>**/gen/**</exclude> + <exclude>**/generated-sources/**</exclude> + <exclude>**/yang-gen-sal/**</exclude> + <exclude>**/pax/**</exclude> + </excludes> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/ArchiveCleanProvider.java b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/ArchiveCleanProvider.java new file mode 100644 index 000000000..00ec2e60e --- /dev/null +++ b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/ArchiveCleanProvider.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * ============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.dataprovider.model; + +import java.util.Date; + +public interface ArchiveCleanProvider { + + /** + * Remove all index data older, than specified + * @param olderAreOutdated time to specify older elements + * @return number of removed elements + */ + int doIndexClean(Date olderAreOutdated); + + /** + * Get number of elements older then + * @param olderAreOutdated date to compare with and specify older elements + * @return number of elements + */ + public int getNumberOfOldObjects(Date olderAreOutdated); + + +} diff --git a/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/DataProvider.java b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/DataProvider.java new file mode 100644 index 000000000..fd25661e3 --- /dev/null +++ b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/DataProvider.java @@ -0,0 +1,102 @@ +/** + * ============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.dataprovider.model; + +import java.util.Date; +import java.util.List; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ConnectionlogEntity; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.EventlogEntity; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.FaultcurrentEntity; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.FaultlogEntity; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.Inventory; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.NetworkElementConnectionEntity; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.PmdataEntity; + +public interface DataProvider extends ArchiveCleanProvider { + + // -- Connection log + void writeConnectionLog(ConnectionlogEntity event); + + // -- Event log + void writeEventLog(EventlogEntity event); + + void writeFaultLog(FaultlogEntity fault); + + void updateFaultCurrent(FaultcurrentEntity fault); + + /** + * Remove all entries for one node + * + * @param nodeName contains the mountpointname + * @return number of deleted entries + */ + int clearFaultsCurrentOfNode(String nodeName); + + /** + * Remove all entries for one node + * + * @param nodeName contains the mountpointname + * @param objectId of element to be deleted + * @return number of deleted entries + */ + int clearFaultsCurrentOfNodeWithObjectId(String nodeName, String objectId); + + /** + * Deliver list with all mountpoint/node-names in the database. + * + * @return List of all mountpoint/node-names the had active alarms. + */ + List<String> getAllNodesWithCurrentAlarms(); + + /** + * write internal equipment to database + * @param internalEquipment with mandatory fields. + */ + void writeInventory(Inventory internalEquipment); + + /** + * + * @param networkElementConnectionEntitiy to wirte to DB + * @param nodeId Id for this DB element + */ + void updateNetworkConnectionDeviceType(NetworkElementConnectionEntity networkElementConnectionEntitiy, + String nodeId); + + /** + * Update after new mountpoint registration + * @param networkElementConnectionEntitiy data + * @param nodeId of device (mountpoint name) + */ + void updateNetworkConnection22(NetworkElementConnectionEntity networkElementConnectionEntitiy, String nodeId); + + void removeNetworkConnection(String nodeId); + + @Override + int doIndexClean(Date olderAreOutdated); + + @Override + int getNumberOfOldObjects(Date olderAreOutdated); + + List<NetworkElementConnectionEntity> getNetworkElementConnections(); + + /** + * @param list + */ + void doWritePerformanceData(List<PmdataEntity> list); + +} diff --git a/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/HtDatabaseMaintenance.java b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/HtDatabaseMaintenance.java new file mode 100644 index 000000000..11681c05f --- /dev/null +++ b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/HtDatabaseMaintenance.java @@ -0,0 +1,56 @@ +/******************************************************************************* + * ============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.dataprovider.model; + +import java.util.List; +import org.eclipse.jdt.annotation.Nullable; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.MaintenanceEntity; + +/** + * @author herbert + * + */ +public interface HtDatabaseMaintenance { + + /** + * @param mountPointNodeName + */ + MaintenanceEntity createIfNotExists(String mountPointNodeName); + + /** + * @param mountPointNodeName + */ + void deleteIfNotRequired(String mountPointNodeName); + + /** + * @return + */ + List<MaintenanceEntity> getAll(); + + /** + * @param mountpointName + * @return + */ + MaintenanceEntity getMaintenance(@Nullable String mountpointName); + + /** + * @param m + */ + MaintenanceEntity setMaintenance(MaintenanceEntity m); + +} diff --git a/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/IEntityDataProvider.java b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/IEntityDataProvider.java new file mode 100644 index 000000000..95ea0752b --- /dev/null +++ b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/IEntityDataProvider.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * ============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.dataprovider.model; + +import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.StatusChangedHandler.StatusKey; + +public interface IEntityDataProvider { + + /** Get provider for database read/write operations **/ + public DataProvider getDataProvider(); + + /** Get provider to access read/write operations for maintenance **/ + public HtDatabaseMaintenance getHtDatabaseMaintenance(); + + /** Set overall ready status from outside of this data-provider **/ + public void setReadyStatus(boolean status); + + /** Set some static status information after startup */ + public void setStatus(StatusKey key,String value); + + /** Database configuration information **/ + public IEsConfig getEsConfig(); + + /** Provide NetconfTimeStamp handler **/ + public NetconfTimeStamp getConverter(); +} diff --git a/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/IEsConfig.java b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/IEsConfig.java new file mode 100644 index 000000000..f41095db9 --- /dev/null +++ b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/IEsConfig.java @@ -0,0 +1,48 @@ +/******************************************************************************* + * ============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.dataprovider.model; + +import org.onap.ccsdk.features.sdnr.wt.common.configuration.filechange.IConfigChangedListener; + +public interface IEsConfig { + + String getCluster(); + + /** + * @return seconds + */ + long getArchiveCheckIntervalSeconds(); + + /** + * @return seconds + */ + long getArchiveLifetimeSeconds(); + + /** + * @param archiveCleanService + */ + void unregisterConfigChangedListener(IConfigChangedListener archiveCleanService); + + /** + * @param archiveCleanService + */ + void registerConfigChangedListener(IConfigChangedListener archiveCleanService); + + + +} diff --git a/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/NetconfTimeStamp.java b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/NetconfTimeStamp.java new file mode 100644 index 000000000..5bed9f7a3 --- /dev/null +++ b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/NetconfTimeStamp.java @@ -0,0 +1,87 @@ +/******************************************************************************* + * ============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.dataprovider.model; + +import java.time.LocalDateTime; +import java.util.Date; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime; + +/** + * @author herbert + * + */ +public interface NetconfTimeStamp { + + /** + * Get actual timestamp as NETCONF specific type NETCONF/YANG 1.0 Format + * + * @return String with Date in NETCONF/YANG Format Version 1.0. + */ + String getTimeStampAsNetconfString(); + + /** + * Get actual timestamp as NETCONF specific type NETCONF/YANG 1.0 Format + + * @return String with Date in NETCONF/YANG Format Version 1.0. + */ + String getTimeStampAsNetconfString(Date date); + + /** + * Get actual timestamp as NETCONF specific type NETCONF/YANG 1.0 Format in GMT + * + * @return DateAndTime Type 1.0. Date in NETCONF/YANG Format Version 1.0. + */ + DateAndTime getTimeStamp(); + + /** + * Get time from date as NETCONF specific type NETCONF/YANG 1.0 Format in GMT + * @param date specifying the date and time + * @return DateAndTime Type 1.0. Date in NETCONF/YANG Format Version 1.0. + */ + DateAndTime getTimeStamp(Date date); + + /** + * Get time from date as NETCONF specific type NETCONF/YANG 1.0 Format in GMT + * @param date specifying the date and time + * @return DateAndTime Type 1.0. Date in NETCONF/YANG Format Version 1.0. + */ + DateAndTime getTimeStamp(String date); + + /** + * Return the String with a NETCONF time converted to long + * + * @param netconfTime as String according the formats given above + * @return Epoch milliseconds + * @throws IllegalArgumentException In case of no compliant time format definition for the string + */ + long getTimeStampFromNetconfAsMilliseconds(String netconfTime) throws IllegalArgumentException; + + /** + * Deliver String result. + * + * @param netconfTime as String according the formats given above + * @return If successful: String in ISO8601 Format for database and presentation. If "wrong formed + * input" the Input string with the prefix "Maleformed date" is delivered back. + */ + String getTimeStampFromNetconf(String netconfTime); + + Date getDateFromNetconf(String netconfTime); + + String getTimeStampAsNetconfString(LocalDateTime dt); + +}
\ No newline at end of file diff --git a/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/StatusChangedHandler.java b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/StatusChangedHandler.java new file mode 100644 index 000000000..fa64d4d3e --- /dev/null +++ b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/StatusChangedHandler.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * ============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.dataprovider.model; + + +public interface StatusChangedHandler { + + public enum StatusKey { + CLUSTER_SIZE, + + } + public void onStatusChanged(StatusKey key,String newValue); + +} diff --git a/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/types/NetconfTimeStampImpl.java b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/types/NetconfTimeStampImpl.java new file mode 100644 index 000000000..f5dd65269 --- /dev/null +++ b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/types/NetconfTimeStampImpl.java @@ -0,0 +1,215 @@ +/******************************************************************************* + * ============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.dataprovider.model.types; + +import java.time.LocalDateTime; +import java.time.OffsetDateTime; +import java.time.ZoneOffset; +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeParseException; +import java.util.Date; +import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.NetconfTimeStamp; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * 2019/06/17 Redesign to ZonedDateTime because of sync problems. + * + * Function is handling the NETCONF and the format used by database and restconf communication. + * + * Input supported for the formats used in NETCONF messages: + * + * Format1 ISO 8601 2017-01-18T11:44:49.482-05:00 + * + * Format2 NETCONF - pattern from ietf-yang-types "2013-07-15" Pattern: + * "\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[\+\-](\d{2}):(\d{2}))" + * + * Format3 NETCONF DateAndTime CoreModel-CoreFoundationModule-TypeDefinitions vom + * 2016-07-01 Example1: 20170118114449.1Z Example2: 20170118114449.1-0500 Pattern: + * "\d{4}\d{2}\d{2}\d{2}\d{2}\d{2}.\d+?(Z|[\+\-](\d{2})(\d{2}))" typedef DateAndTime { description + * "This primitive type defines the date and time according to the following structure: + * 'yyyyMMddhhmmss.s[Z|{+|-}HHMm]' where: yyyy '0000'..'9999' year MM '01'..'12' month dd '01'..'31' + * day hh '00'..'23' hour mm '00'..'59' minute ss '00'..'59' second s '.0'..'.9' tenth of second + * (set to '.0' if EMS or NE cannot support this granularity) Z 'Z' indicates UTC (rather than local + * time) {+|-} '+' or '-' delta from UTC HH '00'..'23' time zone difference in hours Mm '00'..'59' + * time zone difference in minutes."; type string; } Format4 E/// specific Example1: + * 2017-01-23T13:32:38-05:00 Example2: 2017-01-23T13:32-05:00 + * + * Input formats netconfTime as String according the formats given above + * + * Return format is String in ISO8601 Format for database and presentation. + * + * Example formats: + * 1) ISO8601. Example 2017-01-18T11:44:49.482-05:00 + * 2) Microwave ONF. Examples 20170118114449.1Z, 20170118114449.1-0500 + * 3.1) Ericson. Example: 2017-01-23T13:32:38-05:00 + * 3.2) Ericson. Example: 2017-01-23T13:32-05:00 + * Always 10 Groups, + * 1:Year 2:Month 3:day 4:Hour 5:minute 6:optional sec 7:optional ms 8:optional Z or 9:offset + * signedhour 10:min + * + * Template: + * private static final NetconfTimeStamp NETCONFTIME_CONVERTER = NetconfTimeStamp.getConverter(); + */ + +public class NetconfTimeStampImpl implements NetconfTimeStamp { + private static final Logger LOG = LoggerFactory.getLogger(NetconfTimeStamp.class); + + private static final NetconfTimeStamp CONVERTER = new NetconfTimeStampImpl(); + + /** + * Specify the input format expected from netconf, and from specific devices. + */ + private static DateTimeFormatter formatterInput = DateTimeFormatter.ofPattern("" + + "[yyyy-MM-dd'T'HH:mm[:ss][.SSS][.SS][.S][xxx][xx][X][Z]]" + + "[yyyyMMddHHmmss[.SSS][.SS][.S][xxx][xx][X][Z]]" + ).withZone(ZoneOffset.UTC); + + /** + * Specify output format that is used internally + */ + private static DateTimeFormatter formatterOutput = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.S'Z'") + .withZone(ZoneOffset.UTC); + + /** + * Use static access + */ + private NetconfTimeStampImpl() { + } + + /* + * ------------------------------------ Public function + */ + + /** + * Use this function to get the converter + * @return global converter + */ + public static NetconfTimeStamp getConverter() { + return CONVERTER; + } + + /** + * Get actual timestamp as NETCONF specific type NETCONF/YANG 1.0 Format + * + * @return String with Date in NETCONF/YANG Format Version 1.0. + */ + @Override + public String getTimeStampAsNetconfString() { + return ZonedDateTime.now(ZoneOffset.UTC).format(formatterOutput); + } + + /** + * Get actual timestamp as NETCONF specific type NETCONF/YANG 1.0 Format + + * @return String with Date in NETCONF/YANG Format Version 1.0. + */ + @Override + public String getTimeStampAsNetconfString(Date date) { + return ZonedDateTime.ofInstant(date.toInstant(),ZoneOffset.UTC).format(formatterOutput); + } + + + + /** + * Get actual timestamp as NETCONF specific type NETCONF/YANG 1.0 Format in GMT + * + * @return DateAndTime Type 1.0. Date in NETCONF/YANG Format Version 1.0. + */ + @Override + public DateAndTime getTimeStamp() { + return DateAndTime.getDefaultInstance(getTimeStampAsNetconfString()); + } + + /** + * Get time from date as NETCONF specific type NETCONF/YANG 1.0 Format in GMT + * @param date specifying the date and time + * @return DateAndTime Type 1.0. Date in NETCONF/YANG Format Version 1.0. + */ + @Override + public DateAndTime getTimeStamp(Date date) { + return DateAndTime.getDefaultInstance(getTimeStampAsNetconfString(date)); + } + /** + * Get time from date as NETCONF specific type NETCONF/YANG 1.0 Format in GMT + * @param date specifying the date and time + * @return DateAndTime Type 1.0. Date in NETCONF/YANG Format Version 1.0. + */ + @Override + public DateAndTime getTimeStamp(String date) { + return DateAndTime.getDefaultInstance(date); + } + + /** + * Return the String with a NETCONF time converted to long + * + * @param netconfTime as String according the formats given above + * @return Epoch milliseconds + * @throws IllegalArgumentException In case of no compliant time format definition for the string + */ + @Override + public long getTimeStampFromNetconfAsMilliseconds(String netconfTime) throws IllegalArgumentException { + try { + long utcMillis = doParse(netconfTime).toInstant().toEpochMilli(); + return utcMillis; + } catch (DateTimeParseException e) { + throw new IllegalArgumentException( + "No pattern for NETCONF data string: " + netconfTime + " Msg:" + e.getMessage()); + } + } + + /** + * Deliver String result. + * + * @param netconfTime as String according the formats given above + * @return If successful: String in ISO8601 Format for database and presentation. If "wrong formed + * input" the Input string with the prefix "Maleformed date" is delivered back. + */ + @Override + public String getTimeStampFromNetconf(String netconfTime) { + try { + String inputUTC = doParse(netconfTime).format(formatterOutput); + return inputUTC; + } catch (Exception e) { + LOG.info(e.getMessage()); + } + LOG.debug("No pattern for NETCONF data string: {}", netconfTime); + return "Malformed date: " + netconfTime; // Error handling + } + + /*---------------------------------------------------- + * Private functions + */ + + private OffsetDateTime doParse(String netconfTime) { + return OffsetDateTime.parse(netconfTime, formatterInput); + } + + @Override + public Date getDateFromNetconf(String netconfTime) { + return Date.from(LocalDateTime.parse(netconfTime, formatterInput).atZone(ZoneOffset.UTC).toInstant()); + } + + @Override + public String getTimeStampAsNetconfString(LocalDateTime dt) { + return formatterOutput.format(dt); + } + +} diff --git a/sdnr/wt/data-provider/model/src/main/yang/dataprovider.yang b/sdnr/wt/data-provider/model/src/main/yang/dataprovider.yang new file mode 100644 index 000000000..3a56661b9 --- /dev/null +++ b/sdnr/wt/data-provider/model/src/main/yang/dataprovider.yang @@ -0,0 +1,1228 @@ +module data-provider { + + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:data-provider"; + prefix "odluxprovider"; + + import ietf-yang-types { prefix "yang"; revision-date 2013-07-15; } + import netconf-node-topology { prefix "nettop"; revision-date 2015-01-14; } + description + "data-provider api module"; + + revision "2019-08-01" { + description + "Initial revision"; + } + // --- typedef + typedef Entity { + description "Data type and alias for elasticsearch or table name for SQL database."; + type enumeration { + enum connectionlog { + description "logs mountpoint connection state changes"; + } + enum faultcurrent { + description "current faults"; + } + enum eventlog { + description "logs for all notifications e.g. netconf, ves and internal events"; + } + enum faultlog { + description "faultlog information"; + } + enum historicalperformance15min { + description "performance data"; + } + enum historicalperformance24h { + description "performance data"; + } + enum mediator-server { + description "list of mediator servers"; + } + enum networkelement-connection { + description "list of mountpoints for netconf devices (joint required-network-element+mdsal + state"; + } + enum inventoryequipment { + description "list of equipment inventory"; + } + enum maintenancemode { + description "list of maintenance setting"; + } + } + } + typedef SortOrder { + type enumeration { + enum ascending { + } + enum descending { + } + } + description "Entities for odlux clients"; + } + typedef FilterProperty { + type string; + } + + typedef NotificationType { + type enumeration { + enum ProblemNotificationXml { + description ""; + } + enum AttributeValueChangedNotificationXml { + description ""; + } + } + } + + typedef ConnectionLogStatus { + type enumeration { + enum Mounted { + description "Mountpoint created"; + } + enum Unmounted { + description "Mountpoint removed"; + } + enum Connecting { + description "Mountpoint establishing connection"; + } + enum Connected { + description "Mountpoint connection established"; + } + enum UnableToConnect { + description "Mountpoint connection not possible"; + } + enum Disconnected { + description "Required and mountpoint removed"; + } + enum Undefined { + description "Status not available"; + } + } + } + typedef NetworkElementDeviceType { + type enumeration { + enum Wireless { + description "implements microwave-model.yang or air-interface.yang"; + } + enum RAN { + description "implements sth. like o-ran*.yang"; + } + enum ORAN { + description "implements RAN according to o-ran*.yang"; + } + enum RAN3GPP { + description "implements RAN according to _3gpp-ran*.yang"; + } + enum Optical { + description "implements tapi-*.yang or org-openroadm*.yang"; + } + enum Router { + description "implements vlan-interface.yang"; + } + enum NtsManager { + + description "Simulation of device"; + } + enum Nonsupported { + description "Device type known, but not support"; + } + enum Unknown { + description "Device type at this point of time unknown"; + } + } + } + typedef severity-type { + type enumeration { + enum NonAlarmed { + description "problem cleared indication"; + } + enum Warning { + description "problem level"; + } + enum Minor { + description "problem level"; + } + enum Major { + description "problem level"; + } + enum Critical { + description "problem level"; + } + } + description "According to ITU-T M.3160"; + } + typedef source-type { + type enumeration { + enum ves { + description "VES Interface"; + } + enum netconf { + description "NETCONF Interface"; + } + enum controller { + description "SDN Controller"; + } + enum unknown { + description "Unknown source"; + } + } + } + typedef granularity-period-type { + type enumeration { + enum unknown { + description "none"; + } + enum period-15-min { + description "none"; + } + enum period-24-hours { + description "none"; + } + } + description "The enumeration with the options for granularity period of the performance data similar to g.874.1-model"; + } + // --- grouping and builder-container + grouping connectionlog-entity { + leaf id { + type string; + description "database id"; + } + leaf node-id { + type string; + description "the node/mountpoint which connection state has changed"; + } + leaf timestamp { + type yang:date-and-time; + description "timestamp when event happened"; + } + leaf status { + type ConnectionLogStatus; + description "new state of the connection of the device"; + } + } + container connectionlog { + description "builder"; + uses connectionlog-entity; + } + grouping object-change-reference { + description "Reference of of object (e.g. Interface pack) owned by a node"; + leaf node-id { + type string; + } + leaf counter { + type int32; + } + leaf timestamp { + type yang:date-and-time; + } + leaf object-id { + type string; + } + } + grouping source-reference { + description "Identify a source"; + leaf source-type { + type source-type; + } + } + grouping fault { + description "Fault event of an object"; + leaf problem { + type string; + } + leaf severity { + type severity-type; + } + } + grouping attribute-change { + description "update change of an attribute"; + leaf attribute-name { + type string; + } + leaf new-value { + type string; + } + } + grouping entity-id { + description "Unique database id of entity"; + leaf id { + type string; + } + } + grouping faultcurrent-entity { + description "Current fault status"; + uses object-change-reference; + uses fault; + uses entity-id; + } + container faultcurrent { + description "builder"; + uses faultcurrent-entity; + } + grouping faultlog-entity { + description "Changed fault indication"; + uses source-reference; + uses object-change-reference; + + uses fault; + uses entity-id; + } + container faultlog { + description "builder"; + uses faultlog-entity; + } + grouping eventlog-entity { + description "One change event of devices"; + uses source-reference; + uses object-change-reference; + uses attribute-change; + uses entity-id; + } + container eventlog { + description "builder"; + uses eventlog-entity; + } + grouping filter { + leaf description { + type string; + description "Filter specific description"; + } + leaf start { + type yang:date-and-time; + description "begin of maintenance-mode"; + } + leaf end { + type yang:date-and-time; + description "end of maintenance-mode"; + } + leaf object-id-ref { + type string; + description "object id to filter on, or empty for all"; + } + leaf problem { + type string; + description "name of the problem to filter or empty for all"; + } + } + grouping maintenance-entity { + description "Maintenance mode for a device. "; + leaf id { + mandatory true; + type string; + description "Key to get/set configuration entry in database. Normally Mountpoint-name + is used as key id of node."; + } + leaf node-id { + mandatory true; + type string; + description ""; + } + leaf active { + type boolean; + description "Configuration to activate or deactivate this entry"; + } + uses filter; + } + container maintenance { + description "builder"; + uses maintenance-entity; + } + grouping mediator-server-entity { + leaf id { + mandatory true; + type string; + } + leaf url { + type string; + } + leaf name { + type string; + } + } + grouping pmdata-base { + description "Performance data base information"; + leaf node-name { + type string; + } + leaf uuid-interface { + type string; + } + leaf layer-protocol-name { + type string; + } + leaf radio-signal-id { + type string; + } + leaf time-stamp { + type yang:date-and-time; + } + leaf suspect-interval-flag { + type boolean; + } + leaf granularity-period { + type granularity-period-type; + } + leaf scanner-id { + type string; + } + } + grouping pmdata-microwave { + description "Consolidated performance information of all microwave model interface pacs"; + leaf es { + type int32; + units "s"; + default -1; + config false; + description "Number of errored seconds."; + } + leaf ses { + type int32; + units "s"; + default -1; + config false; + description "Number of severely errored seconds."; + } + leaf cses { + type int32; + units "s"; + default -1; + config false; + description "Number of consecutive severely errored seconds."; + } + leaf unavailability { + type int32; + units "s"; + default -1; + config false; + description "Total time of unavailability in seconds."; + } + leaf tx-level-min { + type int8; + units "dBm"; + default 99; + config false; + description "Minimum transmit power. Signed integers are required."; + } + leaf tx-level-max { + type int8; + units "dBm"; + default 99; + config false; + description "Maximum transmit power. Signed integers are required."; + } + leaf tx-level-avg { + type int8; + units "dBm"; + default 99; + config false; + description "Averaged transmit power. Signed integers are required."; + } + leaf rx-level-min { + type int8; + units "dBm"; + default 99; + config false; + description "Minimum receive level. Signed integers are required."; + } + leaf rx-level-max { + type int8; + units "dBm"; + default 99; + config false; + description "Maximum receive level. Signed integers are required."; + } + leaf rx-level-avg { + type int8; + units "dBm"; + default 99; + config false; + description "Averaged receive level. Signed integers are required."; + } + leaf time2-states { + type int32; + units "s"; + default -1; + config false; + description "Sum of all seconds the transmitter operated in e.g. BPSK."; + } + leaf time4-states-s { + type int32; + units "s"; + default -1; + config false; + description "none"; + } + leaf time4-states { + type int32; + units "s"; + default -1; + config false; + description "none"; + } + leaf time8-states { + type int32; + units "s"; + default -1; + config false; + description "none"; + } + leaf time16-states-s { + type int32; + units "s"; + default -1; + config false; + description "none"; + } + leaf time16-states { + type int32; + units "s"; + default -1; + config false; + description "none"; + } + leaf time32-states { + type int32; + units "s"; + default -1; + config false; + description "none"; + } + leaf time64-states { + type int32; + units "s"; + default -1; + config false; + description "none"; + } + leaf time128-states { + type int32; + units "s"; + default -1; + config false; + description "none"; + } + leaf time256-states { + type int32; + units "s"; + default -1; + config false; + description "none"; + } + leaf time512-states { + type int32; + units "s"; + default -1; + config false; + description "none"; + } + leaf time512-states-l { + type int32; + units "s"; + default -1; + config false; + description "none"; + } + leaf time1024-states { + type int32; + units "s"; + default -1; + config false; + description "none"; + } + leaf time1024-states-l { + type int32; + units "s"; + default -1; + config false; + description "none"; + } + leaf time2048-states { + type int32; + units "s"; + default -1; + config false; + description "none"; + } + leaf time2048-states-l { + type int32; + units "s"; + default -1; + config false; + description "none"; + } + leaf time4096-states { + type int32; + units "s"; + default -1; + config false; + description "none"; + } + leaf time4096-states-l { + type int32; + units "s"; + default -1; + config false; + description "none"; + } + leaf time8192-states { + type int32; + units "s"; + default -1; + config false; + description "none"; + } + leaf time8192-states-l { + type int32; + units "s"; + default -1; + config false; + description "none"; + } + leaf snir-min { + type int8; + units "dB"; + default -99; + config false; + description "Minimum signal to (noise+interference) ratio."; + } + leaf snir-max { + type int8; + units "dB"; + default -99; + config false; + description "Maximum signal to (noise+interference) ratio."; + } + leaf snir-avg { + type int8; + units "dB"; + default -99; + config false; + description "Averaged signal to (noise+interference) ratio."; + } + leaf xpd-min { + type int8; + units "dB"; + default -99; + config false; + description "Minimum cross polarization discrimination."; + } + leaf xpd-max { + type int8; + units "dB"; + default -99; + config false; + description "Maximum cross polarization discrimination."; + } + leaf xpd-avg { + type int8; + units "dB"; + default -99; + config false; + description "Averaged cross polarization discrimination."; + } + leaf rf-temp-min { + type int8; + units "C"; + default -99; + config false; + description "Lowest temperature (in degree Celsius) of the radio module inside the outdoor unit."; + } + leaf rf-temp-max { + type int8; + units "C"; + default -99; + config false; + description "Highest temperature (in degree Celsius) of the radio module inside the outdoor unit."; + } + leaf rf-temp-avg { + type int8; + units "C"; + default -99; + config false; + description "Averaged temperature (in degree Celsius) of the radio module inside the outdoor unit."; + } + leaf defect-blocks-sum { + type int16; + units "blocks"; + default -1; + config false; + description "Total number of blocks that were defect after receiving and could not be corrected by the FEC."; + } + leaf time-period { + type int32; + units "s"; + default -1; + config false; + description "Total length of the measurement period."; + } + } + grouping pmdata-ethernet { + description "Consolidated performance information for ethernet."; + leaf tx-ethernet-bytes-max-s { + type int32; + units "Bytes/s"; + default -1; + config false; + description "Counts the number of Bytes of Ethernet traffic (before header compression) transmitted within a second and keeps the highest value within the measurement period. Field to be left blank for all types of TDM containers."; + } + leaf tx-ethernet-bytes-max-m { + type int64; + units "Bytes/min"; + default -1; + config false; + description "Counts the number of Bytes of Ethernet traffic (before header compression) transmitted within a minute and keeps the highest value with in the measurement period. Field to be left blank for all types of TDM containers."; + } + leaf tx-ethernet-bytes-sum { + type int64; + units "Bytes"; + default -1; + config false; + description "Total number of Bytes of Ethernet traffic (before header compression) transmitted (in direction out of the device) during the measurement period. Field to be left blank for all types of TDM containers."; + } + } + container pmdata-entity { + description "builder"; + uses pmdata-base; + container performance-data { + uses pmdata-microwave; + uses pmdata-ethernet; + } + } + grouping pmdata15m-entity { + uses pmdata-base; + container performance-data { + uses pmdata-microwave; + uses pmdata-ethernet; + } + } + grouping pmdata24h-entity { + uses pmdata-base; + container performance-data { + uses pmdata-microwave; + uses pmdata-ethernet; + } + } + grouping inventory-entity { + description "One equipment entity in a list of a network element that could be rack, card, backplane, module"; + + leaf id { + description "Unique database id, node-id/uuid"; + mandatory true; + type string; + } + leaf tree-level { + description "Containment level, starting with 0.."; + type uint32; + } + leaf parent-uuid { + description "Unique inventory id of holder"; + type string; + } + leaf node-id { + description "Unique node id of network element"; + type string; + } + leaf uuid { + description "Unique inventory id of this node for this equipement, provided by network element"; + type string; + } + leaf-list contained-holder { + description "List of uuid of contained equipment"; + type string; + } + leaf manufacturer-name { + description "manufactured-thing/manufacturer-properties/manufacturer-name"; + type string; + } + leaf manufacturer-identifier { + description "manufactured-thing/manufacturer-properties/manufacturer-identifier"; + type string; + } + leaf serial { + description "manufactured-thing/equipment-instance/serial"; + type string; + } + leaf date { + description "manufactured-thing/equipment-instance/manufacture-date: Date information provided by manufacturer. No specific format. ()"; + type string; + } + leaf version { + description "manufactured-thing/equipment-type/version"; + type string; + } + leaf description { + description "manufactured-thing/equipment-type/description"; + type string; + } + leaf part-type-id { + description "manufactured-thing/equipment-type/part-type-identifier"; + type string; + } + leaf model-identifier { + description "manufactured-thing/equipment-type/model-identifier"; + type string; + } + leaf type-name { + description "manufactured-thing/equipment-type/type-name"; + type string; + } + } + container inventory { + description "builder"; + uses inventory-entity; + } + grouping node-details-g { + leaf-list available-capabilities { + type string; + } + leaf-list unavailable-capabilities { + type string; + } + } + grouping network-element-connection-entity { + + leaf id { + type string; + description "database id/key. here is equal to node-id"; + } + leaf node-id { + type string; + description "mountpoint name of device in controller"; + } + leaf host { + type string; + description "netconf hostname or ip address of device"; + } + leaf port { + type uint32; + description "netconf port of device"; + } + leaf username { + type string; + description "netconf username"; + } + leaf password { + type string; + description "netconf password. should be removed asap"; + } + leaf core-model-capability { + type string; + description "revision of core-model capability"; + } + leaf device-type { + type NetworkElementDeviceType; + description "categoried type of ne based on implemented yang specs"; + } + leaf is-required { + type boolean; + description "entry exists in db index required-networkelement"; + } + container node-details { + uses node-details-g; + description "holder of available and unavailable capabilities"; + } + leaf status { + type ConnectionLogStatus; + description "current connection status. default Disconnected"; + } + } + container network-element-connection { + description "builder"; + uses network-element-connection-entity; + } + grouping status-entity { + container faults { + leaf criticals { + type uint32; + } + leaf majors { + type uint32; + } + leaf minors { + type uint32; + } + leaf warnings { + type uint32; + } + } + } + container status { + description "builder"; + uses status-entity; + } + grouping entity-input { + list filter { + key property; + leaf property { + type string; + } + leaf filtervalue { + type string; + } + description "List with filter criteria. Not listed means all."; + } + list sortorder { + key property; + leaf property { + type string; + } + leaf sortorder { + type SortOrder; + } + description "List with sort order. Not listed means default"; + } + container pagination { + leaf size { + type uint32 { + range "1..max"; + } + default 20; + description "Number of entries to be delivered"; + } + leaf page { + type uint64 { + range "1..max"; + } + default 1; + description "Number to be used to calculate starting entry to deliver"; + } + } + } + grouping pagination-output-g { + leaf size { + type uint32 { + range "1..max"; + } + default 20; + description "Number of entries to be delivered"; + } + leaf page { + type uint64 { + range "1..max"; + } + default 1; + description "Number to be used to calculate starting entry to deliver"; + } + leaf total { + type uint64 { + range "0..max"; + } + default 0; + description "Number to be used to calculate starting entry to deliver"; + } + } + container pagination-output { + description "builder"; + uses pagination-output-g; + } + // --- rpc + rpc read-faultcurrent-list { + description + "Get list of faultcurrent entries according to filter"; + input { + uses entity-input; + } + output { + container pagination { + uses pagination-output-g; + } + list data { + uses faultcurrent-entity; + } + } + } + rpc read-faultlog-list { + description + "Get list of faultlog entries according to filter"; + input { + uses entity-input; + } + output { + container pagination { + uses pagination-output-g; + } + list data { + uses faultlog-entity; + } + } + } + + rpc read-eventlog-list { + description + "Get list of eventlog entities according to filter"; + input { + uses entity-input; + } + output { + container pagination { + uses pagination-output-g; + } + list data { + uses eventlog-entity; + } + } + } + rpc read-connectionlog-list { + description + "Get list of eventlog entities according to filter"; + input { + uses entity-input; + } + output { + container pagination { + uses pagination-output-g; + } + list data { + uses connectionlog-entity; + } + } + } + rpc read-maintenance-list { + description + "Get list of maintenance entries according to filter"; + input { + uses entity-input; + } + output { + container pagination { + uses pagination-output-g; + } + list data { + uses maintenance-entity; + } + } + } + rpc create-maintenance { + description + "insert new entry of maintenance"; + input { + uses maintenance-entity; + } + output { + uses maintenance-entity; + } + } + rpc update-maintenance { + description + "update existing entity of maintenance"; + input { + uses maintenance-entity; + } + output { + uses maintenance-entity; + } + } + rpc delete-maintenance { + description + "delete entity of maintenance"; + input { + uses maintenance-entity; + } + output { + } + } + + rpc read-mediator-server-list { + description + "Get list of mediator-servers according to filter"; + input { + uses entity-input; + } + output { + container pagination { + uses pagination-output-g; + } + list data { + uses mediator-server-entity; + } + } + } + rpc create-mediator-server { + description + "create new entry of entity mediator-server"; + input { + uses mediator-server-entity; + } + output { + uses mediator-server-entity; + } + } + rpc update-mediator-server { + description + "update entry of entity mediator-server"; + input { + uses mediator-server-entity; + } + output { + uses mediator-server-entity; + } + } + rpc delete-mediator-server { + description + "delete entry of entity mediator-server"; + input { + uses mediator-server-entity; + } + output { + } + } + rpc read-network-element-connection-list { + description + "Get list of networkelement-connections according to filter"; + input { + uses entity-input; + } + output { + container pagination { + uses pagination-output-g; + } + list data { + uses network-element-connection-entity; + } + } + } + rpc create-network-element-connection { + description "create entry in networkelement-connection"; + input { + uses network-element-connection-entity; + } + output { + uses network-element-connection-entity; + } + } + rpc update-network-element-connection { + description "Put an element to ne-entity"; + input { + uses network-element-connection-entity; + } + output { + uses network-element-connection-entity; + } + } + rpc delete-network-element-connection { + description "!ONLY FOR TESTING! Put an element to ne-entity"; + input { + uses network-element-connection-entity; + } + output { + } + } + + rpc read-pmdata-15m-ltp-list { + description + "Get list of ltps for one mountpoint with historical pmdata"; + input { + uses entity-input; + } + output { + container pagination { + uses pagination-output-g; + } + leaf-list data { + type string; + } + } + } + rpc read-pmdata-24h-ltp-list { + description + "Get list of ltps for one mountpoint with historical pmdata"; + input { + uses entity-input; + } + + output { + container pagination { + uses pagination-output-g; + } + leaf-list data { + type string; + } + } + } + rpc read-pmdata-15m-device-list { + description + "Get list of mountpoints with historical pmdata"; + input { + uses entity-input; + } + output { + container pagination { + uses pagination-output-g; + } + leaf-list data { + type string; + } + } + } + rpc read-pmdata-24h-device-list { + description + "Get list of mountpoints with historical pmdata"; + input { + uses entity-input; + } + output { + container pagination { + uses pagination-output-g; + } + leaf-list data { + type string; + } + } + } + + rpc read-pmdata-15m-list { + description + "Get list of entities according to filter"; + input { + uses entity-input; + } + output { + container pagination { + uses pagination-output-g; + } + list data { + uses pmdata15m-entity; + } + } + } + rpc read-pmdata-24h-list { + description + "Get list of historical pmdata according to filter"; + input { + uses entity-input; + } + output { + container pagination { + uses pagination-output-g; + } + list data { + uses pmdata24h-entity; + } + } + } + rpc read-inventory-list { + description + "Get list of inventory according to filter"; + input { + uses entity-input; + } + output { + container pagination { + uses pagination-output-g; + } + list data { + uses inventory-entity; + } + } + } + rpc read-status { + description + "Read status information of controller"; + output { + list data { + uses status-entity; + } + } + } +} + |