Skip to content

Commit f4f6c46

Browse files
authored
fix(cloud): fix vip examples
1 parent 958b2a7 commit f4f6c46

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

examples/cloud/reserved_fixed_ips.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@ def toggle_reserved_fixed_ip_vip(*, client: Gcore, port_id: str, is_vip: bool) -
7373

7474
def list_candidate_ports(*, client: Gcore, port_id: str) -> None:
7575
print("\n=== LIST CANDIDATE PORTS ===")
76-
candidate_ports = client.cloud.reserved_fixed_ips.vip.list_candidate_ports(port_id)
76+
candidate_ports = client.cloud.reserved_fixed_ips.vip.candidate_ports.list(port_id)
7777
for count, port in enumerate(candidate_ports.results, 1):
7878
print(f"{count}. Candidate port: ID={port.port_id}, instance name={port.instance_name}")
7979
print("========================")
8080

8181

8282
def list_connected_ports(*, client: Gcore, port_id: str) -> None:
8383
print("\n=== LIST CONNECTED PORTS ===")
84-
connected_ports = client.cloud.reserved_fixed_ips.vip.list_connected_ports(port_id)
84+
connected_ports = client.cloud.reserved_fixed_ips.vip.connected_ports.list(port_id)
8585
for count, port in enumerate(connected_ports.results, 1):
8686
print(f"{count}. Connected port: ID={port.port_id}, instance name={port.instance_name}")
8787
print("========================")

examples/cloud/reserved_fixed_ips_async.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@ async def toggle_reserved_fixed_ip_vip(*, client: AsyncGcore, port_id: str, is_v
7777

7878
async def list_candidate_ports(*, client: AsyncGcore, port_id: str) -> None:
7979
print("\n=== LIST CANDIDATE PORTS ===")
80-
candidate_ports = await client.cloud.reserved_fixed_ips.vip.list_candidate_ports(port_id)
80+
candidate_ports = await client.cloud.reserved_fixed_ips.vip.candidate_ports.list(port_id)
8181
for count, port in enumerate(candidate_ports.results, 1):
8282
print(f"{count}. Candidate port: ID={port.port_id}, instance name={port.instance_name}")
8383
print("========================")
8484

8585

8686
async def list_connected_ports(*, client: AsyncGcore, port_id: str) -> None:
8787
print("\n=== LIST CONNECTED PORTS ===")
88-
connected_ports = await client.cloud.reserved_fixed_ips.vip.list_connected_ports(port_id)
88+
connected_ports = await client.cloud.reserved_fixed_ips.vip.connected_ports.list(port_id)
8989
for count, port in enumerate(connected_ports.results, 1):
9090
print(f"{count}. Connected port: ID={port.port_id}, instance name={port.instance_name}")
9191
print("========================")

0 commit comments

Comments
 (0)