util: add helper to get the cluster ID

added helper function to get the cluster ID.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2021-11-17 18:01:28 +05:30 committed by Madhu Rajanna
parent e4e0f397a6
commit d05fc1e8e5

View File

@ -114,6 +114,14 @@ func (cc *ClusterConnection) GetFSAdmin() (*ca.FSAdmin, error) {
return ca.NewFromConn(cc.conn), nil
}
func (cc *ClusterConnection) GetFSID() (string, error) {
if cc.conn == nil {
return "", errors.New("cluster is not connected yet")
}
return cc.conn.GetFSID()
}
// GetRBDAdmin get RBDAdmin to administrate rbd volumes.
func (cc *ClusterConnection) GetRBDAdmin() (*ra.RBDAdmin, error) {
if cc.conn == nil {