'Extracts disk image and OVF file from OVA package
Extracts a single disk image and OVF from OVA tar archive and calls
OVF parser method.
:param ova: a file object containing the OVA file
:returns: a tuple of extracted disk file object and dictionary of
properties parsed from the OVF file
:raises RuntimeError: an error for malformed OVA and OVF files'

def extract(self, ova):

    with tarfile.open(fileobj=ova) as tar_file:
        filenames = tar_file.getnames()
        ovf_filename = next((filename for filename in filenames if filename.endswith('.ovf')), None)
        if ovf_filename:
            ovf = tar_file.extractfile(ovf_filename)
            (disk_name, properties) = self._parse_OVF(ovf)
            ovf.close()
        else:
            raise RuntimeError(_('Could    not    find    OVF    file    in    OVA    archive    file.'))
        disk = tar_file.extractfile(disk_name)
        return (disk, properties)
