Esempio n. 1
0
File: SR.cs Progetto: 00mjk/xenadmin
        /// <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());
        }
Esempio n. 2
0
        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());
        }
Esempio n. 3
0
 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);
 }