Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
Save apimodel after upgrade (#2306)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cecile Robert-Michon authored and jackfrancis committed Feb 20, 2018
1 parent 97e82f5 commit e5774d7
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions cmd/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,5 +206,26 @@ func (uc *upgradeCmd) run(cmd *cobra.Command, args []string) error {
log.Fatalf("Error upgrading cluster: %s \n", err.Error())
}

apiloader := &api.Apiloader{
Translator: &i18n.Translator{
Locale: uc.locale,
},
}
b, e := apiloader.SerializeContainerService(uc.containerService, uc.apiVersion)

if e != nil {
return e
}

f := acsengine.FileSaver{
Translator: &i18n.Translator{
Locale: uc.locale,
},
}

if e = f.SaveFile(uc.deploymentDirectory, "apimodel.json", b); e != nil {
return e
}

return nil
}

0 comments on commit e5774d7

Please sign in to comment.