summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-06-20 04:43:06 +0000
committerCoprDistGit <infra@openeuler.org>2023-06-20 04:43:06 +0000
commit6ae539573d86ea109ee2c692d167ed9dd70d9eba (patch)
treeede6631be0c61e6a68eca201c9eb031a56bdcb31
parenta9633d1237f0e9f78b932d8f0f8fe385c856222f (diff)
automatic import of python-omni-apiopeneuler20.03
-rw-r--r--.gitignore1
-rw-r--r--python-omni-api.spec265
-rw-r--r--sources1
3 files changed, 267 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..1293040 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/omni-api-0.5.0.tar.gz
diff --git a/python-omni-api.spec b/python-omni-api.spec
new file mode 100644
index 0000000..d35c7c6
--- /dev/null
+++ b/python-omni-api.spec
@@ -0,0 +1,265 @@
+%global _empty_manifest_terminate_build 0
+Name: python-omni-api
+Version: 0.5.0
+Release: 1
+Summary: Omni API Client
+License: Apache License, Version 2.0
+URL: http://omni-api.hive.pt
+Source0: https://mirrors.aliyun.com/pypi/web/packages/f0/01/1a291555c07c2ed5f6c34e100a5979a3a54148569e83f1a7072bac2914bf/omni-api-0.5.0.tar.gz
+BuildArch: noarch
+
+Requires: python3-appier
+
+%description
+# [Omni API](http://omni-api.hive.pt)
+
+Simple REST API wrapper for the Omni infra-structure.
+
+## Configuration
+
+| Name | Type | Description |
+| --------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------ |
+| **OMNI_BASE_URL** | `str` | The base URL that is going to be used for API connections (defaults to `http://localhost:8080/mvc/`). |
+| **OMNI_OPEN_URL** | `str` | The open URL for the Omni connection (defaults to `OMNI_BASE_URL`). |
+| **OMNI_PREFIX** | `str` | The default prefix to be used for API requests (defaults to `adm/`). |
+| **OMNI_ID** | `str` | The client id to be used for API connections (defaults to `None`). |
+| **OMNI_SECRET** | `str` | The secret key to be used for API connections (defaults to `None`). |
+| **OMNI_REDIRECT_URL** | `str` | The URL to be used for redirection OAuth based workflow (defaults to `base,base.user,base.admin,foundation.store.list`). |
+| **OMNI_USERNAME** | `str` | The username to be used on direct workflow (defaults to `None`). |
+| **OMNI_PASSWORD** | `str` | The password to be used on direct workflow (defaults to `None`). |
+
+## Usage
+
+Typical usage of the Omni client implies the providing of the username and the
+password inside the target omni instance (Direct Mode).
+
+```python
+api = omni.Api(
+ base_url = "http://frontdoorhq.com",
+ username = "YOUR_USERNAME",
+ password = "YOUR_PASSWORD"
+)
+```
+
+Alternatively it's possible to use the api throught an OAuth base approach using
+the provided client id and secret values.
+
+```python
+api = omni.Api(
+ base_url = "http://frontdoorhq.com",
+ client_id = "YOUR_OAUTH_ID",
+ client_secret = "YOUR_OAUTH_SECRET"
+)
+```
+
+For these type of handling the `OAuthAccessError` exception must be handled and then
+the user must be redirect to the url provided by `api.oauth_autorize` method call.
+
+Running then the `api.oauth_access` call with the returned `code` from the server side
+that should be used to redeem the `access_token` required for session authentication.
+
+## Examples
+
+Examples are located [here](src/examples).
+
+## License
+
+Omni API is currently licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/).
+
+## Build Automation
+
+[![Build Status](https://app.travis-ci.com/hivesolutions/omni-api.svg?branch=master)](https://travis-ci.com/github/hivesolutions/omni-api)
+[![Build Status GitHub](https://github.com/hivesolutions/omni-api/workflows/Main%20Workflow/badge.svg)](https://github.com/hivesolutions/omni-api/actions)
+[![Coverage Status](https://coveralls.io/repos/hivesolutions/omni-api/badge.svg?branch=master)](https://coveralls.io/r/hivesolutions/omni-api?branch=master)
+[![PyPi Status](https://img.shields.io/pypi/v/omni-api.svg)](https://pypi.python.org/pypi/omni-api)
+[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://www.apache.org/licenses/)
+
+
+
+
+%package -n python3-omni-api
+Summary: Omni API Client
+Provides: python-omni-api
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-omni-api
+# [Omni API](http://omni-api.hive.pt)
+
+Simple REST API wrapper for the Omni infra-structure.
+
+## Configuration
+
+| Name | Type | Description |
+| --------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------ |
+| **OMNI_BASE_URL** | `str` | The base URL that is going to be used for API connections (defaults to `http://localhost:8080/mvc/`). |
+| **OMNI_OPEN_URL** | `str` | The open URL for the Omni connection (defaults to `OMNI_BASE_URL`). |
+| **OMNI_PREFIX** | `str` | The default prefix to be used for API requests (defaults to `adm/`). |
+| **OMNI_ID** | `str` | The client id to be used for API connections (defaults to `None`). |
+| **OMNI_SECRET** | `str` | The secret key to be used for API connections (defaults to `None`). |
+| **OMNI_REDIRECT_URL** | `str` | The URL to be used for redirection OAuth based workflow (defaults to `base,base.user,base.admin,foundation.store.list`). |
+| **OMNI_USERNAME** | `str` | The username to be used on direct workflow (defaults to `None`). |
+| **OMNI_PASSWORD** | `str` | The password to be used on direct workflow (defaults to `None`). |
+
+## Usage
+
+Typical usage of the Omni client implies the providing of the username and the
+password inside the target omni instance (Direct Mode).
+
+```python
+api = omni.Api(
+ base_url = "http://frontdoorhq.com",
+ username = "YOUR_USERNAME",
+ password = "YOUR_PASSWORD"
+)
+```
+
+Alternatively it's possible to use the api throught an OAuth base approach using
+the provided client id and secret values.
+
+```python
+api = omni.Api(
+ base_url = "http://frontdoorhq.com",
+ client_id = "YOUR_OAUTH_ID",
+ client_secret = "YOUR_OAUTH_SECRET"
+)
+```
+
+For these type of handling the `OAuthAccessError` exception must be handled and then
+the user must be redirect to the url provided by `api.oauth_autorize` method call.
+
+Running then the `api.oauth_access` call with the returned `code` from the server side
+that should be used to redeem the `access_token` required for session authentication.
+
+## Examples
+
+Examples are located [here](src/examples).
+
+## License
+
+Omni API is currently licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/).
+
+## Build Automation
+
+[![Build Status](https://app.travis-ci.com/hivesolutions/omni-api.svg?branch=master)](https://travis-ci.com/github/hivesolutions/omni-api)
+[![Build Status GitHub](https://github.com/hivesolutions/omni-api/workflows/Main%20Workflow/badge.svg)](https://github.com/hivesolutions/omni-api/actions)
+[![Coverage Status](https://coveralls.io/repos/hivesolutions/omni-api/badge.svg?branch=master)](https://coveralls.io/r/hivesolutions/omni-api?branch=master)
+[![PyPi Status](https://img.shields.io/pypi/v/omni-api.svg)](https://pypi.python.org/pypi/omni-api)
+[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://www.apache.org/licenses/)
+
+
+
+
+%package help
+Summary: Development documents and examples for omni-api
+Provides: python3-omni-api-doc
+%description help
+# [Omni API](http://omni-api.hive.pt)
+
+Simple REST API wrapper for the Omni infra-structure.
+
+## Configuration
+
+| Name | Type | Description |
+| --------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------ |
+| **OMNI_BASE_URL** | `str` | The base URL that is going to be used for API connections (defaults to `http://localhost:8080/mvc/`). |
+| **OMNI_OPEN_URL** | `str` | The open URL for the Omni connection (defaults to `OMNI_BASE_URL`). |
+| **OMNI_PREFIX** | `str` | The default prefix to be used for API requests (defaults to `adm/`). |
+| **OMNI_ID** | `str` | The client id to be used for API connections (defaults to `None`). |
+| **OMNI_SECRET** | `str` | The secret key to be used for API connections (defaults to `None`). |
+| **OMNI_REDIRECT_URL** | `str` | The URL to be used for redirection OAuth based workflow (defaults to `base,base.user,base.admin,foundation.store.list`). |
+| **OMNI_USERNAME** | `str` | The username to be used on direct workflow (defaults to `None`). |
+| **OMNI_PASSWORD** | `str` | The password to be used on direct workflow (defaults to `None`). |
+
+## Usage
+
+Typical usage of the Omni client implies the providing of the username and the
+password inside the target omni instance (Direct Mode).
+
+```python
+api = omni.Api(
+ base_url = "http://frontdoorhq.com",
+ username = "YOUR_USERNAME",
+ password = "YOUR_PASSWORD"
+)
+```
+
+Alternatively it's possible to use the api throught an OAuth base approach using
+the provided client id and secret values.
+
+```python
+api = omni.Api(
+ base_url = "http://frontdoorhq.com",
+ client_id = "YOUR_OAUTH_ID",
+ client_secret = "YOUR_OAUTH_SECRET"
+)
+```
+
+For these type of handling the `OAuthAccessError` exception must be handled and then
+the user must be redirect to the url provided by `api.oauth_autorize` method call.
+
+Running then the `api.oauth_access` call with the returned `code` from the server side
+that should be used to redeem the `access_token` required for session authentication.
+
+## Examples
+
+Examples are located [here](src/examples).
+
+## License
+
+Omni API is currently licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/).
+
+## Build Automation
+
+[![Build Status](https://app.travis-ci.com/hivesolutions/omni-api.svg?branch=master)](https://travis-ci.com/github/hivesolutions/omni-api)
+[![Build Status GitHub](https://github.com/hivesolutions/omni-api/workflows/Main%20Workflow/badge.svg)](https://github.com/hivesolutions/omni-api/actions)
+[![Coverage Status](https://coveralls.io/repos/hivesolutions/omni-api/badge.svg?branch=master)](https://coveralls.io/r/hivesolutions/omni-api?branch=master)
+[![PyPi Status](https://img.shields.io/pypi/v/omni-api.svg)](https://pypi.python.org/pypi/omni-api)
+[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://www.apache.org/licenses/)
+
+
+
+
+%prep
+%autosetup -n omni-api-0.5.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-omni-api -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Tue Jun 20 2023 Python_Bot <Python_Bot@openeuler.org> - 0.5.0-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..8838cc0
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+1c2b0ea53a9699c6d23789744034df72 omni-api-0.5.0.tar.gz