59,62c59 < expr = "field 'device' = '%s' and \ < field 'VLAN' = '-1'" % FLAGS.vlan_interface < pifs = session.call_xenapi('PIF.get_all_records_where', expr) < pif_ref = None --- > pifs = session.call_xenapi('PIF.get_all') 64a62,74 > raise Exception(_('Found no PIF on host')) > # 3 - create vlan for network > found_pif = False > pif_ref = None > for pif_ref in pifs: > if (session.call_xenapi('PIF.get_device', pif_ref) == FLAGS.vlan_interface and > session.call_xenapi('PIF.get_VLAN', pif_ref) == '-1'): > session.call_xenapi('VLAN.create', > pif_ref, > str(vlan_num), > network_ref) > found_pif = True > if not found_pif: 67,72d76 < # 3 - create vlan for network < for pif_ref in pifs.keys(): < session.call_xenapi('VLAN.create', < pif_ref, < str(vlan_num), < network_ref)