You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Ian Forde <if...@marketo.com> on 2014/12/10 21:58:00 UTC

Cloudmonkey default output - having some more issues

If I want to see what instances in a project are in the destroyed state via Cloudmonkey, I should be able to use both the API call and the native Cloudmonkey call.


[root@sjmpc-mgr1 cloudmanager_utils]# cloudmonkey -d json api listVirtualMachines domainid=c4fe811a-eeb5-4826-85a6-67c8d3f26234 projectid=6629b1a5-1014-49d9-b5b8-af78914b6051 state="Destroyed" filter=id,name

{

  "count": 2,

  "virtualmachine": [

    {

      "id": "be10acfc-f11e-4667-a36b-2ed30f1cca45",

      "name": "foo2"

    },

    {

      "id": "71766548-49fb-4327-bad7-a8c546c9c29b",

      "name": "foo1"

    }

  ]

}

Unfortunately, a problem arises when I try to change the output format from json to default, where apparently NIC ID/name leakage appears in the output…


cloudmonkey -d default api listVirtualMachines domainid=c4fe811a-eeb5-4826-85a6-67c8d3f26234 projectid=6629b1a5-1014-49d9-b5b8-af78914b6051 state="Destroyed" filter=id,name

id = be10acfc-f11e-4667-a36b-2ed30f1cca45

name = foo2

id = ecbd8703-79c3-4db0-97cc-bd4b02a6eefb

================================================================================

id = d2fc481a-e049-4a37-8906-027ba37522d3

name = default

================================================================================

================================================================================

id = 71766548-49fb-4327-bad7-a8c546c9c29b

name = foo1

id = 1619ec83-7a40-401a-b4be-fb2367ea1baf

================================================================================

id = d2fc481a-e049-4a37-8906-027ba37522d3

name = default

================================================================================

================================================================================


This makes it hard to use cloudmonkey in bash scripts…


Ideas?


  -Ian


Re: Cloudmonkey default output - having some more issues

Posted by Ian Forde <if...@marketo.com>.
Confirmed.  I reran the rest (without state=³Destroyed²) and it output the
correct info.  Thanks much!

  -I

On 12/11/14, 5:13 AM, "Rohit Yadav" <ro...@shapeblue.com> wrote:

>Hi Ian,
>
>Good suggestion. I've fixed it, now filtered output across all display
>output formats (default, json, table) will follow same filtering
>algorithm.
>
>Can you confirm testing against latest master?
>https://github.com/apache/cloudstack-cloudmonkey
>
>On Thursday 11 December 2014 02:28 AM, Ian Forde wrote:
>> If I want to see what instances in a project are in the destroyed state
>>via Cloudmonkey, I should be able to use both the API call and the
>>native Cloudmonkey call.
>>
>>
>> [root@sjmpc-mgr1 cloudmanager_utils]# cloudmonkey -d json api
>>listVirtualMachines domainid=c4fe811a-eeb5-4826-85a6-67c8d3f26234
>>projectid=6629b1a5-1014-49d9-b5b8-af78914b6051 state="Destroyed"
>>filter=id,name
>>
>> {
>>
>>    "count": 2,
>>
>>    "virtualmachine": [
>>
>>      {
>>
>>        "id": "be10acfc-f11e-4667-a36b-2ed30f1cca45",
>>
>>        "name": "foo2"
>>
>>      },
>>
>>      {
>>
>>        "id": "71766548-49fb-4327-bad7-a8c546c9c29b",
>>
>>        "name": "foo1"
>>
>>      }
>>
>>    ]
>>
>> }
>>
>> Unfortunately, a problem arises when I try to change the output format
>>from json to default, where apparently NIC ID/name leakage appears in
>>the outputŠ
>>
>>
>> cloudmonkey -d default api listVirtualMachines
>>domainid=c4fe811a-eeb5-4826-85a6-67c8d3f26234
>>projectid=6629b1a5-1014-49d9-b5b8-af78914b6051 state="Destroyed"
>>filter=id,name
>>
>> id = be10acfc-f11e-4667-a36b-2ed30f1cca45
>>
>> name = foo2
>>
>> id = ecbd8703-79c3-4db0-97cc-bd4b02a6eefb
>>
>> 
>>=========================================================================
>>=======
>>
>> id = d2fc481a-e049-4a37-8906-027ba37522d3
>>
>> name = default
>>
>> 
>>=========================================================================
>>=======
>>
>> 
>>=========================================================================
>>=======
>>
>> id = 71766548-49fb-4327-bad7-a8c546c9c29b
>>
>> name = foo1
>>
>> id = 1619ec83-7a40-401a-b4be-fb2367ea1baf
>>
>> 
>>=========================================================================
>>=======
>>
>> id = d2fc481a-e049-4a37-8906-027ba37522d3
>>
>> name = default
>>
>> 
>>=========================================================================
>>=======
>>
>> 
>>=========================================================================
>>=======
>>
>>
>> This makes it hard to use cloudmonkey in bash scriptsŠ
>>
>>
>> Ideas?
>>
>>
>>    -Ian
>>
>>
>
>--
>Regards,
>Rohit Yadav
>Software Architect, ShapeBlue
>M. +91 8826230892 | rohit.yadav@shapeblue.com
>Blog: bhaisaab.org | Twitter: @_bhaisaab
>PS. If you see any footer below, I did not add it :)
>Find out more about ShapeBlue and our range of CloudStack related services
>
>IaaS Cloud Design &
>Build<http://shapeblue.com/iaas-cloud-design-and-build//>
>CSForge ­ rapid IaaS deployment framework<http://shapeblue.com/csforge/>
>CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
>CloudStack Software
>Engineering<http://shapeblue.com/cloudstack-software-engineering/>
>CloudStack Infrastructure
>Support<http://shapeblue.com/cloudstack-infrastructure-support/>
>CloudStack Bootcamp Training
>Courses<http://shapeblue.com/cloudstack-training/>
>
>This email and any attachments to it may be confidential and are intended
>solely for the use of the individual to whom it is addressed. Any views
>or opinions expressed are solely those of the author and do not
>necessarily represent those of Shape Blue Ltd or related companies. If
>you are not the intended recipient of this email, you must neither take
>any action based upon its contents, nor copy or show it to anyone. Please
>contact the sender if you believe you have received this email in error.
>Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue
>Services India LLP is a company incorporated in India and is operated
>under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is
>a company incorporated in Brasil and is operated under license from Shape
>Blue Ltd. ShapeBlue SA Pty Ltd is a company registered by The Republic of
>South Africa and is traded under license from Shape Blue Ltd. ShapeBlue
>is a registered trademark.


