Beispiel #1
0
func addCoreosExtraInfo(a *api.API, pkg *api.Package, m *omahaSpec.Manifest) error {
	c, err := a.GetCoreosAction(pkg.ID)
	if err != nil {
		return err
	}
	action := m.AddAction(c.Event)
	action.ChromeOSVersion = c.ChromeOSVersion
	action.Sha256 = c.Sha256
	action.NeedsAdmin = c.NeedsAdmin
	action.IsDelta = c.IsDelta
	action.DisablePayloadBackoff = c.DisablePayloadBackoff
	action.MetadataSignatureRsa = c.MetadataSignatureRsa
	action.MetadataSize = c.MetadataSize
	action.Deadline = c.Deadline
	return nil
}
Beispiel #2
0
func addPackage(pkg *api.Package, m *omahaSpec.Manifest) {
	var filename, size, hash string
	if sizeValue, err := pkg.Size.Value(); err == nil {
		size, _ = sizeValue.(string)
	}

	if filenameValue, err := pkg.Filename.Value(); err == nil {
		filename, _ = filenameValue.(string)
	}

	if hashValue, err := pkg.Hash.Value(); err == nil {
		hash, _ = hashValue.(string)
	}

	if hash != "" || filename != "" || size != "" {
		m.AddPackage(hash, filename, size, true)
	}
}
Beispiel #3
0
func addContainerExtraInfo(pkg *api.Package, m *omahaSpec.Manifest) error {
	action := m.AddAction("update_app")
	// Send the application type when it's a container (for containers_updater)
	action.ChromeOSVersion = strconv.Itoa(pkg.Type)
	return nil
}