def handle_get_version_command(self):
        """ Handles <get_version> command.

        @return: Response string for <get_version> command.
        """
        protocol = Element('protocol')
        for name, value in [('name', 'OSP'), ('version', self.get_protocol_version())]:
            elem = SubElement(protocol, name)
            elem.text = value

        daemon = Element('daemon')
        for name, value in [('name', self.get_daemon_name()), ('version', self.get_daemon_version())]:
            elem = SubElement(daemon, name)
            elem.text = value

        scanner = Element('scanner')
        for name, value in [('name', self.get_scanner_name()), ('version', self.get_scanner_version())]:
            elem = SubElement(scanner, name)
            elem.text = value

        content = [protocol, daemon, scanner]

        if self.get_vts_version():
            vts = Element('vts')
            elem = SubElement(vts, 'version')
            elem.text = self.get_vts_version()
            content.append(vts)

        return simple_response_str('get_version', 200, 'OK', content)
def handle_get_version_command ( self ) : protocol = Element ( 'protocol' ) for name , value in [ ( 'name' , 'OSP' ) , ( 'version' , self . get_protocol_version ( ) ) ] : elem = SubElement ( protocol , name ) elem . text = value daemon = Element ( 'daemon' ) for name , value in [ ( 'name' , self . get_daemon_name ( ) ) , ( 'version' , self . get_daemon_version ( ) ) ] : elem = SubElement ( daemon , name ) elem . text = value scanner = Element ( 'scanner' ) for name , value in [ ( 'name' , self . get_scanner_name ( ) ) , ( 'version' , self . get_scanner_version ( ) ) ] : elem = SubElement ( scanner , name ) elem . text = value content = [ protocol , daemon , scanner ] if self . get_vts_version ( ) : vts = Element ( 'vts' ) elem = SubElement ( vts , 'version' ) elem . text = self . get_vts_version ( ) content . append ( vts ) return simple_response_str ( 'get_version' , 200 , 'OK' , content )
Handles <get_version> command.

        @return: Response string for <get_version> command.