Or is it that the client doesn’t care about the network (since all networks are 
reachable from one-another) and just wants to run a VM.
This is called a basic zone :)
Some higher level portal could achieve this logic for an advanced zone, I guess.


From: Chiradeep Vittal 
<chiradeep.vit...@citrix.com<mailto:chiradeep.vit...@citrix.com>>
Date: Tuesday, June 17, 2014 at 10:49 PM
To: "dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org>" 
<dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org>>
Subject: Re: [API]How to check how many IPs are available in guest network

Not sure I understand. Would this be a single network encompassing several 
vlans and ip ranges?

From: ilya musayev 
<ilya.mailing.li...@gmail.com<mailto:ilya.mailing.li...@gmail.com>>
Reply-To: "dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org>" 
<dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org>>
Date: Tuesday, June 17, 2014 at 6:39 PM
To: "dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org>" 
<dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org>>
Subject: Re: [API]How to check how many IPs are available in guest network


Chiradeep,

So i did a little more digging in your example, I also realized you code
has assumption that i have /24 entirely dedicated to CloudStack :)

Welcome to enterprise madness where IP space, while being internal and
free - is close guarded and restricted.

Do we have a concept of IP Pools in future versions? That is an
aggregate of smaller ip ranges that end user can group into 1 entity. So
if range x runs out of IP space, we just go to the next range and vlan
in that pool, without returning and error - "you ran out of IP space".

Thanks,
ilya



On 6/16/14, 12:56 PM, Chiradeep Vittal wrote:
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.li...@gmail.com<mailto:ilya.mailing.li...@gmail.com>>
Reply-To:  "dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org>" 
<dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org>>
Date:  Monday, June 16, 2014 at 3:21 PM
To:  "dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org>" 
<dev@cloudstack.apache.org<mailto: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



Reply via email to