forked from openshift/origin
/
convert.go
30 lines (26 loc) · 1.2 KB
/
convert.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
package quota
import quotav1 "github.com/openshift/api/quota/v1"
// ConvertClusterResourceQuotaToAppliedClusterQuota returns back a converted AppliedClusterResourceQuota which is NOT a deep copy.
func ConvertAppliedClusterResourceQuotaToClusterResourceQuota(in *AppliedClusterResourceQuota) *ClusterResourceQuota {
return &ClusterResourceQuota{
ObjectMeta: in.ObjectMeta,
Spec: in.Spec,
Status: in.Status,
}
}
// ConvertClusterResourceQuotaToAppliedClusterQuota returns back a converted AppliedClusterResourceQuota which is NOT a deep copy.
func ConvertV1ClusterResourceQuotaToV1AppliedClusterResourceQuota(in *quotav1.ClusterResourceQuota) *quotav1.AppliedClusterResourceQuota {
return "av1.AppliedClusterResourceQuota{
ObjectMeta: in.ObjectMeta,
Spec: in.Spec,
Status: in.Status,
}
}
// ConvertV1AppliedClusterResourceQuotaToV1ClusterResourceQuota returns back a converted AppliedClusterResourceQuota which is NOT a deep copy.
func ConvertV1AppliedClusterResourceQuotaToV1ClusterResourceQuota(in *quotav1.AppliedClusterResourceQuota) *quotav1.ClusterResourceQuota {
return "av1.ClusterResourceQuota{
ObjectMeta: in.ObjectMeta,
Spec: in.Spec,
Status: in.Status,
}
}