

def attach_volume(self, node, volume, device):
    action = ET.Element('ACTION')
    perform = ET.SubElement(action, 'PERFORM')
    perform.text = 'ATTACHDISK'
    params = ET.SubElement(action, 'PARAMS')
    ET.SubElement(target, 'STORAGE', {
        'href': ('/storage/%s' % str(volume.id)),
    })
    target = ET.SubElement(params, 'TARGET')
    target.text = device
    xml = ET.tostring(action)
    url = ('/compute/%s/action' % node.id)
    resp = self.connection.request(url, method='POST', data=xml)
    return (resp.status == httplib.ACCEPTED)

dataset/ETHPy150Open apache/libcloud/libcloud/compute/drivers/opennebula.py OpenNebula_3_6_NodeDriver.attach_volume/VarMisuse@57/75 `params`->`target`