Reply

Get next available network from network container and then register it via curl

Techie
Posts: 12
3336     1

Hello I'm trying to get the next available /22 from a network container

 

curl -s -k -u userSmiley Tonguew -X GET "https://infoblox.com/wapi/v2.11/networkcontainer?network=10.0.0.0/8&_return_type=json&_max_results=1..."

 

When the running the above command I get the _ref but now need help to get the next available /22 and then register it with a comment.  Is there a good write on this?

Re: Get next available network from network container and then register it via curl

Techie
Posts: 12
3337     1
curl --location --request POST 'https://grid-master.lab.com/wapi/v2.11/network' \
--header 'Authorization: Basic YWRtaW46aW5mb2Jsb3g=' \
--header 'Content-Type: application/json' \
--data-raw '{
    "network":{
        "_object_function": "next_available_network",
        "_parameters": {
            "exclude": ["192.168.0.0/24","192.168.1.0/24"],
            "cidr":27
        },
        "_result_field": "networks",
        "_object": "networkcontainer",
        "_object_parameters": {
            "network": "192.168.0.0/16"
        }
    }
}'

If there is no reason to not do it, the simpler option would probably be to create 10.0.2.0/24 network and fetch the next available /27 network within it.

 

If you want to query the next available networks in a network container, you can do using the following call:

curl --location --request POST 'https://grid-master.lab.com/wapi/v2.11/networkcontainer/ZG5zLm5ldHdvcmtfY29udGFpbmVyJDE5Mi4xNjguMC4wLzE2LzA:192.168.0.0/16/default?_function=next_available_network' \
--header 'Authorization: Basic YWRtaW46aW5mb2Jsb3g=' \
--header 'Content-Type: application/json' \
--data-raw '{
    "cidr":27,
    "num":20
}'

 

https://community.infoblox.com/t5/API-Integration-DevOps-NetOps/Next-available-network-from-a-specif... 

Re: Get next available network from network container and then register it via curl

Techie
Posts: 12
3337     1

Found another post on how to get next available network, just need one to register

Showing results for 
Search instead for 
Did you mean: 

Recommended for You

Businesses are investing heavily into securing company resources from cyber-attacks form cybercrimin