Esempio n. 1
0
        private void LoadTreeWithVPC()
        {
            TerraformGen tfGen = new TerraformGen();

            // For Loading VPC
            List <amazonVPC> VPCList = new List <amazonVPC>();

            tfGen.LoadVPC(GlobalVars.varPrj.DiagramFilename, VPCList);

            foreach (amazonVPC aVpc in VPCList)
            {
                TreeNode[] tvwNode = tvwStructure.Nodes.Find(aVpc.name, false);

                if (tvwNode.Length == 0)
                {
                    TreeNode tn = tvwStructure.Nodes.Add(aVpc.name, "VPC[" + aVpc.name + "|" + aVpc.cidr_block + "]");
                    tn.Nodes.Add("SN:" + aVpc.name, "Subnets");
                    tn.Nodes.Add("RT:" + aVpc.name, "Route Tables");
                    tn.Nodes.Add("IG:" + aVpc.name, "Internet Gateways");
                    tn.Nodes.Add("NACL:" + aVpc.name, "Network ACLs");
                    tn.Nodes.Add("EIP:" + aVpc.name, "Elastic IPs");
                    tn.Nodes.Add("SG:" + aVpc.name, "Security Groups");

                    tn.ExpandAll();
                }
            }
        }
Esempio n. 2
0
        private void vPCToolStripMenuItem_Click(object sender, EventArgs e)
        {
            TerraformGen tfGen = new TerraformGen();

            // For Loading VPC
            List <amazonVPC> VPCList = new List <amazonVPC>();

            tfGen.LoadVPC(drawFilename, VPCList);

            foreach (amazonVPC aVpc in VPCList)
            {
                richTextBox1.Text += aVpc.ToString();
            }
            dataGridView1.DataSource = VPCList;
        }
Esempio n. 3
0
        private string  GenerateVPC(string InputFile)
        {
            TerraformGen tfGen    = new TerraformGen();
            string       outputTF = "";
            // For Loading VPC
            List <amazonVPC> VPCList = new List <amazonVPC>();

            tfGen.LoadVPC(InputFile, VPCList);

            foreach (amazonVPC aVpc in VPCList)
            {
                outputTF += aVpc.ToString();
            }


            return(outputTF);
        }
Esempio n. 4
0
        private void LoadPropWindowWithVPC(string VPCName)
        {
            TerraformGen tfGen = new TerraformGen();
            // For Loading VPC
            List <amazonVPC> VPCList = new List <amazonVPC>();

            tfGen.LoadVPC(GlobalVars.varPrj.DiagramFilename, VPCList);

            foreach (amazonVPC aVpc in VPCList)
            {
                if (aVpc.name == VPCName)
                {
                    prgPropGrid.SelectedObject = aVpc;
                    return;
                }
            }
        }