mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Merge pull request #509 from jeffmccune/feature/master/vsphere_server_attribute
[vsphere] Add vsphere_server connection attribute * Small patch with tests, merging my own code.
This commit is contained in:
commit
91cd093cab
2 changed files with 4 additions and 1 deletions
|
@ -26,6 +26,8 @@ module Fog
|
|||
|
||||
attr_reader :vsphere_is_vcenter
|
||||
attr_reader :vsphere_rev
|
||||
attr_reader :vsphere_server
|
||||
attr_reader :vsphere_username
|
||||
|
||||
# Utility method to convert a VMware managed object into an attribute hash.
|
||||
# This should only really be necessary for the real class.
|
||||
|
@ -125,6 +127,7 @@ module Fog
|
|||
end
|
||||
|
||||
@vsphere_is_vcenter = @connection.serviceContent.about.apiType == "VirtualCenter"
|
||||
@vsphere_rev = @connection.rev
|
||||
|
||||
authenticate
|
||||
end
|
||||
|
|
|
@ -34,7 +34,7 @@ Shindo.tests('Fog::Compute[:vsphere]', ['vsphere']) do
|
|||
end
|
||||
|
||||
tests("Compute attributes") do
|
||||
%w{ vsphere_is_vcenter vsphere_rev }.each do |attr|
|
||||
%w{ vsphere_is_vcenter vsphere_rev vsphere_username vsphere_server }.each do |attr|
|
||||
test("it should respond to #{attr}") { compute.respond_to? attr }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue