/// <returns>The name of the host to which this SR is attached, or null if the storage is shared /// or unattached.</returns> private string GetHostName() { if (Connection == null) { return(null); } Host host = GetStorageHost(); return(host == null ? null : host.Name()); }
public override string Name() { if (name_label != "") { return(name_label); } if (Connection == null) { return(string.Empty); } Host master = Connection.Resolve(this.master); return(master == null ? "" : master.Name()); }
public override string Name() { if (Connection != null) { SR sr = Connection.Resolve(this.SR); if (sr != null) { Host host = sr.GetStorageHost(); if (sr.Physical() && host != null) { return(string.Format(Messages.CD_DRIVE, host.Name())); } } } return(name_label); }