summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/data-provider/model
diff options
context:
space:
mode:
authorKAPIL SINGAL <ks220y@att.com>2021-07-30 01:55:03 +0000
committerGerrit Code Review <gerrit@onap.org>2021-07-30 01:55:03 +0000
commite4f3ee3ce9264c6ca41928e49c3075d4ca99eb0f (patch)
tree29a4875163cfec0b0aff3e2c6071a6f286340c6c /sdnr/wt/data-provider/model
parent4d2a4e187187e726e99fa85e32bfbe101567a83f (diff)
parent016536791b95df23811dabd063010f0561526163 (diff)
Merge "Support for MariaDB"
Diffstat (limited to 'sdnr/wt/data-provider/model')
-rw-r--r--sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/ArchiveCleanProvider.java6
-rw-r--r--sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/DataProvider.java14
-rw-r--r--sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/HtDatabaseMediatorserver.java30
-rw-r--r--sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/IEntityDataProvider.java3
-rw-r--r--sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/IEsConfig.java3
-rw-r--r--sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/SdnrDbType.java26
-rw-r--r--sdnr/wt/data-provider/model/src/main/yang/data-provider@2020-11-10.yang44
7 files changed, 112 insertions, 14 deletions
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
index 2af7324e5..15c857c62 100644
--- 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
@@ -23,7 +23,7 @@ public interface ArchiveCleanProvider {
/**
* Remove all index data older, than specified from faultlog and eventlog
- *
+ *
* @param olderAreOutdated time to specify older elements
* @return number of removed elements
*/
@@ -31,11 +31,11 @@ public interface ArchiveCleanProvider {
/**
* 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);
+ public long 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
index 0de5dc246..128138ee3 100644
--- 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
@@ -17,7 +17,6 @@
*/
package org.onap.ccsdk.features.sdnr.wt.dataprovider.model;
-import java.util.Date;
import java.util.List;
import org.onap.ccsdk.features.sdnr.wt.common.database.HtDatabaseClient;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.ConnectionlogEntity;
@@ -81,6 +80,13 @@ public interface DataProvider extends ArchiveCleanProvider {
/**
*
+ * @param nodeName
+ * @return number of entries
+ */
+ public int clearGuiCutThroughEntriesOfNode(String nodeName);
+
+ /**
+ *
* @param networkElementConnectionEntitiy to wirte to DB
* @param nodeId Id for this DB element
* @return if succeeded
@@ -99,12 +105,6 @@ public interface DataProvider extends ArchiveCleanProvider {
void removeNetworkConnection(String nodeId);
- @Override
- int doIndexClean(Date olderAreOutdated);
-
- @Override
- int getNumberOfOldObjects(Date olderAreOutdated);
-
List<NetworkElementConnectionEntity> getNetworkElementConnections();
/**
diff --git a/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/HtDatabaseMediatorserver.java b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/HtDatabaseMediatorserver.java
new file mode 100644
index 000000000..2fc62da01
--- /dev/null
+++ b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/HtDatabaseMediatorserver.java
@@ -0,0 +1,30 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP : ccsdk features
+ * ================================================================================
+ * Copyright (C) 2021 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.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.MediatorServerEntity;
+
+public interface HtDatabaseMediatorserver {
+
+ List<MediatorServerEntity> getAll();
+}
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
index 2a91d7816..04239f4c4 100644
--- 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
@@ -29,9 +29,6 @@ public interface IEntityDataProvider {
public HtUserdataManager getHtDatabaseUserManager();
- /** 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);
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
index 0f8f5e37d..18e07f148 100644
--- 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
@@ -33,6 +33,8 @@ public interface IEsConfig {
*/
long getArchiveLifetimeSeconds();
+ boolean doFullsizeRequests();
+
/**
* @param archiveCleanService
*/
@@ -44,5 +46,4 @@ public interface IEsConfig {
void registerConfigChangedListener(IConfigChangedListener archiveCleanService);
-
}
diff --git a/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/SdnrDbType.java b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/SdnrDbType.java
new file mode 100644
index 000000000..80efe6fb3
--- /dev/null
+++ b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/SdnrDbType.java
@@ -0,0 +1,26 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP : ccsdk features
+ * ================================================================================
+ * Copyright (C) 2020 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 enum SdnrDbType {
+ ELASTICSEARCH, MARIADB
+}
diff --git a/sdnr/wt/data-provider/model/src/main/yang/data-provider@2020-11-10.yang b/sdnr/wt/data-provider/model/src/main/yang/data-provider@2020-11-10.yang
index 84c43d52b..31c7fd875 100644
--- a/sdnr/wt/data-provider/model/src/main/yang/data-provider@2020-11-10.yang
+++ b/sdnr/wt/data-provider/model/src/main/yang/data-provider@2020-11-10.yang
@@ -1313,6 +1313,50 @@ module data-provider {
description
"An object containing the number of current faults per its severity.";
}
+ container network-element-connections {
+ leaf total {
+ type uint32;
+ description
+ "The number of all network-elements.";
+ }
+ leaf Mounted {
+ type uint32;
+ description
+ "The number of network-elements with state 'Mounted'.";
+ }
+ leaf Unmounted {
+ type uint32;
+ description
+ "The number of network-elements with state 'Unmounted'.";
+ }
+ leaf Connecting {
+ type uint32;
+ description
+ "The number of network-elements with state 'Connecting'.";
+ }
+ leaf Connected {
+ type uint32;
+ description
+ "The number of network-elements with state 'Connected'.";
+ }
+ leaf UnableToConnect {
+ type uint32;
+ description
+ "The number of network-elements with state 'UnableToConnect'.";
+ }
+ leaf Disconnected {
+ type uint32;
+ description
+ "The number of network-elements with state 'Disconnected'.";
+ }
+ leaf Undefined {
+ type uint32;
+ description
+ "The number of network-elements with state 'Undefined'.";
+ }
+ description
+ "An object containing the number of network-elements per its connection-state.";
+ }
description
"An object class defining an status entity for current faults
(also called active alarms).";