1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-23 17:33:56 +03:00

F #4913: Install new vcenter driver

This commit is contained in:
Jaime Melis 2017-02-22 16:17:56 +01:00
parent 446490cf1a
commit 6d00ad5a90
33 changed files with 82 additions and 3294 deletions

View File

@ -236,7 +236,8 @@ LIB_DIRS="$LIB_LOCATION/ruby \
$LIB_LOCATION/mads \
$LIB_LOCATION/sh \
$LIB_LOCATION/ruby/cli \
$LIB_LOCATION/ruby/cli/one_helper"
$LIB_LOCATION/ruby/cli/one_helper \
$LIB_LOCATION/ruby/vcenter_driver"
VAR_DIRS="$VAR_LOCATION/remotes \
$VAR_LOCATION/remotes/im \
@ -381,6 +382,7 @@ INSTALL_FILES=(
AUTH_DUMMY_FILES:$VAR_LOCATION/remotes/auth/dummy
AUTH_PLAIN_FILES:$VAR_LOCATION/remotes/auth/plain
VMM_EXEC_LIB_FILES:$VAR_LOCATION/remotes/vmm/lib
VMM_EXEC_LIB_VCENTER_FILES:$LIB_LOCATION/ruby/vcenter_driver
VMM_EXEC_KVM_SCRIPTS:$VAR_LOCATION/remotes/vmm/kvm
VMM_EXEC_VCENTER_SCRIPTS:$VAR_LOCATION/remotes/vmm/vcenter
VMM_EXEC_EC2_SCRIPTS:$VAR_LOCATION/remotes/vmm/ec2
@ -642,6 +644,21 @@ MADS_LIB_FILES="src/mad/sh/madcommon.sh \
VMM_EXEC_LIB_FILES="src/vmm_mad/remotes/lib/poll_common.rb"
#-------------------------------------------------------------------------------
# VMM Lib vcenter files, used by the vCenter Driver to be installed in
# $REMOTES_LOCATION/vmm/lib/vcenter
#-------------------------------------------------------------------------------
VMM_EXEC_LIB_VCENTER_FILES="src/vmm_mad/remotes/lib/vcenter_driver/datastore.rb
src/vmm_mad/remotes/lib/vcenter_driver/vi_client.rb \
src/vmm_mad/remotes/lib/vcenter_driver/file_helper.rb \
src/vmm_mad/remotes/lib/vcenter_driver/host.rb \
src/vmm_mad/remotes/lib/vcenter_driver/virtual_machine.rb \
src/vmm_mad/remotes/lib/vcenter_driver/vi_helper.rb \
src/vmm_mad/remotes/lib/vcenter_driver/memoize.rb \
src/vmm_mad/remotes/lib/vcenter_driver/datacenter.rb \
src/vmm_mad/remotes/lib/vcenter_driver/network.rb"
#-------------------------------------------------------------------------------
# VMM SH Driver KVM scripts, to be installed under $REMOTES_LOCATION/vmm/kvm
#-------------------------------------------------------------------------------
@ -690,7 +707,7 @@ VMM_EXEC_VCENTER_SCRIPTS="src/vmm_mad/remotes/vcenter/cancel \
src/vmm_mad/remotes/vcenter/poll \
src/vmm_mad/remotes/vcenter/shutdown \
src/vmm_mad/remotes/vcenter/reconfigure \
src/vmm_mad/remotes/vcenter/prereconfigure"
src/vmm_mad/remotes/vcenter/preconfigure"
#------------------------------------------------------------------------------
# VMM Driver EC2 scripts, to be installed under $REMOTES_LOCATION/vmm/ec2
@ -758,7 +775,7 @@ IM_PROBES_KVM_PROBES_FILES="src/im_mad/remotes/kvm-probes.d/kvm.rb \
src/im_mad/remotes/common.d/version.sh \
src/im_mad/remotes/common.d/collectd-client-shepherd.sh"
IM_PROBES_VCENTER_FILES="src/im_mad/remotes/vcenter.d/vcenter.rb"
IM_PROBES_VCENTER_FILES="src/im_mad/remotes/vcenter.d/poll"
IM_PROBES_EC2_FILES="src/im_mad/remotes/ec2.d/poll"

View File

@ -27,7 +27,7 @@ end
$: << RUBY_LIB_LOCATION
$: << File.dirname(__FILE__)
require 'vcenter_driver2'
require 'vcenter_driver'
drv_action_enc = ARGV[0]
id = ARGV[1]

View File

@ -29,7 +29,7 @@ end
$: << RUBY_LIB_LOCATION
$: << File.dirname(__FILE__)
require 'vcenter_driver2'
require 'vcenter_driver'
drv_action_enc = ARGV[0]
id = ARGV[1]

View File

@ -31,7 +31,7 @@ end
$: << RUBY_LIB_LOCATION
$: << File.dirname(__FILE__)
require 'vcenter_driver2'
require 'vcenter_driver'
drv_action_enc = ARGV[0]
id = ARGV[1]

