Skip to content

Commit de7c427

Browse files
Merge branch 'fix/docstring_typos' into development
2 parents e0de501 + bd1ae71 commit de7c427

8 files changed

Lines changed: 112 additions & 20 deletions

File tree

docs/source/examples/auth_example.rst

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,19 @@ methods when connecting to an Aruba Orchestrator instance with pyedgeconnect.
1010
The example scripts provided in the repository use this process in
1111
addition to any other required logic for a particular use-case.
1212

13+
.. note::
14+
15+
The code referenced in this document and all published examples
16+
with pyedgeconnect are available from the GitHub repository within the
17+
`examples <https://github.com/SPOpenSource/edgeconnect-python/tree/main/examples>`_
18+
folder. Each example script contains logic to authenticate to the
19+
Orchestrator as documented in the authentication example.
20+
21+
Clone the repository and download the examples with:
22+
23+
.. code:: bash
24+
25+
$ git clone https://github.com/SPOpenSource/edgeconnect-python.git
1326
1427
1528
Environment variables
@@ -23,12 +36,12 @@ related to authenticating to Orchestrator
2336
``ORCH_USER``
2437
``ORCH_PASSWORD``
2538

26-
If ORCH_URL is specified, it will take precedence, otherwise user will
27-
be prompted for input to enter the Orchestrator IP or FQDN
39+
If ``ORCH_URL`` is specified, it will take precedence, otherwise user
40+
will be prompted for input to enter the Orchestrator IP or FQDN
2841

29-
If ORCH_API_KEY is specified it will take precedence for an authentication
30-
method over user/password authentication. If not found, the user will be
31-
prompted for entering an API key.
42+
If ``ORCH_API_KEY`` is specified it will take precedence for an
43+
authentication method over user/password authentication. If not found,
44+
the user will be prompted for entering an API key.
3245

3346
.. code-block:: python
3447

docs/source/examples/basic_examples.rst

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
.. basic_examples:
22
33
4-
The following examples are also included as individual .py files in the
5-
repository in the `examples` directory. Each example script contains
6-
logic to authenticate to the Orchestrator as documented in the
7-
authentication example.
4+
.. note::
5+
6+
The code referenced in this document and all published examples
7+
with pyedgeconnect are available from the GitHub repository within the
8+
`examples <https://github.com/SPOpenSource/edgeconnect-python/tree/main/examples>`_
9+
folder. Each example script contains logic to authenticate to the
10+
Orchestrator as documented in the authentication example.
11+
12+
Clone the repository and download the examples with:
13+
14+
.. code:: bash
15+
16+
$ git clone https://github.com/SPOpenSource/edgeconnect-python.git
817
918
1019
Print Appliance Information

docs/source/examples/generate_preconfig.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,15 @@
1313

1414
The code referenced in this document and all published examples
1515
with pyedgeconnect are available from the GitHub repository within the
16-
`examples <https://https://github.com/SPOpenSource/edgeconnect-python/tree/main/examples>`_
17-
folder
16+
`examples <https://github.com/SPOpenSource/edgeconnect-python/tree/main/examples>`_
17+
folder. Each example script contains logic to authenticate to the
18+
Orchestrator as documented in the authentication example.
19+
20+
Clone the repository and download the examples with:
21+
22+
.. code:: bash
23+
24+
$ git clone https://github.com/SPOpenSource/edgeconnect-python.git
1825
1926
Generate EdgeConnect Preconfig
2027
------------------------------

docs/source/examples/index.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,15 @@ Example Code from Repository
44

55
All examples documented in this section are available from the
66
GitHub repository within the
7-
`examples <https://https://github.com/SPOpenSource/edgeconnect-python/tree/main/examples>`_
7+
`examples <https://github.com/SPOpenSource/edgeconnect-python/tree/main/examples>`_
88
folder:
99

10+
Clone the repository and download the examples with:
11+
12+
.. code:: bash
13+
14+
$ git clone https://github.com/SPOpenSource/edgeconnect-python.git
15+
1016
1117
Example script documentation and instructions
1218

docs/source/examples/upload_security_policy.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,15 @@
1919

2020
The code referenced in this document and all published examples
2121
with pyedgeconnect are available from the GitHub repository within the
22-
`examples <https://https://github.com/SPOpenSource/edgeconnect-python/tree/main/examples>`_
23-
folder:
22+
`examples <https://github.com/SPOpenSource/edgeconnect-python/tree/main/examples>`_
23+
folder. Each example script contains logic to authenticate to the
24+
Orchestrator as documented in the authentication example.
25+
26+
Clone the repository and download the examples with:
27+
28+
.. code:: bash
29+
30+
$ git clone https://github.com/SPOpenSource/edgeconnect-python.git
2431
2532
Upload EdgeConnect Security Policy
2633
----------------------------------

