Esempio n. 1
0
        /// <summary>
        /// See if a particular thign is in the DNS list.
        /// </summary>
        /// <param name="v"></param>
        /// <returns></returns>
        private static async Task <IEnumerable <bool> > CheckDNS(string dnsList)
        {
            var result = new List <bool>();

            foreach (var dns in dnsList.Split(','))
            {
                bool endswith = (await IPLocationTests.FindLocalIpName()).EndsWith(dns.Trim());
                result.Add(endswith);
            }
            return(result);
        }
Esempio n. 2
0
 public void LinuxGRIDWithLocalDNSParserNotLocal()
 {
     SetupAndTestLinuxGRIDWithLocalDNSParser(() =>
     {
         // Set the location to be something that should match above
         IPLocationTests.SetIpName("mynode.uww.edu");
         var locations = DataSetManager.ValidLocations;
         foreach (var l in locations)
         {
             Console.WriteLine(l);
         }
         Assert.AreEqual(2, locations.Length);
     });
 }
Esempio n. 3
0
 /// <summary>
 /// We can copy files from other locations.
 /// </summary>
 /// <param name="destination">The destination we need to copy from</param>
 /// <returns>true if a copy can be sourced from here or to here</returns>
 /// <remarks>
 /// We know how to do direct disk copies and also SCP's from visible machines.
 /// </remarks>
 public bool CanSourceCopy(IPlace destination)
 {
     // As long as it is another active location
     return(destination is PlaceLocalWindowsDisk ||
            ((destination is ISCPTarget) && ((ISCPTarget)destination).SCPIsVisibleFrom(IPLocationTests.FindLocalIpName().Result)));
 }