This is a place for anyone to learn about working with the vSphere Management SDK's native python binding library pyVmomi. Samples here are contributed by developers like you and curated by your fellow developers. The quality and validity of the samples will vary, however, if you see a problem report it! If you can solve someone's problem, contribute a fix! If you need a new sample ask for one!
First, you'll need a functioning Python environment. This may differ by operating system and distribution.
$ pip install pyvmomi
Now you are ready to get and use the samples project:
Simply file a issue on at pyvmomi-community-samples/issues please start requests for new samples with the words: "New Sample:" to help our triage folks identify the sample request.
First read up on github forks so you know the basic terms for how to work with github. We are asking that you branch each new sample independently for sanity's sake. This lets you submit multiple samples at one time and lets us evaluate multiple samples independently.
- fork the repository
- clone your fork locally
- make a branch for your sample and check it out
- commit the branch to your repo
- make a pull request
Some notes on branching, editing code, then pushing the code back up to github...
NOTE: fork first
$ git clone email@example.com:your_user_name/pyvmomi-community-samples.git $ cd pyvmomi-community-samples $ git branch your_sample_name $ git checkout your_sample_name $ vim samples/your_sample_name.py $ git add samples/your_sample_name.py $ git commit $ git push origin your_sample_name
Now you're ready to create a pull request to the official project.
See this guide for the best practice on how to do this.
$ git checkout master $ git remote add vmware firstname.lastname@example.org:vmware/pyvmomi-community-samples.git $ git fetch vmware master $ git rebase vmware/master $ git push origin master