OK: a summary for those who're following the story.
I was able to VPN into the OP's setup to get hold of
the objects as they come along, so to speak. (Which
helped tremendously in trying to see what was going
on). The situation is this:
When you're setting the attribute of a WMI object (via
COM)
On 24/06/2011 15:29, Tim Golden wrote:
The __setattr__ logic does involve a certain level of cacheing
and redirection, so there definitely is scope for an error in
the WMI code
... and here I mean "in the code of the wmi.py module" ;)
TJG
___
python-
On 24/06/2011 15:09, Graham Bloice wrote:
On 24/06/2011 14:59, M Saunders TAS wrote:
Graham Bloice wrote:
In the Python call to AddVirtualSystemResources() you've reversed the order of
the parameters.
Additionally the method signature for AddVirtualSystemResources() returns
(Job, NewResou
On 24/06/2011 14:59, M Saunders TAS wrote:
>
> Graham Bloice wrote:
>> In the Python call to AddVirtualSystemResources() you've reversed the order
>> of the parameters.
> Additionally the method signature for AddVirtualSystemResources() returns
>
> (Job, NewResources[], ReturnValue)>
> Which is
Tim Golden wrote:
> Thanks for posting. Nothing's jumping out at me I'm afraid.
I've had another chance to look at this today and have found a workaround using
win32com.client but still cannot figure why it exempts when using the WMI
module.
Using WMI module
HD =
c.Msvm_ResourceAllocationSett
On 21/06/2011 21:57, M Saunders TAS wrote:
python scsi_add_short.py
Traceback (most recent call last):
File "scsi_add_short.py", line 15, in
HD.Address = "100"
File "c:\python27\lib\site-packages\wmi.py", line 571, in __setattr__
handle_com_error ()
File "c:\python27\lib\site-p
> [... snip horrendous Powershell stuff ...]
>
> I never can understand why people like Powershell syntax so much
Indeed, it is syntactically horrendous. I wrote that after I hit problem in
Python to test the concept, honest...
> I'm not going to be much help here, I'm afraid: I don't have acce
On 21/06/2011 17:06, Graham Bloice wrote:
In the Python call to AddVirtualSystemResources() you've reversed the
order of the parameters.
Aha. And to help out the OP, you can pass parameters by name as
well as by position. (As you have done in the previous method
call).
TJG
On 21/06/2011 16:13, M Saunders TAS wrote:
> Hi,
>
> I'm trying to use python and the fantastic WMI module to manage Hyper-V
> virtual machine resources and am having problems trying to modify properties
> of an instance to pass back via WMI.
>
> The following code in powershell is what I need to
On 21/06/2011 16:13, M Saunders TAS wrote:
I'm trying to use python and the fantastic WMI module to manage
Hyper-V virtual machine resources and am having problems trying to
modify properties of an instance to pass back via WMI.
The following code in powershell is what I need to emulate in pytho
Hi,
I'm trying to use python and the fantastic WMI module to manage Hyper-V virtual
machine resources and am having problems trying to modify properties of an
instance to pass back via WMI.
The following code in powershell is what I need to emulate in python:
$vmms = gwmi -namespace root\virtu
11 matches
Mail list logo