yunion.io/x/cloudmux@v0.3.10-0-alpha.1/pkg/apis/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 apis 16 17 import "yunion.io/x/pkg/utils" 18 19 const ( 20 SERVICE_TYPE_IMAGE = "image" 21 SERVICE_TYPE_OFFLINE_CLOUDMETA = "offlinecloudmeta" 22 SERVICE_TYPE_CLOUDID = "cloudid" 23 SERVICE_TYPE_CLOUDEVENT = "cloudevent" 24 SERVICE_TYPE_DEVTOOL = "devtool" 25 SERVICE_TYPE_ANSIBLE = "ansible" 26 SERVICE_TYPE_CLOUDMETA = "cloudmeta" 27 SERVICE_TYPE_YUNIONCONF = "yunionconf" 28 SERVICE_TYPE_METER = "meter" 29 SERVICE_TYPE_SCHEDULER = "scheduler" 30 SERVICE_TYPE_VNCPROXY = "vncproxy" 31 SERVICE_TYPE_KEYSTONE = "identity" 32 SERVICE_TYPE_NOTIFY = "notify" 33 SERVICE_TYPE_MONITOR = "monitor" 34 SERVICE_TYPE_LOG = "log" 35 SERVICE_TYPE_REGION = "compute" 36 SERVICE_TYPE_CLOUDMON = "cloudmon" 37 38 SERVICE_TYPE_ETCD = "etcd" 39 SERVICE_TYPE_INFLUXDB = "influxdb" 40 41 SERVICE_TYPE_SCHEDULEDTASK = "scheduledtask" 42 43 STATUS_UPDATE_TAGS = "update_tags" 44 STATUS_UPDATE_TAGS_FAILED = "update_tags_fail" 45 46 STATUS_SYNC_STATUS = "sync_status" 47 STATUS_DELETING = "deleting" 48 STATUS_DELETE_FAILED = "delete_failed" 49 STATUS_UNKNOWN = "unknown" 50 STATUS_CREATING = "creating" 51 STATUS_CREATE_FAILED = "create_failed" 52 53 CLOUD_TAG_PREFIX = "ext:" 54 USER_TAG_PREFIX = "user:" 55 SYS_CLOUD_TAG_PREFIX = "sys:" 56 // Such tags have inherited and isolated properties 57 CLASS_TAT_PREFIX = "cls:" 58 59 SKU_STATUS_AVAILABLE = "available" 60 SKU_STATUS_SOLDOUT = "soldout" 61 ) 62 63 var ( 64 NO_RESOURCE_SERVICES = []string{ 65 SERVICE_TYPE_OFFLINE_CLOUDMETA, 66 SERVICE_TYPE_CLOUDMETA, 67 SERVICE_TYPE_SCHEDULER, 68 SERVICE_TYPE_VNCPROXY, 69 SERVICE_TYPE_KEYSTONE, 70 SERVICE_TYPE_ETCD, 71 SERVICE_TYPE_INFLUXDB, 72 } 73 ) 74 75 const ( 76 OS_ARCH_X86 = "x86" 77 OS_ARCH_ARM = "arm" 78 79 OS_ARCH_I386 = "i386" 80 OS_ARCH_X86_32 = "x86_32" 81 OS_ARCH_X86_64 = "x86_64" 82 OS_ARCH_AARCH32 = "aarch32" 83 OS_ARCH_AARCH64 = "aarch64" 84 ) 85 86 var ( 87 ARCH_X86 = []string{ 88 OS_ARCH_X86, 89 OS_ARCH_I386, 90 OS_ARCH_X86_32, 91 OS_ARCH_X86_64, 92 } 93 ARCH_ARM = []string{ 94 OS_ARCH_ARM, 95 OS_ARCH_AARCH32, 96 OS_ARCH_AARCH64, 97 } 98 ) 99 100 func IsARM(osArch string) bool { 101 return utils.IsInStringArray(osArch, ARCH_ARM) 102 }