Václav Kubernát | 48e9dfa | 2020-07-08 10:55:12 +0200 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (C) 2020 CESNET, https://photonics.cesnet.cz/ |
| 3 | * |
| 4 | * Written by Václav Kubernát <kubernat@cesnet.cz> |
| 5 | * |
| 6 | */ |
| 7 | #include "proxy_datastore.hpp" |
| 8 | |
| 9 | ProxyDatastore::ProxyDatastore(const std::shared_ptr<DatastoreAccess>& datastore) |
| 10 | : m_datastore(datastore) |
| 11 | { |
| 12 | } |
| 13 | |
| 14 | DatastoreAccess::Tree ProxyDatastore::getItems(const std::string& path) const |
| 15 | { |
| 16 | return m_datastore->getItems(path); |
| 17 | } |
| 18 | |
| 19 | void ProxyDatastore::setLeaf(const std::string& path, leaf_data_ value) |
| 20 | { |
| 21 | m_datastore->setLeaf(path, value); |
| 22 | } |
| 23 | |
| 24 | void ProxyDatastore::createItem(const std::string& path) |
| 25 | { |
| 26 | m_datastore->createItem(path); |
| 27 | } |
| 28 | |
| 29 | void ProxyDatastore::deleteItem(const std::string& path) |
| 30 | { |
| 31 | m_datastore->deleteItem(path); |
| 32 | } |
| 33 | |
| 34 | void ProxyDatastore::moveItem(const std::string& source, std::variant<yang::move::Absolute, yang::move::Relative> move) |
| 35 | { |
| 36 | m_datastore->moveItem(source, move); |
| 37 | } |
| 38 | |
| 39 | void ProxyDatastore::commitChanges() |
| 40 | { |
| 41 | m_datastore->commitChanges(); |
| 42 | } |
| 43 | |
| 44 | void ProxyDatastore::discardChanges() |
| 45 | { |
| 46 | m_datastore->discardChanges(); |
| 47 | } |
| 48 | |
| 49 | void ProxyDatastore::copyConfig(const Datastore source, const Datastore destination) |
| 50 | { |
| 51 | m_datastore->copyConfig(source, destination); |
| 52 | } |
| 53 | |
| 54 | std::string ProxyDatastore::dump(const DataFormat format) const |
| 55 | { |
| 56 | return m_datastore->dump(format); |
| 57 | } |
| 58 | |
| 59 | std::shared_ptr<Schema> ProxyDatastore::schema() const |
| 60 | { |
| 61 | return m_datastore->schema(); |
| 62 | } |