def get_credential_details(self, tenant_id, credential_id): """Get a particular credential""" LOG.debug("get_credential_details() called\n") try: credential = cdb.get_credential(tenant_id, credential_id) except Exception: raise cexc.CredentialNotFound(tenant_id=tenant_id, credential_id=credential_id) return credential
def get_credential_details(self, tenant_id, credential_id): """Get a particular credential""" LOG.debug("get_credential_details() called\n") try: credential = cdb.get_credential(tenant_id, credential_id) except Exception: raise cexc.CredentialNotFound(tenant_id=tenant_id, credential_id=credential_id) return credential
def rename_credential(self, tenant_id, credential_id, new_name): """Rename the particular credential resource""" LOG.debug("rename_credential() called\n") try: credential = cdb.get_credential(tenant_id, credential_id) except Exception: raise cexc.CredentialNotFound(tenant_id=tenant_id, credential_id=credential_id) credential = cdb.update_credential(tenant_id, credential_id, new_name) return credential
def delete_credential(self, tenant_id, credential_id): """Delete a credential""" LOG.debug("delete_credential() called\n") try: credential = cdb.get_credential(tenant_id, credential_id) except Exception: raise cexc.CredentialNotFound(tenant_id=tenant_id, credential_id=credential_id) credential = cdb.remove_credential(tenant_id, credential_id) return credential
def rename_credential(self, tenant_id, credential_id, new_name): """Rename the particular credential resource""" LOG.debug("rename_credential() called\n") try: credential = cdb.get_credential(tenant_id, credential_id) except Exception: raise cexc.CredentialNotFound(tenant_id=tenant_id, credential_id=credential_id) credential = cdb.update_credential(tenant_id, credential_id, new_name) return credential
def delete_credential(self, tenant_id, credential_id): """Delete a credential""" LOG.debug("delete_credential() called\n") try: credential = cdb.get_credential(tenant_id, credential_id) except Exception: raise cexc.CredentialNotFound(tenant_id=tenant_id, credential_id=credential_id) credential = cdb.remove_credential(tenant_id, credential_id) return credential