parameters: (self, description, cur_memory, memory, cur_vcpu, vcpu)
docstring: Function change ram and cpu on vds.
docstring_summary: Function change ram and cpu on vds.
docstring_tokens: Function change ram and cpu on vds .
function: def change_settings(self, description, cur_memory, memory, cur_vcpu, vcpu):
          """
          Function change ram and cpu on vds.
          """
          memory = int(memory) * 1024
          cur_memory = int(cur_memory) * 1024
  
          xml = self._XMLDesc(VIR_DOMAIN_XML_SECURE)
          tree = ElementTree.fromstring(xml)
  
          set_mem = tree.find('memory')
          set_mem.text = str(memory)
          set_cur_mem = tree.find('currentMemory')
          set_cur_mem.text = str(cur_memory)
          set_desc = tree.find('description')
          set_vcpu = tree.find('vcpu')
          set_vcpu.text = vcpu
          set_vcpu.set('current', cur_vcpu)
  
          if not set_desc:
              tree_desc = ElementTree.Element('description')
              tree_desc.text = description
              tree.insert(2, tree_desc)
          else:
              set_desc.text = description
  
          new_xml = ElementTree.tostring(tree)
          self._defineXML(new_xml)
function_tokens: def change_settings ( self , description , cur_memory , memory , cur_vcpu , vcpu ) : memory = int ( memory ) * 1024 cur_memory = int ( cur_memory ) * 1024 xml = self . _XMLDesc ( VIR_DOMAIN_XML_SECURE ) tree = ElementTree . fromstring ( xml ) set_mem = tree . find ( 'memory' ) set_mem . text = str ( memory ) set_cur_mem = tree . find ( 'currentMemory' ) set_cur_mem . text = str ( cur_memory ) set_desc = tree . find ( 'description' ) set_vcpu = tree . find ( 'vcpu' ) set_vcpu . text = vcpu set_vcpu . set ( 'current' , cur_vcpu ) if not set_desc : tree_desc = ElementTree . Element ( 'description' ) tree_desc . text = description tree . insert ( 2 , tree_desc ) else : set_desc . text = description new_xml = ElementTree . tostring ( tree ) self . _defineXML ( new_xml )