public async Task <InfobloxNetworks> GetNetworkListsAsync() { // https://10.10.10.10/wapi/v2.9/network string apifunction = "network"; string apipath = $"{helperConfig.ApiRoute}/{helperConfig.ApiVersion}/{apifunction}"; string content = await IBXCallApi(HttpMethod.Get, apifunction, apipath); return(InfobloxNetworks.FromJson(content)); }
//InfoBlox specific options. public async Task <InfobloxNetwork> GetNetworkAsync(string cidrNetwork) { // https://10.10.10.10/wapi/v2.9/network?network=10.10.10.10/8 string apifunction = "network"; string apicommand = $"network={cidrNetwork}"; string apipath = $"{helperConfig.ApiRoute}/{helperConfig.ApiVersion}/{apifunction}"; string content = await IBXCallApi(HttpMethod.Get, apifunction, apipath, apicommand); InfobloxNetwork _subnet = (from subnet in (InfobloxNetworks.FromJson(content)) select subnet).FirstOrDefault(); return(_subnet); }