From e42a313f36a392726413b905f5587245c93bf022 Mon Sep 17 00:00:00 2001 From: Qu Xuan Date: Thu, 23 Sep 2021 20:27:50 +0800 Subject: [PATCH] fix(region): google vm mac addr --- pkg/multicloud/google/instance.go | 4 +--- pkg/multicloud/google/instancenic.go | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg/multicloud/google/instance.go b/pkg/multicloud/google/instance.go index 9cb577f459..bae147c7a5 100644 --- a/pkg/multicloud/google/instance.go +++ b/pkg/multicloud/google/instance.go @@ -290,10 +290,8 @@ func (instance *SInstance) GetOsType() cloudprovider.TOsType { for _, disk := range instance.Disks { if disk.Index == 0 { for _, license := range disk.Licenses { - if strings.Index(strings.ToLower(license), "windows") < 0 { + if strings.Contains(strings.ToLower(license), "windows") { return cloudprovider.OsTypeWindows - } else { - return cloudprovider.OsTypeLinux } } } diff --git a/pkg/multicloud/google/instancenic.go b/pkg/multicloud/google/instancenic.go index ae87474486..572251fbdf 100644 --- a/pkg/multicloud/google/instancenic.go +++ b/pkg/multicloud/google/instancenic.go @@ -45,7 +45,7 @@ func (nic *SNetworkInterface) GetIP() string { func (nic *SNetworkInterface) GetMAC() string { ip, _ := netutils.NewIPV4Addr(nic.NetworkIP) - return ip.ToMac("00:16:") + return ip.ToMac("42:01:") } func (nic *SNetworkInterface) GetDriver() string {