yagocd package

Submodules

yagocd.client module

class yagocd.client.Yagocd(server=None, auth=None, options=None)[source]

Bases: object

Main class of the package, that gives user access to Go REST API methods.

DEFAULT_OPTIONS = {'headers': {'Accept': 'application/vnd.go.cd.v1+json'}, 'verify': True, 'api_path': 'api/', 'context_path': 'go/', 'server': 'http://localhost:8153'}
agents

Property for accessing AgentManager instance, which is used to manage agents.

Return type:yagocd.resources.agent.AgentManager
artifacts

Property for accessing ArtifactManager instance, which is used to manage artifacts.

Return type:yagocd.resources.artifact.ArtifactManager
configurations

Property for accessing ConfigurationManager instance, which is used to manage configurations.

Return type:yagocd.resources.configuration.ConfigurationManager
elastic_profiles

Property for accessing ElasticAgentProfileManager instance, which is used to manage elastic agent profiles.

Return type:yagocd.resources.elastic_profile.ElasticAgentProfileManager
encryption

Property for accessing EncryptionManager instance, which is used to manage encryption.

Return type:yagocd.resources.encryption.EncryptionManager
environments

Property for accessing EnvironmentManager instance, which is used to manage environments.

Return type:yagocd.resources.environment.EnvironmentManager
feeds

Property for accessing FeedManager instance, which is used to manage feeds.

Return type:yagocd.resources.feed.FeedManager
info

Property for accessing InfoManager instance, which is used to general server info.

Return type:yagocd.resources.info.InfoManager
jobs

Property for accessing JobManager instance, which is used to manage feeds.

Return type:yagocd.resources.job.JobManager
materials

Property for accessing MaterialManager instance, which is used to manage materials.

Return type:yagocd.resources.material.MaterialManager
notification_filters

Property for accessing NotificationFilterManager instance, which is used to manage notification filters.

Return type:yagocd.resources.notification_filter.NotificationFilterManager
package_repositories

Property for accessing PackageRepositoryManager instance, which is used to manage package repos.

Return type:yagocd.resources.package_repository.PackageRepositoryManager
packages

Property for accessing PackageManager instance, which is used to manage packages.

Return type:yagocd.resources.package.PackageManager
pipeline_configs

Property for accessing PipelineConfigManager instance, which is used to manage pipeline configurations.

Return type:yagocd.resources.pipeline_config.PipelineConfigManager
pipelines

Property for accessing PipelineManager instance, which is used to manage pipelines.

Return type:yagocd.resources.pipeline.PipelineManager
plugin_info

Property for accessing PluginInfoManager instance, which is used to manage pipeline configurations.

Return type:yagocd.resources.plugin_info.PluginInfoManager
properties

Property for accessing PropertyManager instance, which is used to manage properties of the jobs.

Return type:yagocd.resources.property.PropertyManager
scms

Property for accessing SCMManager instance, which is used to manage pluggable SCM materials.

Return type:yagocd.resources.scm.SCMManager
server_url

Property for getting server url.

Returns:server url for this instance.
stages

Property for accessing StageManager instance, which is used to manage stages.

Return type:yagocd.resources.stage.StageManager
templates

Property for accessing TemplateManager instance, which is used to manage templates.

Return type:yagocd.resources.template.TemplateManager
users

Property for accessing UserManager instance, which is used to manage users.

Return type:yagocd.resources.user.UserManager
versions

Property for accessing VersionManager instance, which is used to get server info.

Return type:yagocd.resources.version.VersionManager

yagocd.exception module

exception yagocd.exception.RequestError(summary, response)[source]

Bases: yagocd.exception.YagocdException

Exception for throwing on request errors.

Usually extended error information would be contained in response as json object.

exception yagocd.exception.YagocdException[source]

Bases: exceptions.Exception

Base class for custom exceptions.

yagocd.session module

class yagocd.session.Session(auth, options)[source]

Bases: object

Class for working with sessions. Instance of this class is created only once in the initialization of yagocd.client.Client and then passed as a parameter for all managers.

base_api(context_path=None, api_path=None)[source]
delete(path, data=None, headers=None)[source]
get(path, params=None, headers=None)[source]
patch(path, data=None, headers=None)[source]
post(path, params=None, data=None, headers=None, files=None)[source]
put(path, data=None, headers=None, files=None)[source]
request(method, path, params=None, data=None, headers=None, files=None)[source]
server_url

