mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
confd: Adapt YANG models after libyang/netopeer2 upgrade
We previously run a draft version of a lot of YANG models, netconf-server,ssh-server and mode. Now they are released with minor changes. infix-meta is an exception, here we had to remove the obsolete marker of the node and value, since this is no longer allowed in libyang.
This commit is contained in:
@@ -108,7 +108,7 @@ To configure WiFi as a client, first store your WiFi password in the keystore:
|
||||
admin@infix:/> configure
|
||||
admin@infix:/config/> edit keystore symmetric-key mywifi
|
||||
admin@infix:/config/keystore/…/mywifi/> set key-format wifi-preshared-key-format
|
||||
admin@infix:/config/keystore/…/mywifi/> set cleartext-key YourWiFiPassword
|
||||
admin@infix:/config/keystore/…/mywifi/> set cleartext-symmetric-key YourWiFiPassword
|
||||
admin@infix:/config/keystore/…/mywifi/> leave
|
||||
```
|
||||
|
||||
|
||||
+1
-1
@@ -84,7 +84,7 @@ and 63 characters
|
||||
admin@example:/> configure
|
||||
admin@example:/config/> edit keystore symmetric-key example
|
||||
admin@example:/config/keystore/…/example/> set key-format wifi-preshared-key-format
|
||||
admin@example:/config/keystore/…/example/> set cleartext-key mysecret
|
||||
admin@example:/config/keystore/…/example/> set cleartext-symmetric-key mysecret
|
||||
admin@example:/config/keystore/…/example/> leave
|
||||
admin@example:/>
|
||||
```
|
||||
|
||||
@@ -87,7 +87,7 @@ int wifi_gen(struct lyd_node *dif, struct lyd_node *cif, struct dagger *net)
|
||||
country = lydx_get_cattr(wifi, "country-code");
|
||||
encryption = lydx_get_cattr(wifi, "encryption");
|
||||
secret_node = lydx_get_xpathf(cif, "../../keystore/symmetric-keys/symmetric-key[name='%s']", secret_name);
|
||||
secret = lydx_get_cattr(secret_node, "cleartext-key");
|
||||
secret = lydx_get_cattr(secret_node, "cleartext-symmetric-key");
|
||||
|
||||
if (!enabled)
|
||||
return wifi_gen_del(cif, net);
|
||||
|
||||
@@ -37,7 +37,7 @@ MODULES=(
|
||||
"infix-firewall@2025-04-26.yang"
|
||||
"infix-firewall-services@2025-04-26.yang"
|
||||
"infix-firewall-icmp-types@2025-04-26.yang"
|
||||
"infix-meta@2024-10-18.yang"
|
||||
"infix-meta@2025-12-10.yang"
|
||||
"infix-system@2025-10-18.yang"
|
||||
"infix-services@2025-12-10.yang"
|
||||
"ieee802-ethernet-interface@2019-06-21.yang"
|
||||
|
||||
@@ -37,6 +37,11 @@ submodule infix-if-wifi {
|
||||
It supports WiFi client mode and enables comprehensive management of
|
||||
wireless connections, including encryption, country codes, and scanning.";
|
||||
|
||||
revision 2025-12-12 {
|
||||
description "Adapt to new revision of model ietf-keystore.";
|
||||
reference "internal";
|
||||
}
|
||||
|
||||
revision 2025-05-27 {
|
||||
description "Initial revision.";
|
||||
reference "internal";
|
||||
@@ -121,7 +126,7 @@ submodule infix-if-wifi {
|
||||
}
|
||||
|
||||
leaf secret {
|
||||
type ks:symmetric-key-ref;
|
||||
type ks:central-symmetric-key-ref;
|
||||
mandatory true;
|
||||
must "../encryption != 'disabled'" {
|
||||
error-message
|
||||
|
||||
@@ -11,6 +11,10 @@ module infix-keystore {
|
||||
import infix-crypto-types {
|
||||
prefix infix-ct;
|
||||
}
|
||||
|
||||
revision 2025-12-10 {
|
||||
description "Adapt to changes in final version of ietf-keystore";
|
||||
}
|
||||
revision 2025-06-17 {
|
||||
description "Add Wi-Fi secrets support";
|
||||
}
|
||||
@@ -46,14 +50,14 @@ module infix-keystore {
|
||||
wifi-preshared-key-format - WiFi preshared key";
|
||||
}
|
||||
}
|
||||
deviation "/ks:keystore/ks:symmetric-keys/ks:symmetric-key/ks:key-type/ks:cleartext-key/ks:cleartext-key" {
|
||||
deviation "/ks:keystore/ks:symmetric-keys/ks:symmetric-key/ks:key-type/ks:cleartext-symmetric-key" {
|
||||
deviate not-supported;
|
||||
}
|
||||
augment "/ks:keystore/ks:symmetric-keys/ks:symmetric-key/ks:key-type" {
|
||||
case cleartext-key {
|
||||
leaf cleartext-key {
|
||||
case cleartext-symmetric-key {
|
||||
leaf cleartext-symmetric-key {
|
||||
type string;
|
||||
must "../../ks:key-format != 'infix-ct:wifi-preshared-key-format' or " +
|
||||
must "../infix-ks:key-format != 'infix-ct:wifi-preshared-key-format' or " +
|
||||
"(string-length(.) >= 8 and string-length(.) <= 63)" {
|
||||
error-message "WiFi pre-shared key must be 8-63 characters long";
|
||||
}
|
||||
|
||||
@@ -12,6 +12,10 @@ module infix-meta {
|
||||
description "Infix metadata.";
|
||||
|
||||
|
||||
revision 2025-12-10 {
|
||||
description "Remove the obsolete, not allowed in libyang.";
|
||||
reference "internal";
|
||||
}
|
||||
revision 2024-10-18 {
|
||||
description "Mark entire meta container obsolete.";
|
||||
reference "internal";
|
||||
@@ -29,10 +33,8 @@ module infix-meta {
|
||||
|
||||
container meta {
|
||||
description "Meta data";
|
||||
status obsolete;
|
||||
|
||||
leaf version {
|
||||
status obsolete; // Ensure frontends don't show this, used for migration.
|
||||
description "Configuration file format version, automatically generated.";
|
||||
type string;
|
||||
}
|
||||
|
||||
@@ -167,6 +167,7 @@ module infix-routing {
|
||||
base infix-routing-type;
|
||||
description "Static route";
|
||||
}
|
||||
|
||||
deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/rt:type" {
|
||||
deviate replace {
|
||||
type identityref {
|
||||
@@ -858,5 +859,4 @@ module infix-routing {
|
||||
This is useful for networks where multiple addresses exist on an interface.";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,10 @@ module infix-services {
|
||||
contact "kernelkit@googlegroups.com";
|
||||
description "Infix services, generic.";
|
||||
|
||||
revision 2025-12-10 {
|
||||
description "Adapt to changes in final version of ietf-keystore";
|
||||
reference "internal";
|
||||
}
|
||||
revision 2024-12-03 {
|
||||
description "Add support for SSH server configuration";
|
||||
reference "internal";
|
||||
@@ -143,7 +147,7 @@ module infix-services {
|
||||
+ "derived-from-or-self(deref(.)/../ks:private-key-format, 'infix-ct:rsa-private-key-format'))" {
|
||||
error-message "Only RSA hostkeys are supported.";
|
||||
}
|
||||
type ks:asymmetric-key-ref;
|
||||
type ks:central-asymmetric-key-ref;
|
||||
}
|
||||
|
||||
list listen {
|
||||
|
||||
Reference in New Issue
Block a user