View File

@ -31,7 +31,7 @@ end
$: << RUBY_LIB_LOCATION
$: << File.dirname(__FILE__)
require 'vcenter_driver2'
require 'vcenter_driver'
drv_action_enc = ARGV[0]
id = ARGV[1]

View File

@ -31,7 +31,7 @@ end
$: << RUBY_LIB_LOCATION
$: << File.dirname(__FILE__)
require 'vcenter_driver2'
require 'vcenter_driver'
drv_action_enc = ARGV[0]
id = ARGV[1]

View File

@ -31,7 +31,7 @@ end
$: << RUBY_LIB_LOCATION
$: << File.dirname(__FILE__)
require 'vcenter_driver2'
require 'vcenter_driver'
drv_action_enc = ARGV[0]
id = ARGV[1]

View File

@ -29,7 +29,7 @@ end
$: << RUBY_LIB_LOCATION
$: << File.dirname(__FILE__)
require 'vcenter_driver2'
require 'vcenter_driver'
require 'uri'
require 'cgi'
require 'fileutils'

View File

@ -27,7 +27,7 @@ end
$: << RUBY_LIB_LOCATION
$: << File.dirname(__FILE__)
require 'vcenter_driver2'
require 'vcenter_driver'
host_id = ARGV[0]
target_ds_ref = ARGV[1]

View File

@ -26,7 +26,7 @@ end
$: << RUBY_LIB_LOCATION
require 'vcenter_driver2'
require 'vcenter_driver'
host_id = ARGV[4]

View File

@ -35,7 +35,7 @@ end
$: << RUBY_LIB_LOCATION
$: << File.dirname(__FILE__)
require 'vcenter_driver2'
require 'vcenter_driver'
src = ARGV[0]
dst = ARGV[1]

View File

@ -34,7 +34,7 @@ end
$: << RUBY_LIB_LOCATION
$: << File.dirname(__FILE__)
require 'vcenter_driver2'
require 'vcenter_driver'
src = ARGV[0]
target_path = ARGV[1]

View File

@ -34,7 +34,7 @@ end
$: << RUBY_LIB_LOCATION
$: << File.dirname(__FILE__)
require 'vcenter_driver2'
require 'vcenter_driver'
path = ARGV[0]
vmid = ARGV[1]

View File

@ -35,7 +35,7 @@ end
$: << RUBY_LIB_LOCATION
$: << File.dirname(__FILE__)
require 'vcenter_driver2'
require 'vcenter_driver'
size = ARGV[0]
path = ARGV[2]

View File

@ -35,7 +35,7 @@ end
$: << RUBY_LIB_LOCATION
$: << File.dirname(__FILE__)
require 'vcenter_driver2'
require 'vcenter_driver'
path = ARGV[0]
vmid = ARGV[2]

View File

@ -1,70 +0,0 @@
# ---------------------------------------------------------------------------- #
# Copyright 2002-2016, OpenNebula Project, OpenNebula Systems #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
# not use this file except in compliance with the License. You may obtain #
# a copy of the License at #
# #
# http://www.apache.org/licenses/LICENSE-2.0 #
# #
# Unless required by applicable law or agreed to in writing, software #
# distributed under the License is distributed on an "AS IS" BASIS, #
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
# See the License for the specific language governing permissions and #
# limitations under the License. #
# ---------------------------------------------------------------------------- #
# ---------------------------------------------------------------------------- #
# Set up the environment for the driver #
# ---------------------------------------------------------------------------- #
ONE_LOCATION = ENV["ONE_LOCATION"] if !defined?(ONE_LOCATION)
if !ONE_LOCATION
BIN_LOCATION = "/usr/bin" if !defined?(BIN_LOCATION)
LIB_LOCATION = "/usr/lib/one" if !defined?(LIB_LOCATION)
ETC_LOCATION = "/etc/one/" if !defined?(ETC_LOCATION)
VAR_LOCATION = "/var/lib/one" if !defined?(VAR_LOCATION)
else
BIN_LOCATION = ONE_LOCATION + "/bin" if !defined?(BIN_LOCATION)
LIB_LOCATION = ONE_LOCATION + "/lib" if !defined?(LIB_LOCATION)
ETC_LOCATION = ONE_LOCATION + "/etc/" if !defined?(ETC_LOCATION)
VAR_LOCATION = ONE_LOCATION + "/var/" if !defined?(VAR_LOCATION)
end
ENV['LANG'] = 'C'
$: << LIB_LOCATION + '/ruby/vendors/rbvmomi/lib'
$: << LIB_LOCATION + '/ruby'
$: << LIB_LOCATION + '/ruby/vcenter_driver'
require 'rbvmomi'
require 'yaml'
require 'opennebula'
require 'base64'
require 'openssl'
# ---------------------------------------------------------------------------- #
# vCenter Library #
# ---------------------------------------------------------------------------- #
require 'memoize'
require 'vi_client'
require 'vi_helper'
require 'datacenter'
require 'host'
require 'datastore'
require 'virtual_machine'
require 'network'
require 'file_helper'
# ---------------------------------------------------------------------------- #
# Helper functions #
# ---------------------------------------------------------------------------- #
def check_valid(parameter, label)
if parameter.nil? || parameter.empty?
STDERR.puts "The parameter '#{label}' is required for this action."
exit -1
end
end

