mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(region): vendor update for qcloud nat status (#19513)
This commit is contained in:
@@ -88,7 +88,7 @@ require (
|
||||
k8s.io/client-go v0.19.3
|
||||
k8s.io/cluster-bootstrap v0.19.3
|
||||
moul.io/http2curl/v2 v2.3.0
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20240218015724-8843a313c438
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20240220074040-c367f1e9972c
|
||||
yunion.io/x/executor v0.0.0-20230705125604-c5ac3141db32
|
||||
yunion.io/x/jsonutils v1.0.1-0.20240203102553-4096f103b401
|
||||
yunion.io/x/log v1.0.1-0.20230411060016-feb3f46ab361
|
||||
|
||||
@@ -1201,8 +1201,8 @@ sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK
|
||||
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
|
||||
sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
|
||||
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20240218015724-8843a313c438 h1:hPtZ3cddRW+yr2nj1SEAcLCqw1/jJ1OQAJSRtD7E6zw=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20240218015724-8843a313c438/go.mod h1:dsUESXIbXJ+/ywbNClhldOrbPOiBi2udrgOnB/ffoWk=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20240220074040-c367f1e9972c h1:JrwRyafRs6P6IcYq1dV5HQ3KbtWQtDP3XMnHMTZjnNc=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20240220074040-c367f1e9972c/go.mod h1:dsUESXIbXJ+/ywbNClhldOrbPOiBi2udrgOnB/ffoWk=
|
||||
yunion.io/x/executor v0.0.0-20230705125604-c5ac3141db32 h1:v7POYkQwo1XzOxBoIoRVr/k0V9Y5JyjpshlIFa9raug=
|
||||
yunion.io/x/executor v0.0.0-20230705125604-c5ac3141db32/go.mod h1:Uxuou9WQIeJXNpy7t2fPLL0BYLvLiMvGQwY7Qc6aSws=
|
||||
yunion.io/x/jsonutils v0.0.0-20190625054549-a964e1e8a051/go.mod h1:4N0/RVzsYL3kH3WE/H1BjUQdFiWu50JGCFQuuy+Z634=
|
||||
|
||||
Vendored
+1
-1
@@ -1465,7 +1465,7 @@ sigs.k8s.io/structured-merge-diff/v4/value
|
||||
# sigs.k8s.io/yaml v1.2.0
|
||||
## explicit; go 1.12
|
||||
sigs.k8s.io/yaml
|
||||
# yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20240218015724-8843a313c438
|
||||
# yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20240220074040-c367f1e9972c
|
||||
## explicit; go 1.18
|
||||
yunion.io/x/cloudmux/pkg/apis
|
||||
yunion.io/x/cloudmux/pkg/apis/billing
|
||||
|
||||
+3
-1
@@ -136,6 +136,7 @@ const (
|
||||
CITY_PHOENIX = "Phoenix" //菲尼克斯
|
||||
CITY_DALLAS = "Dallas" //达拉斯
|
||||
CITY_COLUMBUS = "Columbus" //哥伦布
|
||||
CITY_INDIANAPOLIS = "Indianapolis" //印第安纳波利斯
|
||||
|
||||
// 英国
|
||||
CITY_LONDON = "London" //伦敦
|
||||
@@ -171,7 +172,8 @@ const (
|
||||
CITY_TARN = "Tarn" //塔恩
|
||||
|
||||
// 瑞典
|
||||
CITY_STOCKHOLM = "Stockholm" //斯德哥尔摩
|
||||
CITY_STOCKHOLM = "Stockholm" // 斯德哥尔摩
|
||||
CITY_SANDVIKEN = "Sandviken" // 桑德维肯
|
||||
|
||||
// 波兰
|
||||
CITY_WARSAW = "Warsaw" // 华沙
|
||||
|
||||
+18
@@ -518,6 +518,12 @@ var (
|
||||
City: CITY_STOCKHOLM,
|
||||
CountryCode: COUNTRY_CODE_SE,
|
||||
}
|
||||
RegionSandviken = cloudprovider.SGeographicInfo{
|
||||
Latitude: 59,
|
||||
Longitude: 27.66,
|
||||
City: CITY_SANDVIKEN,
|
||||
CountryCode: COUNTRY_CODE_SE,
|
||||
}
|
||||
RegionDelmenhorst = cloudprovider.SGeographicInfo{
|
||||
Latitude: 53.051,
|
||||
Longitude: 8.632,
|
||||
@@ -702,6 +708,18 @@ var (
|
||||
CountryCode: COUNTRY_CODE_US,
|
||||
}
|
||||
RegionColumbus = cloudprovider.SGeographicInfo{
|
||||
Latitude: 39.983,
|
||||
Longitude: -83.156,
|
||||
City: CITY_COLUMBUS,
|
||||
CountryCode: COUNTRY_CODE_US,
|
||||
}
|
||||
RegionIndianapolis = cloudprovider.SGeographicInfo{
|
||||
Latitude: 39.78,
|
||||
Longitude: -82.62,
|
||||
City: CITY_INDIANAPOLIS,
|
||||
CountryCode: COUNTRY_CODE_US,
|
||||
}
|
||||
RegionTelAviv = cloudprovider.SGeographicInfo{
|
||||
Latitude: 32.088,
|
||||
Longitude: 34.762,
|
||||
City: CITY_TEL_AVIV,
|
||||
|
||||
+1
-1
@@ -54,5 +54,5 @@ var LatitudeAndLongitude = map[string]cloudprovider.SGeographicInfo{
|
||||
"eu-central-2": api.RegionAbuDhabi,
|
||||
"ap-southeast-3": api.RegionJakarta,
|
||||
"me-central-1": api.RegionDubai,
|
||||
"il-central-1": api.RegionColumbus,
|
||||
"il-central-1": api.RegionTelAviv,
|
||||
}
|
||||
|
||||
+6
@@ -64,6 +64,12 @@ var AzureGeographicInfo = map[string]cloudprovider.SGeographicInfo{
|
||||
"brazilsoutheast": api.RegionRioDeJaneiro, // 里约热内卢
|
||||
"jioindiawest": api.RegionJioIndiaWest, // 贾姆讷格尔
|
||||
"jioindiacentral": api.RegionJioIndiaCentral, // 那格浦尔
|
||||
"swedencentral": api.RegionSandviken,
|
||||
"qatarcentral": api.RegionDoha,
|
||||
"polandcentral": api.RegionWarsaw,
|
||||
"italynorth": api.RegionMilan,
|
||||
"israelcentral": api.RegionTelAviv,
|
||||
"brazilus": api.RegionIndianapolis,
|
||||
|
||||
"chinaeast": api.RegionShanghai,
|
||||
"chinaeast2": api.RegionShanghai,
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ var LatitudeAndLongitude = map[string]cloudprovider.SGeographicInfo{
|
||||
"us-south1": api.RegionDallas,
|
||||
"southamerica-west1": api.RegionSantiago,
|
||||
|
||||
"me-west1": api.RegionColumbus,
|
||||
"me-west1": api.RegionTelAviv,
|
||||
"me-central1": api.RegionDoha,
|
||||
"me-central2": api.RegionDamman,
|
||||
}
|
||||
|
||||
+9
-6
@@ -31,7 +31,7 @@ type SNatGateway struct {
|
||||
NatId string `json:"natId"`
|
||||
NatName string `json:"natName"`
|
||||
ProductionStatus float32 `json:"productionStatus"`
|
||||
State float32 `json:"state"`
|
||||
State string `json:"state"`
|
||||
UnVpcId string `json:"unVpcId"`
|
||||
VpcId float32 `json:"vpcId"`
|
||||
VpcName string `json:"vpcName"`
|
||||
@@ -63,12 +63,15 @@ func (self *SNatGateway) GetINetworkId() string {
|
||||
}
|
||||
|
||||
func (nat *SNatGateway) GetStatus() string {
|
||||
// NAT网关状态,0:运行中, 1:不可用, 2:欠费停服
|
||||
switch int(nat.State) {
|
||||
case 0:
|
||||
switch nat.State {
|
||||
case "PENDING":
|
||||
return api.NAT_STATUS_ALLOCATE
|
||||
case "AVAILABLE":
|
||||
return api.NAT_STAUTS_AVAILABLE
|
||||
case 1, 2:
|
||||
return api.NAT_STATUS_UNKNOWN
|
||||
case "UPDATING":
|
||||
return api.NAT_STATUS_DEPLOYING
|
||||
case "DELETING":
|
||||
return api.NAT_STATUS_DELETING
|
||||
default:
|
||||
return api.NAT_STATUS_UNKNOWN
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user