mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 14:19:49 +08:00
Merge pull request #12007 from rainzm/automated-cherry-pick-of-#12006-upstream-release-3.8
Automated cherry pick of #12006: feat(region): add direct vpc options
This commit is contained in:
@@ -143,8 +143,7 @@ func (guest *SGuest) sshableTryEach(
|
||||
if vpc == nil {
|
||||
continue
|
||||
}
|
||||
if vpc.Id == compute_api.DEFAULT_VPC_ID {
|
||||
// - vpc_id == "default"
|
||||
if vpc.Id == compute_api.DEFAULT_VPC_ID || vpc.Direct {
|
||||
if ok := guest.sshableTryDefaultVPC(ctx, tryData, gn); ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -87,6 +87,9 @@ type SVpc struct {
|
||||
|
||||
// Vpc外网访问模式
|
||||
ExternalAccessMode string `width:"16" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"`
|
||||
|
||||
// Can it be connected directly
|
||||
Direct bool `default:"false" list:"user" update:"user"`
|
||||
}
|
||||
|
||||
func (manager *SVpcManager) GetContextManagers() [][]db.IModelManager {
|
||||
|
||||
@@ -88,6 +88,7 @@ func (opts *VpcIdOptions) Params() (jsonutils.JSONObject, error) {
|
||||
type VpcUpdateOptions struct {
|
||||
BaseUpdateOptions
|
||||
ExternalAccessMode string `help:"Filter by external access mode" choices:"distgw|eip|eip-distgw"`
|
||||
Direct bool `help:"Can it be connected directly"`
|
||||
}
|
||||
|
||||
func (opts *VpcUpdateOptions) Params() (jsonutils.JSONObject, error) {
|
||||
|
||||
Reference in New Issue
Block a user