def METHOD_NAME(self, request, target_sat, pre_upgrade_data):
    """Run subscription auto-attach on pre-upgrade content host registered
    with Satellite.
    :id: postupgrade-940fc78c-ffa6-4d9a-9c4b-efa1b9480a22
    :steps:
        1. Run subscription auto-attach on content host.
        2. Delete the content host, activation key, location & organization.
    :expectedresults: After upgrade,
        1. Pre-upgrade content host should get subscribed.
        2. All the cleanup should be completed successfully.
    """
    rhel_contenthost = ContentHost.get_host_by_hostname(pre_upgrade_data.rhel_client)
    host = target_sat.api.Host().search(query={'search': f'name={rhel_contenthost.hostname}'})[
        0
    ]
    target_sat.cli.Host.subscription_auto_attach({'host-id': host.id})
    result = rhel_contenthost.execute('yum install -y zsh')
    assert result.status == 0, 'package was not installed'
    org = target_sat.api.Organization().search(
        query={'search': f'name={pre_upgrade_data.org_name}'}
    )[0]
    request.addfinalizer(org.delete)
    sub = target_sat.api.Subscription(organization=org)
    sub.delete_manifest(data={'organization_id': org.id})
    assert len(sub.search()) == 0
    manifester = Manifester(manifest_category=settings.manifest.entitlement)
    manifester.allocation_uuid = pre_upgrade_data.allocation_uuid
    request.addfinalizer(manifester.delete_subscription_allocation)