pyedgeconnect/orch/_deployment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def get_appliance_deployment(
141141
* keyword **maxInBWEnabled** (`bool`): Enable inbound
142142
bandwidth shaping (if this is true, you must specify
143143
maxInBW)
144-
* keyword **licence** (`dict`): Appliance EC license
144+
* keyword **license** (`dict`): Appliance EC license
145145
information (only valid for EC models) \n
146146
* keyword **ecMini** (`bool`): Is EC Mini license
147147
enabled

pyedgeconnect/orch/_flow.py

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ def get_appliance_flows( # noqa: C901, silences flake8 complexity
3333
edge_ha: bool = False,
3434
built_in: bool = False,
3535
uptime: str = None,
36+
active_uptime_start: int = None,
37+
active_uptime_end: int = None,
38+
term_uptime_start: int = None,
39+
term_uptime_end: int = None,
3640
bytes_transferred: str = "total",
3741
duration: str = None,
3842
anytime_slow_flows: str = None,
@@ -89,7 +93,7 @@ def get_appliance_flows( # noqa: C901, silences flake8 complexity
8993
:param application_group: Filter for application-group flows,
9094
defaults to None
9195
:type application_group: str, optional
92-
:param protocl: Filter by protocol, e.g. ``ip``, ``icmp``, ``bgp``,
96+
:param protocol: Filter by protocol, e.g. ``ip``, ``icmp``, ``bgp``,
9397
etc., defaults to None
9498
:type protocol: str, optional
9599
:param vlan: Filter for VLAN ID, defaults to None
@@ -133,8 +137,27 @@ def get_appliance_flows( # noqa: C901, silences flake8 complexity
133137
:param uptime: Filter for uptime of flow. Term for ended within.
134138
Accepted values include ``anytime``, ``last5m``, ``term5m``,
135139
``term``, ``last1hr``, ``term1hr``, ``last4hr``, ``term4h``,
136-
``last24hr``, ``term24hr``, defaults to None
140+
``last24hr``, ``term24hr``. ``last`` implies started, ``term``
141+
implies ended. Values can be combined with ``%7C``, e.g.,
142+
value of ``anytime%7Cterm24hr`` would implie started anytime or
143+
ended within past 24 hours. Defaults to None
137144
:type uptime: str, optional
145+
:param active_uptime_start: Custom start time filter for active
146+
flows, units in epoch milliseconds, must be used along with
147+
``active_uptime_end``, otherwise ignored. Defaults to None
148+
:type active_uptime_start: int, optional
149+
:param active_uptime_end: Custom end time filter for active
150+
flows, units in epoch milliseconds, must be used along with
151+
``active_uptime_start``, otherwise ignored. Defaults to None
152+
:type active_uptime_end: int, optional
153+
:param term_uptime_start: Custom start time filter for ended
154+
flows, units in epoch milliseconds, must be used along with
155+
``term_uptime_end``, otherwise ignored. Defaults to None
156+
:type term_uptime_start: int, optional
157+
:param term_uptime_end: Custom end time filter for ended
158+
flows, units in epoch milliseconds, must be used along with
159+
``term_uptime_start``, otherwise ignored. Defaults to None
160+
:type term_uptime_end: int, optional
138161
:param bytes_transferred: Bytes transfered, accepted values are
139162
``total`` and ``last5m``, defaults to "total"
140163
:type bytes_transferred: str, optional
@@ -345,6 +368,12 @@ def get_appliance_flows( # noqa: C901, silences flake8 complexity
345368

346369
if uptime is not None:
347370
path = path + "&uptime={}".format(uptime)
371+
if active_uptime_start is not None and active_uptime_end is not None:
372+
path += f"&anyStartTime={active_uptime_start}&anyEndTime={active_uptime_end}"
373+
if term_uptime_start is not None and term_uptime_end is not None:
374+
path += (
375+
f"&termStartTime={term_uptime_start}&termEndTime={term_uptime_end}"
376+
)
348377

349378
path = path + "&bytes={}".format(bytes_transferred)
350379
path = path + "&duration={}".format(duration)

pyedgeconnect/orch/_inbound_shaper.py

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,30 @@ def get_appliance_inbound_shaper(
2626
:param cached: ``True`` retrieves last known value to Orchestrator,
2727
``False`` retrieves values directly from Appliance
2828
:type cached: bool
29-
:return: Returns dictionary where each key is a segment id that
30-
contains its associated DNS proxy configuration (profiles,
31-
domain groups and maps).
29+
:return: Returns dictionary of inbound shaper configuration on
30+
appliance \n
31+
* keyword **<interface_name>** (`dict`): Interface shaper
32+
configuration. ``wan`` specifies system WAN shaper. \n
33+
* keyword **accuracy** (`int`): related to underlying shaper
34+
credit, not a user-configured parameter
35+
* keyword **dyn_bw_enable** (`bool`): If dynamic bandwidth
36+
is configured on interface inbound shaper
37+
* keyword **enable** (`bool`): If inbound shaper enabled on
38+
interface
39+
* keyword **max_bw** (`int`): Maximum bandwidth for interface
40+
in kbps
41+
* keyword **traffic-class** (`dict`): Traffic class configs \n
42+
* keyword **<traffic_class_int>** (`dict`): Config of
43+
traffic class \n
44+
* keyword **excess** (`int`): Excess weighting
45+
* keyword **flow_limit** (`int`): Flow limit
46+
* keyword **max_bw** (`int`): Percentage max bandwidth
47+
* keyword **max_bw_abs** (`int`): Absolute max bandwidth
48+
* keyword **max_wait** (`int`): Max wait time
49+
* keyword **min_bw** (`int`): Percentage min bandwidth
50+
* keyword **min_bw_abs** (`int`): Absolute min bandwidth
51+
* keyword **name** (`str`): Name of traffic class
52+
* keyword **priority** (`int`): Priority in traffic map
3253
:rtype: dict
3354
"""
3455
return self._get("/inboundShaper/{}?cached={}".format(ne_id, cached))

0 commit comments

Comments
 (0)