Automatic merge from release/2.1.0 -> release/2.2.0

* commit '1bb838607b441c9e4f14240bcc13c0007cbd2d41':
  minor fixes
  minior fixes
  guestdisk support index filter
  修正:1. 阿里云刚删除主机的IP地址不能占用 2. rebuild root no-account-init无效 3. 其他问题...
This commit is contained in:
邱剑
2018-09-15 21:30:39 +08:00
16 changed files with 144 additions and 25 deletions
+4
View File
@@ -31,6 +31,10 @@ func (manager *SResourceBaseManager) Query(fields ...string) *sqlchemy.SQuery {
return manager.SModelBaseManager.Query(fields...).IsFalse("deleted")
}
func (manager *SResourceBaseManager) RawQuery(fields ...string) *sqlchemy.SQuery {
return manager.SModelBaseManager.Query(fields...)
}
func CanDelete(model IModel, ctx context.Context) bool {
err := model.ValidateDeleteCondition(ctx)
if err == nil {