Commit Graph

282 Commits

Author SHA1 Message Date
Tianhao He 912e365564 Merge pull request #528 from tianhao64/master
Fixes #519, #448, #420, #421 Fix SoapAdapter serializer to support se…
2017-03-21 11:57:54 -07:00
Tianhao He ac455dc273 Fixes #519, #448, #420, #421 Fix SoapAdapter serializer to support serializing unicode chars
We use string formatter to contruct serialization result.
The template used is str(byte) in python2 even though when the val is
unicode.
This is fine when val only contains ASCII chars since python can encode
them to str implicitly using ASCII encoding. But when the val is
non-ASCII unicodes,
the conversion fails. Fix it by using a unicode template to avoid the
conversion.
2017-03-21 11:52:50 -07:00
Tianhao He 3d2e0256e9 Merge pull request #524 from nlamirault/patch-1
[DOC] Fix guest os state
2017-03-16 11:00:27 -07:00
Nicolas Lamirault a962a6ce68 Fix guest os state
According to the code, guest os not running state is : "notRunning"

```python
CreateEnumType("vim.vm.GuestInfo.GuestState", "VirtualMachineGuestState", "vim.version.version1", ["running", "shuttingDown", "resetting", "standby", "notRunning", "unknown"])
```
2017-03-16 10:58:32 +01:00
Tianhao He 73da908ed1 Merge pull request #517 from tianhao64/master
add sso.py to support get bearer/hok token from sso server
2017-02-27 15:59:13 -08:00
Tianhao He 5ce2854f62 add sso.py to support get bearer/hok token from sso server 2017-02-27 15:40:26 -08:00
Tianhao He 59432a08c0 Merge pull request #497 from nordevallj/pyvmomi-bug-487
Fix #487: Remove custom __getattr__ in _HTTPSConnection
2017-01-25 15:02:30 -08:00
Johan Nordevall 31f1e34498 Fix #487: Remove custom __getattr__ in _HTTPSConnection
This prevents maximum recursion depth errors when referencing _HTTPSConnection.connect. The custom __getattr__ was a leftover from 21a5d52e6a which removed the self._wrapped attribute.
2017-01-25 12:39:04 -08:00
Tianhao He 36291a3775 Merge pull request #494 from magianxd/master
Pass connectionPoolTimeout to __RetrieveContent in __Login
2017-01-19 08:21:46 -08:00
Shawn Xiao 3e79ae30c0 Pass connectionPoolTimeout to __RetrieveContent in __Login 2017-01-19 15:38:11 +08:00
Tianhao He f579982fc9 Merge pull request #491 from magianxd/master
add parameter 'connectionPoolTimeout' in both SmartConnect and SmartConnectNoSSL
2017-01-17 09:38:15 -08:00
Shawn Xiao 138098125c pass 'connectionPoolTimeout' to __RetrieveContent, __Login and __LoginBySSPI 2017-01-17 17:28:46 +08:00
Shawn Xiao 541db29ff0 add parameter 'connectionPoolTimeout' in both SmartConnect and SmartConnectNoSSL 2017-01-17 16:47:37 +08:00
Tianhao He 73672f7aa3 Merge pull request #484 from tianhao64/master
Add user-agent header when connecting to vsphere
2016-11-18 20:59:16 -08:00
Tianhao He 5ddbb49982 Add user-agent header when connecting to vsphere 2016-11-18 20:54:48 -08:00
Tianhao He 1f9c6a6b91 vSphere 6.5 support - fix release note link 2016-11-15 14:32:19 -08:00
Tianhao He c5241e45a4 Merge pull request #481 from tianhao64/master
vSphere 6.5 support - update README
2016-11-15 14:12:26 -08:00
Tianhao He 36e470b97c vSphere 6.5 support - update README 2016-11-15 14:10:28 -08:00
Tianhao He 9d80bb987d Merge pull request #480 from tianhao64/master
vSphere 6.5 support
2016-11-15 13:06:26 -08:00
Tianhao He dbad63e88d vSphere 6.5 support.
Update bindings files to support vSphere 6.5.
Add Eam binding to support vSphere EAM service.
Fixed ssl context creation in samples
2016-11-15 12:14:34 -08:00
Tianhao He 46f5ecaebb Merge pull request #478 from tianhao64/master
Fix thumbprint verification
2016-11-14 17:40:11 -08:00
Tianhao He 21a5d52e6a Fix thumbprint verification
Revert HTTPSConnectionWrapper back to _HTTPSConnection to fix thumbprint verification.
Create custom_patches to support custom _HTTPSConnection. So tests should use below annotation:

