Skip to content

Conversation

@platanus-kr
Copy link
Collaborator

@platanus-kr platanus-kr commented Oct 6, 2025

Overview

  • Add Router CRUD to Network tools

Key Changes

Router common tools

  • Create router
  • Get details router
  • Get routers
  • Update router
  • Delete router

Related Issues

Additional context

스크린샷 2025-10-06 13 25 41 스크린샷 2025-10-06 13 26 45 스크린샷 2025-10-06 13 26 50 스크린샷 2025-10-06 13 26 54

I have basic CRUD tests for the router. External gateway or DNS-related items will be handled as separate development tasks.

provider_network_type: str | None = None,
provider_physical_network: str | None = None,
provider_segmentation_id: int | None = None,
project_id: str | None = None,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

project_id를 추가하신 이유가 있나요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네크워크는 프로젝트별로 생성할 수 있습니다~ 이번에 추가된 라우터는 다른 서브넷간 통신을 하기 위한 라우팅과 더불어 다른 프로젝트에 있는 네트워크 (서브넷 포함) 과 통신할때도 필요합니다. 저 파라미터를 받지 않으면 cloud.yaml에 지정된 계정의 프로젝트로만 네트워크가 생성되요. 예를들어 admin으로 로그인하면 admin 프로젝트에만 네트워크를 만들수 있어요.

) -> Router:
"""
Create a new Router.
Typical use-cases:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usecase를 따로 작성하신 이유가 있으신가요?
몇몇 시나리오에서는 :param에 작성하셔도 될 것 같은데, 이유가 있을 것 같아 질문합니다.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요청 바디의 중첩구조에 대해 LLM이 혼동하는 경우가 있어 추가하게 됐습니다.
param은 해당 인자에 대한 설명에 충실하는게 좋지 않을까요?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그렇군요!
저도 앞으로 조건사항이 있으면 use case로 따로 작성해야겠네요.

Typical use-cases:
- Create basic router: name="r1" (defaults to admin_state_up=True)
- Create distributed router: is_distributed=True
- Create with external gateway for north-south traffic:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

north-south traffic이 무엇을 의미하는지 궁금합니다.

Copy link
Collaborator Author

@platanus-kr platanus-kr Oct 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네트워크에서 상하 계층간 통신방향을 구분하기 위해 사용되는 용어 입니다.
상위로 전달하는것을 northbound, 하위로 전달하는 것을 southbound 라고 합니다.

즉 이 경우 외부 게이트웨이(external gateway info)로 트래픽을 통신하기 위한 설정 use case 입니다.


(추가) 주로 SDN 분야에서 많이 쓰는 용어입니다!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

좋은 정보 알아갑니다!

- Set distributed flag: is_distributed=True or False.
- Set external gateway: external_gateway_info={"network_id": "ext-net", "enable_snat": True, "external_fixed_ips": [...]}.
- Clear external gateway: clear_external_gateway=True (takes precedence over external_gateway_info).
- Replace static routes: routes=[{"destination": "192.0.2.0/24", "nexthop": "10.0.0.1"}]. Pass [] to remove all routes.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저는 이 문장이 두 가지로 해석되었어요.

  1. roter=[] 인 경우 모든 라우터를 삭제하므로 routes 값 업데이트를 건너뛴다.
  2. 모든 라우터를 삭제하고 싶다면 [] 전달한다.

이 문장이 어떤 의미를 가지고 있나요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. None 일 때 : static route를 변경하지 않는다
  2. [] (빈 리스트) 일 때 : static route를 모두 삭제한다.
  3. [{"dest..": "192.168.0.0/24" ...}] (값이 있는) 일 때 : static route를 완전히 교체한다.

답변이 되셨길 바랍니다.

Copy link
Collaborator

@S0okJu S0okJu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

제가 실수로 approve를 눌러서 review 코멘트 남깁니다.

S0okJu

This comment was marked as off-topic.

Copy link
Collaborator

@S0okJu S0okJu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@platanus-kr
Copy link
Collaborator Author

익일 오전까지 다른 의견 기다리고 오후에 머지하겠습니다!

Copy link
Collaborator

@paikend paikend left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@choieastsea choieastsea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

전체적으로 openstacksdk에서 제공하는 proxy와 cloud 계층이 혼용되어있는데, proxy 방법으로 통일해주시면 좋을 것 같습니다~!

Copy link
Collaborator

@choieastsea choieastsea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@platanus-kr platanus-kr merged commit f32e39a into develop Oct 10, 2025
6 checks passed
@platanus-kr platanus-kr added the feature Request for new feature or functionality enhancement label Oct 11, 2025
@platanus-kr platanus-kr self-assigned this Oct 22, 2025
halucinor pushed a commit that referenced this pull request Oct 23, 2025
halucinor pushed a commit that referenced this pull request Oct 24, 2025
@halucinor halucinor deleted the feat/router-crud-tools branch October 30, 2025 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Request for new feature or functionality enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants