Example #1
0
        /// <summary>
        /// Return the resulting dataset name given a credential for the user name
        /// </summary>
        /// <param name="job"></param>
        /// <param name="origDSName"></param>
        /// <param name="gridCredentials"></param>
        /// <returns></returns>
        public static string ResultingDataSetName(this AtlasJob job, string origDSName, Credential gridCredentials, int jobIteration = 0)
        {
            if (gridCredentials == null)
            {
                throw new ArgumentNullException(nameof(gridCredentials));
            }

            var scope = string.Format("user.{0}", gridCredentials.Username);

            return(job.ResultingDataSetName(origDSName, scope, jobIteration));
        }
Example #2
0
 /// <summary>
 /// Fetch from GRID the credential name.
 /// </summary>
 /// <param name="job"></param>
 /// <param name="origDSName"></param>
 /// <returns></returns>
 public static string ResultingDataSetName(this AtlasJob job, string origDSName, int jobIteration = 0)
 {
     using (var credList = new CredentialSet("GRID"))
     {
         var gridCredentials = credList.Load().FirstOrDefault();
         if (gridCredentials == null)
         {
             throw new ArgumentException("Please create a generic windows credential with the target 'GRID' with the user name as the rucio grid user name and the password to be used with voms proxy init");
         }
         return(job.ResultingDataSetName(origDSName, gridCredentials, jobIteration));
     }
 }