From fb6f75b8c9736e6cdde44b3ce9c2ee81e5408578 Mon Sep 17 00:00:00 2001 From: Iustin Mitu Date: Mon, 22 Sep 2025 04:41:35 -0600 Subject: [PATCH] Pull request #39: hotfixes customer support github Merge in ISGAPPSEC/cyperf-api-wrapper from hotfixes-github to release/7.0 Squashed commit of the following: commit d615aa95f6f42e2c12355972c0ec178595f12885 Author: iustmitu Date: Fri Sep 19 11:54:37 2025 +0300 rename enum value commit 5b90d5164f54ec882472e49f8ddd806bb03bfa52 Author: iustmitu Date: Fri Sep 19 11:19:45 2025 +0300 hotfixes --- cyperf/api/licensing_api.py | 3 +++ cyperf/models/async_operation_response.py | 2 +- cyperf/models/ip_network.py | 16 ++++++++++++---- cyperf/models/stream_payload_type.py | 2 +- docs/StreamPayloadType.md | 2 +- 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/cyperf/api/licensing_api.py b/cyperf/api/licensing_api.py index e8a676d..f04d9a5 100644 --- a/cyperf/api/licensing_api.py +++ b/cyperf/api/licensing_api.py @@ -1934,6 +1934,7 @@ def get_counted_feature_stats( ) _response_types_map: Dict[str, Optional[str]] = { + '200': "AsyncOperationResponse", '202': "AsyncOperationResponse", '500': "ErrorDescription", } @@ -1993,6 +1994,7 @@ def get_counted_feature_stats_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { + '200': "AsyncOperationResponse", '202': "AsyncOperationResponse", '500': "ErrorDescription", } @@ -2052,6 +2054,7 @@ def get_counted_feature_stats_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { + '200': "AsyncOperationResponse", '202': "AsyncOperationResponse", '500': "ErrorDescription", } diff --git a/cyperf/models/async_operation_response.py b/cyperf/models/async_operation_response.py index 4167394..32351b5 100644 --- a/cyperf/models/async_operation_response.py +++ b/cyperf/models/async_operation_response.py @@ -31,7 +31,7 @@ class AsyncOperationResponse(BaseModel): id: StrictInt = Field(description="The subresource id of the status.") message: StrictStr = Field(description="A message from the operation (optional).") progress: StrictInt = Field(description="The progress of the operation (percent).") - result_url: StrictStr = Field(description="The URL where the archive is available.", alias="resultUrl") + result_url: Optional[StrictStr] = Field(description="The URL where the archive is available.", alias="resultUrl") state: StrictStr = Field(description="The state of the operation.") type: StrictStr = Field(description="The name of the operation.") url: StrictStr = Field(description="The status URI of the operation.") diff --git a/cyperf/models/ip_network.py b/cyperf/models/ip_network.py index 6c0865e..5e8b58d 100644 --- a/cyperf/models/ip_network.py +++ b/cyperf/models/ip_network.py @@ -25,6 +25,8 @@ from cyperf.models.api_link import APILink from cyperf.models.dns_resolver import DNSResolver from cyperf.models.dns_server import DNSServer +from cyperf.models.emulated_router import EmulatedRouter +from cyperf.models.eth_range import EthRange from cyperf.models.ip_range import IPRange from cyperf.models.ip_sec_stack import IPSecStack from cyperf.models.mac_dtls_stack import MacDtlsStack @@ -43,8 +45,8 @@ class IPNetwork(BaseModel): dns_resolver: Optional[DNSResolver] = Field(default=None, alias="DNSResolver") dns_server: Optional[DNSServer] = Field(default=None, description="The DNS Server configuration for Network Segment", alias="DNSServer") dut_connections: Optional[List[StrictStr]] = Field(default=None, description="The connected DUT network segments.", alias="DUTConnections") - emulated_router: Optional[Dict[str, Any]] = Field(default=None, alias="EmulatedRouter") - eth_range: Optional[Dict[str, Any]] = Field(default=None, alias="EthRange") + emulated_router: Optional[EmulatedRouter] = Field(default=None, alias="EmulatedRouter") + eth_range: Optional[EthRange] = Field(default=None, alias="EthRange") ip_ranges: Optional[List[IPRange]] = Field(default=None, alias="IPRanges") ip_sec_stacks: Optional[List[IPSecStack]] = Field(default=None, alias="IPSecStacks") mac_dtls_stacks: Optional[List[MacDtlsStack]] = Field(default=None, alias="MacDtlsStacks") @@ -107,6 +109,12 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of dns_server if self.dns_server: _dict['DNSServer'] = self.dns_server.to_dict() + # override the default output from pydantic by calling `to_dict()` of emulated_router + if self.emulated_router: + _dict['EmulatedRouter'] = self.emulated_router.to_dict() + # override the default output from pydantic by calling `to_dict()` of eth_range + if self.eth_range: + _dict['EthRange'] = self.eth_range.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in ip_ranges (list) _items = [] if self.ip_ranges: @@ -164,8 +172,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "networkTags": obj.get("networkTags"), "DNSResolver": DNSResolver.from_dict(obj["DNSResolver"]) if obj.get("DNSResolver") is not None else None, "DNSServer": DNSServer.from_dict(obj["DNSServer"]) if obj.get("DNSServer") is not None else None, - "DUTConnections": obj.get("DUTConnections"), - "EmulatedRouter": obj.get("EmulatedRouter"), + "EmulatedRouter": EmulatedRouter.from_dict(obj["EmulatedRouter"]) if obj.get("EmulatedRouter") is not None else None, + "EthRange": EthRange.from_dict(obj["EthRange"]) if obj.get("EthRange") is not None else None, "EthRange": obj.get("EthRange"), "IPRanges": [IPRange.from_dict(_item) for _item in obj["IPRanges"]] if obj.get("IPRanges") is not None else None, "IPSecStacks": [IPSecStack.from_dict(_item) for _item in obj["IPSecStacks"]] if obj.get("IPSecStacks") is not None else None, diff --git a/cyperf/models/stream_payload_type.py b/cyperf/models/stream_payload_type.py index 0845462..ff58c46 100644 --- a/cyperf/models/stream_payload_type.py +++ b/cyperf/models/stream_payload_type.py @@ -29,7 +29,7 @@ class StreamPayloadType(str, Enum): """ RANDOM = 'RANDOM' PSEUDORANDOM = 'PSEUDORANDOM' - LESS_THAN_NIL_GREATER_THAN = '' + NULL = 'null' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/docs/StreamPayloadType.md b/docs/StreamPayloadType.md index f31e2ff..2aa633b 100644 --- a/docs/StreamPayloadType.md +++ b/docs/StreamPayloadType.md @@ -7,7 +7,7 @@ * `PSEUDORANDOM` (value: `'PSEUDORANDOM'`) -* `LESS_THAN_NIL_GREATER_THAN` (value: `''`) +* `NULL` (value: `'null'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)