def __init__(self, request, *args, **kwargs):
        super(CreateNetwork, self).__init__(request, *args, **kwargs)
        tenant_choices = [('', _("Select a project"))]
        tenants, has_more = api.keystone.tenant_list(request)
        for tenant in tenants:
            if tenant.enabled:
                tenant_choices.append((tenant.id, tenant.name))
        self.fields['tenant_id'].choices = tenant_choices

        if api.neutron.is_port_profiles_supported():
            self.fields['net_profile_id'].choices = (
                self.get_network_profile_choices(request))

        if api.neutron.is_extension_supported(request, 'provider'):
            neutron_settings = getattr(settings,
                                       'OPENSTACK_NEUTRON_NETWORK', {})
            seg_id_range = neutron_settings.get('segmentation_id_range', {})
            self.seg_id_range = {
                'vlan': seg_id_range.get('vlan',
                                         SEGMENTATION_ID_RANGE.get('vlan')),
                'gre': seg_id_range.get('gre',
                                        SEGMENTATION_ID_RANGE.get('gre')),
                'vxlan': seg_id_range.get('vxlan',
                                          SEGMENTATION_ID_RANGE.get('vxlan'))
            }
            seg_id_help = (
                _("For VLAN networks, the VLAN VID on the physical "
                  "network that realizes the virtual network. Valid VLAN VIDs "
                  "are %(vlan_min)s through %(vlan_max)s. For GRE or VXLAN "
                  "networks, the tunnel ID. Valid tunnel IDs for GRE networks "
                  "are %(gre_min)s through %(gre_max)s. For VXLAN networks, "
                  "%(vxlan_min)s through %(vxlan_max)s.")
                % {'vlan_min': self.seg_id_range['vlan'][0],
                   'vlan_max': self.seg_id_range['vlan'][1],
                   'gre_min': self.seg_id_range['gre'][0],
                   'gre_max': self.seg_id_range['gre'][1],
                   'vxlan_min': self.seg_id_range['vxlan'][0],
                   'vxlan_max': self.seg_id_range['vxlan'][1]})
            self.fields['segmentation_id'].help_text = seg_id_help

            supported_provider_types = neutron_settings.get(
                'supported_provider_types', ['*'])
            if supported_provider_types == ['*']:
                network_type_choices = PROVIDER_TYPES
            else:
                network_type_choices = [
                    net_type for net_type in PROVIDER_TYPES
                    if supported_provider_types in net_type[0]]
            if len(network_type_choices) == 0:
                self._hide_provider_network_type()
            else:
                self.fields['network_type'].choices = network_type_choices
        else:
            self._hide_provider_network_type()
dataset/ETHPy150Open CiscoSystems/avos/openstack_dashboard/dashboards/admin/networks/forms.py/CreateNetwork.__init__/swapped operands of `in`