Documentation ¶
Overview ¶
Package test is using for HuaWei Ascend pin scheduling test.
Package test is using for HuaWei Ascend pin scheduling test.
Package test is using for HuaWei Ascend pin scheduling test.
Package test is using for HuaWei Ascend pin scheduling test.
Package test is using for HuaWei Ascend pin fault rescheduling.
Package test is using for HuaWei Ascend pin scheduling test.
Index ¶
- Constants
- func AddConfigIntoFakeSSN(ssn *framework.Session, configs []conf.Configuration)
- func AddFakeTaskResReq(vTask *api.TaskInfo, name string, value float64)
- func AddJobIntoFakeSSN(ssn *framework.Session, info ...*api.JobInfo)
- func AddResource(resourceList v1.ResourceList, name v1.ResourceName, need string)
- func AddTestJobLabel(job *api.JobInfo, labelKey, labelValue string)
- func AddTestJobPodGroup(job *api.JobInfo)
- func AddTestTaskLabel(task *api.TaskInfo, labelKey, labelValue string)
- func BuildNPUNode(node NPUNode) *v1.Node
- func BuildNPUPod(pod NPUPod) *v1.Pod
- func BuildPodWithReqResource(resourceName v1.ResourceName, resourceNum string) *v1.Pod
- func BuildTestTaskWithAnnotation(npuName, npuNum, npuAllocate string) *api.TaskInfo
- func FakeNormalSSN() *framework.Session
- func FakeNormalTestJob(jobName string, taskNum int) *api.JobInfo
- func FakeNormalTestJobByCreatTime(jobName string, taskNum int, creatTime int64) *api.JobInfo
- func FakeNormalTestNode(name string) *api.NodeInfo
- func FakeNormalTestNodes(num int) []*api.NodeInfo
- func FakeNormalTestTask(name string, nodename string, groupname string) *api.TaskInfo
- func FakeNormalTestTasks(num int) []*api.TaskInfo
- func FakeSSNReSchedule() *framework.Session
- func FakeTaskWithResReq(name, resName string, resNum int) *api.TaskInfo
- func FakeVNPUTestTask(name string, nodename string, groupname string, num int) *api.TaskInfo
- func PatchReset(patch *gomonkey.Patches)
- func SetFakeJobRequestSource(fJob *api.JobInfo, name string, value int)
- func SetFakeJobResRequest(fJob *api.JobInfo, name v1.ResourceName, need string)
- func SetFakeNPUJobErrors(fJob *api.JobInfo, msg string)
- func SetFakeNPUJobStatusPending(fJob *api.JobInfo)
- func SetFakeNPUPodStatus(fPod *v1.Pod, status v1.PodPhase)
- func SetFakeNPUTaskStatus(fTask *api.TaskInfo, status api.TaskStatus)
- func SetFakeNodeSource(nodeInf *api.NodeInfo, name string, value int)
- func SetTestJobPodGroupPendingStatus(job *api.JobInfo)
- func SetTestNPUPodAnnotation(pod *v1.Pod, annotationKey string, annotationValue string)
- type NPUNode
- type NPUPod
Constants ¶
const ( // NPUIndex4 for re-scheduler tests NPUIndex4 = 4 // NPUIndex5 for re-scheduler tests NPUIndex5 = 5 // NPUIndex8 for re-scheduler tests NPUIndex8 = 8 // NPUHexKilo for const 1000,volcano frame used. NPUHexKilo = 1000 // NPU910CardName 910 card name NPU910CardName = "huawei.com/Ascend910" // AscendNPUPodRealUse for NPU pod real use cards. AscendNPUPodRealUse = "huawei.com/AscendReal" // FakeUpdateTime fake update time for test FakeUpdateTime = int64(11110) // FakeJobName fake job namespace/name FakeJobName = "vcjob/job" // FakeTaskName0 fake task name FakeTaskName0 = "vcjob-pod0" // FakeTaskName1 fake task name FakeTaskName1 = "vcjob-pod1" )
Variables ¶
This section is empty.
Functions ¶
func AddConfigIntoFakeSSN ¶
func AddConfigIntoFakeSSN(ssn *framework.Session, configs []conf.Configuration)
AddConfigIntoFakeSSN Add test node into fake SSN.
func AddFakeTaskResReq ¶
AddFakeTaskResReq add require resource of fake task.
func AddJobIntoFakeSSN ¶
AddJobIntoFakeSSN Add test job into fake SSN.
func AddResource ¶
func AddResource(resourceList v1.ResourceList, name v1.ResourceName, need string)
AddResource add resource into resourceList
func AddTestJobLabel ¶
AddTestJobLabel add test job's label.
func AddTestJobPodGroup ¶
AddTestJobPodGroup set test job pg.
func AddTestTaskLabel ¶
AddTestTaskLabel add test job's label.
func BuildPodWithReqResource ¶
func BuildPodWithReqResource(resourceName v1.ResourceName, resourceNum string) *v1.Pod
BuildPodWithReqResource build pod with request resource
func BuildTestTaskWithAnnotation ¶
BuildTestTaskWithAnnotation build test task with annotation
func FakeNormalTestJob ¶
FakeNormalTestJob make normal test job.
func FakeNormalTestJobByCreatTime ¶
FakeNormalTestJobByCreatTime make normal test job by create time.
func FakeNormalTestNode ¶
FakeNormalTestNode fake normal test node.
func FakeNormalTestNodes ¶
FakeNormalTestNodes fake normal test nodes.
func FakeNormalTestTask ¶
FakeNormalTestTask fake normal test task.
func FakeNormalTestTasks ¶
FakeNormalTestTasks fake normal test tasks.
func FakeSSNReSchedule ¶
FakeSSNReSchedule fake normal test ssn 2jobs.
func FakeTaskWithResReq ¶
FakeTaskWithResReq fake task with resource require
func FakeVNPUTestTask ¶
FakeVNPUTestTask fake vnpu test task.
func SetFakeJobRequestSource ¶
SetFakeJobRequestSource add job require on total,task.
func SetFakeJobResRequest ¶
func SetFakeJobResRequest(fJob *api.JobInfo, name v1.ResourceName, need string)
SetFakeJobResRequest set fake
func SetFakeNPUJobErrors ¶
SetFakeNPUJobErrors set job and it's tasks to pending status.
func SetFakeNPUJobStatusPending ¶
SetFakeNPUJobStatusPending set job and it's tasks to pending status.
func SetFakeNPUPodStatus ¶
SetFakeNPUPodStatus set fake pod status.
func SetFakeNPUTaskStatus ¶
func SetFakeNPUTaskStatus(fTask *api.TaskInfo, status api.TaskStatus)
SetFakeNPUTaskStatus task set same status.
func SetFakeNodeSource ¶
SetFakeNodeSource Set fake node the idle, Capability, Allocatable source.
func SetTestJobPodGroupPendingStatus ¶
SetTestJobPodGroupPendingStatus set test job's PodGroupStatus