// newTestHypervisorConfig creaets a new virtcontainers
// HypervisorConfig, ensuring that the required resources are also
// created.
//
// Note: no parameter validation in case caller wishes to create an invalid
// object.
newTestHypervisorConfig creaets a new virtcontainers
HypervisorConfig, ensuring that the required resources are also
created.

no parameter validation in case caller wishes to create an invalid
object.
// newTestHypervisorConfig creaets a new virtcontainers // HypervisorConfig ensuring that the required resources are also // created . // // Note : no parameter validation in case caller wishes to create an invalid // object .
func newTestHypervisorConfig(dir string, create bool) (vc.HypervisorConfig, error) {
	kernelPath := path.Join(dir, "kernel")
	imagePath := path.Join(dir, "image")
	hypervisorPath := path.Join(dir, "hypervisor")
	if create {
		for _, file := range []string{kernelPath, imagePath, hypervisorPath} {
			err := createEmptyFile(file)
			if err != nil {
				return vc.HypervisorConfig{}, err
			}
		}
	}
	return vc.HypervisorConfig{
		KernelPath:            kernelPath,
		ImagePath:             imagePath,
		HypervisorPath:        hypervisorPath,
		HypervisorMachineType: "pc-lite",
	}, nil
}
func newTestHypervisorConfig ( dir string , create bool ) ( vc . HypervisorConfig , error ) { kernelPath := path . Join ( dir , " " ) imagePath := path . Join ( dir , " " ) hypervisorPath := path . Join ( dir , " " ) if create { for _ , file := range [ ] string { kernelPath , imagePath , hypervisorPath } { err := createEmptyFile ( file ) if err != nil { return vc . HypervisorConfig { } , err } } } return vc . HypervisorConfig { KernelPath : kernelPath , ImagePath : imagePath , HypervisorPath : hypervisorPath , HypervisorMachineType : " " , } , nil }
newTestHypervisorConfig creaets a new virtcontainers
HypervisorConfig, ensuring that the required resources are also
created.
newTestHypervisorConfig creaets a new virtcontainers HypervisorConfig ensuring that the required resources are also created .