ltep_athena_api package

Subpackages

Submodules

ltep_athena_api.athena_api module

ltep_athena_api.authenticate module

class ltep_athena_api.authenticate.AthenaAuth(host_api_address: str, email: str, developer_name: str, developer_token: str, host_api_address_sandbox: Optional[str] = None)[source]

Bases: object

Initializes Authentification parameters to authenticate developer at LTEP Athena Platform :param str host_api_address: hosting address of Athena platform, e.g. ‘http://localhost:5000 :param str email: user’s email :param str developer_name: user’s developr name :param str developer_token: user’s developer token :param str host_api_address_sandbox: hosting address of Sandbox Athena service (if seperated), e.g. ‘http://localhost:27000 :returns: AthenaAuth instance :rtype: AthenaAuth

static authenticate_access_athena(fn)[source]

Decorator Function to authenticate with Athena Platform

developer_name: str
developer_token: str
email: str
host_api_address: str
host_api_address_sandbox: str = None

ltep_athena_api.deploy module

class ltep_athena_api.deploy.DeployGithubAthena[source]

Bases: object

create_github_enterprise_instance(base_url: str, login_or_access_token: str)[source]

This methods creates a Github instance for repositories hosted on by GitHub enterprise at own server location :param str base_url: url location to Github Enterprise :param str acess_token: developer token derived from Github :raises Exception: if GitHub authenfication was unsuccessful :returns: GitHub instance :rtype: Github

create_github_instance(acess_token: str) Github[source]

This methods creates a Github instance for repositories hosted on GitHub Inc. :param str acess_token: developer token derived from Github :raises Exception: if GitHub authenfication was unsuccessful :returns: GitHub instance :rtype: Github

create_github_instance_password(username: str, password: str) Github[source]

This methods creates a Github instance for repositories hosted on GitHub Inc. :param str acess_token: developer token derived from Github :raises Exception: if GitHub authenfication was unsuccessful :returns: GitHub instance :rtype: Github

create_new_github_repo_organization(github: Github, organization_name: str, repo_name: str = 'affoord', private: bool = True) Repository[source]

This methods creates a Github Repository for a organization :param Github github: Github instance to perform git operations :param str repo_name: repo’s name :param bool private: private or public repo :returns: Repository instance :rtype: Repository

create_new_github_repo_user(github: Github, repo_name: str = 'athena_length-height', private: bool = True) Repository[source]

This methods creates a Github Repository for a user :param Github github: Github instance to perform git operations :param str repo_name: repo’s name :param bool private: private or public repo :returns: Repository instance :rtype: Repository

create_webhook(repo: Repository, host: str, endpoint: str = 'github-webhook', events: List[str] = ['push', 'pull_request'], active: bool = True)[source]

Creates a webhook for the specified repository.

deploy_to_github(repo: Repository, folder_location: str)[source]

This methods creates a Github Repository for a organization :param Github github: Github instance to perform git operations :param str repo_name: repo’s name :param bool private: private or public repo :returns: Repository instance :rtype: Repository

get_existing_repo(github: Github, repo_full_name_or_repo_id: str) Repository[source]

This methods returns a Github Repository for a user :param str repo_full_name_or_repo_id: repo’s name, e.g. your_github_user/your_repository :returns: GitHub instance :rtype: Github

init_default_deployment_user(**kwargs)
class ltep_athena_api.deploy.jenkinsDeploy[source]

Bases: object

build_jenkins_job(jenkins_server: Jenkins, name: str = 'athena_deploy')[source]
connect_to_jenkins(host_url: str, user_name: str, password: str) Jenkins[source]
create_jenkins_job(jenkins_server: Jenkins, name: str = 'athena_deploy', config_xml: str = "<?xml version='1.0' encoding='UTF-8'?>\n<project>\n  <keepDependencies>false</keepDependencies>\n  <properties/>\n  <scm class='jenkins.scm.NullSCM'/>\n  <canRoam>true</canRoam>\n  <disabled>false</disabled>\n  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>\n  <triggers class='vector'/>\n  <concurrentBuild>false</concurrentBuild>\n  <builders/>\n  <publishers/>\n  <buildWrappers/>\n</project>")[source]

ltep_athena_api.microservice module

Module contents