@tests.VCRTestBase.my_vcr.use_cassette...
2016-11-14 17:33:50 -08:00
Tianhao He 3cbb7e4874 Merge pull request #451 from cingeyedog/master
Import vim from pyVmomi
2016-09-27 11:02:46 -07:00
Matt Garrett 986770b63d Import vim from pyVmomi
Import vim so that sample code will run properly
2016-09-17 15:11:18 -04:00
Tianhao He 575ab56eb5 Merge pull request #442 from userlocalhost2000/correct/description_mistake
Corrected a description mistake which is reported in #441
2016-08-27 22:29:43 -07:00
Tianhao He ec88233535 Merge pull request #426 from martinmosegaard/master
Fix #351: Detect vApps in getallvms sample
2016-08-27 22:12:07 -07:00
Hiroyasu OHYAMA dabbc05657 Corrected a description mistake which is reported in #441 2016-08-18 11:46:08 +09:00
Martin Mosegaard Amdisen 84fcb7535c Fix #351: Detect vApps in getallvms sample
VM folders may contain vApps. If a vApp is detected, print its
child VMs.

A vApp may contain child vApps too, but since this is a rare
usecase, nested vApps and their child VMs are ignored.

Signed-off-by: Martin Mosegaard Amdisen <martin.amdisen@praqma.com>
2016-07-23 18:40:39 +02:00
Tianhao He db3774a2a6 Merge pull request #398 from tianhao64/master
Temporarily workaround issue #182 by creating dummy managed method
2016-06-15 15:37:00 -07:00
Tianhao He 6be4fd1844 Merge pull request #408 from JLHasson/no-ssl
Added function to connect to server without ssl
2016-06-14 16:19:48 -07:00
Lance Hasson ef18ed3248 added namespace and preserved order of parameters to be consistent with function declaration 2016-06-14 16:16:56 -07:00
Lance Hasson 9b8164b201 remove sslContext parameter option 2016-06-14 16:08:49 -07:00
Lance Hasson c0cd02a545 corrected function call 2016-06-14 16:06:51 -07:00
Lance Hasson 09d0127c27 formatting 2016-06-14 15:57:05 -07:00
Lance Hasson 82fba028bf named to SmartConnectNoSSL and extended to cover Connect as well 2016-06-14 15:50:12 -07:00
Lance Hasson f91ccde071 added function to connect to server without ssl 2016-06-14 10:57:17 -07:00
tianhao he 0f4a4e5895 Try to query wsdl type/method from vim25 namespace first when namespace is unknown.
Some type, in this case 'Task' is not defined in the specified namespace(urn:nfc). In such case, the deserializer will have to guess the namespace by interate namesapce in the _wsdlTypeMapNSs. 'Task' exists in multiple namespaces. In python2, the order in the map is fixed and vim25 is always tried first, but in python3 the order of the set is random. If wrong namespace is returned, the xml parser will fail later on.
2016-06-06 08:56:11 -07:00
tianhao he f3245a6c33 Fix issue #182 by creating an uncallable managed method
VC is returning some internal managed method in 6.0. Looks like this issue
will be resolved in 6.5 server types as it will be public in 6.5. To tempoarily
workaound this issue, returning a dummy method and dummy obj instead of throwing
exception when client side can't understand the returned managed method.
2016-06-03 12:37:47 -07:00
Tianhao He 55e007d4ba Merge pull request #395 from guangmuzhu/master
No captitalized name allowed
2016-05-19 12:00:41 -07:00
Guangmu Zhu 41109fe843 No captitalized name allowed
The default setting of allowCapitalizedNames is False.
2016-05-12 13:03:41 +08:00
Tianhao He 350f6c9089 Merge pull request #394 from Infinidat/urnmap
Use urn map for attribute resolution from top-level names
2016-05-02 09:27:30 -07:00
Arnon Yaari f5bfaccce5 Use urn map for attribute resolution from top-level names
pyvmomi objects can be resolved by the vmodl name, e.g. "vim.vm.RelocateSpec"
or by the wsdl name, e.g. "vim.VirtualMachineRelocateSpec".
The wsdl name resolution uses "vim" as a hard-coded name, and doesn't
resolve more wsdl namespaces like "sms" and "pbm"
2016-05-02 15:33:53 +03:00
Tianhao He 841ad99118 Merge pull request #390 from tianhao64/master
update tag
2016-04-25 10:11:09 -07:00
tianhao he 4912d9af0f Merge remote-tracking branch 'upstream/master' 2016-04-25 09:54:42 -07:00
Tianhao He dc4d87c8f0 Merge pull request #165 from Infinidat/pull_request_4
Refactoring to support SMS API
2016-04-25 09:43:24 -07:00
Arnon Yaari a5a3aa996e Add SoapAdapter request context per instance.
SoapStubAdapter supports adding soap headers using GetRequestContext, but
the request context is thread-local. Adding support for a per-instance request context.
This is needed e.g. for vSphere SMS API, where only the SMS SoapAdapter needs
the additional headers.
2016-04-25 11:42:33 +03:00
tianhao he 616d8e28b1 update version to 6.0.0.2016.4 2016-04-22 20:40:01 -07:00
Tianhao He b7fa79dc45 Merge pull request #389 from tianhao64/master
Update version number in setup.py to meet PEP 0440 standard
2016-04-22 17:12:30 -07:00
tianhao he 3eca86fb87 Update version number in setup.py to meet PEP 0440 standard 2016-04-22 17:09:52 -07:00
Tianhao He fd632230eb Merge pull request #387 from vmware/revert-251-master
Revert "Test navigation from a VM to it's MAC address."
2016-04-20 15:58:56 -07:00