Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        //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);
        }