

def __init__(self, request, *args, **kwargs):
    super(CreateNATPoolForm, self).__init__(request, *args, **kwargs)
    ec_list = client.externalconnectivity_list(request, tenant_id=request.user.tenant_id)
    external_segments_options = [(ec.id, ec.name) for ec in ec_list]
    self.fields['external_segment_id'].choices = external_segments_options

dataset/ETHPy150Open openstack/group-based-policy-ui/gbpui/panels/network_policy/forms.py CreateNATPoolForm.__init__/original