diff options
author | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2014-04-15 23:45:19 +0300 |
---|---|---|
committer | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2014-04-15 23:45:19 +0300 |
commit | bc1689c28354efc0968bdd3847d0e011fcb84b88 (patch) | |
tree | 816484773f632e5cc25b9bd976889636e49fb8ab /aconf/modules | |
parent | d9decd5a0dd0abbe7842da4400e665d96d6b8f9b (diff) | |
download | aconf-bc1689c28354efc0968bdd3847d0e011fcb84b88.tar.bz2 aconf-bc1689c28354efc0968bdd3847d0e011fcb84b88.tar.xz |
model: 'pairs' and 'ipairs' metamethods for TreeNode instances
Diffstat (limited to 'aconf/modules')
-rw-r--r-- | aconf/modules/network.lua | 4 |
1 files changed, 2 insertions, 2 deletions
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 ( |