def serialize_waterbutler_settings(self): if not self.complete: raise exceptions.AddonError('Repo is not configured') return { 'owner': self.user, 'repo': self.repo, }
def serialize_waterbutler_settings(self): if not self.folder_id: raise exceptions.AddonError('Cannot serialize settings for S3 addon') return { 'bucket': self.folder_id, 'encrypt_uploads': self.encrypt_uploads }
def serialize_waterbutler_settings(self): if not self.folder_path or not self.folder_id: raise exceptions.AddonError('Folder is not configured') return { 'container_type': self.folder_path, 'container_id': str(self.folder_id), }
def serialize_waterbutler_credentials(self): if not self.has_auth: raise exceptions.AddonError('Cannot serialize credentials for S3 addon') return { 'access_key': self.external_account.oauth_key, 'secret_key': self.external_account.oauth_secret, }
def serialize_waterbutler_settings(self): if not self.folder_id: raise exceptions.AddonError('ownCloud is not configured') return { 'folder': self.folder_id, 'verify_ssl': USE_SSL }
def serialize_waterbutler_credentials(self): if not self.has_auth: raise exceptions.AddonError( 'Cannot serialize credentials for Azure Blob Storage addon') return { 'account_name': self.external_account.oauth_key, 'account_key': self.external_account.oauth_secret }
def serialize_waterbutler_credentials(self): if not self.has_auth: raise exceptions.AddonError('Addon is not authorized') try: Provider(self.external_account).refresh_oauth_key() return {'token': self.external_account.oauth_key} except BoxClientException as error: raise HTTPError(error.status_code, data={'message_long': error.message})
def serialize_waterbutler_credentials(self): if not self.has_auth: raise exceptions.AddonError('Cannot serialize credentials for S3 Compatible Storage addon') return { 'host': self.external_account.provider_id.split('\t')[0], 'access_key': self.external_account.oauth_key, 'secret_key': self.external_account.oauth_secret, }
def serialize_waterbutler_settings(self): if not self.folder_id: raise exceptions.AddonError('Dataverse is not configured') return { 'host': self.external_account.oauth_key, 'doi': self.dataset_doi, 'id': self.dataset_id, 'name': self.dataset, }
def serialize_waterbutler_settings(self): if not self.complete: raise exceptions.AddonError('Repo is not configured') return { 'host': self.external_account.oauth_secret, 'owner': self.user, 'repo': self.repo, 'repo_id': self.repo_id }
def serialize_waterbutler_credentials(self): if not self.has_auth: raise exceptions.AddonError('Addon is not authorized') provider = NextcloudProvider(self.external_account) return { 'host': provider.host, 'username': provider.username, 'password': provider.password }
def serialize_waterbutler_settings(self): if not self.folder_id: raise exceptions.AddonError('WEKO is not configured') provider = WEKOProvider(self.external_account) return { 'nid': self.owner._id, 'url': provider.sword_url, 'index_id': self.index_id, 'index_title': self.index_title, }
def serialize_waterbutler_credentials(self): if not self.has_auth: raise exceptions.AddonError('Addon is not authorized') provider = WEKOProvider(self.external_account) if provider.repoid is not None: return { 'token': self.external_account.oauth_key, 'user_id': provider.userid } else: return {'password': provider.password, 'user_id': provider.userid}
def serialize_waterbutler_settings(self): if not self.folder_id: raise exceptions.AddonError('Folder is not configured') return { 'folder': { 'id': self.folder_id, 'name': self.folder_name, 'path': self.folder_path } }
def serialize_waterbutler_credentials(self): if not self.has_auth: raise exceptions.AddonError( 'Cannot serialize credentials for OpenStack Swift addon') provider = SwiftProvider(self.external_account) return { 'auth_version': provider.auth_version, 'auth_url': provider.auth_url, 'tenant_name': provider.tenant_name, 'user_domain_name': provider.user_domain_name, 'project_domain_name': provider.project_domain_name, 'username': provider.username, 'password': provider.password }
def serialize_waterbutler_settings(self): if self.folder_id is None: raise exceptions.AddonError('Folder is not configured') return {'folder': self.folder_id}
def serialize_waterbutler_credentials(self): if not self.has_auth: raise exceptions.AddonError('Addon is not authorized') return {'token': self.external_account.oauth_key}
def serialize_waterbutler_settings(self): if not self.folder_id: raise exceptions.AddonError( 'Cannot serialize settings for AzureBlobStorage addon') return {'container': self.folder_id}
def serialize_waterbutler_settings(self): if not self.folder_id: raise exceptions.AddonError( 'Cannot serialize settings for OpenStack Swift addon') return {'container': self.folder_id}
def serialize_waterbutler_credentials(self): if not self.has_auth: raise exceptions.AddonError('Addon is not authorized') return {'token': self.fetch_access_token()}
def serialize_waterbutler_credentials(self): if not self.complete or not self.repo: raise exceptions.AddonError('Addon is not authorized') return {'token': self.api.fetch_access_token()}