示例#1
0
文件: lxc.go 项目: zanella/nomad
// Fingerprint fingerprints the lxc driver configuration
func (d *LxcDriver) Fingerprint(cfg *config.Config, node *structs.Node) (bool, error) {
	enabled := cfg.ReadBoolDefault(lxcConfigOption, true)
	if !enabled && !cfg.DevMode {
		return false, nil
	}
	version := lxc.Version()
	if version == "" {
		return false, nil
	}
	node.Attributes["driver.lxc.version"] = version
	node.Attributes["driver.lxc"] = "1"
	return true, nil
}
示例#2
0
文件: lxc_test.go 项目: zanella/nomad
func lxcPresent(t *testing.T) bool {
	return lxc.Version() != ""
}