
I'm playing with the python sdk. When I want to delete a VM, I see that it takes a action with settings : [@param action.force: boolean] [@param action.vm.disks.detach_only: boolean] [@param action.async: boolean] [@param action.grace_period.expiry: long] [@param correlation_id: any string] But if I try action_params = params.Action(vm={'disks': {'detach_only': False}}) print action_params.export_(sys.stdout, 0) I'm getting : AttributeError: 'dict' object has no attribute 'export_' How can I build the argument to params.Action ?

On 04/11/2016 11:51 AM, Fabrice Bacchella wrote:
I'm playing with the python sdk.
When I want to delete a VM, I see that it takes a action with settings :
[@param action.force: boolean] [@param action.vm.disks.detach_only: boolean] [@param action.async: boolean] [@param action.grace_period.expiry: long] [@param correlation_id: any string]
But if I try
action_params = params.Action(vm={'disks': {'detach_only': False}}) print action_params.export_(sys.stdout, 0)
I'm getting :
AttributeError: 'dict' object has no attribute 'export_'
How can I build the argument to params.Action ?
action_params = params.Action( vm=params.Vm( disks=param.Disks( detach_only=False, ), ), ) -- Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta 3ºD, 28016 Madrid, Spain Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.

Le 11 avr. 2016 à 12:20, Juan Hernández <jhernand@redhat.com> a écrit :
On 04/11/2016 11:51 AM, Fabrice Bacchella wrote:
I'm playing with the python sdk.
When I want to delete a VM, I see that it takes a action with settings :
[@param action.force: boolean] [@param action.vm.disks.detach_only: boolean] [@param action.async: boolean] [@param action.grace_period.expiry: long] [@param correlation_id: any string]
But if I try
action_params = params.Action(vm={'disks': {'detach_only': False}}) print action_params.export_(sys.stdout, 0)
I'm getting :
AttributeError: 'dict' object has no attribute 'export_'
How can I build the argument to params.Action ?
action_params = params.Action( vm=params.Vm( disks=param.Disks( detach_only=False, ), ), )
Thanks.
participants (2)
-
Fabrice Bacchella
-
Juan Hernández