try adding listall=true to cloudmonkey command?

2014-06-17 7:44 GMT+02:00 ilya musayev <ilya.mailing.li...@gmail.com>:

> It returns nothing, just a blank like.
>
> I will be upgrading our CloudStack instances this week to see if the issue
> still persists with 4.3.0, but i dont believe it will change my result.
>
>
> On 6/16/14, 10:14 PM, Chiradeep Vittal wrote:
>
>> Can you explain "does not work"
>>
>> --
>> Chiradeep
>>
>>  On Jun 16, 2014, at 10:02 PM, "ilya musayev" <
>>> ilya.mailing.li...@gmail.com> wrote:
>>>
>>> Thanks Chiradeep and Wei
>>>
>>> Unfortunately neither gave me what i needed, so i wrote this SQL script:
>>>
>>> SELECT b.name, count(*) FreeIPCount
>>> FROM cloud.user_ip_address a, cloud.networks b
>>> WHERE b.id=a.source_network_id
>>> AND a.state = "Free"
>>> and b.name is not null
>>> group by b.name;
>>>
>>> Chiradeep, for some reason list virtualmachines calls in cloudmonkey
>>> does not always work, especially if you have a very large environment with
>>> several thousand VMs. I'd think it has something to do with how cloudmonkey
>>> buffers the output, but i dont know enough about its inner working.
>>>
>>>  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>
>>>> 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
>>>>
>>>
>

Reply via email to