Skip to content

Commit

Permalink
Add metadata for GuestTempalte details
Browse files Browse the repository at this point in the history
  • Loading branch information
rainzm committed Jul 27, 2020
1 parent 02b3032 commit a66ba3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/apis/compute/guesttemplate.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ type GuestTemplateListInput struct {
}

type GuestTemplateConfigInfo struct {
Metadata map[string]string `json:"metadata"`
Secgroup string `json:"secgroup"`
Sku GuestTemplateSku `json:"sku"`
Disks []GuestTemplateDisk `json:"disks"`
Expand Down
3 changes: 3 additions & 0 deletions pkg/compute/models/guest_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,9 @@ func (gt *SGuestTemplate) getMoreDetails(ctx context.Context, userCred mcclient.
}
out.Brand = Hypervisor2Brand(gt.Hypervisor)

// metadata
configInfo.Metadata = input.Metadata

// sku deal
if len(input.InstanceType) > 0 {
skuOutput := computeapis.GuestTemplateSku{}
Expand Down

0 comments on commit a66ba3f

Please sign in to comment.