Skip to content

Commit 2e0fba6

Browse files
tsimionescuangela-cncf
authored andcommitted
Pull request #22: Fix auto generated api wrapper
Merge in ISGAPPSEC/cyperf-api-wrapper from fix-auto-generated-api-wrapper to main Squashed commit of the following: commit 96c0dd7b3fc43816744e4f238a3fcfbe4a80c5ed Author: Tudor Simionescu <tudor.simionescu@keysight.com> Date: Wed Apr 23 15:14:00 2025 +0300 Fix missing rename of get_application_types commit f9241ae2182cc17d10dfbdcabd572b1a859a3a5c Author: Tudor Simionescu <tudor.simionescu@keysight.com> Date: Wed Apr 23 15:13:02 2025 +0300 Manually modify Config object to prevent pydantic issue What: - Make the 'validate' field of a Config have a different name in Python Why: - 'validate' is a method in BaseModel and the field name is shadowing it
1 parent 6ba1879 commit 2e0fba6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

cyperf/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def wait_for_controller_up(self, timeout_seconds=600):
155155
try:
156156
if not eula_accepted:
157157
eula_checker.check_eulas()
158-
app_res_api.get_application_types(take=0)
158+
app_res_api.get_resources_application_types(take=0)
159159
sessions_api.get_sessions(take=0)
160160
configs_api.get_configs(take=0)
161161
agents_api.get_agents(take=0)

cyperf/models/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class Config(BaseModel):
4242
network_profiles: Optional[List[NetworkProfile]] = Field(default=None, alias="NetworkProfiles")
4343
traffic_profiles: Optional[List[ApplicationProfile]] = Field(default=None, alias="TrafficProfiles")
4444
links: Optional[List[APILink]] = None
45-
validate: Optional[List[Union[StrictBytes, StrictStr]]] = None
45+
validate_operations: Optional[List[Union[StrictBytes, StrictStr]]] = Field(default=None, alias="validate")
4646
__properties: ClassVar[List[str]] = ["AttackProfiles", "ConfigValidation", "CustomDashboards", "ExpectedDiskSpace", "NetworkProfiles", "TrafficProfiles", "links", "validate"]
4747

4848
model_config = ConfigDict(

0 commit comments

Comments
 (0)