def set_network_params(self, controller=None):
    controller = (controller or self.nodes.controller)
    if (self._config.platform == consts.Platforms.NONE):
        log.info('On None platform, leaving network management to the user')
        api_vip = ingress_vip = machine_networks = None
    elif (self._config.vip_dhcp_allocation or (self._high_availability_mode == consts.HighAvailabilityMode.NONE)):
        log.info('Letting access VIPs be deducted from machine networks')
        api_vip = ingress_vip = None
        machine_networks = self.get_machine_networks()
    else:
        log.info('Assigning VIPs statically')
        access_vips = controller.get_ingress_and_api_vips()
        api_vip = access_vips['api_vip']
        ingress_vip = access_vips['ingress_vip']
        machine_networks = None
    self.set_advanced_networking(vip_dhcp_allocation=self._config.vip_dhcp_allocation, cluster_networks=self._config.cluster_networks, service_networks=self._config.service_networks, machine_networks=machine_networks, api_vip=api_vip, ingress_vip=ingress_vip)
    if (self._config.is_ipv4 and self._config.is_ipv6):
        machine_networks = controller.get_all_machine_addresses()
        self.set_advanced_networking(machine_networks=machine_networks)
def set_network_params(self, controller=None):
    controller = (controller or self.nodes.controller)
    if (self._config.platform == consts.Platforms.NONE):
        log.info('On None platform, leaving network management to the user')
        api_vip = ingress_vip = machine_networks = None
    elif (self._config.vip_dhcp_allocation or (self._high_availability_mode == consts.HighAvailabilityMode.NONE)):
        log.info('Letting access VIPs be deducted from machine networks')
        api_vip = ingress_vip = None
        machine_networks = self.get_machine_networks()
    else:
        log.info('Assigning VIPs statically')
        access_vips = controller.get_ingress_and_api_vips()
        api_vip = access_vips['api_vip']
        ingress_vip = access_vips['ingress_vip']
        machine_networks = None
    self.set_advanced_networking(vip_dhcp_allocation=self._config.vip_dhcp_allocation, cluster_networks=self._config.cluster_networks, service_networks=self._config.service_networks, machine_networks=machine_networks, api_vip=api_vip, ingress_vip=ingress_vip)
    if (self._config.is_ipv4 and self._config.is_ipv6):
        machine_networks = controller.get_all_machine_addresses()
        self.set_advanced_networking(machine_networks=machine_networks)