Skip to content

Commit

Permalink
luci-proto-external: migrate from support to cni-protocol to external…
Browse files Browse the repository at this point in the history
…-protocol

As previously introduced cni protocol support (for netifd) has evolved more
to a multipurpose protocol useful for cni/netavark/some vpn/etc connections
I have decided to rename it from cni-protocol to external-protocol.

That's why also it's luci companion, luci-proto-cni, should be renamed
to luci-proto-external and migrated to support external-protocol.

This patch also adds support for new option in external-protocol, delay.

This closes promise made in #22702 on openwrt packages repository.

Signed-off-by: Oskari Rauta <oskari.rauta@gmail.com>
  • Loading branch information
oskarirauta committed Nov 30, 2023
1 parent 1a1e63a commit 69885ce
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk

LUCI_TITLE:=Support for CNI protocol
LUCI_DEPENDS:=+cni-protocol
LUCI_TITLE:=Support for externally managed protocol
LUCI_DEPENDS:=+external-protocol

include ../../luci.mk

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
'require form';
'require network';

return network.registerProtocol('cni', {
return network.registerProtocol('external', {
getI18n: function () {
return _('CNI (Externally managed interface)');
return _('Externally managed interface');
},

getOpkgPackage: function() {
return "cni-protocol";
return "external-protocol";
},

isFloating: function() {
Expand All @@ -31,12 +31,17 @@ return network.registerProtocol('cni', {
o.optional = false;
o.rmempty = false;

o = s.taboption('general', form.Value, '_delay', _('Delay'), _('Afer making changes to network using CNI protocol, network must be manually restarted.'));
o = s.taboption('general', form.Value, '_delay', _('Delay'), _('Afer making changes to network using external protocol, network must be manually restarted.'));
o.ucioption = 'delay';
o.placeholder = '10';
o.datatype = 'min(1)';
o.optional = true;
o.rmempty = true;

o = s.taboption('general', form.Value, '_searchdomain', _('Search domain'));
o.ucioption = 'searchdomain'
o.optional = true;
o.rmempty = true;
}

});

0 comments on commit 69885ce

Please sign in to comment.