예제 #1
0
func (v vmware) IsAvailable() bool {
	if v.ovfFileName != "" {
		_, err := os.Stat(v.ovfFileName)
		return !os.IsNotExist(err)
	}
	return vmcheck.IsVirtualWorld()
}
예제 #2
0
func main() {
	if !vmcheck.IsVirtualWorld() {
		fmt.Println("not in a virtual world... :(")
		return
	}

	version, typ := vmcheck.GetVersion()
	fmt.Println(version, typ)

	config := rpcvmx.NewConfig()
	fmt.Println(config.GetString("foo", "foo"))
	fmt.Println(config.GetString("bar", "foo"))
}
예제 #3
0
func main() {
	if !vmcheck.IsVirtualWorld() {
		fmt.Println("not in a virtual world... :(")
		return
	}

	config := rpcvmx.NewConfig()

	fmt.Println(config.SetString("foo", "bar"))
	fmt.Println(config.String("foo", "foo"))

	fmt.Println(config.SetInt("foo", 3))
	fmt.Println(config.Int("foo", 0))

	fmt.Println(config.SetBool("foo", false))
	fmt.Println(config.Bool("foo", true))

}
예제 #4
0
func (v vmware) IsAvailable() bool {
	return vmcheck.IsVirtualWorld()
}