Adapt to a breakage revert in upstream libyang
The identity values are now once again prefixed.
This (partially) reverts commit
315838ea5f0efeba4d68647ff612fc4141eb1190.
Depends-on: https://gerrit.cesnet.cz/c/CzechLight/dependencies/+/6490
Change-Id: I1b1bc3381c36d47d7ebdc5cdf6aa65cb1711c6fe
diff --git a/src/firewall/Firewall.cpp b/src/firewall/Firewall.cpp
index 3875e26..a9352bd 100644
--- a/src/firewall/Firewall.cpp
+++ b/src/firewall/Firewall.cpp
@@ -79,11 +79,11 @@
// Action is the last statement we get, so this is where we create the actual rule.
ss << "add rule inet filter acls" << match;
auto action = velia::utils::getValueAsString(node);
- if (action == "accept"sv) {
+ if (action == "ietf-access-control-list:accept"sv) {
ss << " accept";
- } else if (action == "drop"sv) {
+ } else if (action == "ietf-access-control-list:drop"sv) {
ss << " drop";
- } else if (action == "reject"sv) {
+ } else if (action == "ietf-access-control-list:reject"sv) {
ss << " reject";
} else {
// This should theoretically never happen.
diff --git a/tests/sysrepo_interfaces-libnl.cpp b/tests/sysrepo_interfaces-libnl.cpp
index a5e26f6..754ef42 100644
--- a/tests/sysrepo_interfaces-libnl.cpp
+++ b/tests/sysrepo_interfaces-libnl.cpp
@@ -269,13 +269,13 @@
auto routeIdx = findRouteIndex("198.51.100.0/24");
REQUIRE(routeIdx > 0);
REQUIRE(data["/routes/route["s + std::to_string(routeIdx) + "]/next-hop/outgoing-interface"] == IFACE);
- REQUIRE(data["/routes/route["s + std::to_string(routeIdx) + "]/source-protocol"] == "static");
+ REQUIRE(data["/routes/route["s + std::to_string(routeIdx) + "]/source-protocol"] == "ietf-routing:static");
}
{
auto routeIdx = findRouteIndex("192.0.2.0/24");
REQUIRE(routeIdx > 0);
REQUIRE(data["/routes/route["s + std::to_string(routeIdx) + "]/next-hop/outgoing-interface"] == IFACE);
- REQUIRE(data["/routes/route["s + std::to_string(routeIdx) + "]/source-protocol"] == "direct");
+ REQUIRE(data["/routes/route["s + std::to_string(routeIdx) + "]/source-protocol"] == "ietf-routing:direct");
}
data = dataFromSysrepo(client, "/ietf-routing:routing/ribs/rib[name='ipv6-master']", sysrepo::Datastore::Operational);