From 9070dafe8bd32f1d623ab75454ab0d22365446c5 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Fri, 5 May 2023 13:24:10 +0000 Subject: automatic import of python-pyrundeck --- .gitignore | 1 + python-pyrundeck.spec | 247 ++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 249 insertions(+) create mode 100644 python-pyrundeck.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..9955b4a 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/pyrundeck-0.10.0.tar.gz diff --git a/python-pyrundeck.spec b/python-pyrundeck.spec new file mode 100644 index 0000000..0aabd5d --- /dev/null +++ b/python-pyrundeck.spec @@ -0,0 +1,247 @@ +%global _empty_manifest_terminate_build 0 +Name: python-pyrundeck +Version: 0.10.0 +Release: 1 +Summary: Python REST API client for Rundeck 2.6+ +License: GPL3 +URL: https://github.com/pschmitt/pyrundeck +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/37/1b/6ec897f466597068c7cea03fd5dcf064ce2baf7ecec0db3acad2d25b1566/pyrundeck-0.10.0.tar.gz +BuildArch: noarch + +Requires: python3-requests + +%description +# Rundeck REST API client + +![PyPI](https://img.shields.io/pypi/v/pyrundeck) +![PyPI - Downloads](https://img.shields.io/pypi/dm/pyrundeck) +![PyPI - License](https://img.shields.io/pypi/l/pyrundeck) +![Python Lint](https://github.com/pschmitt/pyrundeck/workflows/Python%20Lint/badge.svg) + +This is a Python REST API client for Rundeck 2.6+ + +## Example + +```python +from pyrundeck import Rundeck + +rundeck = Rundeck('http://rundeck-url', + token='sometoken', + api_version=32, # this is not mandatory, it defaults to 18 + ) + +run = rundeck.run_job(RUNDECK_JOB_ID, options={'option1': 'foo'}) + +running_jobs = rundeck.get_executions_for_job(job_id=RUNDECK_JOB_ID, status='running') + +for job in running_jobs['executions']: + print("%s is running" % job['id']) +``` + +A token can be generated in the 'profile' page of Rundeck. Alternatively you +can login with a username and password. + +Example using the file upload option + +```python +from pyrundeck import rundeck + +rd = Rundeck( + rundeck_url, + username=username, + password=password, + verify=False, + api_version=19 # Required for file upload option + ) +# Use the file_key returned in the response to reference the file when running a job +# Per documentation at https://docs.rundeck.com/docs/api/rundeck-api.html#upload-a-file-for-a-job-option +response = rd.upload_file(RUNDECK_JOB_ID, OPTION_NAME, FILE_NAME_STRING_OR_IOFILEWRAPPER) +file_key = response['options'][OPTION_NAME] +rd.run_job(RUNDECK_JOB_ID, options={OPTION_NAME: file_key}) +``` + +## See also + +- https://github.com/marklap/rundeckrun + +## LICENSE + +GPL3 + + + + +%package -n python3-pyrundeck +Summary: Python REST API client for Rundeck 2.6+ +Provides: python-pyrundeck +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-pyrundeck +# Rundeck REST API client + +![PyPI](https://img.shields.io/pypi/v/pyrundeck) +![PyPI - Downloads](https://img.shields.io/pypi/dm/pyrundeck) +![PyPI - License](https://img.shields.io/pypi/l/pyrundeck) +![Python Lint](https://github.com/pschmitt/pyrundeck/workflows/Python%20Lint/badge.svg) + +This is a Python REST API client for Rundeck 2.6+ + +## Example + +```python +from pyrundeck import Rundeck + +rundeck = Rundeck('http://rundeck-url', + token='sometoken', + api_version=32, # this is not mandatory, it defaults to 18 + ) + +run = rundeck.run_job(RUNDECK_JOB_ID, options={'option1': 'foo'}) + +running_jobs = rundeck.get_executions_for_job(job_id=RUNDECK_JOB_ID, status='running') + +for job in running_jobs['executions']: + print("%s is running" % job['id']) +``` + +A token can be generated in the 'profile' page of Rundeck. Alternatively you +can login with a username and password. + +Example using the file upload option + +```python +from pyrundeck import rundeck + +rd = Rundeck( + rundeck_url, + username=username, + password=password, + verify=False, + api_version=19 # Required for file upload option + ) +# Use the file_key returned in the response to reference the file when running a job +# Per documentation at https://docs.rundeck.com/docs/api/rundeck-api.html#upload-a-file-for-a-job-option +response = rd.upload_file(RUNDECK_JOB_ID, OPTION_NAME, FILE_NAME_STRING_OR_IOFILEWRAPPER) +file_key = response['options'][OPTION_NAME] +rd.run_job(RUNDECK_JOB_ID, options={OPTION_NAME: file_key}) +``` + +## See also + +- https://github.com/marklap/rundeckrun + +## LICENSE + +GPL3 + + + + +%package help +Summary: Development documents and examples for pyrundeck +Provides: python3-pyrundeck-doc +%description help +# Rundeck REST API client + +![PyPI](https://img.shields.io/pypi/v/pyrundeck) +![PyPI - Downloads](https://img.shields.io/pypi/dm/pyrundeck) +![PyPI - License](https://img.shields.io/pypi/l/pyrundeck) +![Python Lint](https://github.com/pschmitt/pyrundeck/workflows/Python%20Lint/badge.svg) + +This is a Python REST API client for Rundeck 2.6+ + +## Example + +```python +from pyrundeck import Rundeck + +rundeck = Rundeck('http://rundeck-url', + token='sometoken', + api_version=32, # this is not mandatory, it defaults to 18 + ) + +run = rundeck.run_job(RUNDECK_JOB_ID, options={'option1': 'foo'}) + +running_jobs = rundeck.get_executions_for_job(job_id=RUNDECK_JOB_ID, status='running') + +for job in running_jobs['executions']: + print("%s is running" % job['id']) +``` + +A token can be generated in the 'profile' page of Rundeck. Alternatively you +can login with a username and password. + +Example using the file upload option + +```python +from pyrundeck import rundeck + +rd = Rundeck( + rundeck_url, + username=username, + password=password, + verify=False, + api_version=19 # Required for file upload option + ) +# Use the file_key returned in the response to reference the file when running a job +# Per documentation at https://docs.rundeck.com/docs/api/rundeck-api.html#upload-a-file-for-a-job-option +response = rd.upload_file(RUNDECK_JOB_ID, OPTION_NAME, FILE_NAME_STRING_OR_IOFILEWRAPPER) +file_key = response['options'][OPTION_NAME] +rd.run_job(RUNDECK_JOB_ID, options={OPTION_NAME: file_key}) +``` + +## See also + +- https://github.com/marklap/rundeckrun + +## LICENSE + +GPL3 + + + + +%prep +%autosetup -n pyrundeck-0.10.0 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-pyrundeck -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Fri May 05 2023 Python_Bot - 0.10.0-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..0fe6e24 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +98ba785b66a22c7081e07d07f776c7da pyrundeck-0.10.0.tar.gz -- cgit v1.2.3