deviceconfig

package
v0.0.0-...-e560ebb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BoardToPlatformMap = map[string]string{
	"auron_paine":             "auron",
	"auron_yuna":              "auron",
	"buddy":                   "auron",
	"gandof":                  "auron",
	"lulu":                    "auron",
	"samus":                   "auron",
	"monroe":                  "beltino",
	"panther":                 "beltino",
	"tricky":                  "beltino",
	"zako":                    "beltino",
	"caroline":                "glados",
	"caroline-ndktranslation": "glados",
	"cave":                    "glados",
	"chell":                   "glados",
	"bob":                     "gru",
	"kevin":                   "gru",
	"kahlee":                  "grunt",
	"excelsior":               "fizz",
	"fizz-labstation":         "fizz",
	"fizz-moblab":             "fizz",
	"guado-kernelnext":        "jecht",
	"guado_labstation":        "jecht",
	"guado":                   "jecht",
	"rikku":                   "jecht",
	"tidus":                   "jecht",
	"asuka":                   "kunimitsu",
	"lars":                    "kunimitsu",
	"sentry":                  "kunimitsu",
	"nyan_big":                "nyan",
	"nyan_blaze":              "nyan",
	"nyan_kitty":              "nyan",
	"elm":                     "oak",
	"hana":                    "oak",
	"atlas":                   "poppy",
	"eve":                     "poppy",
	"nautilus":                "poppy",
	"nocturne":                "poppy",
	"soraka":                  "poppy",
	"banjo":                   "rambi",
	"candy":                   "rambi",
	"enguarde":                "rambi",
	"gnawty":                  "rambi",
	"heli":                    "rambi",
	"kip":                     "rambi",
	"ninja":                   "rambi",
	"orco":                    "rambi",
	"quawks":                  "rambi",
	"squawks":                 "rambi",
	"sumo":                    "rambi",
	"swanky":                  "rambi",
	"winky":                   "rambi",
	"pyro":                    "reef",
	"sand":                    "reef",
	"snappy":                  "reef",
	"arcada":                  "sarien",
	"sarien-kvm":              "sarien",
	"falco":                   "slippy",
	"falco_li":                "slippy",
	"peppy":                   "slippy",
	"banon":                   "strago",
	"celes":                   "strago",
	"cyan":                    "strago",
	"edgar":                   "strago",
	"kefka":                   "strago",
	"reks":                    "strago",
	"relm":                    "strago",
	"sabin":                   "strago",
	"setzer":                  "strago",
	"terra":                   "strago",
	"ultima":                  "strago",
	"wizpig":                  "strago",
	"veyron_fievel":           "veyron_pinky",
	"veyron_jaq":              "veyron_pinky",
	"veyron_jerry":            "veyron_pinky",
	"veyron_mickey":           "veyron_pinky",
	"veyron_mighty":           "veyron_pinky",
	"veyron_minnie":           "veyron_pinky",
	"veyron_rialto":           "veyron_pinky",
	"veyron_speedy":           "veyron_pinky",
	"veyron_tiger":            "veyron_pinky",
}

BoardToPlatformMap refers to the mapping from autotest board to device reference board: https://docs.google.com/spreadsheets/d/1R6ycgnIJnoSWVpN9pVvnrPUacady-vYFkjMrW-pHZ9c/edit#gid=0 Current DUTs' boards and models are not 1:1 matched to platforms and models in device config. BoardToPlatformMap and ModelMap are used temporarily to do the mapping, so that no duts will skip device config retrieval.

View Source
var ModelMap = map[string]string{
	"arcada_signed":    "arcada",
	"falco_li":         "falco",
	"guado-kernelnext": "guado",
	"sarien_signed":    "sarien",
}

ModelMap refers to the mapping from autotest model to device model: https://docs.google.com/spreadsheets/d/1R6ycgnIJnoSWVpN9pVvnrPUacady-vYFkjMrW-pHZ9c/edit#gid=0

Functions

func ConvertValidDeviceConfigID

func ConvertValidDeviceConfigID(dcID *device.ConfigId) *device.ConfigId

ConvertValidDeviceConfigID maps existing device config ID from autotest to valid one.

func DeviceConfigsExists

func DeviceConfigsExists(ctx context.Context, cfgIds []*device.ConfigId) (map[int32]bool, error)

DeviceConfigsExists Checks if the device configs exist in the datastore

func GetAllCachedConfig

func GetAllCachedConfig(ctx context.Context) (map[*device.Config]time.Time, error)

GetAllCachedConfig gets all the device configs from datastore.

func GetCachedConfig

func GetCachedConfig(ctx context.Context, cfgIds []*device.ConfigId) ([]proto.Message, error)

GetCachedConfig gets the device config data from datastore.

func GetDeviceConfigIDStr

func GetDeviceConfigIDStr(cfgid *device.ConfigId) string

GetDeviceConfigIDStr returns a string as device config short name.

func GetValidModel

func GetValidModel(model string) string

GetValidModel maps some autotest models to valid device config model values.

func GetValidPlatform

func GetValidPlatform(platform string) string

GetValidPlatform maps some autotest boards to valid device config platform values.

func UpdateDatastore

func UpdateDatastore(ctx context.Context, client gitiles.GitilesClient, project, committish, path string) error

UpdateDatastore updates the datastore cache for all device config data.

func UpdateDatastoreFromBoxster

func UpdateDatastoreFromBoxster(ctx context.Context, gc git.ClientInterface, joinedConfigPath string, client gitiles.GitilesClient, project, committish, path string) error

UpdateDatastoreFromBoxster updates datastore from boxster (go/boxster)

Types

type Programs

type Programs struct {
	Programs []struct {
		Name           string `json:"name,omitempty"`
		Repo           *Repo  `json:"repo,omitempty"`
		DeviceProjects []struct {
			Repo *Repo `json:"repo,omitempty"`
		} `json:"deviceProjects,omitempty"`
	} `json:"programs,omitempty"`
}

Programs defines the structure of a DLM program list.

type Repo

type Repo struct {
	Name       string `json:"name,omitempty"`
	RepoPath   string `json:"repoPath,omitempty"`
	ConfigPath string `json:"configPath,omitempty"`
}

Repo defines the repo info in DLM configs.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL