func (p *Process) Validate(sys *system.System) []TestResult { skip := false sysProcess := sys.NewProcess(p.Executable, sys, util.Config{}) var results []TestResult results = append(results, ValidateValue(p, "running", p.Running, sysProcess.Running, skip)) return results }
func (p *Process) Validate(sys *system.System) []TestResult { sysProcess := sys.NewProcess(p.Executable, sys) var results []TestResult results = append(results, ValidateValue(p, "running", p.Running, sysProcess.Running)) return results }
func (r ProcessMap) AppendSysResource(sr string, sys *system.System, config util.Config) (*Process, error) { sysres := sys.NewProcess(sr, sys, config) res, err := NewProcess(sysres, config) if err != nil { return nil, err } r[res.ID()] = res return res, nil }
func (r ProcessMap) AppendSysResourceIfExists(sr string, sys *system.System) (*Process, system.Process, bool) { sysres := sys.NewProcess(sr, sys) res := NewProcess(sysres) if e, _ := sysres.Exists(); e != true { return res, sysres, false } r[res.ID()] = res return res, sysres, true }
func (r ProcessMap) AppendSysResourceIfExists(sr string, sys *system.System) (*Process, system.Process, bool) { sysres := sys.NewProcess(sr, sys, util.Config{}) // FIXME: Do we want to be silent about errors? res, _ := NewProcess(sysres, util.Config{}) if e, _ := sysres.Exists(); e != true { return res, sysres, false } r[res.ID()] = res return res, sysres, true }
func (r ProcessMap) AppendSysResource(sr string, sys *system.System, config util.Config) (*Process, error) { sysres := sys.NewProcess(sr, sys, config) res, err := NewProcess(sysres, config) if err != nil { return nil, err } if old_res, ok := r[res.ID()]; ok { res.Title = old_res.Title res.Meta = old_res.Meta } r[res.ID()] = res return res, nil }
func (r ProcessMap) AppendSysResource(sr string, sys *system.System) (*Process, system.Process) { sysres := sys.NewProcess(sr, sys) res := NewProcess(sysres) r[res.ID()] = res return res, sysres }