Empty 'Availability' attr in Win32_DiskDrive

Discussion in 'Win32' started by helmanofer, May 25, 2011.

  1. helmanofer

    helmanofer New Member

    Joined:
    May 25, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi,

    I am trying to write this function (in python using wmi module) that queries the disks for their availability (online, offline, etc.) on windows initiators (form windows client), I always get ‘None’ as an answer and I can’t find anything useful in Google.

    I am using python WMI module and I got the Win32 class and the attribute from msdn.

    def query_disks(self):
    c = wmi.WMI(self.ip, user=self.username, password=self.password)
    vols = c.Win32_DiskDrive(['Availability'])
    for vol in vols:
    print vol.Availability
    return vols

    I am able to get other attributes, and when I try to read vol.blabla I get an exception.

    I noticed that it also happens when I run vb script querying the same attributes (not a python issue)

    thanks,

    Ofer Helman
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice