Skip to content

Conversation

@choieastsea
Copy link
Collaborator

@choieastsea choieastsea commented Oct 20, 2025

Overview

권한 및 오픈스택 환경을 변경하며 interaction할 수 있도록 ConnectionManager 관련 tool를 추가

Key Changes

  • tools/connection.py 생성하여 cloud를 선택하고 조회할 수 있는 툴 추가
    • 권한이 부족하거나 다른 환경도 옮기면서 실행할 수 있다

Related Issues

Additional context

실행 화면 예시
image

처음 issue에서는 config 정보를 resource로 제공하려고 했는데요. 아래 이유로 인해 tool로 제공하고자 하는데, 편하게 의견 주세요.

resource는 사용자가 직접 추가해야하는데, 현재 경우에 적합하지 않다고 생각하였습니다.
image
활성화 여부만 체크하면 되는 tool과 달리 사진처럼 resource는 가져와서 대화에 포함시켜야하는데, 사용자가 의도적으로 포함시켜서 질의하는 상황에 적합하다고 판단됩니다. 이 기능은 권한 오류 등이 발생할 때, llm이 function calling으로 get config -> set config를 수행하는 것을 의도하므로 암묵적으로 포함되어야 합니다. 현재로는 사용자가 mcp tool 호출시 오류를 겪을 때 오류 내용 기반으로 질문하기 위한 openstack sdk 호출 "로그 파일" 정도가 resource에 적합하다고 생각이 듭니다.

@choieastsea choieastsea requested a review from halucinor October 21, 2025 01:12
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.

이와 관련된 내용을 README.md에 업데이트해도 좋을 것 같아요!

개인적으로 많이 배워갑니다. 😊

)

@staticmethod
def _mask_credential(
Copy link
Collaborator

Choose a reason for hiding this comment

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

비밀번호를 없애는 것이 아닌 마스킹하신 이유가 궁금합니다.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

clouds.yaml에는 비밀번호 없이도 입력이 가능한데, 그것과 구분하기 위해 마스킹하도록 하였습니다.

config.cloud_config, ["password"]
)

@staticmethod
Copy link
Collaborator

Choose a reason for hiding this comment

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

staticmethod와 classmethod를 사용하신 이유가 궁금합니다.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

mask하는 경우 인스턴스 변수를 사용하지 않아 staticmethod로도 충분하다고 생각했습니다.

_cloud_name은 클래스 변수로 인스턴스 전역에서 공유하도록 의도하여 getter, setter도 classmethod로 정의하였습니다.

나머지 함수들은 register_tools에서 tool로 등록하기 위해 self 사용하는 인스턴스 메서드로 정의했습니다.

Copy link
Collaborator

@halucinor halucinor left a comment

Choose a reason for hiding this comment

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

해당 기능을 의도한대로 사용하기 위해서는 clouds.yaml 에 다음과 같이 여러 계정정보가 존재해야하는 상황인거죠?

clouds:
  openstack:
    auth:
        ...
    region_name: "RegionOne"
    interface: "public"
    identity_api_version: 3
    
  openstack-demo:
    auth:
        ...
    region_name: "RegionOne"
    interface: "public"
    identity_api_version: 3

@choieastsea
Copy link
Collaborator Author

해당 기능을 의도한대로 사용하기 위해서는 clouds.yaml 에 다음과 같이 여러 계정정보가 존재해야하는 상황인거죠?

clouds:
  openstack:
    auth:
        ...
    region_name: "RegionOne"
    interface: "public"
    identity_api_version: 3
    
  openstack-demo:
    auth:
        ...
    region_name: "RegionOne"
    interface: "public"
    identity_api_version: 3

@halucinor 넵 마자요. 동적으로 인증 정보가 추가되는 것도 생각했는데, sdk 수준에서 사용자가 어떤 clouds.yaml을 사용했는지 알 수 있는 방법이 없어 보였습니다

Copy link
Collaborator

@halucinor halucinor 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

@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

@choieastsea choieastsea merged commit bcd6084 into develop Oct 23, 2025
6 checks passed
halucinor pushed a commit that referenced this pull request Oct 23, 2025
* feat: connection manager related tool

* fix: logging은 base.py에서 수행하도록 수정
halucinor pushed a commit that referenced this pull request Oct 24, 2025
* feat: connection manager related tool

* fix: logging은 base.py에서 수행하도록 수정
@halucinor halucinor deleted the feat/multi-connection 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants