1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Empty 'Availability' attr in Win32_DiskDrive

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

  1. helmanofer

    helmanofer New Member

    May 25, 2011
    Likes Received:
    Trophy Points:

    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)


    Ofer Helman

Share This Page