feat: scan NFS server for available exports in storage-add dialog
Some checks failed
Backend Tests / pytest (Python 3.12) (push) Failing after 1m20s
Deploy to Production / Trigger production update (push) Failing after 10s
SonarCloud / SonarCloud Analysis (push) Has been cancelled

Add a "scan exports" button next to the server field for NFS storages
that calls Proxmox's /nodes/{node}/scan/nfs and turns the export path
input into a select populated with the real exports found on the
target server, instead of requiring the path to be typed by hand.
This commit is contained in:
markmorado
2026-08-20 10:23:04 +05:00
parent c768da93ee
commit 31d17fca61
6 changed files with 93 additions and 3 deletions

View File

@@ -239,6 +239,16 @@ class StorageMixin:
logger.error(f"Ошибка получения статусов хранилищ с {self.host}: {e}")
return status
def scan_nfs_exports(self, node: str, server: str) -> List[Dict]:
"""
Получить список NFS-экспортов удалённого сервера через
GET /nodes/{node}/scan/nfs — для выбора export в диалоге добавления
хранилища вместо ручного ввода пути.
"""
if not self.proxmox:
return []
return self.proxmox.nodes(node).scan.nfs.get(server=server)
def get_node_storages(self, node: str, content: str = None) -> List[Dict]:
"""Get storages available on a specific node, optionally filtered by content type"""
if not self.proxmox: