def get_ontap_version(self, cached=True):
    'Gets the ONTAP version.'
    if cached:
        return self.connection.get_ontap_version()
    ontap_version = netapp_api.NaElement('system-get-version')
    result = self.connection.invoke_successfully(ontap_version, True)
    version_tuple = (result.get_child_by_name('version-tuple') or netapp_api.NaElement('none'))
    system_version_tuple = (version_tuple.get_child_by_name('system-version-tuple') or netapp_api.NaElement('none'))
    generation = system_version_tuple.get_child_content('generation')
    major = system_version_tuple.get_child_content('major')
    return ('%(generation)s.%(major)s' % {'generation': generation, 'major': major})
Gets the ONTAP version.
def get_ontap_version(self, cached=True):
    
    if cached:
        return self.connection.get_ontap_version()
    ontap_version = netapp_api.NaElement('system-get-version')
    result = self.connection.invoke_successfully(ontap_version, True)
    version_tuple = (result.get_child_by_name('version-tuple') or netapp_api.NaElement('none'))
    system_version_tuple = (version_tuple.get_child_by_name('system-version-tuple') or netapp_api.NaElement('none'))
    generation = system_version_tuple.get_child_content('generation')
    major = system_version_tuple.get_child_content('major')
    return ('%(generation)s.%(major)s' % {'generation': generation, 'major': major})