Project

General

Profile

Revision 847

Fixed: Lease-to-XML did not take into account multi-instance resources.

View differences:

leases.py
1785 1785
                res.set("type", res_type)
1786 1786
                ninstances = capacity.get_ninstances(res_type)
1787 1787
                if ninstances == 1:
1788
                    res.set("amount", str(capacity.get_quantity(res_type)))                
1788
                    res.set("amount", str(capacity.get_quantity(res_type)))
1789
                else:
1790
                    for instance in range(1,ninstances+1):
1791
                        inst_elem = ET.SubElement(res, "instance")               
1792
                        inst_elem.set("amount", str(capacity.get_quantity_instance(res_type, instance)))
1789 1793
            
1790 1794
        return nodes
1791 1795
    

Also available in: Unified diff