mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-10-31 02:38:07 +08:00
fix(region): vendor update 0412 (#19962)
This commit is contained in:
@@ -89,12 +89,12 @@ require (
|
||||
k8s.io/cluster-bootstrap v0.19.3
|
||||
k8s.io/cri-api v0.22.17
|
||||
moul.io/http2curl/v2 v2.3.0
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20240412034729-5250d15c00b1
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20240412094305-e14a0e9ddb86
|
||||
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.20240305175729-7cf2d6cd5a91
|
||||
yunion.io/x/ovsdb v0.0.0-20230306173834-f164f413a900
|
||||
yunion.io/x/pkg v1.10.1-0.20240410104547-550ff8a373cc
|
||||
yunion.io/x/pkg v1.10.1-0.20240412065625-b89c998df243
|
||||
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e
|
||||
yunion.io/x/sqlchemy v1.1.3-0.20240326090913-96da8bf92408
|
||||
yunion.io/x/structarg v0.0.0-20231017124457-df4d5009457c
|
||||
|
||||
@@ -1210,8 +1210,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.20240412034729-5250d15c00b1 h1:1N069/5RxK6zElHbDvE4JgE7rbJQsOeueg8A+UrUA80=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20240412034729-5250d15c00b1/go.mod h1:dsUESXIbXJ+/ywbNClhldOrbPOiBi2udrgOnB/ffoWk=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20240412094305-e14a0e9ddb86 h1:0FxIR/tdP9GZTRNrfP1RquYcd792nTRmWETaUGic5es=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20240412094305-e14a0e9ddb86/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=
|
||||
@@ -1225,8 +1225,8 @@ yunion.io/x/ovsdb v0.0.0-20230306173834-f164f413a900 h1:Hu/4ERvoWaN6aiFs4h4/yvVB
|
||||
yunion.io/x/ovsdb v0.0.0-20230306173834-f164f413a900/go.mod h1:0vLkNEhlmA64HViPBAnSTUMrx5QP1CLsxXmxDKQ80tc=
|
||||
yunion.io/x/pkg v0.0.0-20190620104149-945c25821dbf/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
|
||||
yunion.io/x/pkg v0.0.0-20190628082551-f4033ba2ea30/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
|
||||
yunion.io/x/pkg v1.10.1-0.20240410104547-550ff8a373cc h1:kmTCqrss7CyIuDO6JrvCIU/iGyBlX5cS2KnS5Y2MKZA=
|
||||
yunion.io/x/pkg v1.10.1-0.20240410104547-550ff8a373cc/go.mod h1:ksCJVQ+DwKrJ5QBEoU8pzrDFfDaZVAFH/iJ6yQCYxJk=
|
||||
yunion.io/x/pkg v1.10.1-0.20240412065625-b89c998df243 h1:EydQd4QaawZ5+i9IjNSqzrs8hiu9eI1mv5fV+Q1HAC8=
|
||||
yunion.io/x/pkg v1.10.1-0.20240412065625-b89c998df243/go.mod h1:ksCJVQ+DwKrJ5QBEoU8pzrDFfDaZVAFH/iJ6yQCYxJk=
|
||||
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e h1:v+EzIadodSwkdZ/7bremd7J8J50Cise/HCylsOJngmo=
|
||||
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e/go.mod h1:0iFKpOs1y4lbCxeOmq3Xx/0AcQoewVPwj62eRluioEo=
|
||||
yunion.io/x/sqlchemy v1.1.3-0.20240326090913-96da8bf92408 h1:TmkgsnVG/KsUfxaFxaYEhQs0o4nXc9fFFlqZv6mwZ/E=
|
||||
|
||||
Vendored
+2
-2
@@ -1476,7 +1476,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.20240412034729-5250d15c00b1
|
||||
# yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20240412094305-e14a0e9ddb86
|
||||
## explicit; go 1.18
|
||||
yunion.io/x/cloudmux/pkg/apis
|
||||
yunion.io/x/cloudmux/pkg/apis/billing
|
||||
@@ -1573,7 +1573,7 @@ yunion.io/x/log/hooks
|
||||
yunion.io/x/ovsdb/cli_util
|
||||
yunion.io/x/ovsdb/schema/ovn_nb
|
||||
yunion.io/x/ovsdb/types
|
||||
# yunion.io/x/pkg v1.10.1-0.20240410104547-550ff8a373cc
|
||||
# yunion.io/x/pkg v1.10.1-0.20240412065625-b89c998df243
|
||||
## explicit; go 1.18
|
||||
yunion.io/x/pkg/appctx
|
||||
yunion.io/x/pkg/errors
|
||||
|
||||
-2
@@ -54,8 +54,6 @@ func (self *SRegion) GetDisk(id string) (*SDisk, error) {
|
||||
return nil, err
|
||||
}
|
||||
return ret, nil
|
||||
|
||||
return nil, cloudprovider.ErrNotImplemented
|
||||
}
|
||||
|
||||
func (self *SDisk) GetId() string {
|
||||
|
||||
+25
@@ -356,6 +356,18 @@ func (self *SOracleClient) GetSubAccounts() ([]cloudprovider.SSubAccount, error)
|
||||
subAccount.HealthStatus = api.CLOUD_PROVIDER_HEALTH_NORMAL
|
||||
ret = append(ret, subAccount)
|
||||
}
|
||||
if len(self.compartment) == 0 {
|
||||
compartment, err := self.GetCompartment(self.tenancyOCID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
subAccount := cloudprovider.SSubAccount{}
|
||||
subAccount.Id = compartment.Id
|
||||
subAccount.Name = compartment.Name
|
||||
subAccount.Account = fmt.Sprintf("%s/%s", self.userOCID, compartment.Id)
|
||||
subAccount.HealthStatus = api.CLOUD_PROVIDER_HEALTH_NORMAL
|
||||
ret = append(ret, subAccount)
|
||||
}
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
@@ -381,6 +393,19 @@ func (self *SOracleClient) GetCompartments() ([]Compartment, error) {
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
func (self *SOracleClient) GetCompartment(id string) (*Compartment, error) {
|
||||
resp, err := self.get(SERVICE_IDENTITY, ORACLE_DEFAULT_REGION, "compartments", id, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ret := &Compartment{}
|
||||
err = resp.Unmarshal(&ret)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "Unmarshal")
|
||||
}
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
func (self *SOracleClient) GetAccountId() string {
|
||||
return self.tenancyOCID
|
||||
}
|
||||
|
||||
+2
@@ -112,6 +112,8 @@ func normalizeOsDistribution(osDist string, imageName string) string {
|
||||
return "AlmaLinux"
|
||||
} else if strings.Contains(osDist, "amazon") && strings.Contains(osDist, "linux") {
|
||||
return "Amazon Linux"
|
||||
} else if strings.Contains(osDist, "kylin") {
|
||||
return "Kylin"
|
||||
} else if strings.Contains(osDist, "windows") {
|
||||
for _, ver := range []string{"2003", "2008", "2012", "2016", "2019", "2022"} {
|
||||
if strings.Contains(osDist, ver) {
|
||||
|
||||
Reference in New Issue
Block a user