Refactor GPU rental network handling and enhance IP management
- Renamed "FIP" to "IP" in the status output for clarity. - Updated `create_gpu_server` to accept `port_id` as an optional parameter, allowing for more flexible network configurations. - Introduced `delete_access_ip` function to manage direct public ports or floating IPs more effectively. - Enhanced session management to prioritize direct public IPs over floating IPs, improving connection reliability. - Added checks for direct network availability in the doctor command to ensure proper network functionality. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -144,8 +144,8 @@ def test_cmd_stop_deletes_compute_keeps_disks(monkeypatch):
|
||||
lambda conn, server, log: deleted.append(server.id),
|
||||
)
|
||||
monkeypatch.setattr(
|
||||
"gpu_rent.session.delete_floating_ip",
|
||||
lambda conn, fip_id, address, log: deleted.append("fip"),
|
||||
"gpu_rent.session.delete_access_ip",
|
||||
lambda conn, region, fip_id, address, log: deleted.append("fip"),
|
||||
)
|
||||
save_state(
|
||||
SessionState(
|
||||
|
||||
Reference in New Issue
Block a user