forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fields.go
32 lines (27 loc) · 940 Bytes
/
fields.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package api
import "k8s.io/kubernetes/pkg/fields"
// ClusterNetworkToSelectableFields returns a label set that represents the object
func ClusterNetworkToSelectableFields(network *ClusterNetwork) fields.Set {
return fields.Set{
"metadata.name": network.Name,
}
}
// HostSubnetToSelectableFields returns a label set that represents the object
func HostSubnetToSelectableFields(obj *HostSubnet) fields.Set {
return fields.Set{
"metadata.name": obj.Name,
}
}
// NetNamespaceToSelectableFields returns a label set that represents the object
func NetNamespaceToSelectableFields(obj *NetNamespace) fields.Set {
return fields.Set{
"metadata.name": obj.Name,
}
}
// EgressNetworkPolicyToSelectableFields returns a label set that represents the object
func EgressNetworkPolicyToSelectableFields(obj *EgressNetworkPolicy) fields.Set {
return fields.Set{
"metadata.name": obj.Name,
"metadata.namespace": obj.Namespace,
}
}