Automatic merge from release/2.0.0 -> release/2.1.0

* commit 'a2d8b3bf994423f88f5306999a8eec8169eec133':
  fixup cronman/doc.go
  修正:cloudprovider的secret字段没有在list中获得
This commit is contained in:
邱剑
2018-08-14 12:18:40 +08:00
2 changed files with 5 additions and 4 deletions
+1
View File
@@ -0,0 +1 @@
package cronman // import "yunion.io/x/onecloud/pkg/cloudcommon/cronman"
+4 -4
View File
@@ -47,8 +47,8 @@ type SCloudprovider struct {
AccessUrl string `width:"64" charset:"ascii" nullable:"true" list:"admin" update:"admin" create:"admin_optional"`
// Hostname string `width:"64" charset:"ascii" nullable:"true"` // Column(VARCHAR(64, charset='ascii'), nullable=False)
// port = Column(Integer, nullable=False)
Account string `width:"64" charset:"ascii" nullable:"false" list:"admin" create:"admin_required"` // Column(VARCHAR(64, charset='ascii'), nullable=False)
Secret string `width:"256" charset:"ascii" nullable:"false" create:"admin_required"` // Column(VARCHAR(256, charset='ascii'), nullable=False)
Account string `width:"64" charset:"ascii" nullable:"false" list:"admin" create:"admin_required"` // Column(VARCHAR(64, charset='ascii'), nullable=False)
Secret string `width:"256" charset:"ascii" nullable:"false" list:"admin" create:"admin_required"` // Column(VARCHAR(256, charset='ascii'), nullable=False)
LastSync time.Time `get:"admin" list:"admin"` // = Column(DateTime, nullable=True)
@@ -257,7 +257,7 @@ func (self *SCloudprovider) AllowPerformSync(ctx context.Context, userCred mccli
}
func (self *SCloudprovider) PerformSync(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error) {
if ! self.Enabled {
if !self.Enabled {
return nil, httperrors.NewInvalidStatusError("Cloudprovider disabled")
}
syncRange := SSyncRange{}
@@ -276,7 +276,7 @@ func (self *SCloudprovider) AllowPerformUpdateCredential(ctx context.Context, us
}
func (self *SCloudprovider) PerformUpdateCredential(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error) {
if ! self.Enabled {
if !self.Enabled {
return nil, httperrors.NewInvalidStatusError("Cloudprovider disabled")
}