Skip to content

Commit b7408b6

Browse files
committed
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 <iustin.mitu@keysight.com> Date: Fri Sep 19 11:54:37 2025 +0300 rename enum value commit 5b90d5164f54ec882472e49f8ddd806bb03bfa52 Author: iustmitu <iustin.mitu@keysight.com> Date: Fri Sep 19 11:19:45 2025 +0300 hotfixes
1 parent bb0f883 commit b7408b6

File tree

5 files changed

+18
-7
lines changed

5 files changed

+18
-7
lines changed

cyperf/api/licensing_api.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1934,6 +1934,7 @@ def get_counted_feature_stats(
19341934
)
19351935

19361936
_response_types_map: Dict[str, Optional[str]] = {
1937+
'200': "AsyncOperationResponse",
19371938
'202': "AsyncOperationResponse",
19381939
'500': "ErrorDescription",
19391940
}
@@ -1993,6 +1994,7 @@ def get_counted_feature_stats_with_http_info(
19931994
)
19941995

19951996
_response_types_map: Dict[str, Optional[str]] = {
1997+
'200': "AsyncOperationResponse",
19961998
'202': "AsyncOperationResponse",
19971999
'500': "ErrorDescription",
19982000
}
@@ -2052,6 +2054,7 @@ def get_counted_feature_stats_without_preload_content(
20522054
)
20532055

20542056
_response_types_map: Dict[str, Optional[str]] = {
2057+
'200': "AsyncOperationResponse",
20552058
'202': "AsyncOperationResponse",
20562059
'500': "ErrorDescription",
20572060
}

cyperf/models/async_operation_response.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class AsyncOperationResponse(BaseModel):
3131
id: StrictInt = Field(description="The subresource id of the status.")
3232
message: StrictStr = Field(description="A message from the operation (optional).")
3333
progress: StrictInt = Field(description="The progress of the operation (percent).")
34-
result_url: StrictStr = Field(description="The URL where the archive is available.", alias="resultUrl")
34+
result_url: Optional[StrictStr] = Field(description="The URL where the archive is available.", alias="resultUrl")
3535
state: StrictStr = Field(description="The state of the operation.")
3636
type: StrictStr = Field(description="The name of the operation.")
3737
url: StrictStr = Field(description="The status URI of the operation.")

cyperf/models/ip_network.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
from cyperf.models.api_link import APILink
2626
from cyperf.models.dns_resolver import DNSResolver
2727
from cyperf.models.dns_server import DNSServer
28+
from cyperf.models.emulated_router import EmulatedRouter
29+
from cyperf.models.eth_range import EthRange
2830
from cyperf.models.ip_range import IPRange
2931
from cyperf.models.ip_sec_stack import IPSecStack
3032
from cyperf.models.mac_dtls_stack import MacDtlsStack
@@ -43,8 +45,8 @@ class IPNetwork(BaseModel):
4345
dns_resolver: Optional[DNSResolver] = Field(default=None, alias="DNSResolver")
4446
dns_server: Optional[DNSServer] = Field(default=None, description="The DNS Server configuration for Network Segment", alias="DNSServer")
4547
dut_connections: Optional[List[StrictStr]] = Field(default=None, description="The connected DUT network segments.", alias="DUTConnections")
46-
emulated_router: Optional[Dict[str, Any]] = Field(default=None, alias="EmulatedRouter")
47-
eth_range: Optional[Dict[str, Any]] = Field(default=None, alias="EthRange")
48+
emulated_router: Optional[EmulatedRouter] = Field(default=None, alias="EmulatedRouter")
49+
eth_range: Optional[EthRange] = Field(default=None, alias="EthRange")
4850
ip_ranges: Optional[List[IPRange]] = Field(default=None, alias="IPRanges")
4951
ip_sec_stacks: Optional[List[IPSecStack]] = Field(default=None, alias="IPSecStacks")
5052
mac_dtls_stacks: Optional[List[MacDtlsStack]] = Field(default=None, alias="MacDtlsStacks")
@@ -107,6 +109,12 @@ def to_dict(self) -> Dict[str, Any]:
107109
# override the default output from pydantic by calling `to_dict()` of dns_server
108110
if self.dns_server:
109111
_dict['DNSServer'] = self.dns_server.to_dict()
112+
# override the default output from pydantic by calling `to_dict()` of emulated_router
113+
if self.emulated_router:
114+
_dict['EmulatedRouter'] = self.emulated_router.to_dict()
115+
# override the default output from pydantic by calling `to_dict()` of eth_range
116+
if self.eth_range:
117+
_dict['EthRange'] = self.eth_range.to_dict()
110118
# override the default output from pydantic by calling `to_dict()` of each item in ip_ranges (list)
111119
_items = []
112120
if self.ip_ranges:
@@ -164,8 +172,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
164172
"networkTags": obj.get("networkTags"),
165173
"DNSResolver": DNSResolver.from_dict(obj["DNSResolver"]) if obj.get("DNSResolver") is not None else None,
166174
"DNSServer": DNSServer.from_dict(obj["DNSServer"]) if obj.get("DNSServer") is not None else None,
167-
"DUTConnections": obj.get("DUTConnections"),
168-
"EmulatedRouter": obj.get("EmulatedRouter"),
175+
"EmulatedRouter": EmulatedRouter.from_dict(obj["EmulatedRouter"]) if obj.get("EmulatedRouter") is not None else None,
176+
"EthRange": EthRange.from_dict(obj["EthRange"]) if obj.get("EthRange") is not None else None,
169177
"EthRange": obj.get("EthRange"),
170178
"IPRanges": [IPRange.from_dict(_item) for _item in obj["IPRanges"]] if obj.get("IPRanges") is not None else None,
171179
"IPSecStacks": [IPSecStack.from_dict(_item) for _item in obj["IPSecStacks"]] if obj.get("IPSecStacks") is not None else None,

cyperf/models/stream_payload_type.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class StreamPayloadType(str, Enum):
2929
"""
3030
RANDOM = 'RANDOM'
3131
PSEUDORANDOM = 'PSEUDORANDOM'
32-
LESS_THAN_NIL_GREATER_THAN = '<nil>'
32+
NULL = 'null'
3333

3434
@classmethod
3535
def from_json(cls, json_str: str) -> Self:

docs/StreamPayloadType.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
* `PSEUDORANDOM` (value: `'PSEUDORANDOM'`)
99

10-
* `LESS_THAN_NIL_GREATER_THAN` (value: `'<nil>'`)
10+
* `NULL` (value: `'null'`)
1111

1212
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1313

0 commit comments

Comments
 (0)