fix: vm nic charge type support (#23703)

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
This commit is contained in:
Jian Qiu
2025-11-07 10:53:04 +08:00
committed by GitHub
co-authored by Qiu Jian
parent f53caeb6d1
commit dfbd89c9db
8 changed files with 43 additions and 16 deletions
+2
View File
@@ -357,6 +357,8 @@ func ParseNetworkConfig(desc string, idx int) (*compute.NetworkConfig, error) {
netConfig.Driver = p
} else if strings.HasPrefix(p, "num-queues=") {
netConfig.NumQueues, _ = strconv.Atoi(p[len("num-queues="):])
} else if strings.HasPrefix(p, "charge-type=") {
netConfig.ChargeType = p[len("charge-type="):]
} else if regutils.MatchSize(p) {
bw, err := fileutils.GetSizeMb(p, 'M', 1000)
if err != nil {