Merge pull request #1129 in YUNIONIO/onecloud from ~QIUJIAN/onecloud:hotfix/qj-zone-storagetypes-exclude-baremetal to release/2.6.0

* commit 'fe769b65b46c7d54e0f69ec74acf48ddb0146152':
  fix: zone capability storagetypes filter out baremetal hosts
This commit is contained in:
万垚奇
2019-02-27 17:17:32 +08:00
+1
View File
@@ -126,6 +126,7 @@ func getStorageTypes(zone *SZone, isSysDisk bool) []string {
if isSysDisk {
q = q.Filter(sqlchemy.IsTrue(storages.Field("is_sys_disk_store")))
}
q = q.Filter(sqlchemy.NotEquals(hosts.Field("host_type"), HOST_TYPE_BAREMETAL))
q = q.Distinct()
rows, err := q.Rows()
if err != nil {