yunion.io/x/cloudmux@v0.3.10-0-alpha.1/pkg/apis/compute/sku_const.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 compute 16 17 const ( 18 SkuCategoryGeneralPurpose = "general_purpose" // 通用型 19 SkuCategoryBurstable = "burstable" // 突发性能型 20 SkuCategoryComputeOptimized = "compute_optimized" // 计算优化型 21 SkuCategoryMemoryOptimized = "memory_optimized" // 内存优化型 22 SkuCategoryStorageIOOptimized = "storage_optimized" // 存储IO优化型 23 SkuCategoryHardwareAccelerated = "hardware_accelerated" // 硬件加速型 24 SkuCategoryHighStorage = "high_storage" // 高存储型 25 SkuCategoryHighMemory = "high_memory" // 高内存型 26 ) 27 28 const ( 29 SkuStatusAvailable = "available" 30 SkuStatusSoldout = "soldout" 31 SkuStatusCreating = "creating" 32 SkuStatusCreatFailed = "create_failed" 33 SkuStatusDeleting = "deleting" 34 SkuStatusDeleteFailed = "delete_failed" 35 SkuStatusUnknown = "unknown" 36 SkuStatusReady = "ready" 37 ) 38 39 var InstanceFamilies = map[string]string{ 40 SkuCategoryGeneralPurpose: "g1", 41 SkuCategoryBurstable: "t1", 42 SkuCategoryComputeOptimized: "c1", 43 SkuCategoryMemoryOptimized: "r1", 44 SkuCategoryStorageIOOptimized: "i1", 45 SkuCategoryHardwareAccelerated: "", 46 SkuCategoryHighStorage: "hc1", 47 SkuCategoryHighMemory: "hr1", 48 } 49 50 var SKU_FAMILIES = []string{ 51 SkuCategoryGeneralPurpose, 52 SkuCategoryBurstable, 53 SkuCategoryComputeOptimized, 54 SkuCategoryMemoryOptimized, 55 SkuCategoryStorageIOOptimized, 56 SkuCategoryHardwareAccelerated, 57 SkuCategoryHighStorage, 58 SkuCategoryHighMemory, 59 }