This repository was archived by the owner on Apr 23, 2026. It is now read-only.
refactor(proxmox-client): 나머지 fetch/cmd 도 trait 에 흡수 (2/2) - #73
Merged
Conversation
PR 1/2 의 후속. 남아 있던 `match AccessType` 경로들을 trait 메서드로 전부 이관. Trait 확장 (모두 default = API-not-supported, Ssh 만 override): - host_info / resources / docker / ports / snapshots - docker_logs_cmd / container_logs_cmd / docker_exec_cmd (기존 String 반환 public wrapper 는 Option 을 unwrap_or_default 로 감쌈) 추가로 순수 파서 함수 분리 (향후 StubRunner 기반 단위 테스트 대상): - parse_docker / parse_ports / parse_resources / parse_snapshots / parse_host_info 정리: - 기존 `fn fetch_resources` / `fn fetch_snapshots` private 함수 제거 (trait impl 로 이동) - 호출 없던 wrapper `fetch_docker` / `fetch_ports` 제거 (dead-code 즉시 삭제 규약) - `fetch_detail` 은 client 를 한 번 만들어 4 메서드 호출 결과: - 남은 `match AccessType` 은 `client_for` 하나 + `display_server` (UI 태그) 뿐 - 호출부(cli/main) 변경 없음, CI 58/58 / clippy clean Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Owner
Author
Dalteam Review
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR #72 의 후속. 남아 있던 `match server.access` 경로들을 trait 메서드로 전부 이관.
Trait 확장
default impl 은 모두 "API-not-supported" (None / 빈 벡터), `SshProxmoxClient` 만 override:
파서 분리
향후 StubRunner 로 파서 단위 테스트를 붙일 수 있도록 각 fetch 내부를 순수 함수로 추출:
정리
결과
남은 `match AccessType` 은 `client_for` 한 곳 + `display_server` (UI 태그) 뿐.
Test plan
🤖 Generated with Claude Code