Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cyperf/api/licensing_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1934,6 +1934,7 @@ def get_counted_feature_stats(
)

_response_types_map: Dict[str, Optional[str]] = {
'200': "AsyncOperationResponse",
'202': "AsyncOperationResponse",
'500': "ErrorDescription",
}
Expand Down Expand Up @@ -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",
}
Expand Down Expand Up @@ -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",
}
Expand Down
2 changes: 1 addition & 1 deletion cyperf/models/async_operation_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down
16 changes: 12 additions & 4 deletions cyperf/models/ip_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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")
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion cyperf/models/stream_payload_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class StreamPayloadType(str, Enum):
"""
RANDOM = 'RANDOM'
PSEUDORANDOM = 'PSEUDORANDOM'
LESS_THAN_NIL_GREATER_THAN = '<nil>'
NULL = 'null'

@classmethod
def from_json(cls, json_str: str) -> Self:
Expand Down
2 changes: 1 addition & 1 deletion docs/StreamPayloadType.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

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

* `LESS_THAN_NIL_GREATER_THAN` (value: `'<nil>'`)
* `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)

Expand Down