// IsHardwareSchemaV2 - true when we are using v2, false for v1
func (c *OVClient) IsHardwareSchemaV2() bool {
	var currentversion liboneview.Version
	var asc liboneview.APISupport
	currentversion = currentversion.CalculateVersion(c.APIVersion, 108) // force icsp to 108 version since icsp version doesn't matter
	asc = asc.NewByName("server_hardwarev2.go")
	if asc.IsSupported(currentversion) {
		log.Debugf("IsHardwareSchemaV2 is supported: %+v", currentversion)
		return true
	}
	return false
}
Exemplo n.º 2
0
// ProfileTemplatesNotSupported - determine these functions are supported
func (c *OVClient) ProfileTemplatesNotSupported() bool {
	var currentversion liboneview.Version
	var asc liboneview.APISupport
	currentversion = currentversion.CalculateVersion(c.APIVersion, 108) // force icsp to 108 version since icsp version doesn't matter
	asc = asc.NewByName("profile_templates.go")
	if !asc.IsSupported(currentversion) {
		log.Debugf("ProfileTemplates client version not supported: %+v", currentversion)
		return true
	}
	return false
}