refactor: generated

This commit is contained in:
Clayton Coleman
2016-12-09 13:16:33 -05:00
parent 596d9de8fa
commit c52d510a24
83 changed files with 11705 additions and 27639 deletions

View File

@@ -369,7 +369,7 @@ type PodControlInterface interface {
// CreatePodsOnNode creates a new pod according to the spec on the specified node.
CreatePodsOnNode(nodeName, namespace string, template *v1.PodTemplateSpec, object runtime.Object) error
// CreatePodsWithControllerRef creates new pods according to the spec, and sets object as the pod's controller.
CreatePodsWithControllerRef(namespace string, template *v1.PodTemplateSpec, object runtime.Object, controllerRef *v1.OwnerReference) error
CreatePodsWithControllerRef(namespace string, template *v1.PodTemplateSpec, object runtime.Object, controllerRef *metav1.OwnerReference) error
// DeletePod deletes the pod identified by podID.
DeletePod(namespace string, podID string, object runtime.Object) error
// PatchPod patches the pod.
@@ -436,7 +436,7 @@ func (r RealPodControl) CreatePods(namespace string, template *v1.PodTemplateSpe
return r.createPods("", namespace, template, object, nil)
}
func (r RealPodControl) CreatePodsWithControllerRef(namespace string, template *v1.PodTemplateSpec, controllerObject runtime.Object, controllerRef *v1.OwnerReference) error {
func (r RealPodControl) CreatePodsWithControllerRef(namespace string, template *v1.PodTemplateSpec, controllerObject runtime.Object, controllerRef *metav1.OwnerReference) error {
if controllerRef == nil {
return fmt.Errorf("controllerRef is nil")
}
@@ -461,7 +461,7 @@ func (r RealPodControl) PatchPod(namespace, name string, data []byte) error {
return err
}
func GetPodFromTemplate(template *v1.PodTemplateSpec, parentObject runtime.Object, controllerRef *v1.OwnerReference) (*v1.Pod, error) {
func GetPodFromTemplate(template *v1.PodTemplateSpec, parentObject runtime.Object, controllerRef *metav1.OwnerReference) (*v1.Pod, error) {
desiredLabels := getPodsLabelSet(template)
desiredFinalizers := getPodsFinalizers(template)
desiredAnnotations, err := getPodsAnnotationSet(template, parentObject)
@@ -493,7 +493,7 @@ func GetPodFromTemplate(template *v1.PodTemplateSpec, parentObject runtime.Objec
return pod, nil
}
func (r RealPodControl) createPods(nodeName, namespace string, template *v1.PodTemplateSpec, object runtime.Object, controllerRef *v1.OwnerReference) error {
func (r RealPodControl) createPods(nodeName, namespace string, template *v1.PodTemplateSpec, object runtime.Object, controllerRef *metav1.OwnerReference) error {
pod, err := GetPodFromTemplate(template, object, controllerRef)
if err != nil {
return err
@@ -537,7 +537,7 @@ func (r RealPodControl) DeletePod(namespace string, podID string, object runtime
type FakePodControl struct {
sync.Mutex
Templates []v1.PodTemplateSpec
ControllerRefs []v1.OwnerReference
ControllerRefs []metav1.OwnerReference
DeletePodName []string
Patches [][]byte
Err error
@@ -565,7 +565,7 @@ func (f *FakePodControl) CreatePods(namespace string, spec *v1.PodTemplateSpec,
return nil
}
func (f *FakePodControl) CreatePodsWithControllerRef(namespace string, spec *v1.PodTemplateSpec, object runtime.Object, controllerRef *v1.OwnerReference) error {
func (f *FakePodControl) CreatePodsWithControllerRef(namespace string, spec *v1.PodTemplateSpec, object runtime.Object, controllerRef *metav1.OwnerReference) error {
f.Lock()
defer f.Unlock()
f.Templates = append(f.Templates, *spec)
@@ -601,7 +601,7 @@ func (f *FakePodControl) Clear() {
defer f.Unlock()
f.DeletePodName = []string{}
f.Templates = []v1.PodTemplateSpec{}
f.ControllerRefs = []v1.OwnerReference{}
f.ControllerRefs = []metav1.OwnerReference{}
f.Patches = [][]byte{}
}