mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +00:00
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:
parent
e4e0f397a6
commit
d05fc1e8e5
@ -114,6 +114,14 @@ func (cc *ClusterConnection) GetFSAdmin() (*ca.FSAdmin, error) {
|
|||||||
return ca.NewFromConn(cc.conn), nil
|
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.
|
// GetRBDAdmin get RBDAdmin to administrate rbd volumes.
|
||||||
func (cc *ClusterConnection) GetRBDAdmin() (*ra.RBDAdmin, error) {
|
func (cc *ClusterConnection) GetRBDAdmin() (*ra.RBDAdmin, error) {
|
||||||
if cc.conn == nil {
|
if cc.conn == nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user