Example #1
0
 public PodInfo(PodIdentifier id, IReadOnlyDictionary <string, string> annotations, IReadOnlyDictionary <string, bool> ready, string ipAddress)
 {
     this.Id              = id;
     this.Annotations     = annotations;
     this.ContainersReady = ready;
     this.PodIp           = ipAddress ?? string.Empty;
 }
Example #2
0
 public DataDownloadRequest(PodIdentifier pod, string repoName, string dropFolder, string extractionLocation, DataDownloadRequestDetails?details)
 {
     this.Pod                = pod;
     this.DataSource         = repoName;
     this.DataDropFolder     = dropFolder;
     this.ExtractionLocation = extractionLocation;
     this.Details            = details;
 }
Example #3
0
 public PodDataRequestInfo(PodIdentifier id, IReadOnlyDictionary <string, string> annotations)
 {
     this.Id          = id;
     this.DataSources = (annotations.FirstOrDefault(a => a.Key == CommonAnnotations.DataSources).Value ?? string.Empty).Split(',').Select(x => x.Trim()).Where(x => !string.IsNullOrEmpty(x)).ToHashSet();
     this.Requests    = annotations.Where(a => a.Key.StartsWith(CommonAnnotations.DataRequestPrefix)).ToDictionary(a => a.Key.Replace(CommonAnnotations.DataRequestPrefix, string.Empty), a => a.Value);
     this.DependsOn   = (annotations.FirstOrDefault(a => a.Key == CommonAnnotations.DataDependsOn).Value ?? string.Empty).Split(',').Select(x => x.Trim()).Where(x => !string.IsNullOrEmpty(x)).ToHashSet();
     this.DropFolder  = annotations.FirstOrDefault(pi => pi.Key == CommonAnnotations.DataStoreLocation).Value ?? string.Empty;
     this.Annotations = annotations;
 }