This repository has been archived by the owner on Jul 1, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vim.rb: enhance the logic of vim.rev. (#139)
* vim.rb: enhance the logic of vim.rev. 1. No matter if rev is specified when calls RbVmomi.connect, vim.rev should be real version that effects current VIM connection. Without this fix, say, vSphere is 6.5, and we give 7.0 to RbVmomi.connect, then returned vim.rev will be 7.0. Even if we give 100.0, obviously 100.0 is not a reasonable vSphere version, returned vim.rev will be 100.0. With this fix, returned vim.rev will be min value of vSphere version and specified rev. 2. Enhanced version comparison. Without this fix, version comparison is done by string comparison, as a result "100.0" is smaller than "6.0". vSphere version has reached to 8.x, once it reaches to "10.0", this bug will be triggered. With this fix, a version number is split into parts by ".", then compare each part from left to right, so that "10.0" is bigger than "6.0". * Revert "vim.rb: enhance the logic of vim.rev." This reverts commit 4efb0be. * vim.rb: enhance the logic of vim.rev. 1. No matter if rev is specified when calls RbVmomi.connect, vim.rev should be real version that effects current VIM connection. Without this fix, say, vSphere is 6.5, and we give 7.0 to RbVmomi.connect, then returned vim.rev will be 7.0. Even if we give 100.0, obviously 100.0 is not a reasonable vSphere version, returned vim.rev will be 100.0. With this fix, returned vim.rev will be min value of vSphere version and specified rev. 2. Enhanced version comparison. Without this fix, version comparison is done by string comparison, as a result "100.0" is smaller than "6.0". vSphere version has reached to 8.x, once it reaches to "10.0", this bug will be triggered. With this fix, a version number is split into parts by ".", then compare each part from left to right, so that "10.0" is bigger than "6.0".
- Loading branch information