def __init__(self, spec, host_cpu):
self.vcpu_set = False<EOL>self.vcpu_num = '<STR_LIT:2>'<EOL>if spec.get('<STR_LIT>'):<EOL><INDENT>self.vcpu_set = True<EOL>self.vcpu_num = spec['<STR_LIT>']<EOL><DEDENT>self.cpu_custom = spec.get('<STR_LIT>')<EOL>self.cpu_model = spec.get('<STR_LIT>')<EOL>self.host_cpu = host_cpu<EOL>self.memory = spec.get('<STR_LIT>')<EOL>self.validate()<EOL>self._cpu_xml = self.generate_cpu_xml()<EOL>self._vcpu_xml = self.generate_vcpu_xml(self.vcpu_num)<EOL>
Generate CPU XML node.

Args:
    spec(dict): VM Lago spec
    host_cpu(lxml.etree.Element): Host cpu capabilities