Refactor volume.Builder.IsReadOnly() to volume.Builder.GetAttributes()

This commit is contained in:
Paul Morie
2015-10-30 16:25:36 -04:00
committed by Paul Morie
parent 961a02a602
commit 911757486d
34 changed files with 235 additions and 269 deletions

View File

@@ -113,10 +113,14 @@ type flockerBuilder struct {
readOnly bool
}
func (_ *flockerBuilder) SupportsOwnershipManagement() bool {
return false
func (b flockerBuilder) GetAttributes() volume.Attributes {
return volume.Attributes{
ReadOnly: b.readOnly,
Managed: false,
SupportsOwnershipManagement: false,
SupportsSELinux: false,
}
}
func (b flockerBuilder) GetPath() string {
return b.flocker.path
}
@@ -201,14 +205,6 @@ func (b flockerBuilder) SetUpAt(dir string) error {
return nil
}
func (b flockerBuilder) IsReadOnly() bool {
return b.readOnly
}
func (b flockerBuilder) SupportsSELinux() bool {
return false
}
// updateDatasetPrimary will update the primary in Flocker and wait for it to
// be ready. If it never gets to ready state it will timeout and error.
func (b flockerBuilder) updateDatasetPrimary(datasetID, primaryUUID string) error {