fix: deprecated-by => yunion:deprecated-by

This commit is contained in:
Qiu Jian
2020-04-16 23:24:56 +08:00
parent 5651805eb0
commit 98fcd1df0f
46 changed files with 162 additions and 103 deletions
+3 -3
View File
@@ -366,8 +366,8 @@ func (gt *SGuestTemplate) getMoreDetails(ctx context.Context, userCred mcclient.
configInfo.Disks = disks
// keypair
if len(input.KeypairId) > 0 {
model, err := KeypairManager.FetchById(input.KeypairId)
if len(input.Keypair) > 0 {
model, err := KeypairManager.FetchByIdOrName(userCred, input.Keypair)
if err == nil {
keypair := model.(*SKeypair)
configInfo.Keypair = keypair.GetName()
@@ -482,7 +482,7 @@ func (gt *SGuestTemplate) PerformPublic(
// check for below private resource in the guest template
privateResource := map[string]int{
"keypair": len(input.KeypairId),
"keypair": len(input.Keypair),
"instance group": len(input.InstanceGroupIds),
"instance snapshot": len(input.InstanceSnapshotId),
}