libcloud/compute/drivers/dimensiondata.py [609:650]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            net_domain_id = self._network_domain_to_network_domain_id(ex_network_domain)

            network_elm.set("networkDomainId", net_domain_id)

            pri_nic = ET.SubElement(network_elm, "primaryNic")

            if ex_primary_nic_private_ipv4 is not None:
                ET.SubElement(pri_nic, "privateIpv4").text = ex_primary_nic_private_ipv4

            if ex_primary_nic_vlan is not None:
                vlan_id = self._vlan_to_vlan_id(ex_primary_nic_vlan)
                ET.SubElement(pri_nic, "vlanId").text = vlan_id

            if ex_primary_nic_network_adapter is not None:
                ET.SubElement(pri_nic, "networkAdapter").text = ex_primary_nic_network_adapter

            if isinstance(ex_additional_nics, (list, tuple)):
                for nic in ex_additional_nics:
                    additional_nic = ET.SubElement(network_elm, "additionalNic")

                    if nic.private_ip_v4 is None and nic.vlan is None:
                        raise ValueError(
                            "Either a vlan or private_ip_v4 "
                            "must be specified for each "
                            "additional nic."
                        )

                    if nic.private_ip_v4 is not None and nic.vlan is not None:
                        raise ValueError(
                            "Either a vlan or private_ip_v4 "
                            "must be specified for each "
                            "additional nic. Not both."
                        )

                    if nic.private_ip_v4 is not None:
                        ET.SubElement(additional_nic, "privateIpv4").text = nic.private_ip_v4

                    if nic.vlan is not None:
                        vlan_id = self._vlan_to_vlan_id(nic.vlan)
                        ET.SubElement(additional_nic, "vlanId").text = vlan_id

                    if nic.network_adapter_name is not None:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



libcloud/compute/drivers/dimensiondata.py [3876:3916]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        net_domain_id = self._network_domain_to_network_domain_id(ex_network_domain)
        network_elm.set("networkDomainId", net_domain_id)

        pri_nic = ET.SubElement(network_elm, "primaryNic")

        if ex_primary_nic_private_ipv4 is not None:
            ET.SubElement(pri_nic, "privateIpv4").text = ex_primary_nic_private_ipv4

        if ex_primary_nic_vlan is not None:
            vlan_id = self._vlan_to_vlan_id(ex_primary_nic_vlan)
            ET.SubElement(pri_nic, "vlanId").text = vlan_id

        if ex_primary_nic_network_adapter is not None:
            ET.SubElement(pri_nic, "networkAdapter").text = ex_primary_nic_network_adapter

        if isinstance(ex_additional_nics, (list, tuple)):
            for nic in ex_additional_nics:
                additional_nic = ET.SubElement(network_elm, "additionalNic")

                if nic.private_ip_v4 is None and nic.vlan is None:
                    raise ValueError(
                        "Either a vlan or private_ip_v4 "
                        "must be specified for each "
                        "additional nic."
                    )

                if nic.private_ip_v4 is not None and nic.vlan is not None:
                    raise ValueError(
                        "Either a vlan or private_ip_v4 "
                        "must be specified for each "
                        "additional nic. Not both."
                    )

                if nic.private_ip_v4 is not None:
                    ET.SubElement(additional_nic, "privateIpv4").text = nic.private_ip_v4

                if nic.vlan is not None:
                    vlan_id = self._vlan_to_vlan_id(nic.vlan)
                    ET.SubElement(additional_nic, "vlanId").text = vlan_id

                if nic.network_adapter_name is not None:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



