mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-23 23:00:19 +00:00
util: add GetAddrs method
added GetAddrs to get the client Adress of the rados connection which is helpful for NetworkFencing Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
1246e2fac7
commit
ba8c5a359c
@ -151,3 +151,13 @@ func (cc *ClusterConnection) GetNFSAdmin() (*nfs.Admin, error) {
|
||||
|
||||
return nfs.NewFromConn(cc.conn), nil
|
||||
}
|
||||
|
||||
// GetAddrs returns the addresses of the RADOS session,
|
||||
// suitable for blocklisting.
|
||||
func (cc *ClusterConnection) GetAddrs() (string, error) {
|
||||
if cc.conn == nil {
|
||||
return "", errors.New("cluster is not connected yet")
|
||||
}
|
||||
|
||||
return cc.conn.GetAddrs()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user