cephfs: set cluster Name as metadata on the subvolume

This change helps read the cluster name from the cmdline args,
the provisioner will set the same on the subvolume.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
This commit is contained in:
Prasanna Kumar Kalever
2022-06-14 18:53:29 +05:30
committed by mergify[bot]
parent 25ce21f496
commit 21d811096b
8 changed files with 72 additions and 37 deletions

View File

@ -81,9 +81,10 @@ type SubVolumeClient interface {
// subVolumeClient implements SubVolumeClient interface.
type subVolumeClient struct {
*SubVolume // Embedded SubVolume struct.
clusterID string // Cluster ID to check subvolumegroup and resize functionality.
conn *util.ClusterConnection // Cluster connection.
*SubVolume // Embedded SubVolume struct.
clusterID string // Cluster ID to check subvolumegroup and resize functionality.
clusterName string // Cluster name
conn *util.ClusterConnection // Cluster connection.
}
// SubVolume holds the information about the subvolume.
@ -97,11 +98,12 @@ type SubVolume struct {
}
// NewSubVolume returns a new subvolume client.
func NewSubVolume(conn *util.ClusterConnection, vol *SubVolume, clusterID string) SubVolumeClient {
func NewSubVolume(conn *util.ClusterConnection, vol *SubVolume, clusterID, clusterName string) SubVolumeClient {
return &subVolumeClient{
SubVolume: vol,
clusterID: clusterID,
conn: conn,
SubVolume: vol,
clusterID: clusterID,
clusterName: clusterName,
conn: conn,
}
}