Example #1
0
 public ReportingNode(string director, string owner, string fqdn, PciScopeConstant pciScope)
 {
     Director = director;
     Owner    = owner;
     Fqdn     = fqdn;
     PciScope = pciScope;
 }
Example #2
0
 public ReviewDataItem(Guid chefId, string fqdn, int environmentId, string environmentName, PciScopeConstant pciScope, string product, string function, string owner, string buildSpec)
 {
     ChefId          = chefId;
     Fqdn            = fqdn;
     EnvironmentId   = environmentId;
     EnvironmentName = environmentName;
     PciScope        = pciScope;
     Product         = product;
     Function        = function;
     Owner           = owner;
     BuildSpec       = buildSpec;
 }
        private static void RecurseSpecs(BuildSpecification spec, bool runningCoreOs, PciScopeConstant pciScope,
                                         int environmentId, out List <Port> ports, out List <SoftwareComponent> softwares,
                                         out string osName, out string osVersion, ref PlatformConstant pt)
        {
            softwares = new List <SoftwareComponent>();
            ports     = new List <Port>();
            osName    = spec.OperatingSystemName;
            osVersion = spec.OperatingSystemVersion;
            var it = spec;

            while (it != null)
            {
                osName    = it.OperatingSystemName;
                osVersion = it.OperatingSystemVersion;
                var softToAdd = runningCoreOs
                    ? it.SoftwareComponents.Where(p => !p.NonCore)
                    : it.SoftwareComponents;
                softToAdd = softToAdd.Where(p => p.PciScope == null || (p.PciScope & pciScope) != 0);
                softToAdd = softToAdd.Where(p => !p.SoftwareComponentEnvironments.Any() || p.SoftwareComponentEnvironments.Any(q => q.EnvironmentId == environmentId));
                softwares.AddRange(softToAdd);
                ports.AddRange(it.Ports.Where(p => !p.IsOutgoing));
                if (it.Platform.HasValue)
                {
                    pt = it.Platform.Value;
                }
                it = it.Parent;
            }
        }
 public static IQueryable<Node> ByPciScope(this IQueryable<Node> nodes, PciScopeConstant pciScope)
 {
     return nodes.Where(p => p.PciScope == pciScope);
 }
 public NodeSearchResult(long id, string fqdn, string owner, string product, string function, PciScopeConstant pciScope, int environmentId, string environmentName, string environmentDescription, string environmentColor, PlatformConstant platform, long?buildSpecId, string buildSpecName, ComplianceStatusConstant complianceStatus, DateTime?lastComplianceDate, Guid?chefId, bool showButtons)
 {
     Id                     = id;
     Fqdn                   = fqdn;
     Owner                  = owner;
     Product                = product;
     Function               = function;
     SecurityClass          = pciScope.ToString();
     EnvironmentDescription = environmentDescription;
     EnvironmentColor       = environmentColor;
     EnvironmentName        = environmentName;
     EnvironmentId          = environmentId;
     Platform               = platform;
     BuildSpecId            = buildSpecId;
     BuildSpecName          = buildSpecName;
     ComplianceStatus       = complianceStatus;
     LastComplianceDate     = lastComplianceDate;
     ChefId                 = chefId;
     ShowButtons            = showButtons;
 }