Skip to content

Commit

Permalink
Add Platform to attributes on create
Browse files Browse the repository at this point in the history
Simple add of a "platform" attribute on volume
create.  This can be used to easily filter out
volumes that were created by Docker and the Docker
volume plugin.

Attribute is of the form:
    platform: Docker-SFVP (for the SolidFireDockerDriver)

    platofrm: Docker-NDVP (for the NDPV plugin)
  • Loading branch information
j-griffith committed Jun 28, 2016
1 parent 5bbf658 commit 7315dd5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions daemon/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ func (d SolidFireDriver) Create(r volume.Request) volume.Response {
var req sfapi.CreateVolumeRequest
var qos sfapi.QoS
var vsz int64
var meta = map[string]string{"platform": "Docker-SFVP"}

log.Debugf("GetVolumeByName: %s, %d", r.Name, d.TenantID)
log.Debugf("Options passed in to create: %+v", r.Options)
Expand Down Expand Up @@ -216,6 +217,7 @@ func (d SolidFireDriver) Create(r volume.Request) volume.Response {
req.TotalSize = vsz
req.AccountID = d.TenantID
req.Name = r.Name
req.Attributes = meta
_, err = d.Client.CreateVolume(&req)
if err != nil {
return volume.Response{Err: err.Error()}
Expand Down

0 comments on commit 7315dd5

Please sign in to comment.