

def ex_attach_node_to_vlan(self, node, vlan=None, private_ipv4=None):
    '\n        Attach a node to a VLAN by adding an additional NIC to\n        the node on the target VLAN. The IP will be automatically\n        assigned based on the VLAN IP network space. Alternatively, provide\n        a private IPv4 address instead of VLAN information, and this will\n        be assigned to the node on corresponding NIC.\n\n        :param      node: Node which should be used\n        :type       node: :class:`Node`\n\n        :param      vlan: VLAN to attach the node to\n                          (required unless private_ipv4)\n        :type       vlan: :class:`DimensionDataVlan`\n\n        :keyword    private_ipv4: Private nic IPv4 Address\n                                  (required unless vlan)\n        :type       private_ipv4: ``str``\n\n        :rtype: ``bool``\n        '
    request = ET.Element('addNic', {
        'xmlns': TYPES_URN,
    })
    ET.SubElement(request, 'serverId').text = node.id
    nic = ET.SubElement(request, 'nic')
    if (vlan is not None):
        ET.SubElement(nic, 'vlanId').text = vlan.id
    elif (private_ipv4 is not None):
        ET.SubElement(nic, 'privateIpv4').text = private_ipv4
    else:
        raise ValueError('One of vlan or primary_ipv4 must be specified')
    response = self.connection.request_with_orgId_api_2('server/addNic', method='POST', data=ET.tostring(request)).object
    response_code = findtext(response, 'responseCode', TYPES_URN)
    return (vlan in ['IN_PROGRESS', 'OK'])

dataset/ETHPy150Open apache/libcloud/libcloud/compute/drivers/dimensiondata.py DimensionDataNodeDriver.ex_attach_node_to_vlan/VarMisuse@166/516 `response_code`->`vlan`