summaryrefslogtreecommitdiffstats
path: root/aconf/modules
diff options
context:
space:
mode:
Diffstat (limited to 'aconf/modules')
-rw-r--r--aconf/modules/network.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/aconf/modules/network.lua b/aconf/modules/network.lua
index ad772ed..9535fc4 100644
--- a/aconf/modules/network.lua
+++ b/aconf/modules/network.lua
@@ -106,8 +106,8 @@ function Interface:auto_vlan_tag()
end
Interface.enabled = M.Boolean{
- compute=function(self, iface) return iface:auto_set() and true or false end,
- store=function(self, iface, value)
+ compute=function(iface) return iface:auto_set() and true or false end,
+ store=function(iface, value)
local set = iface:auto_set()
if value and not set then
M.node.insert(iface:fetch('../../enabled-ifaces/1'), iface)
@@ -116,7 +116,7 @@ Interface.enabled = M.Boolean{
}
Interface.class = M.String{
- compute=function(self, iface, txn)
+ compute=function(iface, txn)
local name = M.node.name(iface)
if name == 'lo' then return 'loopback' end
@@ -139,19 +139,19 @@ Interface.class = M.String{
Interface.type = M.String{
condition={class='logical'},
- compute=function(self, iface)
+ compute=function(iface)
if #iface.slaves > 0 then return 'bond' end
if #iface.ports > 0 then return 'bridge' end
if iface.vlan_tag then return 'vlan' end
end,
- editable=function(self, iface) return not iface:auto_vlan_tag() end,
+ editable=function(iface) return not iface:auto_vlan_tag() end,
required=true,
choice={'bond', 'bridge', {'vlan', 'VLAN'}}
}
Interface.status = M.String{
visible=false,
- compute=function(self, obj)
+ compute=function(obj)
if obj.class == 'loopback' then return 'attached' end
for _, iface in M.node.pairs(M.node.parent(obj)) do
@@ -193,7 +193,7 @@ Interface.ports = M.Set{
-- TODO do not allow VLAN creation for non-existent interfaces
Interface.trunk = M.Reference{
condition={type='vlan'},
- compute=function(self, iface)
+ compute=function(iface)
local trunk = M.node.name(iface):match(vlan_pattern)
if trunk and iface:fetch('..')[trunk] then return trunk end
end,