Skip to content

Commit

Permalink
[YUNIKORN-1861] add omitempty
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Yang <[email protected]>
  • Loading branch information
FrankYang0529 committed Aug 2, 2023
1 parent eff406b commit ae194da
Showing 1 changed file with 44 additions and 44 deletions.
88 changes: 44 additions & 44 deletions pkg/cache/external/scheduler_cache_dao.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,65 +27,65 @@ import (

type SchedulerCacheDao struct {
Statistics SchedulerCacheStatisticsDao `json:"statistics"`
Nodes map[string]NodeDao `json:"nodes"`
Pods map[string]PodDao `json:"pods"`
PriorityClasses map[string]PriorityClassDao `json:"priorityClasses"`
SchedulingPods map[string]PodSchedulingInfoDao `json:"schedulingState"`
Nodes map[string]NodeDao `json:"nodes,omitempty"`
Pods map[string]PodDao `json:"pods,omitempty"`
PriorityClasses map[string]PriorityClassDao `json:"priorityClasses,omitempty"`
SchedulingPods map[string]PodSchedulingInfoDao `json:"schedulingState,omitempty"`
}

type SchedulerCacheStatisticsDao struct {
Nodes int `json:"nodes"`
Pods int `json:"pods"`
PriorityClasses int `json:"priorityClasses"`
Assumed int `json:"assumed"`
PendingAllocations int `json:"pendingAllocations"`
InProgressAllocations int `json:"inProgressAllocations"`
PodsAssigned int `json:"podsAssigned"`
Phases map[string]int `json:"phases"`
Nodes int `json:"nodes,omitempty"`
Pods int `json:"pods,omitempty"`
PriorityClasses int `json:"priorityClasses,omitempty"`
Assumed int `json:"assumed,omitempty"`
PendingAllocations int `json:"pendingAllocations,omitempty"`
InProgressAllocations int `json:"inProgressAllocations,omitempty"`
PodsAssigned int `json:"podsAssigned,omitempty"`
Phases map[string]int `json:"phases,omitempty"`
}

type NodeDao struct {
Name string `json:"name"`
UID types.UID `json:"uid"`
UID types.UID `json:"uid,omitempty"`
NodeInfo v1.NodeSystemInfo `json:"nodeInfo"`
CreationTimestamp time.Time `json:"creationTimestamp"`
Annotations map[string]string `json:"annotations"`
Labels map[string]string `json:"labels"`
PodCIDRs []string `json:"podCIDRs"`
Taints []v1.Taint `json:"taints"`
Addresses []v1.NodeAddress `json:"addresses"`
Allocatable v1.ResourceList `json:"allocatable"`
Capacity v1.ResourceList `json:"capacity"`
Conditions []v1.NodeCondition `json:"conditions"`
Annotations map[string]string `json:"annotations,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
PodCIDRs []string `json:"podCIDRs,omitempty"`
Taints []v1.Taint `json:"taints,omitempty"`
Addresses []v1.NodeAddress `json:"addresses,omitempty"`
Allocatable v1.ResourceList `json:"allocatable,omitempty"`
Capacity v1.ResourceList `json:"capacity,omitempty"`
Conditions []v1.NodeCondition `json:"conditions,omitempty"`
}

type PodDao struct {
Namespace string `json:"namespace"`
Name string `json:"name"`
GenerateName string `json:"generateName"`
UID types.UID `json:"uid"`
GenerateName string `json:"generateName,omitempty"`
UID types.UID `json:"uid,omitempty"`
CreationTimestamp time.Time `json:"creationTimestamp"`
Annotations map[string]string `json:"annotations"`
Labels map[string]string `json:"labels"`
NodeName string `json:"nodeName"`
Affinity *v1.Affinity `json:"affinity"`
NodeSelector map[string]string `json:"nodeSelector"`
PriorityClassName string `json:"priorityClassName"`
Priority *int32 `json:"priority"`
PreemptionPolicy *v1.PreemptionPolicy `json:"preemptionPolicy"`
SchedulerName string `json:"schedulerName"`
Tolerations []v1.Toleration `json:"tolerations"`
Containers []ContainerDao `json:"containers"`
Annotations map[string]string `json:"annotations,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
NodeName string `json:"nodeName,omitempty"`
Affinity *v1.Affinity `json:"affinity,omitempty"`
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
PriorityClassName string `json:"priorityClassName,omitempty"`
Priority *int32 `json:"priority,omitempty"`
PreemptionPolicy *v1.PreemptionPolicy `json:"preemptionPolicy,omitempty"`
SchedulerName string `json:"schedulerName,omitempty"`
Tolerations []v1.Toleration `json:"tolerations,omitempty"`
Containers []ContainerDao `json:"containers,omitempty"`
Status v1.PodStatus `json:"status"`
}

type PriorityClassDao struct {
Name string `json:"name"`
Annotations map[string]string `json:"annotations"`
Labels map[string]string `json:"labels"`
Annotations map[string]string `json:"annotations,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Value int32 `json:"value"`
GlobalDefault bool `json:"globalDefault"`
PreemptionPolicy *v1.PreemptionPolicy `json:"preemptionPolicy"`
GlobalDefault bool `json:"globalDefault,omitempty"`
PreemptionPolicy *v1.PreemptionPolicy `json:"preemptionPolicy,omitempty"`
}

type ContainerDao struct {
Expand All @@ -96,10 +96,10 @@ type ContainerDao struct {
type PodSchedulingInfoDao struct {
Namespace string `json:"-"`
Name string `json:"-"`
UID types.UID `json:"uid"`
AssignedNode string `json:"assignedNode"`
Assumed bool `json:"assumed"`
AllVolumesBound bool `json:"allVolumesBound"`
PendingNode string `json:"pendingNode"`
InProgressNode string `json:"inProgressNode"`
UID types.UID `json:"uid,omitempty"`
AssignedNode string `json:"assignedNode,omitempty"`
Assumed bool `json:"assumed,omitempty"`
AllVolumesBound bool `json:"allVolumesBound,omitempty"`
PendingNode string `json:"pendingNode,omitempty"`
InProgressNode string `json:"inProgressNode,omitempty"`
}

0 comments on commit ae194da

Please sign in to comment.