k8s/io/kubernetes/pkg/api/validation.ValidatePersistentVolume 示例代码

2022-03-03

以下示例是关于golang中包含validation.ValidatePersistentVolume用法的示例代码,想了解validation.ValidatePersistentVolume的具体用法?validation.ValidatePersistentVolume怎么用?validation.ValidatePersistentVolume使用的例子?那么可以参考以下10个相关示例代码来学习它的具体使用方法。

示例1:
strategy.go开发语言: Go项目名称: abhgupta代码行数: 137
60	persistentvolume := obj.(*api.PersistentVolume)
61	errorList := validation.ValidatePersistentVolume(persistentvolume)
62	return append(errorList, volumevalidation.ValidatePersistentVolume(persistentvolume)...)
84	newPv := obj.(*api.PersistentVolume)
85	errorList := validation.ValidatePersistentVolume(newPv)
86	errorList = append(errorList, volumevalidation.ValidatePersistentVolume(newPv)...)
87	return append(errorList, validation.ValidatePersistentVolumeUpdate(newPv, old.(*api.PersistentVolume))...)
88}
107func (persistentvolumeStatusStrategy) ValidateUpdate(ctx genericapirequest.Context, obj, old runtime.Object) field.ErrorList {
108	return validation.ValidatePersistentVolumeStatusUpdate(obj.(*api.PersistentVolume), old.(*api.PersistentVolume))
109}
示例2:
strategy.go开发语言: Go项目名称: ddysher代码行数: 130
56	persistentvolume := obj.(*api.PersistentVolume)
57	errorList := validation.ValidatePersistentVolume(persistentvolume)
58	return append(errorList, volumevalidation.ValidatePersistentVolume(persistentvolume)...)
77	newPv := obj.(*api.PersistentVolume)
78	errorList := validation.ValidatePersistentVolume(newPv)
79	errorList = append(errorList, volumevalidation.ValidatePersistentVolume(newPv)...)
80	return append(errorList, validation.ValidatePersistentVolumeUpdate(newPv, old.(*api.PersistentVolume))...)
81}
100func (persistentvolumeStatusStrategy) ValidateUpdate(ctx genericapirequest.Context, obj, old runtime.Object) field.ErrorList {
101	return validation.ValidatePersistentVolumeStatusUpdate(obj.(*api.PersistentVolume), old.(*api.PersistentVolume))
102}
示例3:
strategy.go开发语言: Go项目名称: detiber代码行数: 130
56	persistentvolume := obj.(*api.PersistentVolume)
57	errorList := validation.ValidatePersistentVolume(persistentvolume)
58	return append(errorList, volumevalidation.ValidatePersistentVolume(persistentvolume)...)
77	newPv := obj.(*api.PersistentVolume)
78	errorList := validation.ValidatePersistentVolume(newPv)
79	errorList = append(errorList, volumevalidation.ValidatePersistentVolume(newPv)...)
80	return append(errorList, validation.ValidatePersistentVolumeUpdate(newPv, old.(*api.PersistentVolume))...)
81}
100func (persistentvolumeStatusStrategy) ValidateUpdate(ctx genericapirequest.Context, obj, old runtime.Object) field.ErrorList {
101	return validation.ValidatePersistentVolumeStatusUpdate(obj.(*api.PersistentVolume), old.(*api.PersistentVolume))
102}
示例4:
strategy.go开发语言: Go项目名称: bparees代码行数: 136
60	persistentvolume := obj.(*api.PersistentVolume)
61	errorList := validation.ValidatePersistentVolume(persistentvolume)
62	return append(errorList, volumevalidation.ValidatePersistentVolume(persistentvolume)...)
83	newPv := obj.(*api.PersistentVolume)
84	errorList := validation.ValidatePersistentVolume(newPv)
85	errorList = append(errorList, volumevalidation.ValidatePersistentVolume(newPv)...)
86	return append(errorList, validation.ValidatePersistentVolumeUpdate(newPv, old.(*api.PersistentVolume))...)
87}
106func (persistentvolumeStatusStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList {
107	return validation.ValidatePersistentVolumeStatusUpdate(obj.(*api.PersistentVolume), old.(*api.PersistentVolume))
108}
示例5:
strategy.go开发语言: Go项目名称: byxorna代码行数: 136
60	persistentvolume := obj.(*api.PersistentVolume)
61	errorList := validation.ValidatePersistentVolume(persistentvolume)
62	return append(errorList, volumevalidation.ValidatePersistentVolume(persistentvolume)...)
83	newPv := obj.(*api.PersistentVolume)
84	errorList := validation.ValidatePersistentVolume(newPv)
85	errorList = append(errorList, volumevalidation.ValidatePersistentVolume(newPv)...)
86	return append(errorList, validation.ValidatePersistentVolumeUpdate(newPv, old.(*api.PersistentVolume))...)
87}
106func (persistentvolumeStatusStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList {
107	return validation.ValidatePersistentVolumeStatusUpdate(obj.(*api.PersistentVolume), old.(*api.PersistentVolume))
108}
示例6:
strategy.go开发语言: Go项目名称: csrwng代码行数: 136
60	persistentvolume := obj.(*api.PersistentVolume)
61	errorList := validation.ValidatePersistentVolume(persistentvolume)
62	return append(errorList, volumevalidation.ValidatePersistentVolume(persistentvolume)...)
83	newPv := obj.(*api.PersistentVolume)
84	errorList := validation.ValidatePersistentVolume(newPv)
85	errorList = append(errorList, volumevalidation.ValidatePersistentVolume(newPv)...)
86	return append(errorList, validation.ValidatePersistentVolumeUpdate(newPv, old.(*api.PersistentVolume))...)
87}
106func (persistentvolumeStatusStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList {
107	return validation.ValidatePersistentVolumeStatusUpdate(obj.(*api.PersistentVolume), old.(*api.PersistentVolume))
108}
示例7:
strategy.go开发语言: Go项目名称: amygdala代码行数: 117
52	persistentvolume := obj.(*api.PersistentVolume)
53	return validation.ValidatePersistentVolume(persistentvolume)
54}
71func (persistentvolumeStrategy) ValidateUpdate(ctx api.Context, obj, old runtime.Object) field.ErrorList {
72	errorList := validation.ValidatePersistentVolume(obj.(*api.PersistentVolume))
73	return append(errorList, validation.ValidatePersistentVolumeUpdate(obj.(*api.PersistentVolume), old.(*api.PersistentVolume))...)
93func (persistentvolumeStatusStrategy) ValidateUpdate(ctx api.Context, obj, old runtime.Object) field.ErrorList {
94	return validation.ValidatePersistentVolumeStatusUpdate(obj.(*api.PersistentVolume), old.(*api.PersistentVolume))
95}
示例8:
strategy.go开发语言: Go项目名称: cjcullen代码行数: 121
53	persistentvolume := obj.(*api.PersistentVolume)
54	return validation.ValidatePersistentVolume(persistentvolume)
55}
72func (persistentvolumeStrategy) ValidateUpdate(ctx api.Context, obj, old runtime.Object) field.ErrorList {
73	errorList := validation.ValidatePersistentVolume(obj.(*api.PersistentVolume))
74	return append(errorList, validation.ValidatePersistentVolumeUpdate(obj.(*api.PersistentVolume), old.(*api.PersistentVolume))...)
94func (persistentvolumeStatusStrategy) ValidateUpdate(ctx api.Context, obj, old runtime.Object) field.ErrorList {
95	return validation.ValidatePersistentVolumeStatusUpdate(obj.(*api.PersistentVolume), old.(*api.PersistentVolume))
96}
示例9:
strategy.go开发语言: Go项目名称: cloud-zuiwanyuan代码行数: 120
52	persistentvolume := obj.(*api.PersistentVolume)
53	return validation.ValidatePersistentVolume(persistentvolume)
54}
71func (persistentvolumeStrategy) ValidateUpdate(ctx api.Context, obj, old runtime.Object) field.ErrorList {
72	errorList := validation.ValidatePersistentVolume(obj.(*api.PersistentVolume))
73	return append(errorList, validation.ValidatePersistentVolumeUpdate(obj.(*api.PersistentVolume), old.(*api.PersistentVolume))...)
93func (persistentvolumeStatusStrategy) ValidateUpdate(ctx api.Context, obj, old runtime.Object) field.ErrorList {
94	return validation.ValidatePersistentVolumeStatusUpdate(obj.(*api.PersistentVolume), old.(*api.PersistentVolume))
95}
示例10:
examples_test.go开发语言: Go项目名称: abhgupta代码行数: 464
78	case *api.PersistentVolume:
79		errors = validation.ValidatePersistentVolume(t)
80	case *api.PersistentVolumeClaim:
83		}
84		errors = validation.ValidatePersistentVolumeClaim(t)
85	case *api.PodTemplate:

本文地址:https://www.itbaoku.cn/snippets/415896.html