From cda36014d51e4836047893949b083b5d7334dc94 Mon Sep 17 00:00:00 2001 From: "Carlos J. Herrera" Date: Tue, 28 Apr 2020 05:54:09 -0400 Subject: [PATCH] F #3912: Adding vsphere-automation gems (#4615) * Adding vsphere-automation gems * Fix bug when ruby < 2.3 Signed-off-by: Carlos Herrera --- share/install_gems/Gemfile | 5 +++++ share/install_gems/install_gems | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/share/install_gems/Gemfile b/share/install_gems/Gemfile index 5e99e0befa..21224291b1 100644 --- a/share/install_gems/Gemfile +++ b/share/install_gems/Gemfile @@ -51,6 +51,11 @@ else gem 'rqrcode' # sunstone end +if RUBY_VERSION >= '2.3' + gem 'vsphere-automation-cis', '~> 0.4.6' + gem 'vsphere-automation-vcenter', '~> 0.4.6' +end + gem 'json' # sunstone, oneflow, cloud, ... gem 'sqlite3' # quota, onedb gem 'treetop', '>= 1.6.3' # oneflow diff --git a/share/install_gems/install_gems b/share/install_gems/install_gems index 2868dc2b95..f36143d8c0 100755 --- a/share/install_gems/install_gems +++ b/share/install_gems/install_gems @@ -36,6 +36,14 @@ end TREETOP = 'treetop --version ">= 1.6.3"' DEFAULT = DEFAULT_PRE if !defined?(DEFAULT) + + +VMWARE = ['rbvmomi --version "~> 2.2.0"', 'json'] +if defined?(RUBY_VERSION) && RUBY_VERSION>="2.3" + VMWARE.push('vsphere-automation-cis') + VMWARE.push('vsphere-automation-vcenter') +end + GROUPS={ :quota => [SQLITE, 'sequel'], :sunstone => [RACK, 'sinatra', 'thin', 'memcache-client', @@ -44,7 +52,7 @@ GROUPS={ :cloud => %w{amazon-ec2 sinatra thin uuidtools curb} << RACK, :hybrid => %w{configparser azure}, :auth_ldap => LDAP, - :vmware => ['rbvmomi --version "~> 2.2.0"', 'json'], + :vmware => VMWARE, :oneflow => ['sinatra', TREETOP, 'parse-cron'], :ec2_hybrid => 'aws-sdk --version "~> 2.5"', :oca => 'ox',