// Convert_network_NetNamespaceList_To_v1_NetNamespaceList is an autogenerated conversion function.
358623
func Convert_network_NetNamespaceList_To_v1_NetNamespaceList(in *network.NetNamespaceList, out *v1.NetNamespaceList, s conversion.Scope) error {
	return autoConvert_network_NetNamespaceList_To_v1_NetNamespaceList(in, out, s)
}
177805
func ReleaseListNamespace(namespace string) ReleaseListOption {
	return func(opts *options) {
		opts.listReq.Namespace = namespace
	}
}
1057114
func Convert_v1_Namespace_To_core_Namespace(in *v1.Namespace, out *core.Namespace, s conversion.Scope) error {
	return autoConvert_v1_Namespace_To_core_Namespace(in, out, s)
}
1015931
func Convert_build_BuildList_To_v1_BuildList(in *build.BuildList, out *v1.BuildList, s conversion.Scope) error {
	return autoConvert_build_BuildList_To_v1_BuildList(in, out, s)
}
887824
func (c *ContivClient) NetworkList() (*[]*Network, error) {
	// build key and URL
	url := c.baseURL + "/api/v1/networks/"

	// http get the object
	var objList []*Network
	err := c.httpGet(url, &objList)
	if err != nil {
		log.Debugf("Error getting networks. Err: %v", err)
		return nil, err
	}

	return &objList, nil
}
322661
func Convert_core_EndpointsList_To_v1_EndpointsList(in *core.EndpointsList, out *v1.EndpointsList, s conversion.Scope) error {
	return autoConvert_core_EndpointsList_To_v1_EndpointsList(in, out, s)
}
1034575
func Convert_user_IdentityList_To_v1_IdentityList(in *user.IdentityList, out *v1.IdentityList, s conversion.Scope) error {
	return autoConvert_user_IdentityList_To_v1_IdentityList(in, out, s)
}
276653
func Convert_image_ImageList_To_v1_ImageList(in *image.ImageList, out *v1.ImageList, s conversion.Scope) error {
	return autoConvert_image_ImageList_To_v1_ImageList(in, out, s)
}
1251372
func Convert_v1_ServiceList_To_core_ServiceList(in *v1.ServiceList, out *core.ServiceList, s conversion.Scope) error {
	return autoConvert_v1_ServiceList_To_core_ServiceList(in, out, s)
}
781168
func Convert_networking_NetworkPolicyIngressRule_To_v1_NetworkPolicyIngressRule(in *networking.NetworkPolicyIngressRule, out *v1.NetworkPolicyIngressRule, s conversion.Scope) error {
	return autoConvert_networking_NetworkPolicyIngressRule_To_v1_NetworkPolicyIngressRule(in, out, s)
}
870598
func Convert_v1_HostSubnet_To_network_HostSubnet(in *v1.HostSubnet, out *network.HostSubnet, s conversion.Scope) error {
	return autoConvert_v1_HostSubnet_To_network_HostSubnet(in, out, s)
}
1126373
func Convert_v1_ClusterNetwork_To_network_ClusterNetwork(in *v1.ClusterNetwork, out *network.ClusterNetwork, s conversion.Scope) error {
	return autoConvert_v1_ClusterNetwork_To_network_ClusterNetwork(in, out, s)
}
816302
func Convert_core_ConfigMapList_To_v1_ConfigMapList(in *core.ConfigMapList, out *v1.ConfigMapList, s conversion.Scope) error {
	return autoConvert_core_ConfigMapList_To_v1_ConfigMapList(in, out, s)
}
322694
func Convert_v1_EndpointsList_To_core_EndpointsList(in *v1.EndpointsList, out *core.EndpointsList, s conversion.Scope) error {
	return autoConvert_v1_EndpointsList_To_core_EndpointsList(in, out, s)
}
1049085
func (c *CNIConfig) DelNetworkList(ctx context.Context, list *NetworkConfigList, rt *RuntimeConf) error {
	var cachedResult types.Result

	// Cached result on DEL was added in CNI spec version 0.4.0 and higher
	if gtet, err := version.GreaterThanOrEqualTo(list.CNIVersion, "0.4.0"); err != nil {
		return err
	} else if gtet {
		cachedResult, err = getCachedResult(list.Name, list.CNIVersion, rt)
		if err != nil {
			return fmt.Errorf("failed to get network %q cached result: %v", list.Name, err)
		}
	}

	for i := len(list.Plugins) - 1; i >= 0; i-- {
		net := list.Plugins[i]
		if err := c.delNetwork(ctx, list.Name, list.CNIVersion, net, cachedResult, rt); err != nil {
			return err
		}
	}
	_ = delCachedResult(list.Name, rt)

	return nil
}
125895
func Convert_authorization_ClusterRoleBindingList_To_v1_ClusterRoleBindingList(in *authorization.ClusterRoleBindingList, out *v1.ClusterRoleBindingList, s conversion.Scope) error {
	return autoConvert_authorization_ClusterRoleBindingList_To_v1_ClusterRoleBindingList(in, out, s)
}
127997
func (e *Engine) NetworkList(ctx context.Context, drivers []string) ([]*enginetypes.Network, error) {
	networks := []*enginetypes.Network{}
	filters := dockerfilters.NewArgs()
	for _, driver := range drivers {
		filters.Add("driver", driver)
	}

	ns, err := e.client.NetworkList(ctx, dockertypes.NetworkListOptions{Filters: filters})
	if err != nil {
		return networks, err
	}

	for _, n := range ns {
		subnets := []string{}
		for _, config := range n.IPAM.Config {
			subnets = append(subnets, config.Subnet)
		}
		networks = append(networks, &enginetypes.Network{Name: n.Name, Subnets: subnets})
	}
	return networks, nil
}