Skip to content

Commit 6c0a3d0

Browse files
committed
feat: make VCN id optional; QoL update (oracle#20)
Signed-off-by: Richard Gebhardt <[email protected]>
1 parent b46af87 commit 6c0a3d0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

oci_networking.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,13 @@ def create_subnet(vcn_id: str, compartment_id: str, cidr_block: str, display_nam
7070

7171

7272
@mcp.tool
73-
def list_subnets(compartment_id: str, vcn_id: str):
73+
def list_subnets(compartment_id: str, vcn_id: str = None):
7474
networking = get_networking_client()
75-
subnets = networking.list_subnets(compartment_id, vcn_id).data
75+
subnets = networking.list_subnets(compartment_id, vcn_id=vcn_id).data
7676
return [
7777
{
7878
"subnet_id": subnet.id,
79+
"vcn_id": subnet.vcn_id,
7980
"display_name": subnet.display_name,
8081
"lifecycle_state": subnet.lifecycle_state,
8182
}

0 commit comments

Comments
 (0)