Esempio n. 1
0
        public void LoadLogicalSystemGroup(LogicalSystemGroupLookup pLookup)
        {
            if (pLookup == null)
            {
                return;
            }

            if (!LogicalSystemGroupLookup.ValidateCode(pLookup.Code))
            {
                return;
            }

            ICollection <DbParameter> parameters = new List <DbParameter>
            {
                new OracleParameter(ITICDbTable.LOGICAL_SYSTEM_GROUP_CODE_COLUMN, OracleType.VarChar)
                {
                    Value = pLookup.Code
                }
            };

            using (IDataReader reader = DbHelper.ExecuteReader(_transaction, _query.SelectLogicalSystemGroupByCode, parameters))
            {
                if (reader.Read())
                {
                    pLookup.Name     = DbHelper.GetString(reader, ITICDbTable.LOGICAL_SYSTEM_GROUP_NAME_COLUMN);
                    pLookup.IsLoaded = true;
                }
            }
        }
Esempio n. 2
0
        private LogicalSystemGroupLookup LoadLogicalSystemGroup(object pHelper)
        {
            HierarchyParallelContext helper = pHelper as HierarchyParallelContext;

            if (helper == null)
            {
                return(null);
            }

            LogicalSystemGroupLookup result = helper.Hierarchy.GenerateLogicalSystemGroup(
                DbHelper.GetString(helper.Reader, ITICDbTable.LOGICAL_SYSTEM_GROUP_CODE_COLUMN),
                DbHelper.GetString(helper.Reader, ITICDbTable.LOGICAL_SYSTEM_GROUP_NAME_COLUMN));

            result.IsLoaded = true;
            return(result);
        }
        private Domain.Profile CreateTestProfile()
        {
            Domain.Profile result = new Domain.Profile();
            result.ProvisioningPlans = new List <ProvisioningPlan>
            {
                new ProvisioningPlan()
            };
            result.ActiveProvisioningPlan = result.ProvisioningPlans[0];

            // ITIC
            InfrastructureLookup     inf = new InfrastructureLookup("III", "Test Infrastructure");
            CapabilityLookup         cap = new CapabilityLookup("SSS", "Test Capability");
            LogicalSystemGroupLookup lsg = new LogicalSystemGroupLookup("LSG8", "Test LSG");

            result.ITICCode = new ITIC(inf, cap, lsg);

            // Platform Stack
            FilterLookup mjf = new FilterLookup("MjF");
            FilterLookup mnf = new FilterLookup("MiF");
            StackLookup  ps  = new StackLookup("WIN_x86_2008R_64_2.7.0_GREEN_SK", "Test Windows 2008 64bit Build 2.7.0", "Test descr");

            result.ActiveProvisioningPlan.PlatformStack = new PlatformStack(mjf, mnf, new FilterLookup("64bit"), new FilterLookup("2.7.0"), ps);

            // Application Stacks
            mjf = new FilterLookup("MjF2");
            mnf = new FilterLookup("MiF2");
            ps  = new StackLookup("TEST_APP_STACK", "Test 2", "Test descr 2");
            result.ActiveProvisioningPlan.ApplicationStacks.Add(new Stack(mjf, mnf, ps));
            mjf = new FilterLookup("MjF3");
            mnf = new FilterLookup("MiF3");
            ps  = new StackLookup("TEST_APP_STACK_3", "Test 3", "Test descr 3");
            result.ActiveProvisioningPlan.ApplicationStacks.Add(new Stack(mjf, mnf, ps));

            // Provisioning Plan Extras
            PlanActionLookup p = new PlanActionLookup()
            {
                Code = "CODE1", Name = "NAME1", Description = "DESc1", IsSelected = true
            };

            result.ActiveProvisioningPlan.InitialWorkflows.Add(p);
            p = new PlanActionLookup()
            {
                Code = "CODE2", Name = "NAME2", Description = "DESc2", IsSelected = true
            };
            result.ActiveProvisioningPlan.CommonPlanActions.Add(p);
            p = new PlanActionLookup()
            {
                Code = "CODE3", Name = "NAME3", Description = "DESc3", IsSelected = true
            };
            result.ActiveProvisioningPlan.FinalWorkflows.Add(p);

            // Post Configuration Actions
            PlanActionLookup pca = new PlanActionLookup()
            {
                Code = "PCA1", Name = "PCA1_NAME1", Description = "PCA1_DESc1", IsSelected = true, IsTextBox = true, DefaultValue = "TEST VALUE"
            };

            result.ActiveProvisioningPlan.AdvancedConfigurationActions.Add(pca);

            return(result);
        }