2
2
# (C) Copyright 2021 Hewlett Packard Enterprise Development LP.
3
3
#
4
4
# overlays : Add, update, delete overlay configurations
5
+ import requests
5
6
6
7
7
8
def get_all_overlays_config (self ) -> list :
@@ -26,7 +27,7 @@ def get_all_overlays_config(self) -> list:
26
27
def configure_new_overlay (
27
28
self ,
28
29
overlay_config : dict ,
29
- ) -> dict :
30
+ ) -> requests . Response :
30
31
"""Configure a new overlay on Orchestrator
31
32
32
33
.. list-table::
@@ -82,7 +83,7 @@ def get_all_overlays_config_keyed(self) -> dict:
82
83
def configure_regionalized_overlay (
83
84
self ,
84
85
regional_overlay_config : list ,
85
- ) -> dict :
86
+ ) -> requests . Response :
86
87
"""Use this API to create an exhaustive representation of
87
88
regionalized overlays. The body of this request should be an array
88
89
of map which keyed by region id whose value is regional overlay
@@ -119,7 +120,7 @@ def configure_regionalized_overlay(
119
120
def modify_regionalized_overlay (
120
121
self ,
121
122
regional_overlay_config : list ,
122
- ) -> dict :
123
+ ) -> requests . Response :
123
124
"""Use this API to update an exhaustive representation of
124
125
regionalized overlays. The body of this request should be a map
125
126
keyed by overlayId whose value is a map of regionId to regional
@@ -180,7 +181,7 @@ def modify_overlay_config(
180
181
self ,
181
182
overlay_id : int ,
182
183
overlay_config : dict ,
183
- ) -> dict :
184
+ ) -> requests . Response :
184
185
"""Use this API to update an existing overlay configuration. If you
185
186
are using regions and have customized regional BIO per region, it
186
187
will be overridden. To avoid this use the other PUT api which takes
@@ -201,8 +202,9 @@ def modify_overlay_config(
201
202
:type overlay_id: int
202
203
:param overlay_config: Full overlay configuration object
203
204
: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
206
208
"""
207
209
return self ._put (
208
210
"/gms/overlays/config/{}" .format (overlay_id ),
@@ -276,7 +278,7 @@ def modify_overlay_config_for_region(
276
278
overlay_id : int ,
277
279
region_id : int ,
278
280
overlay_config : dict ,
279
- ) -> dict :
281
+ ) -> requests . Response :
280
282
"""Use this API to update an existing overlay configuration, use
281
283
region_id ``0`` to update global overlay configuration.
282
284
0 commit comments