From 1fe2bbe0e0296b58a81004cd1fc64aafe7b179f4 Mon Sep 17 00:00:00 2001 From: Zexi Li Date: Wed, 13 Feb 2019 15:10:10 +0800 Subject: [PATCH] baremetal: host convert failed --- pkg/cloudcommon/db/modelbase.go | 1 - pkg/cloudcommon/db/resourcebase.go | 1 - pkg/scheduler/api/sched.go | 3 --- 3 files changed, 5 deletions(-) diff --git a/pkg/cloudcommon/db/modelbase.go b/pkg/cloudcommon/db/modelbase.go index 207c5d3691..c48df26c5d 100644 --- a/pkg/cloudcommon/db/modelbase.go +++ b/pkg/cloudcommon/db/modelbase.go @@ -3,7 +3,6 @@ package db import ( "context" "database/sql" - "fmt" "net/http" "yunion.io/x/jsonutils" diff --git a/pkg/cloudcommon/db/resourcebase.go b/pkg/cloudcommon/db/resourcebase.go index fc201376b5..c0f3a7ea7e 100644 --- a/pkg/cloudcommon/db/resourcebase.go +++ b/pkg/cloudcommon/db/resourcebase.go @@ -4,7 +4,6 @@ import ( "context" "time" - "yunion.io/x/jsonutils" "yunion.io/x/onecloud/pkg/mcclient" "yunion.io/x/pkg/util/timeutils" "yunion.io/x/sqlchemy" diff --git a/pkg/scheduler/api/sched.go b/pkg/scheduler/api/sched.go index c2cf22f502..0e59bed553 100644 --- a/pkg/scheduler/api/sched.go +++ b/pkg/scheduler/api/sched.go @@ -401,9 +401,6 @@ func (d *SchedData) fillNetworksInfo(sjson *simplejson.Json) error { if err != nil || net.Idx == "" { net = new(Network) net.Idx = s.Get("network").MustString() - if net.Idx == "" { - return fmt.Errorf("Invalid network desc: %s", s.MustString()) - } net.Wire = s.Get("wire").MustString() net.Driver = s.Get("driver").MustString() net.Exit = s.Get("exit").MustBool()