コード例 #1
0
        public bool CreateVirtualMachine(VirtualMachineTypes virtualMachineType)
        {
            bool created = false;

            try
            {
                string fullPath         = string.Concat(Shared.InfraDirectory, VMPath);
                string resourceFileName = Shared.GetVMResourceFileName(Environment);
                switch (virtualMachineType)
                {
                case VirtualMachineTypes.Linux:
                    Console.WriteLine("Create IGS Prod Linux VM");
                    created = true;
                    break;

                case VirtualMachineTypes.Windows:
                    Console.WriteLine("Create IGS Prod Windows VM");
                    created = true;
                    break;
                }
                if (created)
                {
                    Shared.CreateInfraDirectory(virtualMachineType.ToString(), fullPath, resourceFileName);
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine($"Creating IGS Prod virtual machine failed due to {ex.Message}");
            }
            return(created);
        }
コード例 #2
0
ファイル: AWSTest.cs プロジェクト: nelmasry/CloudLibrary
 public bool CreateVirtualMachine(VirtualMachineTypes virtualMachineType)
 {
     throw new NotImplementedException();
 }