Skip to content

Commit db1cd1c

Browse files
committed
Pull request #49: ISGAPPSEC2-35959-newrestapi-get_session_config-method-with-include-all-parameter
Merge in ISGAPPSEC/cyperf-api-wrapper from ISGAPPSEC2-35959-get_session_config-method-with-include-all to main Squashed commit of the following: commit 3d246d357f4d572d0aa7b8f0062cb1515c56c913 Author: iustmitu <iustin.mitu@keysight.com> Date: Thu Nov 20 11:06:32 2025 +0200 return [] instead of None for a required field
1 parent 454f342 commit db1cd1c

55 files changed

Lines changed: 74 additions & 74 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cyperf/models/activation_code_list_request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
8484
return _obj
8585

8686
_obj = cls.model_validate({
87-
"activationCode": obj.get("activationCode")
87+
"activationCode": obj.get("activationCode") if obj.get("activationCode") is not None else []
8888
,
8989
"links": obj.get("links")
9090
})

cyperf/models/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
181181
return _obj
182182

183183
_obj = cls.model_validate({
184-
"AgentTags": obj.get("AgentTags"),
184+
"AgentTags": obj.get("AgentTags") if obj.get("AgentTags") is not None else [],
185185
"IP": obj.get("IP"),
186186
"Interfaces": [Interface.from_dict(_item) for _item in obj["Interfaces"]] if obj.get("Interfaces") is not None else None,
187187
"LastUpdate": obj.get("LastUpdate"),

cyperf/models/agent_assignment_details.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
103103
"agentId": obj.get("agentId"),
104104
"captureSettings": CaptureSettings.from_dict(obj["captureSettings"]) if obj.get("captureSettings") is not None else None,
105105
"id": obj.get("id"),
106-
"interfaces": obj.get("interfaces"),
106+
"interfaces": obj.get("interfaces") if obj.get("interfaces") is not None else [],
107107
"links": [APILink.from_dict(_item) for _item in obj["links"]] if obj.get("links") is not None else None
108108
,
109109
"links": obj.get("links")

cyperf/models/agent_assignments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
113113
_obj = cls.model_validate({
114114
"ByID": [AgentAssignmentDetails.from_dict(_item) for _item in obj["ByID"]] if obj.get("ByID") is not None else None,
115115
"ByPort": [AgentAssignmentByPort.from_dict(_item) for _item in obj["ByPort"]] if obj.get("ByPort") is not None else None,
116-
"ByTag": obj.get("ByTag"),
116+
"ByTag": obj.get("ByTag") if obj.get("ByTag") is not None else [],
117117
"links": [APILink.from_dict(_item) for _item in obj["links"]] if obj.get("links") is not None else None
118118
,
119119
"links": obj.get("links")

cyperf/models/agent_reservation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
9090

9191
_obj = cls.model_validate({
9292
"agentId": obj.get("agentId"),
93-
"agentPayloadNames": obj.get("agentPayloadNames"),
93+
"agentPayloadNames": obj.get("agentPayloadNames") if obj.get("agentPayloadNames") is not None else [],
9494
"generalPurposeCPUPercent": obj.get("generalPurposeCPUPercent"),
95-
"interfaces": obj.get("interfaces"),
95+
"interfaces": obj.get("interfaces") if obj.get("interfaces") is not None else [],
9696
"ipAddressVersionUsed": obj.get("ipAddressVersionUsed"),
9797
"optimizationMode": obj.get("optimizationMode")
9898
,

cyperf/models/agents_group.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
9595
return _obj
9696

9797
_obj = cls.model_validate({
98-
"Agents": obj.get("Agents"),
98+
"Agents": obj.get("Agents") if obj.get("Agents") is not None else [],
9999
"Available": obj.get("Available"),
100100
"Name": obj.get("Name"),
101101
"Online": obj.get("Online")

cyperf/models/app_flow_input.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
8686

8787
_obj = cls.model_validate({
8888
"AppFlowId": obj.get("AppFlowId"),
89-
"Exchanges": obj.get("Exchanges")
89+
"Exchanges": obj.get("Exchanges") if obj.get("Exchanges") is not None else []
9090
,
9191
"links": obj.get("links")
9292
})

cyperf/models/app_flow_input_find_param.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
9393
_obj = cls.model_validate({
9494
"AppFlowDesc": AppFlowDesc.from_dict(obj["AppFlowDesc"]) if obj.get("AppFlowDesc") is not None else None,
9595
"AppFlowId": obj.get("AppFlowId"),
96-
"ExchangeNames": obj.get("ExchangeNames"),
97-
"Exchanges": obj.get("Exchanges")
96+
"ExchangeNames": obj.get("ExchangeNames") if obj.get("ExchangeNames") is not None else [],
97+
"Exchanges": obj.get("Exchanges") if obj.get("Exchanges") is not None else []
9898
,
9999
"links": obj.get("links")
100100
})

cyperf/models/application.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
281281
"ServerTLSProfile": TLSProfile.from_dict(obj["ServerTLSProfile"]) if obj.get("ServerTLSProfile") is not None else None,
282282
"StatelessStream": StatelessStream.from_dict(obj["StatelessStream"]) if obj.get("StatelessStream") is not None else None,
283283
"Static": obj.get("Static"),
284-
"SupportedApps": obj.get("SupportedApps"),
284+
"SupportedApps": obj.get("SupportedApps") if obj.get("SupportedApps") is not None else [],
285285
"SupportsCalibration": obj.get("SupportsCalibration"),
286286
"SupportsMultiFlow": obj.get("SupportsMultiFlow"),
287287
"SupportsStrikes": obj.get("SupportsStrikes"),

cyperf/models/application_profile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
163163
"add-applications": [ExternalResourceInfo.from_dict(_item) for _item in obj["add-applications"]] if obj.get("add-applications") is not None else None,
164164
"modify-excluded-dut-recursively": [UpdateNetworkMapping.from_dict(_item) for _item in obj["modify-excluded-dut-recursively"]] if obj.get("modify-excluded-dut-recursively") is not None else None,
165165
"modify-tags-recursively": [UpdateNetworkMapping.from_dict(_item) for _item in obj["modify-tags-recursively"]] if obj.get("modify-tags-recursively") is not None else None,
166-
"reset-tags-to-default": obj.get("reset-tags-to-default")
166+
"reset-tags-to-default": obj.get("reset-tags-to-default") if obj.get("reset-tags-to-default") is not None else []
167167
,
168168
"links": obj.get("links")
169169
})

0 commit comments

Comments
 (0)