Skip to main content

Python client for DCI Control Server

Project description

python-dciclient

The python-dciclient project provides both the python bindings and a CLI to the DCI Control Server

Installation

The team behind the project offers repositories for Red Hat/CentOS:

  • yum -y install https://packages.distributed-ci.io/dci-release.el7.noarch.rpm

Then simply run yum install python-dciclient.

As mentioned above, the package provides two things:

  • The CLI: a dcictl command is provided. For more details dcictl --help.
  • The API: a python module one can use to interact with a control server (dciclient.v1.api.*)

Credentials

Admitting one has valid credentials to use the DCI Control Server platform, there are two way to specify those informations while using dcictl:

  • A dcirc file:

A file where the necessary credentials are stored. This file needs then to be sourced before using dcictl. Example:

export DCI_LOGIN=foo
export DCI_PASSWORD=bar
export DCI_CS_URL=https://api.distributed-ci.io

or using the API secret method:

export DCI_CLIENT_ID=<client_type>/<client_id>
export DCI_API_SECRET=<api_secret>
export DCI_CS_URL=https://api.distributed-ci.io

Where client_type can currently be remoteci or feeder

Which will allow the user to run the command: dcictl team-list

  • At the command line level:

One can pass those informations on the CLI level. Example: dcictl --dci-login jdoe --dci-password jdoe --dci-cs-url 'https://api.distributed-ci.io' team-list or dcictl --dci-client-id <client_type>/<client_id> --dci-api-secret <api_secret> --dci-cs-url 'https://api.distributed-ci.io' team-list

Where client_type can currently be remoteci or feeder

For RemoteCIs or Feeders please use the API Secret to authenticate.

List of available commands

Run dcictl --help command to see the list of the available commands

Commands:
  component-attach-issue       Attach an issue to a component.
  component-create             Create a component.
  component-delete             Delete a component.
  component-file-delete        Delete a component file.
  component-file-download      Retrieve a component file.
  component-file-list          List files attached to a component.
  component-file-show          Show a component file.
  component-file-upload        Attach a file to a component.
  component-list               List all components.
  component-list-issue         List all component attached issues.
  component-show               Show a component.
  component-status             Show an overview of the last jobs associated...
  component-unattach-issue     Unattach an issue from a component.
  component-update             Update a component.
  file-delete                  Delete a file.
  file-list                    List all files.
  file-show                    Show a file.
  job-attach-issue             Attach an issue to a job.
  job-delete                   Delete a job.
  job-list                     List all jobs.
  job-list-issue               List all job attached issues.
  job-list-test                List all tests attached to a job.
  job-output                   Show the job output.
  job-recheck                  Recheck a job.
  job-results                  List all job results.
  job-show                     Show a job.
  job-unattach-issue           Unattach an issue from a job.
  jobdefinition-annotate       Annotate a jobdefinition.
  jobdefinition-attach-test    Attach a test to a jobdefinition.
  jobdefinition-create         Create a jobdefinition.
  jobdefinition-delete         Delete a jobdefinition.
  jobdefinition-list           List all jobdefinitions.
  jobdefinition-list-test      List tests attached to a jobdefinition.
  jobdefinition-set-active     Annotate a jobdefinition.
  jobdefinition-show           Show a jobdefinition.
  jobdefinition-unattach-test  Unattach a test to a jobdefinition.
  jobdefinition-update         Update a jobdefinition.
  jobstate-list                List all jobstates.
  jobstate-show                Show a jobstate.
  purge                        Purge soft-deleted resources.
  remoteci-attach-test         Attach a test to a remoteci.
  remoteci-create              Create a remoteci.
  remoteci-delete              Delete a remoteci.
  remoteci-get-data            Retrieve data field from a remoteci.
  remoteci-list                List all remotecis.
  remoteci-list-test           List tests attached to a remoteci.
  remoteci-refresh-keys        Refresh a remoteci key pair.
  remoteci-reset-api-secret    Reset a remoteci api secret.
  remoteci-show                Show a remoteci.
  remoteci-unattach-test       Unattach a test to a remoteci.
  remoteci-update              Update a remoteci.
  team-create                  Create a team.
  team-delete                  Delete a team.
  team-list                    List all teams.
  team-show                    Show a team.
  team-update                  Update a team.
  test-create                  Create a test.
  test-delete                  Delete a test.
  test-list                    List all tests.
  test-show                    Show a test.
  topic-attach-team            Attach a team to a topic.
  topic-create                 Create a topic.
  topic-delete                 Delete a topic.
  topic-list                   List all topics.
  topic-list-team              List teams attached to a topic.
  topic-show                   Show a topic.
  topic-unattach-team          Unattach a team from a topic.
  user-create                  Create a user.
  user-delete                  Delete a user.
  user-list                    List all users.
  user-show                    Show a user.
  user-update                  Update a user.

License

Apache 2.0

Author Information

Distributed-CI Team distributed-ci@redhat.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dciclient-1.0.1.tar.gz (39.9 kB view details)

Uploaded Source

Built Distribution

dciclient-1.0.1-py3-none-any.whl (80.2 kB view details)

Uploaded Python 3

File details

Details for the file dciclient-1.0.1.tar.gz.

File metadata

  • Download URL: dciclient-1.0.1.tar.gz
  • Upload date:
  • Size: 39.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.2 pkginfo/1.4.2 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for dciclient-1.0.1.tar.gz
Algorithm Hash digest
SHA256 89873c22ca2113ce102a12d2df319100bff4b720bcd20c5f3c47ab24ad25f429
MD5 b6e904f70bf921e6e1b5e32fb1ad44ec
BLAKE2b-256 0dcf040083236ea4a42f154f04a081899df98a4f3f2140abd21c47fd9ca3d6aa

See more details on using hashes here.

File details

Details for the file dciclient-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: dciclient-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 80.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.2 pkginfo/1.4.2 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for dciclient-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1a8285b08b03fa456d438c56347275333b4b47ea0b48112b3b46942c004ff2f2
MD5 4c7d114643e6f4f7ac411c2085519eba
BLAKE2b-256 9ba8c6a65e14b149ef4425614b60c2422f0c0839e25de82a0bbf9236e1e27462

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page