summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--python-0-orchestrator.spec176
-rw-r--r--sources1
3 files changed, 178 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..ff69a15 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/0-orchestrator-1.1.0a8.tar.gz
diff --git a/python-0-orchestrator.spec b/python-0-orchestrator.spec
new file mode 100644
index 0000000..30103ae
--- /dev/null
+++ b/python-0-orchestrator.spec
@@ -0,0 +1,176 @@
+%global _empty_manifest_terminate_build 0
+Name: python-0-orchestrator
+Version: 1.1.0a8
+Release: 1
+Summary: Zero-OS Orchestrator
+License: Apache 2.0
+URL: https://github.com/g8os/grid
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/06/83/ed65c68212f5f145063ba6e3df8e8a58f724564db0f33224f3e4b567f78f/0-orchestrator-1.1.0a8.tar.gz
+BuildArch: noarch
+
+Requires: python3-Jinja2
+Requires: python3-aioredis
+Requires: python3-etcd3
+Requires: python3-netaddr
+Requires: python3-dateutil
+
+%description
+# Python Client
+
+O-orchestrator is the Python client used to talk to [Zero-OS 0 Rest API](../README.md)
+
+## Install
+
+```bash
+pip install 0-orchestrator
+```
+
+## How to use
+
+```python
+In [9]: from zeroos.orchestrator import client
+
+In [10]: c = client.Client('http://192.168.193.212:8080')
+
+In [11]: c.api.nodes.ListNodes().json()
+Out[11]:
+[{'hostname': '', 'id': '2c600cbc2545', 'status': 'running'},
+ {'hostname': '', 'id': '2c600ccd2ae9', 'status': 'running'},
+ {'hostname': '', 'id': '0cc47a3b3d6a', 'status': 'running'},
+ {'hostname': '', 'id': '2c600ccd2ad1', 'status': 'running'},
+ {'hostname': '', 'id': '2c600cbc23bc', 'status': 'running'}]
+```
+
+## To update the client from the RAML file
+
+```shell
+go-raml client -l python --ramlfile raml/api.raml --dir pyclient/zeroos/orchestrator/client
+```
+
+
+
+
+%package -n python3-0-orchestrator
+Summary: Zero-OS Orchestrator
+Provides: python-0-orchestrator
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-0-orchestrator
+# Python Client
+
+O-orchestrator is the Python client used to talk to [Zero-OS 0 Rest API](../README.md)
+
+## Install
+
+```bash
+pip install 0-orchestrator
+```
+
+## How to use
+
+```python
+In [9]: from zeroos.orchestrator import client
+
+In [10]: c = client.Client('http://192.168.193.212:8080')
+
+In [11]: c.api.nodes.ListNodes().json()
+Out[11]:
+[{'hostname': '', 'id': '2c600cbc2545', 'status': 'running'},
+ {'hostname': '', 'id': '2c600ccd2ae9', 'status': 'running'},
+ {'hostname': '', 'id': '0cc47a3b3d6a', 'status': 'running'},
+ {'hostname': '', 'id': '2c600ccd2ad1', 'status': 'running'},
+ {'hostname': '', 'id': '2c600cbc23bc', 'status': 'running'}]
+```
+
+## To update the client from the RAML file
+
+```shell
+go-raml client -l python --ramlfile raml/api.raml --dir pyclient/zeroos/orchestrator/client
+```
+
+
+
+
+%package help
+Summary: Development documents and examples for 0-orchestrator
+Provides: python3-0-orchestrator-doc
+%description help
+# Python Client
+
+O-orchestrator is the Python client used to talk to [Zero-OS 0 Rest API](../README.md)
+
+## Install
+
+```bash
+pip install 0-orchestrator
+```
+
+## How to use
+
+```python
+In [9]: from zeroos.orchestrator import client
+
+In [10]: c = client.Client('http://192.168.193.212:8080')
+
+In [11]: c.api.nodes.ListNodes().json()
+Out[11]:
+[{'hostname': '', 'id': '2c600cbc2545', 'status': 'running'},
+ {'hostname': '', 'id': '2c600ccd2ae9', 'status': 'running'},
+ {'hostname': '', 'id': '0cc47a3b3d6a', 'status': 'running'},
+ {'hostname': '', 'id': '2c600ccd2ad1', 'status': 'running'},
+ {'hostname': '', 'id': '2c600cbc23bc', 'status': 'running'}]
+```
+
+## To update the client from the RAML file
+
+```shell
+go-raml client -l python --ramlfile raml/api.raml --dir pyclient/zeroos/orchestrator/client
+```
+
+
+
+
+%prep
+%autosetup -n 0-orchestrator-1.1.0a8
+
+%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-0-orchestrator -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Wed May 10 2023 Python_Bot <Python_Bot@openeuler.org> - 1.1.0a8-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..901cf22
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+8158e9ca441a5b13627bb3aadf1da240 0-orchestrator-1.1.0a8.tar.gz