def _get_interface_params(self, port_id, props):
        if port_id is None:
            return None

        if not props['address']:
            vmi = VirtualMachineInterfaceSM.get(port_id)
            for iip_id in vmi.instance_ips:
                iip = InstanceIpSM.get(iip_id)
                props['address'] = iip.address
                break

        return port_id
    def _get_interface_params(self, port_id, props):
        if port_id is None:
            return None

        if not props['address']:
            vmi = VirtualMachineInterfaceSM.get(port_id)
            for iip_id in vmi.instance_ips:
                iip = InstanceIpSM.get(iip_id)
                props['address'] = iip.address
                break

        return port_id
Ejemplo n.º 3
0
    def _get_interface_params(self, vip, props):
        port_id = vip.virtual_machine_interface
        if port_id is None:
            return None

        if not props['address']:
            vmi = VirtualMachineInterfaceSM.get(port_id)
            ip_refs = vmi.instance_ip
            if ip_refs:
                iip = InstanceIpSM.get(ip_refs)
                props['address'] = iip.address

        return port_id
    def _get_interface_params(self, vip, props):
        port_id = vip.virtual_machine_interface
        if port_id is None:
            return None

        if not props['address']:
            vmi = VirtualMachineInterfaceSM.get(port_id)
            ip_refs = vmi.instance_ip
            if ip_refs:
                iip = InstanceIpSM.get(ip_refs)
                props['address'] = iip.address

        return port_id
    def _get_interface_params(self, vip, props):
        port_id = vip.virtual_machine_interface
        if port_id is None:
            return None

        if not props["address"]:
            vmi = VirtualMachineInterfaceSM.get(port_id)
            for iip_id in vmi.instance_ips:
                iip = InstanceIpSM.get(iip_id)
                props["address"] = iip.address
                break

        return port_id