Add copy command
Change-Id: I0a88f7fa9a096022dd95e8af8854f980ca34f043
diff --git a/src/netconf_access.cpp b/src/netconf_access.cpp
index f744dc6..5fca200 100644
--- a/src/netconf_access.cpp
+++ b/src/netconf_access.cpp
@@ -149,6 +149,22 @@
return res;
}
+NC_DATASTORE toNcDatastore(Datastore datastore)
+{
+ switch (datastore) {
+ case Datastore::Running:
+ return NC_DATASTORE_RUNNING;
+ case Datastore::Startup:
+ return NC_DATASTORE_STARTUP;
+ }
+ __builtin_unreachable();
+}
+
+void NetconfAccess::copyConfig(const Datastore source, const Datastore destination)
+{
+ m_session->copyConfig(toNcDatastore(source), toNcDatastore(destination));
+}
+
std::string NetconfAccess::fetchSchema(const std::string_view module, const
std::optional<std::string_view> revision, const
std::optional<std::string_view> submodule, const