Skip to content

Commit c8e4670

Browse files
Merge pull request #9 from SPOpenSource/release/0.15.1-a1
Release 0.15.1-a1 fixes #4 fixes #6 fixes #7
2 parents 77e9c4e + 88b8daa commit c8e4670

35 files changed

Lines changed: 564 additions & 120 deletions

README.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -15,65 +15,65 @@ is underway to continue to add further functions.
1515

1616
### Python Version
1717

18-
> **Note:** Requires Python 3.9.0+ (due to PEP585 type-hinting e.g. ``def my_func(var1 = list[str]``)
18+
> **Note:** Requires Python 3.7+
1919
20-
Once Python 3.9 is installed on the system, it's recommended to use a
20+
Once Python 3.7+ is installed on the system, it's recommended to use a
2121
virtual environment to install the package to.
2222

2323
In the directory you'd like to write your project/script, setup a python
24-
virtual environment specifically with python3.9 and activate it. This
24+
virtual environment with the desired python version and activate it. This
2525
is important if you have other versions of python installed on your
2626
system.
2727

2828
```bash
2929

3030
:~$ python3.9 -m venv my_new_project
3131
:~$ source my_new_project/bin/activate
32-
(my_new_project) :~$ python3 --version
33-
Python 3.9.0+
32+
(my_new_project) :~$ python --version
33+
Python 3.9.13
3434
```
3535

36-
Now you can install the package and run your python code
36+
Now you are ready to install the package and run your python code.
3737

38-
```bash
39-
40-
(my_new_project) :~$ pip install git+https://github.com/SPOpenSource/edgeconnect-python
41-
...
42-
(my_new_project) :~$ pip list
43-
Package Version
44-
--------------------- --------------------------------
45-
certifi 2020.12.5
46-
chardet 4.0.0
47-
idna 2.10
48-
pip 20.0.2
49-
pkg-resources 0.0.0
50-
requests 2.25.1
51-
setuptools 44.0.0
52-
pyedgeconnect 0.13.0a2.dev1+g45fd843.d20210428
53-
urllib3 1.26.4
54-
```
38+
> **Note:** Going forward, these commands assume you're within a Python 3.7+ venv, or Python 3.7+ is the exclusive Python version installed in regard to referencing the use of ``pip``. If that is not the case, you can specifically append ``python3.x -m`` ahead of the ``pip install ...``
5539
5640
### Install from PyPI
5741

5842
```bash
59-
pip install pyedgeconnect
43+
$ pip install pyedgeconnect
44+
...
45+
$ pip list
46+
Package Version
47+
----------------------------- --------------------------------
48+
... ...
49+
pyedgeconnect x.y.z
50+
... ...
6051
```
6152

6253
### Install from GitHub
6354

6455
To install the most recent version of pyedgeconnect, open an
6556
interactive shell and run:
6657

67-
> **Note:** These commands assume you're within a Python 3.9 venv, or Python 3.9 is the exclusive Python version installed in regard to referencing the use of ``pip``. If that is not the case, you can specifically append ``python3.9 -m`` ahead of the ``pip install ...``
68-
6958
```bash
70-
pip install git+https://github.com/SPOpenSource/edgeconnect-python
59+
$ pip install git+https://github.com/SPOpenSource/edgeconnect-python
60+
...
61+
$ pip list
62+
Package Version
63+
----------------------------- --------------------------------
64+
... ...
65+
pyedgeconnect x.y.z
66+
... ...
7167
```
7268

7369
To install a specific branch use the @branch syntax
7470

7571
```bash
76-
pip install git+https://github.com/SPOpenSource/edgeconnect-python@<branch_name>
72+
$ pip install git+https://github.com/SPOpenSource/edgeconnect-python@<branch_name>
73+
...
74+
# Install the Development branch
75+
$ pip install git+https://github.com/SPOpenSource/edgeconnect-python@development
76+
...
7777
```
7878

7979
### Install dev options
@@ -88,7 +88,7 @@ following syntax:
8888
```bash
8989
$ pip install pyedgeconnect[dev]
9090
or
91-
$ pip install -e git+https://github.com/SPOpenSource/edgeconnect-python#egg=pyedgeconnect[dev]
91+
$ pip install git+https://github.com/SPOpenSource/edgeconnect-python#egg=pyedgeconnect[dev]
9292
```
9393

9494
## Docs

_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = "0.15.0a2.dev0"
1+
version = "0.15.1a1.dev0"

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# Main version number
1717
version = "0.15"
1818
# The full version, including alpha/beta/rc tags
19-
release = "0.15.0-a1"
19+
release = "0.15.1-a1"
2020

2121

2222
# -- General configuration ---------------------------------------------------

docs/source/install.rst

Lines changed: 37 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@ Python Version
77

88
.. note::
99

10-
Requires Python 3.9.0+ (due to PEP585 type-hinting e.g.
11-
``def my_func(var1 = list[str]``)
10+
Requires Python 3.7+
1211

13-
Once Python 3.9 is installed on the system, it's recommended to use a
12+
Once Python 3.7+ is installed on the system, it's recommended to use a
1413
virtual environment to install the package to.
1514

1615
In the directory you'd like to write your project/script, setup a python
17-
virtual environment specifically with python3.9 and activate it. This
16+
virtual environment with the desired python version and activate it. This
1817
is important if you have other versions of python installed on your
1918
system.
2019

@@ -23,61 +22,57 @@ system.
2322
:~$ python3.9 -m venv my_new_project
2423
:~$ source my_new_project/bin/activate
2524
(my_new_project) :~$ python3 --version
26-
Python 3.9.0+
25+
Python 3.9.13
2726
28-
Now you can install the package and run your python code
27+
Now you are ready to install the package and run your python code.
2928

30-
.. code:: bash
29+
.. note::
3130

32-
(my_new_project) :~$ pip install git+https://github.com/SPOpenSource/edgeconnect-python
33-
...
34-
(my_new_project) :~$ pip list
35-
Package Version
36-
--------------------- --------------------------------
37-
certifi 2020.12.5
38-
chardet 4.0.0
39-
idna 2.10
40-
pip 20.0.2
41-
pkg-resources 0.0.0
42-
requests 2.25.1
43-
setuptools 44.0.0
44-
pyedgeconnect 0.13.0a1.dev1+g45fd843.d20210428
45-
urllib3 1.26.4
31+
Going forward, these commands assume you're within a Python 3.7+ venv, or Python 3.7+
32+
is the exclusive Python version installed in regard to referencing
33+
the use of ``pip``.
34+
35+
If that is not the case, you can specifically append
36+
``python3.x -m`` ahead of the ``pip install ...``
4637

4738
Install from PyPI
4839
-------------------
4940

5041
.. code:: bash
5142
5243
$ pip install pyedgeconnect
53-
44+
...
45+
$ pip list
46+
Package Version
47+
----------------------------- --------------------------------
48+
... ...
49+
pyedgeconnect x.y.z
50+
... ...
5451
5552
Install from GitHub
5653
-------------------
5754

5855
To install the most recent version of pyedgeconnect, open an
5956
interactive shell and run:
6057

61-
.. note::
62-
63-
These commands assume you're within a Python 3.9 venv, or Python 3.9
64-
is the exclusive Python version installed in regard to referencing
65-
the use of ``pip``.
66-
67-
If that is not the case, you can specifically append
68-
``python3.9 -m`` ahead of the ``pip install ...``
69-
70-
.. code:: python
58+
.. code:: bash
7159
72-
pip install git+https://github.com/SPOpenSource/edgeconnect-python
60+
$ pip install git+https://github.com/SPOpenSource/edgeconnect-python
61+
...
62+
$ pip list
63+
Package Version
64+
----------------------------- --------------------------------
65+
... ...
66+
pyedgeconnect x.y.z
67+
... ...
7368
7469
To install a specific branch use the @branch syntax
7570

76-
.. code:: python
77-
78-
pip install git+https://github.com/SPOpenSource/edgeconnect-python@<branch_name>
79-
71+
.. code:: bash
8072
73+
$ pip install git+https://github.com/SPOpenSource/edgeconnect-python@<branch_name>
74+
# Install the Development branch
75+
$ pip install git+https://github.com/SPOpenSource/edgeconnect-python@Development
8176
8277
Build Documentation Locally
8378
---------------------------
@@ -87,8 +82,8 @@ to include sphinx and related packages, then in the docs directory run ``make ht
8782

8883
.. code:: bash
8984
90-
git clone https://github.com/SPOpenSource/edgeconnect-python.git
91-
cd edgeconnect-python
92-
pip install .[dev]
93-
cd docs
94-
make html
85+
$ git clone https://github.com/SPOpenSource/edgeconnect-python.git
86+
$ cd edgeconnect-python
87+
$ pip install .[dev]
88+
$ cd docs
89+
$ make html
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
0.15.1-a1 -- 2022-06-23
2+
-----------------------
3+
4+
5+
🚀 Features
6+
~~~~~~~~~~~~~
7+
8+
**Backwards compatability**: Introduced support back to Python 3.7
9+
10+
11+
Added the following EdgeConnect functions from Swagger:
12+
13+
from .ecos._disk_usage
14+
- :func:`~pyedgeconnect.EdgeConnect.get_appliance_disk_usage`
15+
16+
from .ecos._dns
17+
- :func:`~pyedgeconnect.EdgeConnect.get_appliance_dns_config`
18+
- :func:`~pyedgeconnect.EdgeConnect.set_appliance_dns_config`
19+
20+
from .ecos._memory
21+
- :func:`~pyedgeconnect.EdgeConnect.get_appliance_memory`
22+
23+
from .ecos._statistics
24+
- :func:`~pyedgeconnect.EdgeConnect.get_appliance_stats_minute_range`
25+
- :func:`~pyedgeconnect.EdgeConnect.get_appliance_stats_minute_file`
26+
27+
from .ecos._time
28+
- :func:`~pyedgeconnect.EdgeConnect.get_appliance_time`
29+
30+
31+
🐛 Bug Fixes
32+
~~~~~~~~~~~~~~
33+
34+
- `#4 <https://github.com/SPOpenSource/edgeconnect-python/issues/4>`_ -
35+
:func:`~pyedgeconnect.Orchestrator.get_all_users` was using POST
36+
instead of GET
37+
- `#6 <https://github.com/SPOpenSource/edgeconnect-python/issues/6>`_ -
38+
:func:`~pyedgeconnect.Orchestrator.update_appliance_access_group`
39+
remove default values for appliance_groups and appliance_regions
40+
- `#7 <https://github.com/SPOpenSource/edgeconnect-python/issues/7>`_ -
41+
:func:`~pyedgeconnect.Orchestrator.get_timeseries_stats_tunnel_single_appliance`
42+
update tunnel_name query in URL to tunnelName
43+
44+
45+
🐛 Known Issues
46+
~~~~~~~~~~~~~~~
47+
48+
.. warning::
49+
50+
The following two functions for the _ip_objects submodule exprience
51+
errors at this time. These function do work in the Orchestrator UI:
52+
53+
- :func:`~pyedgeconnect.Orchestrator.bulk_upload_address_group`
54+
- :func:`~pyedgeconnect.Orchestrator.bulk_upload_service_group`

docs/source/release-notes/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ All of the release notes for pyedgeconnect are organized below
88
==================
99

1010
.. toctree::
11+
0.15.1-a1
1112
0.15.0-a1
1213
0.14.0-a2
1314
0.14.0-a1

pyedgeconnect/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,14 +1328,22 @@ def __init__(
13281328
self.logger.addHandler(self.console_handler)
13291329

13301330
# Imported methods
1331+
from .ecos._disk_usage import get_appliance_disk_usage
1332+
from .ecos._dns import get_appliance_dns_config, set_appliance_dns_config
13311333
from .ecos._gms import assign_orchestrator, get_orchestrator
13321334
from .ecos._interfaces import get_appliance_interfaces
13331335
from .ecos._license import is_reboot_required
13341336
from .ecos._login import login, logout
1337+
from .ecos._memory import get_appliance_memory
13351338
from .ecos._network_interfaces import (
13361339
get_appliance_network_interfaces,
13371340
modify_network_interfaces,
13381341
)
13391342
from .ecos._reboot import request_reboot
13401343
from .ecos._save_changes import save_changes
13411344
from .ecos._sp_portal import register_sp_portal, register_sp_portal_status
1345+
from .ecos._statistics import (
1346+
get_appliance_stats_minute_file,
1347+
get_appliance_stats_minute_range,
1348+
)
1349+
from .ecos._time import get_appliance_time

pyedgeconnect/ecos/_disk_usage.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# MIT License
2+
# (C) Copyright 2022 Hewlett Packard Enterprise Development LP.
3+
#
4+
# diskUsage : Available disk space
5+
6+
7+
def get_appliance_disk_usage(
8+
self,
9+
) -> dict:
10+
"""Get the disk usage of the appliance
11+
12+
.. list-table::
13+
:header-rows: 1
14+
15+
* - Swagger Section
16+
- Method
17+
- Endpoint
18+
* - diskUsage
19+
- GET
20+
- /diskUsage
21+
22+
:return: Returns dictionary of current appliance disk usage \n
23+
* keyword **<directory name>** (`dict`): Directory disk
24+
utilization, e.g. ``/`` or ``/dev`` etc. \n
25+
* keyword **1k-blocks** (`int`): The number of 1k-blocks
26+
* keyword **used** (`int`): Size of used space, KB
27+
* keyword **available** (`int`): Size of available space, KB
28+
* keyword **usedpercent** (`int`): Percent of used space
29+
* keyword **filesystem** (`str`): Name of the filesystem
30+
:rtype: dict
31+
"""
32+
return self._get("/diskUsage")

0 commit comments

Comments
 (0)