Skip to content

Commit

Permalink
bugfix: change volume metadata struct
Browse files Browse the repository at this point in the history
change volume metadata struct for remote storage manager.

Signed-off-by: Rudy Zhang <rudyflyzhang@gmail.com>
  • Loading branch information
rudyfly committed May 4, 2018
1 parent 5ce1e4d commit ce5d653
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 8 additions & 7 deletions storage/volume/types/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ import (

// StorageSpec represents storage spec.
type StorageSpec struct {
Type string `json:"type"` // storage type
ID string `json:"id,omitempty"` // storage uid or unique name
Name string `json:"name,omitempty"` // storage cluster name
Key string `json:"key,omitempty"` // storage access key
API string `json:"api"` // gateway address
Address string `json:"address"` // for ceph it's monitor ip:port,ip:port, pangu2's river master
PoolSpec map[string]PoolSpec `json:"poolspec"` // storage pool spec
Type string `json:"type"` // storage type
ID string `json:"id,omitempty"` // storage uid or unique name
API string `json:"api"` // gateway address
Address string `json:"address"` // storage address, such as ceph it's monitor ip:port,ip:port
PoolSpec map[string]PoolSpec `json:"poolspec"` // storage pool spec

ClusterName string `json:"clustername,omitempty"` // storage cluster name
Keyring string `json:"keyring,omitempty"` // storage access key, such as ceph's keyring user:secret
}

// PoolSpec represents storage pool spec.
Expand Down
2 changes: 2 additions & 0 deletions storage/volume/types/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,12 @@ type VolumeConfig struct {

// VolumeSpec represents volume spec.
type VolumeSpec struct {
ClusterAPI string `json:"clusterapi"`
ClusterID string `json:"clusterid"`
Selector Selector `json:"selector"`
Operable bool `json:"operable"`
Backend string `json:"backend,omitempty"`
MountMode string `json:"mountMode,omitempty"`
*VolumeConfig `json:"config,inline"`
Extra map[string]string `json:"extra"`
}
Expand Down

0 comments on commit ce5d653

Please sign in to comment.