Rename UniqueDeviceName to UniqueVolumeName

Rename UniqueDeviceName to UniqueVolumeName and move helper functions
from attacherdetacher to volumehelper package.
Introduce UniquePodName alias
This commit is contained in:
saadali
2016-05-30 15:48:21 -07:00
parent 130341b5f1
commit 9b6a505f8a
48 changed files with 763 additions and 240 deletions

View File

@@ -166,12 +166,16 @@ func (plugin *FakeVolumePlugin) Init(host VolumeHost) error {
return nil
}
func (plugin *FakeVolumePlugin) Name() string {
func (plugin *FakeVolumePlugin) GetPluginName() string {
plugin.RLock()
defer plugin.RUnlock()
return plugin.PluginName
}
func (plugin *FakeVolumePlugin) GetVolumeName(spec *Spec) (string, error) {
return spec.Name(), nil
}
func (plugin *FakeVolumePlugin) CanSupport(spec *Spec) bool {
// TODO: maybe pattern-match on spec.Name() to decide?
return true
@@ -237,10 +241,6 @@ func (plugin *FakeVolumePlugin) GetNewDetacherCallCount() int {
return plugin.NewDetacherCallCount
}
func (plugin *FakeVolumePlugin) GetDeviceName(spec *Spec) (string, error) {
return spec.Name(), nil
}
func (plugin *FakeVolumePlugin) NewRecycler(pvName string, spec *Spec) (Recycler, error) {
return &fakeRecycler{"/attributesTransferredFromSpec", MetricsNil{}}, nil
}