def ex_attach_node_to_vlan(self, node, vlan=None, private_ipv4=None):
        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 response_code in ['IN_PROGRESS', 'OK']
Signs given data using a private key.
dataset/ETHPy150Open apache/libcloud/libcloud/compute/drivers/dimensiondata.py/DimensionDataNodeDriver.ex_attach_node_to_vlan--crossover with--dataset/ETHPy150Open google/python-adb/adb/adb_protocol.py/AuthSigner.Sign