Re: Cloudmonkey default output - having some more issues

Posted by Rohit Yadav <ro...@shapeblue.com>.
Hi Ian,

Good suggestion. I've fixed it, now filtered output across all display
output formats (default, json, table) will follow same filtering algorithm.

Can you confirm testing against latest master?
https://github.com/apache/cloudstack-cloudmonkey

On Thursday 11 December 2014 02:28 AM, Ian Forde wrote:
> If I want to see what instances in a project are in the destroyed state via Cloudmonkey, I should be able to use both the API call and the native Cloudmonkey call.
>
>
> [root@sjmpc-mgr1 cloudmanager_utils]# cloudmonkey -d json api listVirtualMachines domainid=c4fe811a-eeb5-4826-85a6-67c8d3f26234 projectid=6629b1a5-1014-49d9-b5b8-af78914b6051 state="Destroyed" filter=id,name
>
> {
>
>    "count": 2,
>
>    "virtualmachine": [
>
>      {
>
>        "id": "be10acfc-f11e-4667-a36b-2ed30f1cca45",
>
>        "name": "foo2"
>
>      },
>
>      {
>
>        "id": "71766548-49fb-4327-bad7-a8c546c9c29b",
>
>        "name": "foo1"
>
>      }
>
>    ]
>
> }
>
> Unfortunately, a problem arises when I try to change the output format from json to default, where apparently NIC ID/name leakage appears in the output…
>
>
> cloudmonkey -d default api listVirtualMachines domainid=c4fe811a-eeb5-4826-85a6-67c8d3f26234 projectid=6629b1a5-1014-49d9-b5b8-af78914b6051 state="Destroyed" filter=id,name
>
> id = be10acfc-f11e-4667-a36b-2ed30f1cca45
>
> name = foo2
>
> id = ecbd8703-79c3-4db0-97cc-bd4b02a6eefb
>
> ================================================================================
>
> id = d2fc481a-e049-4a37-8906-027ba37522d3
>
> name = default
>
> ================================================================================
>
> ================================================================================
>
> id = 71766548-49fb-4327-bad7-a8c546c9c29b
>
> name = foo1
>
> id = 1619ec83-7a40-401a-b4be-fb2367ea1baf
>
> ================================================================================
>
> id = d2fc481a-e049-4a37-8906-027ba37522d3
>
> name = default
>
> ================================================================================
>
> ================================================================================
>
>
> This makes it hard to use cloudmonkey in bash scripts…
>
>
> Ideas?
>
>
>    -Ian
>
>

--
Regards,
Rohit Yadav
Software Architect, ShapeBlue
M. +91 8826230892 | rohit.yadav@shapeblue.com
Blog: bhaisaab.org | Twitter: @_bhaisaab
PS. If you see any footer below, I did not add it :)
Find out more about ShapeBlue and our range of CloudStack related services

IaaS Cloud Design & Build<http://shapeblue.com/iaas-cloud-design-and-build//>
CSForge – rapid IaaS deployment framework<http://shapeblue.com/csforge/>
CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
CloudStack Software Engineering<http://shapeblue.com/cloudstack-software-engineering/>
CloudStack Infrastructure Support<http://shapeblue.com/cloudstack-infrastructure-support/>
CloudStack Bootcamp Training Courses<http://shapeblue.com/cloudstack-training/>

This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue SA Pty Ltd is a company registered by The Republic of South Africa and is traded under license from Shape Blue Ltd. ShapeBlue is a registered trademark.