Exemple #1
0
 def get_credential_details(self, tenant_id, credential_id):
     """Get a particular credential"""
     LOG.debug(_("get_credential_details() called"))
     try:
         credential = cdb.get_credential(tenant_id, credential_id)
     except Exception:
         raise cexc.CredentialNotFound(tenant_id=tenant_id, credential_id=credential_id)
     return credential
Exemple #2
0
 def rename_credential(self, tenant_id, credential_id, new_name):
     """Rename the particular credential resource"""
     LOG.debug(_("rename_credential() called"))
     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
Exemple #3
0
 def delete_credential(self, tenant_id, credential_id):
     """Delete a credential"""
     LOG.debug(_("delete_credential() called"))
     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 get_credential_details(self, tenant_id, credential_id):
     """Get a particular credential"""
     LOG.debug(_("get_credential_details() called"))
     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"))
     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"))
     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