'Delete an existing key pair.
:param key_pair: Key pair object.
:type key_pair: :class:`.KeyPair`
:return: True on success
:rtype: ``bool``'

def delete_key_pair(self, key):

    key_id = key.name
    response = self.connection.request(('/settings/ssh_keys/%s.json' % key_id), method='DELETE')
    return (response.status == httplib.NO_CONTENT)
