Refactor volume interfaces to receive pod instead of ObjectReference

This commit is contained in:
Paul Morie
2015-05-10 20:12:57 -04:00
parent 738f403eea
commit cd359ffa73
21 changed files with 93 additions and 88 deletions

View File

@@ -72,9 +72,9 @@ func (plugin *ISCSIPlugin) GetAccessModes() []api.AccessModeType {
}
}
func (plugin *ISCSIPlugin) NewBuilder(spec *volume.Spec, podRef *api.ObjectReference, _ volume.VolumeOptions, mounter mount.Interface) (volume.Builder, error) {
func (plugin *ISCSIPlugin) NewBuilder(spec *volume.Spec, pod *api.Pod, _ volume.VolumeOptions, mounter mount.Interface) (volume.Builder, error) {
// Inject real implementations here, test through the internal function.
return plugin.newBuilderInternal(spec, podRef.UID, &ISCSIUtil{}, mounter)
return plugin.newBuilderInternal(spec, pod.UID, &ISCSIUtil{}, mounter)
}
func (plugin *ISCSIPlugin) newBuilderInternal(spec *volume.Spec, podUID types.UID, manager diskManager, mounter mount.Interface) (volume.Builder, error) {