Skip to content

Commit c5924e1

Browse files
docs: 🐛 update method return type-hint for Requests.response object where necessary
1 parent 94535b3 commit c5924e1

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

pyedgeconnect/ecos/_statistics.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# (C) Copyright 2022 Hewlett Packard Enterprise Development LP.
33
#
44
# statistics : Get statistics related information
5+
import requests
56

67

78
def get_appliance_stats_minute_range(self) -> dict:
@@ -38,7 +39,7 @@ def get_appliance_stats_minute_range(self) -> dict:
3839
def get_appliance_stats_minute_file(
3940
self,
4041
file: str,
41-
) -> dict:
42+
) -> requests.Response:
4243
"""Get specific minute statistics file
4344
4445
.. list-table::

pyedgeconnect/orch/_appliance_preconfig.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# appliancePreconfig : Get and apply appliance preconfigurations
55
import base64
66

7+
import requests
8+
79

810
def get_all_preconfig(
911
self,
@@ -490,7 +492,7 @@ def validate_preconfig(
490492
serial_number: str = "",
491493
tag: str = "",
492494
comment: str = "",
493-
):
495+
) -> requests.Response:
494496
"""Runs validation on a preconfig on Orchestrator to identify errors
495497
within the configuration
496498

pyedgeconnect/orch/_overlays.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# (C) Copyright 2021 Hewlett Packard Enterprise Development LP.
33
#
44
# overlays : Add, update, delete overlay configurations
5+
import requests
56

67

78
def get_all_overlays_config(self) -> list:
@@ -26,7 +27,7 @@ def get_all_overlays_config(self) -> list:
2627
def configure_new_overlay(
2728
self,
2829
overlay_config: dict,
29-
) -> dict:
30+
) -> requests.Response:
3031
"""Configure a new overlay on Orchestrator
3132
3233
.. list-table::
@@ -82,7 +83,7 @@ def get_all_overlays_config_keyed(self) -> dict:
8283
def configure_regionalized_overlay(
8384
self,
8485
regional_overlay_config: list,
85-
) -> dict:
86+
) -> requests.Response:
8687
"""Use this API to create an exhaustive representation of
8788
regionalized overlays. The body of this request should be an array
8889
of map which keyed by region id whose value is regional overlay
@@ -119,7 +120,7 @@ def configure_regionalized_overlay(
119120
def modify_regionalized_overlay(
120121
self,
121122
regional_overlay_config: list,
122-
) -> dict:
123+
) -> requests.Response:
123124
"""Use this API to update an exhaustive representation of
124125
regionalized overlays. The body of this request should be a map
125126
keyed by overlayId whose value is a map of regionId to regional
@@ -180,7 +181,7 @@ def modify_overlay_config(
180181
self,
181182
overlay_id: int,
182183
overlay_config: dict,
183-
) -> dict:
184+
) -> requests.Response:
184185
"""Use this API to update an existing overlay configuration. If you
185186
are using regions and have customized regional BIO per region, it
186187
will be overridden. To avoid this use the other PUT api which takes
@@ -201,8 +202,9 @@ def modify_overlay_config(
201202
:type overlay_id: int
202203
:param overlay_config: Full overlay configuration object
203204
:type overlay_config: dict
204-
:return: Returns dictionary of overlay configuration
205-
:rtype: dict
205+
:return: Returns full response details. On successful call will
206+
return newly created Overlay ID
207+
:rtype: Requests.response object
206208
"""
207209
return self._put(
208210
"/gms/overlays/config/{}".format(overlay_id),
@@ -276,7 +278,7 @@ def modify_overlay_config_for_region(
276278
overlay_id: int,
277279
region_id: int,
278280
overlay_config: dict,
279-
) -> dict:
281+
) -> requests.Response:
280282
"""Use this API to update an existing overlay configuration, use
281283
region_id ``0`` to update global overlay configuration.
282284

0 commit comments

Comments
 (0)