Programming VIM/vSphere SDK with a straight way

 

If you are lucky enough to program against ESX VIM/vSphere SDK before, you can select either Java or C#, as the sample codes use in SDK package. As a matter of fact, Java/C# is good at such job. However, you have to use C/C++ if they are both unavailable. As it is very complicate to use the SDK with C/C++ tool chain, VMware is reluctant to give more samples indeed. Googling result on this topic is chaos at all and all you can do is continuous trying, check to the doc and MOB. More, the codes you get are totally unsalable and fragmentary. Hardcodes and tricks go everywhere.

 

Things get changed.

 

With the basis of previous partial completed job, I spent some time recently and final get rid of nearly all the complex. How can you list all the VMs and its status on 10.32.230.100, for example? You can

 

 

 

No hardcode and very straight. More important, it is identical as you do in MOB. All knowledge you get from MOB works here. As a comparing, the C# codes with same functionality are over 500 LOC.

 

Under the hood, there are about 10K well formatted lines of C++ codes. If you want to browse the whole object library, you need another 20K lines of C++ code (not completed). As there is no platform specific code, you can use it anywhere only if g++ is ready.

 

Under the hood of hood, all of those codes are generated by about 1,500 lines of Perl code. It will first parse all VIM/vSphere help docs and generate a temporary file; then it parses stub header file which is generated by gSOAP tool. At last, it merges all of that information and gives us running C++ codes.

 

I'll make it public available soon so that it can serve others also. 

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值