Revision 22ee6892 snf-cyclades-gtools/synnefo/ganeti/hook.py

b/snf-cyclades-gtools/synnefo/ganeti/hook.py
76 76
    """
77 77
    nics = {}
78 78

  
79
    key_to_attr = { 'IP': 'ip', 'MAC': 'mac', 'BRIDGE': 'link' }
79
    key_to_attr = { 'IP': 'ip', 'MAC': 'mac', 'BRIDGE': 'link', 'NETWORK' : 'network' }
80 80

  
81 81
    for env in environ.keys():
82 82
        if env.startswith("GANETI_INSTANCE_NIC"):
83 83
            s = env.replace("GANETI_INSTANCE_NIC", "").split('_', 1)
84
            if len(s) == 2 and s[0].isdigit() and s[1] in ('MAC', 'IP', 'BRIDGE'):
84
            if len(s) == 2 and s[0].isdigit() and s[1] in ('MAC', 'IP', 'BRIDGE', 'NETWORK'):
85 85
                index = int(s[0])
86 86
                key = key_to_attr[s[1]]
87 87

  

Also available in: Unified diff