Skip to content

Commit

Permalink
fix(region): vendor update (#18464)
Browse files Browse the repository at this point in the history
  • Loading branch information
ioito authored Oct 27, 2023
1 parent 908a43c commit 615ef32
Show file tree
Hide file tree
Showing 29 changed files with 365 additions and 539 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,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.20231027025551-a53fc39099d0
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20231027072226-b82b6cc2b7d2
yunion.io/x/executor v0.0.0-20230705125604-c5ac3141db32
yunion.io/x/jsonutils v1.0.1-0.20230613121553-0f3b41e2ef19
yunion.io/x/log v1.0.1-0.20230411060016-feb3f46ab361
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1179,8 +1179,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.20231027025551-a53fc39099d0 h1:vIfj2xB25ZhXF8HQgsUfUIzos81nkz+n+RCMvxeDqe8=
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20231027025551-a53fc39099d0/go.mod h1:McRjoG2gaOUisB+Qa41kLCNZhr0lsCu4apEjTiphXVY=
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20231027072226-b82b6cc2b7d2 h1:767uclY/nlFXrd4LN6WRtkphTZHT+KYHDaH2PdhZnAI=
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20231027072226-b82b6cc2b7d2/go.mod h1:McRjoG2gaOUisB+Qa41kLCNZhr0lsCu4apEjTiphXVY=
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=
Expand Down
33 changes: 17 additions & 16 deletions pkg/apis/webconsole/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,21 @@ const (
)

const (
VNC = "vnc"
ALIYUN = "aliyun"
QCLOUD = "qcloud"
OPENSTACK = "openstack"
SPICE = "spice"
WMKS = "wmks"
WS = "websocket"
VMRC = "vmrc"
ZSTACK = "zstack"
CTYUN = "ctyun"
HUAWEI = "huawei"
HCS = "hcs"
APSARA = "apsara"
JDCLOUD = "jdcloud"
CLOUDPODS = "cloudpods"
PROXMOX = "proxmox"
VNC = "vnc"
ALIYUN = "aliyun"
QCLOUD = "qcloud"
OPENSTACK = "openstack"
SPICE = "spice"
WMKS = "wmks"
WS = "websocket"
VMRC = "vmrc"
ZSTACK = "zstack"
CTYUN = "ctyun"
HUAWEI = "huawei"
HCS = "hcs"
APSARA = "apsara"
JDCLOUD = "jdcloud"
CLOUDPODS = "cloudpods"
PROXMOX = "proxmox"
VOLC_ENGINE = "volcengine"
)
3 changes: 2 additions & 1 deletion pkg/webconsole/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,8 @@ func handleServerRemoteConsole(ctx context.Context, w http.ResponseWriter, r *ht
case session.ALIYUN, session.QCLOUD, session.OPENSTACK,
session.VMRC, session.ZSTACK, session.CTYUN,
session.HUAWEI, session.HCS, session.APSARA,
session.JDCLOUD, session.CLOUDPODS, session.PROXMOX:
session.JDCLOUD, session.CLOUDPODS, session.PROXMOX,
session.VOLCENGINE:
responsePublicCloudConsole(ctx, info, w)
case session.VNC, session.SPICE, session.WMKS:
handleDataSession(ctx, info, w, url.Values{"password": {info.GetPassword()}}, true)
Expand Down
8 changes: 7 additions & 1 deletion pkg/webconsole/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"yunion.io/x/jsonutils"
"yunion.io/x/log"
"yunion.io/x/pkg/appctx"
"yunion.io/x/pkg/utils"

api "yunion.io/x/onecloud/pkg/apis/compute"
"yunion.io/x/onecloud/pkg/httperrors"
Expand Down Expand Up @@ -58,7 +59,12 @@ func (s *ConnectionServer) ServeHTTP(w http.ResponseWriter, req *http.Request) {
switch protocol {
case session.VNC, session.SPICE:
info := sessionObj.ISessionData.(*session.RemoteConsoleInfo)
if info.Hypervisor == api.HYPERVISOR_OPENSTACK || info.Hypervisor == api.HYPERVISOR_PROXMOX || info.Hypervisor == api.HYPERVISOR_CTYUN {
if utils.IsInStringArray(info.Hypervisor, []string{
api.HYPERVISOR_OPENSTACK,
api.HYPERVISOR_PROXMOX,
api.HYPERVISOR_CTYUN,
api.HYPERVISOR_VOLCENGINE,
}) {
srv, err = NewWebsocketProxyServer(sessionObj)
} else {
srv, err = NewWebsockifyServer(sessionObj)
Expand Down
35 changes: 18 additions & 17 deletions pkg/webconsole/session/remote_console.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,23 @@ import (
)

const (
VNC = api.VNC
ALIYUN = api.ALIYUN
QCLOUD = api.QCLOUD
OPENSTACK = api.OPENSTACK
SPICE = api.SPICE
WMKS = api.WMKS
WS = api.WS
VMRC = api.VMRC
ZSTACK = api.ZSTACK
CTYUN = api.CTYUN
HUAWEI = api.HUAWEI
HCS = api.HCS
APSARA = api.APSARA
JDCLOUD = api.JDCLOUD
CLOUDPODS = api.CLOUDPODS
PROXMOX = api.PROXMOX
VNC = api.VNC
ALIYUN = api.ALIYUN
QCLOUD = api.QCLOUD
OPENSTACK = api.OPENSTACK
SPICE = api.SPICE
WMKS = api.WMKS
WS = api.WS
VMRC = api.VMRC
ZSTACK = api.ZSTACK
CTYUN = api.CTYUN
HUAWEI = api.HUAWEI
HCS = api.HCS
APSARA = api.APSARA
JDCLOUD = api.JDCLOUD
CLOUDPODS = api.CLOUDPODS
PROXMOX = api.PROXMOX
VOLCENGINE = api.VOLC_ENGINE
)

type RemoteConsoleInfo struct {
Expand Down Expand Up @@ -124,7 +125,7 @@ func (info *RemoteConsoleInfo) GetConnectParams() (string, error) {
return info.getQcloudURL()
case CLOUDPODS:
return info.getCloudpodsURL()
case OPENSTACK, VMRC, ZSTACK, CTYUN, HUAWEI, HCS, JDCLOUD, PROXMOX:
case OPENSTACK, VMRC, ZSTACK, CTYUN, HUAWEI, HCS, JDCLOUD, PROXMOX, VOLCENGINE:
return info.Url, nil
default:
return "", fmt.Errorf("Can't convert protocol %s to connect params", info.Protocol)
Expand Down
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1438,7 +1438,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.20231027025551-a53fc39099d0
# yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20231027072226-b82b6cc2b7d2
## explicit; go 1.18
yunion.io/x/cloudmux/pkg/apis
yunion.io/x/cloudmux/pkg/apis/billing
Expand Down
4 changes: 4 additions & 0 deletions vendor/yunion.io/x/cloudmux/pkg/multicloud/instance_base.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 0 additions & 19 deletions vendor/yunion.io/x/cloudmux/pkg/multicloud/volcengine/charge.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

85 changes: 19 additions & 66 deletions vendor/yunion.io/x/cloudmux/pkg/multicloud/volcengine/disk.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/yunion.io/x/cloudmux/pkg/multicloud/volcengine/eip.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 615ef32

Please sign in to comment.