Property for getting server url.

Returns:server url for this instance.
server_version

Special method for getting server version.

Because of different behaviour on different versions of server, we have to pass different headers to the endpoints. This method requests the version from server and caches it in internal variable, so other resources could use it.

Returns:server version parsed from about page.
static urljoin(*args)[source]

Joins given arguments into a url. Trailing but not leading slashes are stripped for each argument.

yagocd.util module

class yagocd.util.RequireParamMixin[source]

Bases: object

class yagocd.util.Since(since_version)[source]

Bases: object

ENABLED = True
class yagocd.util.YagocdUtil[source]

Bases: object

static build_graph(nodes, dependencies, compare)[source]
classmethod choose_option(version_to_options, default, server_version)[source]
static graph_depth_walk(root_nodes, near_nodes)[source]
yagocd.util.since

alias of Since

Module contents

class yagocd.Yagocd(server=None, auth=None, options=None)[source]

Bases: object

Main class of the package, that gives user access to Go REST API methods.

DEFAULT_OPTIONS = {'headers': {'Accept': 'application/vnd.go.cd.v1+json'}, 'verify': True, 'api_path': 'api/', 'context_path': 'go/', 'server': 'http://localhost:8153'}
agents

Property for accessing AgentManager instance, which is used to manage agents.

Return type:yagocd.resources.agent.AgentManager
artifacts

Property for accessing ArtifactManager instance, which is used to manage artifacts.

Return type:yagocd.resources.artifact.ArtifactManager
configurations

Property for accessing ConfigurationManager instance, which is used to manage configurations.

Return type:yagocd.resources.configuration.ConfigurationManager
elastic_profiles

Property for accessing ElasticAgentProfileManager instance, which is used to manage elastic agent profiles.

Return type:yagocd.resources.elastic_profile.ElasticAgentProfileManager
encryption

Property for accessing EncryptionManager instance, which is used to manage encryption.

Return type:yagocd.resources.encryption.EncryptionManager
environments

Property for accessing EnvironmentManager instance, which is used to manage environments.

Return type:yagocd.resources.environment.EnvironmentManager
feeds

Property for accessing FeedManager instance, which is used to manage feeds.

Return type:yagocd.resources.feed.FeedManager
info

Property for accessing InfoManager instance, which is used to general server info.

Return type:yagocd.resources.info.InfoManager
jobs

Property for accessing JobManager instance, which is used to manage feeds.

Return type:yagocd.resources.job.JobManager
materials

Property for accessing MaterialManager instance, which is used to manage materials.

Return type:yagocd.resources.material.MaterialManager
notification_filters

Property for accessing NotificationFilterManager instance, which is used to manage notification filters.

Return type:yagocd.resources.notification_filter.NotificationFilterManager
package_repositories

Property for accessing PackageRepositoryManager instance, which is used to manage package repos.

Return type:yagocd.resources.package_repository.PackageRepositoryManager
packages

Property for accessing PackageManager instance, which is used to manage packages.

Return type:yagocd.resources.package.PackageManager
pipeline_configs

Property for accessing PipelineConfigManager instance, which is used to manage pipeline configurations.

Return type:yagocd.resources.pipeline_config.PipelineConfigManager
pipelines

Property for accessing PipelineManager instance, which is used to manage pipelines.

Return type:yagocd.resources.pipeline.PipelineManager
plugin_info

Property for accessing PluginInfoManager instance, which is used to manage pipeline configurations.

Return type:yagocd.resources.plugin_info.PluginInfoManager
properties

Property for accessing PropertyManager instance, which is used to manage properties of the jobs.

Return type:yagocd.resources.property.PropertyManager
scms

Property for accessing SCMManager instance, which is used to manage pluggable SCM materials.

Return type:yagocd.resources.scm.SCMManager
server_url

Property for getting server url.

Returns:server url for this instance.
stages

Property for accessing StageManager instance, which is used to manage stages.

Return type:yagocd.resources.stage.StageManager
templates

Property for accessing TemplateManager instance, which is used to manage templates.

Return type:yagocd.resources.template.TemplateManager
users

Property for accessing UserManager instance, which is used to manage users.

Return type:yagocd.resources.user.UserManager
versions

Property for accessing VersionManager instance, which is used to get server info.

Return type:yagocd.resources.version.VersionManager