Skip to content

Conversation

@platanus-kr
Copy link
Collaborator

Overview

  • Create NeutronTools baseline code.
  • Create NeutronTools test baseline code.
  • Added OpenStack network create, update, delete, retrieve tool

Key Changes

Features

  • Create NeutronTools class and register in tool package
  • Add a NetworkModel that inherits from BaseModel
  • Add tools
    • get_neutron_networks()
    • create_network()
    • get_network_detail()
    • update_network()
    • delete_network()

Testing

Get Network Operations

  • Get networks successfully with full network details
  • Handle empty network list
  • Filter networks by status (ACTIVE/DOWN)
  • Filter shared networks only
  • Handle connection exceptions during network retrieval

Create Network Operations

  • Create network successfully with full parameters
  • Create network with minimal required parameters
  • Handle exceptions during network creation

Get Network Detail Operations

  • Get network details successfully
  • Handle network not found scenarios
  • Handle connection exceptions during detail retrieval

Update Network Operations

  • Update network successfully with multiple parameters
  • Partial network updates (single parameter)
  • Validate error when no update parameters provided
  • Handle exceptions during network updates

Delete Network Operations

  • Delete network successfully
  • Handle network not found during deletion
  • Handle exceptions during network deletion process

Related Issues

Additional context

@platanus-kr platanus-kr changed the title feat: Add neutron function tools feat: Add neutron network function tools Aug 6, 2025
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.

확인해야하는 것

  • try except가 유의미하게 사용되고 있는지, 대부분의 경우 불필요해보입니다.
  • Exception 직접 raise할 필요가 있는지?
  • 코드로 이해가 가능한데 불필요한 주석을 작성했는지

with patch(
"openstack_mcp_server.tools.neutron_tools.openstack.connect",
return_value=mock_conn
) as mock_func:
Copy link
Collaborator

Choose a reason for hiding this comment

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

죄송합니다 제가 as mock_func를 써서 쓰셨겠군요

ruff rule에서 잡힙니다...

Suggested change
) as mock_func:
):

with patch(
"openstack_mcp_server.tools.base.get_openstack_conn",
return_value=mock_conn
) as mock_func:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
) as mock_func:
):

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

as 절이 전부 추가되어있는데 제가 제거해서 커밋 할까요?

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 👍

@platanus-kr platanus-kr added the feature Request for new feature or functionality enhancement label Aug 6, 2025
@platanus-kr platanus-kr merged commit 10a990f into openstack-kr:develop Aug 6, 2025
1 check passed
halucinor pushed a commit that referenced this pull request Aug 24, 2025
* feat(neutron): Add network feature

* feat(neutron): Add network feature test

* chore(neutron): code linting

* fix(neutron): remove comments

* test(neutron): Remove unnecessary tests

* fix(neutron): remove comments in test

* fix(neutron): openstack connection call fix in confest
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.

3 participants