docs: def create(cls, name, vm, size, snapshotprofile, datacenter,
                 source, disk_type='data', background=False):
          """ Create a disk and attach it to a vm. """
          if isinstance(size, tuple):
              prefix, size = size
  
          if source:
              size = None
          disk_params = cls.disk_param(name, size, snapshotprofile)
          disk_params['datacenter_id'] = int(Datacenter.usable_id(datacenter))
          disk_params['type'] = disk_type
  
          if source:
              disk_id = int(Image.usable_id(source,
                                            disk_params['datacenter_id']))
              result = cls.call('hosting.disk.create_from', disk_params, disk_id)
          else:
              result = cls.call('hosting.disk.create', disk_params)
  
          if background and not vm:
              return result
  
          # interactive mode, run a progress bar
          cls.echo('Creating your disk.')
          cls.display_progress(result)
  
          if not vm:
              return
  
          vm_id = Iaas.usable_id(vm)
          result = cls._attach(result['disk_id'], vm_id)
  
          if background:
              return result
  
          cls.echo('Attaching your disk.')
          cls.display_progress(result)