-
Notifications
You must be signed in to change notification settings - Fork 766
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stub adapters should allow the usage of an existing session
StubAdapterBase is extended with an additional parameter and corresponding getter and setter - sessionId. Class derivates can use this parameter to set their own ways for authentication. Currently, pyVmomi uses mainly SoapStubAdapter() which uses a cookie to communicate the session id. If a session id is provided on class initialization, the cookie will be set with that id. connect.Connect(), connect.SmartConnect() and connect.SmartStubAdapter() are extended to allow the usage of an existing session. When a session_id is provided the login step is skipped. Usage example: si1 = SmartConnect(host=vcip, user=vcAdmin, pwd=vcPassword, disableSslCertValidation=True) soap_session_id = pyVim.connect.GetStub().GetSessionId() si2 = SmartConnect(host=vcip, sessionId=soap_session_id, disableSslCertValidation=True)
- Loading branch information
ddraganov
committed
Jan 29, 2024
1 parent
5ad215f
commit 35f2743
Showing
2 changed files
with
52 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters