Get service IP from service discovery

@param string $serviceName
@param bool   $force
@return string
973468
protected function getServiceIp(string $serviceName, bool $force = false): string
    {
        if (!isset($this->serviceIps[$serviceName]) || $force) {
            $serviceIp = $this->discovery->discover($serviceName);
            $this->serviceIps[$serviceName] = $serviceIp;
        }

        return $this->serviceIps[$serviceName];
    }
910195
public function getServiceDatum($service, $key)
    {
        if (isset($this->servicesData[$service])) {
            return $this->servicesData[$service][$key];
        }

        return null;
    }
475889
protected function getHttpClient(bool $force = false): HttpClient
    {
        if ($this->_httpClient === null || $force) {
            $config = ArrayHelper::merge(['class' => HttpClient::class], $this->httpClientConfig);
            $config['baseUrl'] = $this->getBaseUrl();

            return $this->_httpClient = Yii::createObject($config);
        } else {
            return $this->_httpClient;
        }
    }
123248
public function get($serviceName, array $args = [])
    {
        if ($this->getContainer()->has($serviceName)) {
            return $this->getContainer()->get($serviceName, $args);
        }

        return null;
    }
620405
private function addService($serviceName)
    {
        $this->addToDebug("Adding service: '$serviceName'");
        //create service
        $serviceTag = $this->addElement('wsdl:service', $this->definitions);
        $serviceTag->setAttribute('name', $serviceName);

            //port tag
            $portTag = $this->addElement('wsdl:port', $serviceTag);
        $portTag->setAttribute('name', $serviceName.'Port');
        $portTag->setAttribute('binding', 'tns:'.$serviceName.'Binding');

                //address tag
                $addressTag = $this->addElement('soap:address', $portTag);
        $addressTag->setAttribute('location', $this->url);

        //keep a reference
        $this->serviceTags[$serviceName] = $serviceTag;
        //and return
        return $serviceTag;
    }
104995
public static function forgeService($serviceName) {
		if(empty($serviceName)) {
			return null;
		}
		if(is_object($serviceName)) {
			return $serviceName;
		} elseif(is_string($serviceName)) {
			return ArrayHelper::getValue(\App::$domain, $serviceName);
		}
		return null;
	}
1100088
public function getServiceURL($serviceName, $isFeedback = false)
    {
        $serviceName = NotificationServices::validateServiceName($serviceName);
        $serviceType = $isFeedback ? self::FEEDBACK_SERVICE : self::PUSH_SERVICE;
        $environment = $this->getEnvironment();

        $serviceConfig = $this->getServiceConfig();

        if (empty($serviceConfig[$serviceName][$serviceType][static::ENVIRONMENT_DEVELOPMENT])) {
            $environment = static::ENVIRONMENT_PRODUCTION;
        }

        if (empty($serviceConfig[$serviceName][$serviceType][$environment])) {
            throw new DomainException("Service url is not defined");
        }

        return $serviceConfig[$serviceName][$serviceType][$environment];
    }
667315
public OvhAntiSpam serviceName_antiSpams_ip_GET(String serviceName, String ip) throws IOException {
		String qPath = "/xdsl/{serviceName}/antiSpams/{ip}";
		StringBuilder sb = path(qPath, serviceName, ip);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhAntiSpam.class);
	}
1179399
public function getServiceMethod($methodName)
    {
        return $this->getService($this->getServiceName($methodName)) instanceof Service ? $this->getService($this->getServiceName($methodName))->getMethod($methodName) : null;
    }
1007281
public OvhWhitelist serviceName_whitelist_ip_GET(String serviceName, String ip) throws IOException {
		String qPath = "/hosting/privateDatabase/{serviceName}/whitelist/{ip}";
		StringBuilder sb = path(qPath, serviceName, ip);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhWhitelist.class);
	}
55618
public function getConnection($name = null)
    {
        $this->serviceContext = static::CONNECTION_CONTEXT;
        $result = parent::getConnection($name);
        $this->serviceContext = null;
        return $result;
    }
178088
public function disconnect( $serviceName = null ) {
        $service = $this->getService( $serviceName );
        $service->disconnect();

        return ! $service->isConnected();
    }
335620
public function getService($serviceName)
    {
        $serviceName = ltrim($serviceName, '@');
        if (!isset($this->registeredServices[$serviceName])) {
            throw new ServiceManagerException(ServiceManagerException::SERVICE_DEFINITION_NOT_FOUND, [$serviceName]);
        }

        // Instantiate new service or get existing service instance
        if (!isset($this->instantiatedServices[$serviceName])) {
            $service = $this->instantiateService($serviceName);
        } else {
            $service = $this->instantiatedServices[$serviceName];
        }

        return $service;
    }
204368
public function get($serviceKey)
    {
        $serviceId = $this->getServiceId($serviceKey);
        if (!isset($this->services[$serviceId])) {
            $this->services[$serviceId] = $this->load($serviceId, $serviceKey);
        }
        return $this->services[$serviceId];
    }
802432
public function getConnection($serviceName)
    {
        if (empty($this->connectionPool[$serviceName])) {
            $this->initConnection($serviceName);
        }

        return $this->connectionPool[$serviceName];
    }
552006
public static function validateServiceName($serviceName)
    {
        if (!in_array($serviceName, self::getAvailableServices())) {
            throw new DomainException(sprintf("Notification service '%s' is not supported.", $serviceName));
        }
        return $serviceName;
    }
674344
public function get_namespaces( $force = false ) {
		if( is_null( $this->namespaces ) || $force ) {
			$tArray = array(
				'meta'   => 'siteinfo',
				'action' => 'query',
				'siprop' => 'namespaces'
			);
			$tRes = $this->apiQuery( $tArray );

			foreach( $tRes['query']['namespaces'] as $namespace ){
				$this->namespaces[$namespace['id']] = $namespace['*'];
				$this->allowSubpages[$namespace['id']] = ( ( isset( $namespace['subpages'] ) ) ? true : false );
			}
		}
		return $this->namespaces;
	}