View File

@ -27,7 +27,7 @@ end
$: << RUBY_LIB_LOCATION
$: << File.dirname(__FILE__)
require 'vcenter_driver2'
require 'vcenter_driver'
vm_ref = ARGV[0]
drv_action_enc = ARGV[4]

View File

@ -27,7 +27,7 @@ end
$: << RUBY_LIB_LOCATION
$: << File.dirname(__FILE__)
require 'vcenter_driver2'
require 'vcenter_driver'
vm_ref = ARGV[0]
mac = ARGV[1]

View File

@ -27,7 +27,7 @@ end
$: << RUBY_LIB_LOCATION
$: << File.dirname(__FILE__)
require 'vcenter_driver2'
require 'vcenter_driver'
vm_ref = ARGV[0]
host = ARGV[1]

View File

@ -27,7 +27,7 @@ end
$: << RUBY_LIB_LOCATION
$: << File.dirname(__FILE__)
require 'vcenter_driver2'
require 'vcenter_driver'
dfile = ARGV[0]
cluster_name = ARGV[1]

View File

@ -27,7 +27,7 @@ end
$: << RUBY_LIB_LOCATION
$: << File.dirname(__FILE__)
require 'vcenter_driver2'
require 'vcenter_driver'
vm_ref = ARGV[0]
vc_cluster_name = ARGV[-1]

View File

@ -27,7 +27,7 @@ end
$: << RUBY_LIB_LOCATION
$: << File.dirname(__FILE__)
require 'vcenter_driver2'
require 'vcenter_driver'
vm_ref = ARGV[0]
mac = ARGV[1]

View File

@ -28,7 +28,7 @@ end
$: << RUBY_LIB_LOCATION
$: << File.dirname(__FILE__)
require 'vcenter_driver2'
require 'vcenter_driver'
vm_ref = ARGV[0]
vc_cluster_name = ARGV[1]

View File

@ -27,7 +27,7 @@ end
$: << RUBY_LIB_LOCATION
$: << File.dirname(__FILE__)
require 'vcenter_driver2'
require 'vcenter_driver'
vm_ref = ARGV[0]
vc_cluster_name = ARGV[1]

View File

@ -27,7 +27,7 @@ end
$: << RUBY_LIB_LOCATION
$: << File.dirname(__FILE__)
require 'vcenter_driver2'
require 'vcenter_driver'
vm_ref = ARGV[0]
vc_cluster_name = ARGV[-1]

View File

@ -27,7 +27,7 @@ end
$: << RUBY_LIB_LOCATION
$: << File.dirname(__FILE__)
require 'vcenter_driver2'
require 'vcenter_driver'
vm_ref = ARGV[0]
vc_cluster_name = ARGV[1]

View File

@ -27,7 +27,7 @@ end
$: << RUBY_LIB_LOCATION
$: << File.dirname(__FILE__)
require 'vcenter_driver2'
require 'vcenter_driver'
vm_ref = ARGV[2]
vc_cluster_name = ARGV[-1]

View File

@ -27,7 +27,7 @@ end
$: << RUBY_LIB_LOCATION
$: << File.dirname(__FILE__)
require 'vcenter_driver2'
require 'vcenter_driver'
vm_ref = ARGV[0]
vc_cluster_name = ARGV[-1]

View File

@ -27,7 +27,7 @@ end
$: << RUBY_LIB_LOCATION
$: << File.dirname(__FILE__)
require 'vcenter_driver2'
require 'vcenter_driver'
vm_ref = ARGV[0]
vc_cluster_name = ARGV[1]

View File

@ -27,7 +27,7 @@ end
$: << RUBY_LIB_LOCATION
$: << File.dirname(__FILE__)
require 'vcenter_driver2'
require 'vcenter_driver'
vm_ref = ARGV[0]
snap_id = ARGV[1]

View File

@ -27,7 +27,7 @@ end
$: << RUBY_LIB_LOCATION
$: << File.dirname(__FILE__)
require 'vcenter_driver2'
require 'vcenter_driver'
vm_ref = ARGV[0]
snap_id = ARGV[1]

View File

@ -27,7 +27,7 @@ end
$: << RUBY_LIB_LOCATION
$: << File.dirname(__FILE__)
require 'vcenter_driver2'
require 'vcenter_driver'
vm_ref = ARGV[0]
snap_id = ARGV[1]

File diff suppressed because it is too large Load Diff