2018-03-09 02:54 浏览 148

我如何操纵Hyper-v WMI类和方法

Hyper-v is integrated into openstack via the hyper-v wmi interface.The hyper-v wmi interfaces is invoked in the same way as the code in this link shows:

97 vs_man_svc = self._compat_conn.Msvm_VirtualSystemManagementService()[0]

Msvm_VirtualSystemManagementService is a hyper-v wmi classes:

The question is that the above example is implemented in python, how does the golang do this?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答 默认 最新

  • douguangxiang0363 douguangxiang0363 2018-03-09 14:01

    WMI is a part of Windows APIs, available through the COM[+] layer, so there's no real difference in which language you're accessing WMI, provided that language has a way to access COM[+].

    Still, there's a dedicated package to deal with WMI for Go:

    So, after having that package installed, you have a task of discerning calls to WMI subsystem from the Python code and reimplementing those in terms of that package.

    Oh, and studying the results of this search should mostly have you up to speed with this stuff.

    点赞 评论 复制链接分享