From bc1689c28354efc0968bdd3847d0e011fcb84b88 Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen Date: Tue, 15 Apr 2014 23:45:19 +0300 Subject: model: 'pairs' and 'ipairs' metamethods for TreeNode instances --- aconf/modules/network.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'aconf/modules/network.lua') diff --git a/aconf/modules/network.lua b/aconf/modules/network.lua index 34b4064..188ac28 100644 --- a/aconf/modules/network.lua +++ b/aconf/modules/network.lua @@ -93,7 +93,7 @@ end function Interface:is_removable() return self.class == 'logical' end function Interface:auto_set() - for _, set in M.node.ipairs(self:fetch('../../enabled-ifaces')) do + for _, set in ipairs(self:fetch('../../enabled-ifaces')) do if M.node.contains(set, self) then return set end end end @@ -154,7 +154,7 @@ Interface.status = M.String{ compute=function(obj) if obj.class == 'loopback' then return 'attached' end - for _, iface in M.node.pairs(M.node.parent(obj)) do + for _, iface in pairs(M.node.parent(obj)) do if ( iface.type == 'bond' and M.node.contains(iface.slaves, obj) ) or ( -- cgit v1.2.3