summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-18 05:59:58 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-18 05:59:58 +0000
commit91bbef4916ce918b8433f0204b8b1dbea30d5161 (patch)
tree5f52e0e2543050c9d62c463b90833443d2882429
parent53509f3295efa3b0fd06af7dc582fae40016d816 (diff)
automatic import of python-netfoundry
-rw-r--r--.gitignore1
-rw-r--r--python-netfoundry.spec298
-rw-r--r--sources1
3 files changed, 300 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..8a78571 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/netfoundry-5.10.1.tar.gz
diff --git a/python-netfoundry.spec b/python-netfoundry.spec
new file mode 100644
index 0000000..1b7f21f
--- /dev/null
+++ b/python-netfoundry.spec
@@ -0,0 +1,298 @@
+%global _empty_manifest_terminate_build 0
+Name: python-netfoundry
+Version: 5.10.1
+Release: 1
+Summary: Interface to the NetFoundry network-as-code orchestration platform
+License: MIT
+URL: https://pypi.org/project/netfoundry/
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/6d/15/bac273e96bf8dfd57a8201f863f5e27f4669a7422134e4e4334703c7cbd0/netfoundry-5.10.1.tar.gz
+BuildArch: noarch
+
+Requires: python3-inflect
+Requires: python3-milc
+Requires: python3-packaging
+Requires: python3-platformdirs
+Requires: python3-pygments
+Requires: python3-pyjwt
+Requires: python3-pyyaml
+Requires: python3-requests
+Requires: python3-tabulate
+Requires: python3-requests-cache
+
+%description
+# NetFoundry Python Module
+
+This module has a general-purpose library for using the NetFoundry API and installs the CLI `nfctl`.
+
+## User Guide
+
+[Python module guide](https://developer.netfoundry.io/guides/python/)
+
+## Find the Version
+
+```bash
+ $ python3 -m netfoundry.version
+v5.2.0
+ # or
+ $ nfctl version
+v5.2.0
+```
+
+## Play the demo
+
+This creates a demo network with your API account file named `credentials.json` stored in the current directory or the XDG config directory e.g. `~/.config/netfoundry/`. Learn how to obtain and use an API account for your NetFoundry organization in [the Authentication Guide](https://developer.netfoundry.io/guides/authentication/)
+
+```bash
+nfctl demo
+```
+
+## Create network snippet from demo.py
+
+```python
+#!/usr/bin/env python3
+import netfoundry
+
+# user-default path is ~/.netfoundry/
+organization = netfoundry.Organization(credentials="credentials.json")
+
+# use some network group, default is to use the first and there's typically only one
+network_group = netfoundry.NetworkGroup(organization)
+
+# create a network
+network_name = "BibbidiBobbidiBoo"
+if network_group.network_exists(network_name):
+ # use the network
+ network = netfoundry.Network(network_group, network_name=network_name)
+ network.wait_for_status("PROVISIONED")
+else:
+ network_id = network_group.create_network(name=network_name)['id']
+ network = netfoundry.Network(network_group, network_id=network_id)
+ network.wait_for_status("PROVISIONED")
+```
+
+## Publish a new version of the module
+
+[![Video Tour of Release Procedure](https://img.youtube.com/vi/RlIa2mv8YIM/0.jpg)](https://youtu.be/RlIa2mv8YIM)
+
+```
+00:00 Welcome Pythonistas
+00:50 Determine next version number
+01:30 GitFlow Release Start
+02:10 Project Conventional Release Branch Name in Actions Workflow
+02:30 Make a Change to Patch the Module
+04:00 Git Commit the Change
+04:30 GitFlow Publish Release to Git Remote
+05:00 Create Pull Request
+05:30 GitHub Actions Checks Triggered by Pull Request
+06:00 Local testing with "editable" module and TestPyPi
+09:00 Complete Pull Request
+09:30 GitFlow Release Finish and Push Git Tags
+10:30 GitHub Create Release
+12:00 Verify Published Artifacts in PyPi and Hub
+12:30 PyPi Upgrade Gets New Version
+13:30 Docker Run Check Version
+```
+
+
+%package -n python3-netfoundry
+Summary: Interface to the NetFoundry network-as-code orchestration platform
+Provides: python-netfoundry
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-netfoundry
+# NetFoundry Python Module
+
+This module has a general-purpose library for using the NetFoundry API and installs the CLI `nfctl`.
+
+## User Guide
+
+[Python module guide](https://developer.netfoundry.io/guides/python/)
+
+## Find the Version
+
+```bash
+ $ python3 -m netfoundry.version
+v5.2.0
+ # or
+ $ nfctl version
+v5.2.0
+```
+
+## Play the demo
+
+This creates a demo network with your API account file named `credentials.json` stored in the current directory or the XDG config directory e.g. `~/.config/netfoundry/`. Learn how to obtain and use an API account for your NetFoundry organization in [the Authentication Guide](https://developer.netfoundry.io/guides/authentication/)
+
+```bash
+nfctl demo
+```
+
+## Create network snippet from demo.py
+
+```python
+#!/usr/bin/env python3
+import netfoundry
+
+# user-default path is ~/.netfoundry/
+organization = netfoundry.Organization(credentials="credentials.json")
+
+# use some network group, default is to use the first and there's typically only one
+network_group = netfoundry.NetworkGroup(organization)
+
+# create a network
+network_name = "BibbidiBobbidiBoo"
+if network_group.network_exists(network_name):
+ # use the network
+ network = netfoundry.Network(network_group, network_name=network_name)
+ network.wait_for_status("PROVISIONED")
+else:
+ network_id = network_group.create_network(name=network_name)['id']
+ network = netfoundry.Network(network_group, network_id=network_id)
+ network.wait_for_status("PROVISIONED")
+```
+
+## Publish a new version of the module
+
+[![Video Tour of Release Procedure](https://img.youtube.com/vi/RlIa2mv8YIM/0.jpg)](https://youtu.be/RlIa2mv8YIM)
+
+```
+00:00 Welcome Pythonistas
+00:50 Determine next version number
+01:30 GitFlow Release Start
+02:10 Project Conventional Release Branch Name in Actions Workflow
+02:30 Make a Change to Patch the Module
+04:00 Git Commit the Change
+04:30 GitFlow Publish Release to Git Remote
+05:00 Create Pull Request
+05:30 GitHub Actions Checks Triggered by Pull Request
+06:00 Local testing with "editable" module and TestPyPi
+09:00 Complete Pull Request
+09:30 GitFlow Release Finish and Push Git Tags
+10:30 GitHub Create Release
+12:00 Verify Published Artifacts in PyPi and Hub
+12:30 PyPi Upgrade Gets New Version
+13:30 Docker Run Check Version
+```
+
+
+%package help
+Summary: Development documents and examples for netfoundry
+Provides: python3-netfoundry-doc
+%description help
+# NetFoundry Python Module
+
+This module has a general-purpose library for using the NetFoundry API and installs the CLI `nfctl`.
+
+## User Guide
+
+[Python module guide](https://developer.netfoundry.io/guides/python/)
+
+## Find the Version
+
+```bash
+ $ python3 -m netfoundry.version
+v5.2.0
+ # or
+ $ nfctl version
+v5.2.0
+```
+
+## Play the demo
+
+This creates a demo network with your API account file named `credentials.json` stored in the current directory or the XDG config directory e.g. `~/.config/netfoundry/`. Learn how to obtain and use an API account for your NetFoundry organization in [the Authentication Guide](https://developer.netfoundry.io/guides/authentication/)
+
+```bash
+nfctl demo
+```
+
+## Create network snippet from demo.py
+
+```python
+#!/usr/bin/env python3
+import netfoundry
+
+# user-default path is ~/.netfoundry/
+organization = netfoundry.Organization(credentials="credentials.json")
+
+# use some network group, default is to use the first and there's typically only one
+network_group = netfoundry.NetworkGroup(organization)
+
+# create a network
+network_name = "BibbidiBobbidiBoo"
+if network_group.network_exists(network_name):
+ # use the network
+ network = netfoundry.Network(network_group, network_name=network_name)
+ network.wait_for_status("PROVISIONED")
+else:
+ network_id = network_group.create_network(name=network_name)['id']
+ network = netfoundry.Network(network_group, network_id=network_id)
+ network.wait_for_status("PROVISIONED")
+```
+
+## Publish a new version of the module
+
+[![Video Tour of Release Procedure](https://img.youtube.com/vi/RlIa2mv8YIM/0.jpg)](https://youtu.be/RlIa2mv8YIM)
+
+```
+00:00 Welcome Pythonistas
+00:50 Determine next version number
+01:30 GitFlow Release Start
+02:10 Project Conventional Release Branch Name in Actions Workflow
+02:30 Make a Change to Patch the Module
+04:00 Git Commit the Change
+04:30 GitFlow Publish Release to Git Remote
+05:00 Create Pull Request
+05:30 GitHub Actions Checks Triggered by Pull Request
+06:00 Local testing with "editable" module and TestPyPi
+09:00 Complete Pull Request
+09:30 GitFlow Release Finish and Push Git Tags
+10:30 GitHub Create Release
+12:00 Verify Published Artifacts in PyPi and Hub
+12:30 PyPi Upgrade Gets New Version
+13:30 Docker Run Check Version
+```
+
+
+%prep
+%autosetup -n netfoundry-5.10.1
+
+%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-netfoundry -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Thu May 18 2023 Python_Bot <Python_Bot@openeuler.org> - 5.10.1-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..8c1e544
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+d57a8621f9a43b5fe64607911db46fb5 netfoundry-5.10.1.tar.gz