Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions nova/api/ec2/vpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,7 @@ def describe_subnets(self, context, **kwargs):
except kc.ClientException as e:
raise exception.InvalidRequest(e)

subnet_ids = kwargs.get("subnet_id")
# fetch network list
vpc_id = self._get_vpcid_from_context(context)
neutron = neutronv2.get_client(context)
Expand All @@ -697,6 +698,9 @@ def describe_subnets(self, context, **kwargs):
if not network['name'].startswith('subnet-'):
continue

if subnet_ids and network['name'] not in subnet_ids:
continue

if (vpc_id != self._get_vpcid_from_tenantid(network['tenant_id'],
context)):
continue
Expand Down