cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chiradeep Vittal <Chiradeep.Vit...@citrix.com>
Subject Re: [API]How to check how many IPs are available in guest network
Date Mon, 16 Jun 2014 19:56:20 GMT
used=$(cloudmonkey list virtualmachines
networkid=f5119c7a-a5b8-47aa-bf26-d0f41dfa2d6b | grep ipaddress | wc -l)
space=$(cloudmonkey list networks id=f5119c7a-a5b8-47aa-bf26-d0f41dfa2d6b
| grep cidr | awk -F":" '{print $2}' | awk -F "/" '{print $2}')

space=${space%\",}
let space="32 - $space"
let space=³2**$space - 1²



let avail="$space - $used -1²
echo ³Available IPs = $avail"




From:  ilya musayev <ilya.mailing.lists@gmail.com>
Reply-To:  "dev@cloudstack.apache.org" <dev@cloudstack.apache.org>
Date:  Monday, June 16, 2014 at 3:21 PM
To:  "dev@cloudstack.apache.org" <dev@cloudstack.apache.org>
Subject:  [API]How to check how many IPs are available in guest network


Is there a way to check how many guest IPs are available in specific
guest network?

Current cloudstack reporting is not granular enough, i could not find a
command that says listAvailableIPs or something similar.

Any help is appreciated.

Thanks,
ilya


Mime
View raw message