Merged
Conversation
platanus-kr
reviewed
Aug 12, 2025
Comment on lines
4
to
7
| class ServerFlavor(BaseModel): | ||
| id: str | None = Field(default=None, exclude=True) | ||
| name: str = Field(validation_alias="original_name") | ||
| model_config = ConfigDict(validate_by_name=True) |
Collaborator
There was a problem hiding this comment.
Flavor가 Nova에 포함된 리소스긴 하지만 Server라고 접두사를 붙이지 않아도 충분히 전달이 되지 않을까 의견 드립니다.
Collaborator
There was a problem hiding this comment.
ServerFlavor와 Flavor 속성이 달라 구분이 필요
Collaborator
There was a problem hiding this comment.
실제 API 반환을 보니 구조가 달라 구분 및 공통화를 했다는점 이해했습니다.
다만 필드가 디르면 의미가 다르다고 생각이 드는데 Inner class 를 활용하면 어떨까 의견 드렸습니다 (온라인)
Collaborator
Author
There was a problem hiding this comment.
넵 제안주신 대로 inner class로 바꿨습니다 ~ 좋은 의견 감사합니다
S0okJu
reviewed
Aug 13, 2025
S0okJu
approved these changes
Aug 13, 2025
729a1ca to
bb453bc
Compare
platanus-kr
reviewed
Aug 13, 2025
Comment on lines
+4
to
+30
| class Server(BaseModel): | ||
| class Flavor(BaseModel): | ||
| id: str | None = Field(default=None, exclude=True) | ||
| name: str = Field(validation_alias="original_name") | ||
| model_config = ConfigDict(validate_by_name=True) | ||
|
|
||
| model_config = ConfigDict(validate_by_name=True) | ||
| class Image(BaseModel): | ||
| id: str | ||
|
|
||
| class IPAddress(BaseModel): | ||
| addr: str | ||
| version: int | ||
| type: str = Field(validation_alias="OS-EXT-IPS:type") | ||
|
|
||
| class ServerSecurityGroup(BaseModel): | ||
| name: str | ||
| model_config = ConfigDict(validate_by_name=True) | ||
|
|
||
| class SecurityGroup(BaseModel): | ||
| name: str | ||
|
|
||
| class Server(BaseModel): | ||
| id: str | ||
| name: str | ||
| status: str | None = None | ||
| flavor: Flavor | None = None | ||
| image: Image | None = None | ||
| addresses: dict[str, list[ServerIp]] | None = None | ||
| addresses: dict[str, list[IPAddress]] | None = None | ||
| key_name: str | None = None | ||
| security_groups: list[ServerSecurityGroup] | None = None | ||
| security_groups: list[SecurityGroup] | None = None |
platanus-kr
pushed a commit
that referenced
this pull request
Aug 16, 2025
* feat: get flavors * fix: to inner class * fix: format
halucinor
pushed a commit
that referenced
this pull request
Aug 24, 2025
* feat: get flavors * fix: to inner class * fix: format
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Overview
Add
get_flavorstools for compute tools.Key Changes
Flavormodel toServerFlavorcompute_toolsRelated Issues
Additional context
server 조회시 flavor 응답 예시
flavor 리스트 조회시 응답 예시
original_name <-> name이 달라 별도의 response 객체로 분리하였습니다