diff options
author | Michael DÜrre <michael.duerre@highstreet-technologies.com> | 2021-04-06 10:33:41 +0200 |
---|---|---|
committer | Michael D�rre <michael.duerre@highstreet-technologies.com> | 2021-04-06 09:01:07 +0000 |
commit | 24cac2175588a81a2ebecb5c08b91455cfc24d0b (patch) | |
tree | 179e41ba8a16ce579fa679d3283d047a41857b26 /sdnr/wt/data-provider/model | |
parent | 9fb395380431345b7da7a765651185815a9ac91d (diff) |
source out odl mapper
put odl mapper code into seperate bundle
Issue-ID: CCSDK-3254
Signed-off-by: Michael DÜrre <michael.duerre@highstreet-technologies.com>
Change-Id: I3debef0be8e44e7c68c95a6d06b7e50813bbea43
Diffstat (limited to 'sdnr/wt/data-provider/model')
6 files changed, 109 insertions, 6 deletions
diff --git a/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/DataInconsistencyException.java b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/DataInconsistencyException.java new file mode 100644 index 000000000..e734a47a3 --- /dev/null +++ b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/DataInconsistencyException.java @@ -0,0 +1,40 @@ +/* + * ============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; + +import java.util.List; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.Inventory; + +public class DataInconsistencyException extends Exception { + + private static final long serialVersionUID = 1L; + private final List<Inventory> repaired; + + public DataInconsistencyException(List<Inventory> repaired, String message) { + super(message); + this.repaired = repaired; + } + + public List<Inventory> getRepairedList() { + return this.repaired; + } +} 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 47255fd73..e6eb7a4e8 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 @@ -67,10 +67,15 @@ public interface DataProvider extends ArchiveCleanProvider { /** * write internal equipment to database - * * @param internalEquipment with mandatory fields. */ void writeInventory(Inventory internalEquipment); + /** + * write internal equipment to database + * @param nodeId + * @param list with mandatory fields. + */ + void writeInventory(String nodeId, List<Inventory> list); /** * write GUI Cut through data to database diff --git a/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/HtUserdataManager.java b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/HtUserdataManager.java new file mode 100644 index 000000000..2f580c98b --- /dev/null +++ b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/HtUserdataManager.java @@ -0,0 +1,38 @@ +/* + * ============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; + +/** + * @author Jack + * + */ +public interface HtUserdataManager { + + String getUserdata(String username); + + String getUserdata(String username, String key); + + boolean setUserdata(String username, String data); + + boolean setUserdata(String username, String key, String data); + + boolean removeUserdata(String username); + + boolean removeUserdata(String username, String key); + +} 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 9ba10cd0b..2a91d7816 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 @@ -27,6 +27,8 @@ public interface IEntityDataProvider { /** Get provider to access read/write operations for maintenance **/ public HtDatabaseMaintenance getHtDatabaseMaintenance(); + public HtUserdataManager getHtDatabaseUserManager(); + /** Set overall ready status from outside of this data-provider **/ public void setReadyStatus(boolean status); 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 index bd71d5ba1..2ccebca99 100644 --- 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 @@ -75,14 +75,14 @@ public class NetconfTimeStampImpl implements NetconfTimeStamp { /** * Specify the input format expected from netconf, and from specific devices. */ - private static DateTimeFormatter formatterInput = + private static final 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 = + private static final DateTimeFormatter formatterOutput = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.S'Z'").withZone(ZoneOffset.UTC); /** 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 8509007e1..84c43d52b 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 @@ -104,6 +104,10 @@ module data-provider { description "list of GUI Cut through entries"; } + enum userdata { + description + "user specific data. id=username"; + } } description "Data type and alias for elasticsearch or table name for SQL database."; @@ -556,7 +560,11 @@ module data-provider { description "An object class describing a mediator server entity."; } - + container mediator-server { + description + "builder"; + uses mediator-server-entity; + } grouping pmdata-base { description "Performance data base information"; @@ -1260,6 +1268,11 @@ module data-provider { description "current connection status. default Disconnected"; } + leaf tls-key { + type string; + description + "TLS key-id in MD-SAL"; + } description "An object class defining the NetConf connection towards a NetConf server. "; @@ -1324,6 +1337,11 @@ module data-provider { description "The filter information for the corresponding property."; } + leaf-list filtervalues { + type string; + description + "The filter information for the corresponding property."; + } description "List with filter criteria. Not listed means all."; } @@ -1406,12 +1424,12 @@ module data-provider { type string; mandatory true; description - "Unique database id, node-id/uuid"; + "Unique database id, node-id"; } leaf name { type string; description - "Mountpoint Name"; + "Name of the system to which a GUI Cutthrough session will be established"; } leaf weburi { type string; |