-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
The Network object has no attribute admin_state_up.
To Reproduce
- Prompt to LLM. "get networks please"
Expected behavior
The Network object we made has is_admin_state_up.
class Network(BaseModel):
id: str
name: str
status: str
description: str | None = None
is_admin_state_up: bool = True # this!
is_shared: bool = False
mtu: int | None = None
provider_network_type: str | None = None
provider_physical_network: str | None = None
provider_segmentation_id: int | None = None
project_id: str | None = NoneWe should change openstack_network's attribute admin_state_up to is_admin_state_up in _convert_to_network_model function.
def _convert_to_network_model(self, openstack_network) -> Network:
"""
Convert an OpenStack network object to a Network pydantic model.
Args:
openstack_network: OpenStack network object
Returns:
Network pydantic model
"""
return Network(
id=openstack_network.id,
name=openstack_network.name or "",
status=openstack_network.status or "",
description=openstack_network.description or None,
is_admin_state_up=openstack_network.admin_state_up or False, # change this!
is_shared=openstack_network.shared or False,
mtu=openstack_network.mtu or None,
provider_network_type=openstack_network.provider_network_type
or None,
provider_physical_network=openstack_network.provider_physical_network
or None,
provider_segmentation_id=openstack_network.provider_segmentation_id
or None,
project_id=openstack_network.project_id or None,
)
Desktop (please complete the following information):
- OS: Mac OS
- Application: Claude Desktop
Log file / Error Message:
Internal error: Error calling tool 'get_networks': 'Network' object has no attribute 'admin_state_up'
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
