summaryrefslogtreecommitdiff
path: root/python-pyrundeck.spec
diff options
context:
space:
mode:
Diffstat (limited to 'python-pyrundeck.spec')
-rw-r--r--python-pyrundeck.spec247
1 files changed, 247 insertions, 0 deletions
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 <Python_Bot@openeuler.org> - 0.10.0-1
+- Package Spec generated