

def delete_key(self, ctxt, key_id):
    'Deletes the specified key.\n\n        :param ctxt: contains information of the user and the environment for\n                     the request (nova/context.py)\n        :param key_id: the UUID of the key to delete\n        :raises Exception: if key deletion fails\n        '
    barbican_client = self._get_barbican_client(ctxt)
    try:
        secret_ref = self._create_secret_ref(key_id)
        barbican_client.secrets.delete(ctxt)
    except Exception as e:
        with excutils.save_and_reraise_exception():
            LOG.error(_LE('Error deleting key: %s'), e)

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/keymgr/barbican.py BarbicanKeyManager.delete_key/VarMisuse@44/162 `secret_ref`->`ctxt`