infi.pyvisdk

vSphere SDK for Python
Download

infi.pyvisdk Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Price:
  • FREE
  • Publisher Name:
  • Guy Rozendorn
  • Publisher web site:
  • http://infinidat.com

infi.pyvisdk Tags


infi.pyvisdk Description

infi.pyvisdk is a pure Python library to access the VMware vSphere web services API. Thanks to psphere for giving me some insight into how the API works.InstallationThis will be uploaded to the Python Package Index when it becomes more stable, but for now you can download the code from github, then run: $ sudo python ./setup.py installFeaturesA more Object Oriented approach to interfacing with the web services API. Knowledge of the inner workings of the API is not needed. Simple and clean interface.Examplevim = Vim(self.options.server)vim.login(self.options.username, self.options.password)vm = self.vim.getVirtualMachine("Linux network test")# enable Changed Block Tracking. Need a stun cycle after this (i.e. a snapshot)vm.enableChangedBlockTracking()snapshot = vm.createSnapshot()print "Created snapshot: %s" % snapshot.name# take a look at what we have for drives...for disk in vm.disks: log.info("%-15s (%s) %s" % (disk.name, disk.backingType, disk.filename))vm.removeSnapshot(snapshot)ESXCLIfrom pyvisdk.esxcli import Generator, EsxCLIvim = Vim(self.options.server)vim.login(self.options.username, self.options.password)host = self.vim.getHostSystems()esxcli = EsxCLI(self.vim, host)esxcli.get('storage.core.adapter').list()Product's homepage


infi.pyvisdk Related Software