feat(omaha): add a bootid field

the bootid field will be used by CoreOS to uniquely identify a boot of
an instance.
This commit is contained in:
Brandon Philips 2013-07-09 11:48:57 -07:00
parent c2c4ee6b06
commit 528535f63e
3 changed files with 8 additions and 1 deletions

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<request protocol="3.0" version="ChromeOSUpdateEngine-0.1.0.0" updaterversion="ChromeOSUpdateEngine-0.1.0.0" installsource="ondemandupdate" ismachine="1">
<os version="Indy" platform="Chrome OS" sp="ForcedUpdate_x86_64"></os>
<app appid="{87efface-864d-49a5-9bb3-4b050a7c227a}" version="ForcedUpdate" track="dev-channel" from_track="developer-build" lang="en-US" board="amd64-generic" hardware_class="" delta_okay="false" >
<app appid="{87efface-864d-49a5-9bb3-4b050a7c227a}" bootid="{7D52A1CC-7066-40F0-91C7-7CB6A871BFDE}" version="ForcedUpdate" track="dev-channel" from_track="developer-build" lang="en-US" board="amd64-generic" hardware_class="" delta_okay="false" >
<ping active="1" a="-1" r="-1"></ping>
<updatecheck targetversionprefix=""></updatecheck>
<event eventtype="3" eventresult="2" previousversion=""></event>

View file

@ -82,6 +82,9 @@ type App struct {
// update engine extensions
Track string `xml:"track,attr,omitempty"`
FromTrack string `xml:"from_track,attr,omitempty"`
// coreos update engine extensions
BootId string `xml:"bootid,attr,omitempty"`
}
func NewApp(id string) *App {

View file

@ -28,6 +28,10 @@ func TestOmahaRequestUpdateCheck(t *testing.T) {
t.Error("Expected an App Id")
}
if v.Apps[0].BootId != "{7D52A1CC-7066-40F0-91C7-7CB6A871BFDE}" {
t.Error("Expected a Boot Id")
}
if v.Apps[0].UpdateCheck == nil {
t.Error("Expected an UpdateCheck")
}