private static IAnsibleTowerInstance GetAnsibleTowerInstances() { if (AnsibleTowerOptions == null || !AnsibleTowerOptions.EnableAnsible || string.IsNullOrEmpty(AnsibleTowerOptions.ApiUrlBase)) { return(null); } var apiRequestDto = CircuitBreakerHttpClient.Get <ApiRequestDto>(AnsibleTowerOptions.CircuitBreakerName, AnsibleTowerOptions.ApiUrlBase).Result; return(new AnsibleTowerInstance(AnsibleTowerOptions.Name, AnsibleTowerOptions.CircuitBreakerName, AnsibleTowerOptions.ApiUrlBase, AnsibleTowerOptions.Version, apiRequestDto)); }
private Task <T> GetAnsible <T>(string authenticationToken, string endpoint, object input) { SetAutehnticationToken(authenticationToken); return(CircuitBreakerHttpClient.Get <T>(AnsibleTowerInstance.CircuitBreakerName, endpoint, GetAuthorizationHeaders(), true)); }