def list_create(cls, datacenter=None, label=None):
        """List available disks for vm creation."""
        options = {
            'items_per_page': DISK_MAXLIST
        }
        if datacenter:
            datacenter_id = int(Datacenter.usable_id(datacenter))
            options['datacenter_id'] = datacenter_id

        # implement a filter by label as API doesn't handle it
        images = cls.safe_call('hosting.disk.list', options)
        if not label:
            return images
        return [img for img in images
                if label.lower() in img['name'].lower()]
def list_create ( cls , datacenter = None , label = None ) : options = { 'items_per_page' : DISK_MAXLIST } if datacenter : datacenter_id = int ( Datacenter . usable_id ( datacenter ) ) options [ 'datacenter_id' ] = datacenter_id images = cls . safe_call ( 'hosting.disk.list' , options ) if not label : return images return [ img for img in images if label . lower ( ) in img [ 'name' ] . lower ( ) ]
List available disks for vm creation.