yunion.io/x/cloudmux@v0.3.10-0-alpha.1/pkg/multicloud/azure/classic_instancesize.go (about)

     1  // Copyright 2019 Yunion
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package azure
    16  
    17  type ClassicVMSize struct {
    18  	MemoryInMB    int
    19  	NumberOfCores int
    20  	StorageSize   int
    21  	MaxNic        int
    22  }
    23  
    24  var CLASSIC_VM_SIZES = map[string]ClassicVMSize{
    25  	"ExtraSmall":      {MemoryInMB: 786, NumberOfCores: 1, StorageSize: 20, MaxNic: 1},
    26  	"Small":           {MemoryInMB: 1.75 * 1024, NumberOfCores: 1, StorageSize: 225, MaxNic: 1},
    27  	"Medium":          {MemoryInMB: 3.5 * 1024, NumberOfCores: 2, StorageSize: 490, MaxNic: 1},
    28  	"Large":           {MemoryInMB: 7 * 1024, NumberOfCores: 4, StorageSize: 1000, MaxNic: 2},
    29  	"ExtraLarge":      {MemoryInMB: 14 * 1024, NumberOfCores: 8, StorageSize: 2040, MaxNic: 4},
    30  	"A5":              {MemoryInMB: 14 * 1024, NumberOfCores: 2, StorageSize: 490, MaxNic: 1},
    31  	"A6":              {MemoryInMB: 28 * 1024, NumberOfCores: 4, StorageSize: 1000, MaxNic: 2},
    32  	"A7":              {MemoryInMB: 56 * 1024, NumberOfCores: 8, StorageSize: 2040, MaxNic: 4},
    33  	"A8*":             {MemoryInMB: 56 * 1024, NumberOfCores: 8, StorageSize: 1817, MaxNic: 2},
    34  	"A9*":             {MemoryInMB: 112 * 1024, NumberOfCores: 16, StorageSize: 1817, MaxNic: 4},
    35  	"A10":             {MemoryInMB: 56 * 1024, NumberOfCores: 8, StorageSize: 1817, MaxNic: 2},
    36  	"A11":             {MemoryInMB: 112 * 1024, NumberOfCores: 16, StorageSize: 1817, MaxNic: 4},
    37  	"Standard_A1_v2":  {MemoryInMB: 2 * 1024, NumberOfCores: 1, StorageSize: 10, MaxNic: 1},
    38  	"Standard_A2_v2":  {MemoryInMB: 4 * 1024, NumberOfCores: 2, StorageSize: 20, MaxNic: 2},
    39  	"Standard_A4_v2":  {MemoryInMB: 8 * 1024, NumberOfCores: 4, StorageSize: 40, MaxNic: 4},
    40  	"Standard_A8_v2":  {MemoryInMB: 16 * 1024, NumberOfCores: 8, StorageSize: 80, MaxNic: 8},
    41  	"Standard_A2m_v2": {MemoryInMB: 16 * 1024, NumberOfCores: 2, StorageSize: 20, MaxNic: 2},
    42  	"Standard_A4m_v2": {MemoryInMB: 32 * 1024, NumberOfCores: 4, StorageSize: 40, MaxNic: 4},
    43  	"Standard_A8m_v2": {MemoryInMB: 64 * 1024, NumberOfCores: 8, StorageSize: 80, MaxNic: 8},
    44  	"Standard_D1":     {MemoryInMB: 3 * 1024, NumberOfCores: 1, StorageSize: 50, MaxNic: 1},
    45  	"Standard_D2":     {MemoryInMB: 7 * 1024, NumberOfCores: 2, StorageSize: 100, MaxNic: 2},
    46  	"Standard_D3":     {MemoryInMB: 14 * 1024, NumberOfCores: 4, StorageSize: 200, MaxNic: 4},
    47  	"Standard_D4":     {MemoryInMB: 28 * 1024, NumberOfCores: 8, StorageSize: 400, MaxNic: 8},
    48  	"Standard_D11":    {MemoryInMB: 14 * 1024, NumberOfCores: 2, StorageSize: 100, MaxNic: 2},
    49  	"Standard_D12":    {MemoryInMB: 28 * 1024, NumberOfCores: 4, StorageSize: 200, MaxNic: 4},
    50  	"Standard_D13":    {MemoryInMB: 56 * 1024, NumberOfCores: 8, StorageSize: 400, MaxNic: 8},
    51  	"Standard_D14":    {MemoryInMB: 112 * 1024, NumberOfCores: 16, StorageSize: 800, MaxNic: 8},
    52  	"Standard_D1_v2":  {MemoryInMB: 3 * 1024, NumberOfCores: 1, StorageSize: 50, MaxNic: 1},
    53  	"Standard_D2_v2":  {MemoryInMB: 7 * 1024, NumberOfCores: 2, StorageSize: 100, MaxNic: 2},
    54  	"Standard_D3_v2":  {MemoryInMB: 14 * 1024, NumberOfCores: 4, StorageSize: 200, MaxNic: 4},
    55  	"Standard_D4_v2":  {MemoryInMB: 28 * 1024, NumberOfCores: 8, StorageSize: 400, MaxNic: 8},
    56  	"Standard_D5_v2":  {MemoryInMB: 56 * 1024, NumberOfCores: 16, StorageSize: 800, MaxNic: 8},
    57  	"Standard_D11_v2": {MemoryInMB: 14 * 1024, NumberOfCores: 2, StorageSize: 100, MaxNic: 2},
    58  	"Standard_D12_v2": {MemoryInMB: 28 * 1024, NumberOfCores: 4, StorageSize: 200, MaxNic: 4},
    59  	"Standard_D13_v2": {MemoryInMB: 56 * 1024, NumberOfCores: 8, StorageSize: 400, MaxNic: 8},
    60  	"Standard_D14_v2": {MemoryInMB: 112 * 1024, NumberOfCores: 16, StorageSize: 800, MaxNic: 8},
    61  	"Standard_D15_v2": {MemoryInMB: 140 * 1024, NumberOfCores: 20, StorageSize: 1, MaxNic: 8},
    62  	"Standard_D2_v3":  {MemoryInMB: 8 * 1024, NumberOfCores: 2, StorageSize: 50, MaxNic: 2},
    63  	"Standard_D4_v3":  {MemoryInMB: 16 * 1024, NumberOfCores: 4, StorageSize: 100, MaxNic: 2},
    64  	"Standard_D8_v3":  {MemoryInMB: 32 * 1024, NumberOfCores: 8, StorageSize: 200, MaxNic: 4},
    65  	"Standard_D16_v3": {MemoryInMB: 64 * 1024, NumberOfCores: 16, StorageSize: 400, MaxNic: 8},
    66  	"Standard_D32_v3": {MemoryInMB: 128 * 1024, NumberOfCores: 32, StorageSize: 800, MaxNic: 8},
    67  	"Standard_D64_v3": {MemoryInMB: 256 * 1024, NumberOfCores: 64, StorageSize: 1600, MaxNic: 8},
    68  	"Standard_E2_v3":  {MemoryInMB: 16 * 1024, NumberOfCores: 2, StorageSize: 50, MaxNic: 2},
    69  	"Standard_E4_v3":  {MemoryInMB: 32 * 1024, NumberOfCores: 4, StorageSize: 100, MaxNic: 2},
    70  	"Standard_E8_v3":  {MemoryInMB: 64 * 1024, NumberOfCores: 8, StorageSize: 200, MaxNic: 4},
    71  	"Standard_E16_v3": {MemoryInMB: 128 * 1024, NumberOfCores: 16, StorageSize: 400, MaxNic: 8},
    72  	"Standard_E32_v3": {MemoryInMB: 256 * 1024, NumberOfCores: 32, StorageSize: 800, MaxNic: 8},
    73  	"Standard_E64_v3": {MemoryInMB: 432 * 1024, NumberOfCores: 64, StorageSize: 1600, MaxNic: 8},
    74  	"Standard_G1":     {MemoryInMB: 28 * 1024, NumberOfCores: 2, StorageSize: 384, MaxNic: 1},
    75  	"Standard_G2":     {MemoryInMB: 56 * 1024, NumberOfCores: 4, StorageSize: 768, MaxNic: 2},
    76  	"Standard_G3":     {MemoryInMB: 112 * 1024, NumberOfCores: 8, StorageSize: 1, MaxNic: 4},
    77  	"Standard_G4":     {MemoryInMB: 224 * 1024, NumberOfCores: 16, StorageSize: 3, MaxNic: 8},
    78  	"Standard_G5":     {MemoryInMB: 448 * 1024, NumberOfCores: 32, StorageSize: 6, MaxNic: 8},
    79  
    80  	"Standard_A0":            {MemoryInMB: 768, NumberOfCores: 1},
    81  	"Standard_A1":            {MemoryInMB: 1792, NumberOfCores: 1},
    82  	"Standard_A2":            {MemoryInMB: 3584, NumberOfCores: 2},
    83  	"Standard_A3":            {MemoryInMB: 7168, NumberOfCores: 4},
    84  	"Standard_A5":            {MemoryInMB: 14336, NumberOfCores: 2},
    85  	"Standard_A4":            {MemoryInMB: 14336, NumberOfCores: 8},
    86  	"Standard_A6":            {MemoryInMB: 28672, NumberOfCores: 4},
    87  	"Standard_A7":            {MemoryInMB: 57344, NumberOfCores: 8},
    88  	"Basic_A0":               {MemoryInMB: 768, NumberOfCores: 1},
    89  	"Basic_A1":               {MemoryInMB: 1792, NumberOfCores: 1},
    90  	"Basic_A2":               {MemoryInMB: 3584, NumberOfCores: 2},
    91  	"Basic_A3":               {MemoryInMB: 7168, NumberOfCores: 4},
    92  	"Basic_A4":               {MemoryInMB: 14336, NumberOfCores: 8},
    93  	"Standard_D2_v2_Promo":   {MemoryInMB: 7168, NumberOfCores: 2},
    94  	"Standard_D3_v2_Promo":   {MemoryInMB: 14336, NumberOfCores: 4},
    95  	"Standard_D4_v2_Promo":   {MemoryInMB: 28672, NumberOfCores: 8},
    96  	"Standard_D5_v2_Promo":   {MemoryInMB: 57344, NumberOfCores: 16},
    97  	"Standard_D11_v2_Promo":  {MemoryInMB: 14336, NumberOfCores: 2},
    98  	"Standard_D12_v2_Promo":  {MemoryInMB: 28672, NumberOfCores: 4},
    99  	"Standard_D13_v2_Promo":  {MemoryInMB: 57344, NumberOfCores: 8},
   100  	"Standard_D14_v2_Promo":  {MemoryInMB: 114688, NumberOfCores: 16},
   101  	"Standard_F1":            {MemoryInMB: 2048, NumberOfCores: 1},
   102  	"Standard_F2":            {MemoryInMB: 4096, NumberOfCores: 2},
   103  	"Standard_F4":            {MemoryInMB: 8192, NumberOfCores: 4},
   104  	"Standard_F8":            {MemoryInMB: 16384, NumberOfCores: 8},
   105  	"Standard_F16":           {MemoryInMB: 32768, NumberOfCores: 16},
   106  	"Standard_DS1_v2":        {MemoryInMB: 3584, NumberOfCores: 1},
   107  	"Standard_DS2_v2":        {MemoryInMB: 7168, NumberOfCores: 2},
   108  	"Standard_DS3_v2":        {MemoryInMB: 14336, NumberOfCores: 4},
   109  	"Standard_DS4_v2":        {MemoryInMB: 28672, NumberOfCores: 8},
   110  	"Standard_DS5_v2":        {MemoryInMB: 57344, NumberOfCores: 16},
   111  	"Standard_DS11-1_v2":     {MemoryInMB: 14336, NumberOfCores: 2},
   112  	"Standard_DS11_v2":       {MemoryInMB: 14336, NumberOfCores: 2},
   113  	"Standard_DS12-1_v2":     {MemoryInMB: 28672, NumberOfCores: 4},
   114  	"Standard_DS12-2_v2":     {MemoryInMB: 28672, NumberOfCores: 4},
   115  	"Standard_DS12_v2":       {MemoryInMB: 28672, NumberOfCores: 4},
   116  	"Standard_DS13-2_v2":     {MemoryInMB: 57344, NumberOfCores: 8},
   117  	"Standard_DS13-4_v2":     {MemoryInMB: 57344, NumberOfCores: 8},
   118  	"Standard_DS13_v2":       {MemoryInMB: 57344, NumberOfCores: 8},
   119  	"Standard_DS14-4_v2":     {MemoryInMB: 114688, NumberOfCores: 16},
   120  	"Standard_DS14-8_v2":     {MemoryInMB: 114688, NumberOfCores: 16},
   121  	"Standard_DS14_v2":       {MemoryInMB: 114688, NumberOfCores: 16},
   122  	"Standard_DS15_v2":       {MemoryInMB: 143360, NumberOfCores: 20},
   123  	"Standard_DS2_v2_Promo":  {MemoryInMB: 7168, NumberOfCores: 2},
   124  	"Standard_DS3_v2_Promo":  {MemoryInMB: 14336, NumberOfCores: 4},
   125  	"Standard_DS4_v2_Promo":  {MemoryInMB: 28672, NumberOfCores: 8},
   126  	"Standard_DS5_v2_Promo":  {MemoryInMB: 57344, NumberOfCores: 16},
   127  	"Standard_DS11_v2_Promo": {MemoryInMB: 14336, NumberOfCores: 2},
   128  	"Standard_DS12_v2_Promo": {MemoryInMB: 28672, NumberOfCores: 4},
   129  	"Standard_DS13_v2_Promo": {MemoryInMB: 57344, NumberOfCores: 8},
   130  	"Standard_DS14_v2_Promo": {MemoryInMB: 114688, NumberOfCores: 16},
   131  	"Standard_F1s":           {MemoryInMB: 2048, NumberOfCores: 1},
   132  	"Standard_F2s":           {MemoryInMB: 4096, NumberOfCores: 2},
   133  	"Standard_F4s":           {MemoryInMB: 8192, NumberOfCores: 4},
   134  	"Standard_F8s":           {MemoryInMB: 16384, NumberOfCores: 8},
   135  	"Standard_F16s":          {MemoryInMB: 32768, NumberOfCores: 16},
   136  	"Standard_DS1":           {MemoryInMB: 3584, NumberOfCores: 1},
   137  	"Standard_DS2":           {MemoryInMB: 7168, NumberOfCores: 2},
   138  	"Standard_DS3":           {MemoryInMB: 14336, NumberOfCores: 4},
   139  	"Standard_DS4":           {MemoryInMB: 28672, NumberOfCores: 8},
   140  	"Standard_DS11":          {MemoryInMB: 14336, NumberOfCores: 2},
   141  	"Standard_DS12":          {MemoryInMB: 28672, NumberOfCores: 4},
   142  	"Standard_DS13":          {MemoryInMB: 57344, NumberOfCores: 8},
   143  	"Standard_DS14":          {MemoryInMB: 114688, NumberOfCores: 16},
   144  }