diff --git a/src/vmm_mad/remotes/common/dummy.sh b/src/vmm_mad/remotes/common/dummy.sh index 2ed62a9d7b..3ee910cdd1 100755 --- a/src/vmm_mad/remotes/common/dummy.sh +++ b/src/vmm_mad/remotes/common/dummy.sh @@ -16,5 +16,4 @@ # limitations under the License. # #--------------------------------------------------------------------------- # -SCRIPT_NAME=$(basename $0) -echo "Action $SCRIPT_NAME not supported" 1>&2 +exit 0 diff --git a/src/vmm_mad/remotes/vcenter/prereconfigure b/src/vmm_mad/remotes/common/not_supported.sh similarity index 67% rename from src/vmm_mad/remotes/vcenter/prereconfigure rename to src/vmm_mad/remotes/common/not_supported.sh index 564d84fc38..3f0a8a1be5 100755 --- a/src/vmm_mad/remotes/vcenter/prereconfigure +++ b/src/vmm_mad/remotes/common/not_supported.sh @@ -1,20 +1,26 @@ -#!/usr/bin/env ruby +#!/bin/bash -# ---------------------------------------------------------------------------- # -# 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. # -# ---------------------------------------------------------------------------- # +# -------------------------------------------------------------------------- # +# 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. # +#--------------------------------------------------------------------------- # -exit(0) +script_name=$(basename $0) + +source $(dirname $0)/../../scripts_common.sh + +error_message "$script_name: Operation not supported" + +exit 1 diff --git a/src/vmm_mad/remotes/vcenter/migrate b/src/vmm_mad/remotes/vcenter/migrate deleted file mode 100755 index 39058c4157..0000000000 --- a/src/vmm_mad/remotes/vcenter/migrate +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env ruby - -# ---------------------------------------------------------------------------- # -# Copyright 2002-2017, 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. # -# ---------------------------------------------------------------------------- # - -ONE_LOCATION=ENV["ONE_LOCATION"] if !defined?(ONE_LOCATION) - -if !ONE_LOCATION - RUBY_LIB_LOCATION="/usr/lib/one/ruby" if !defined?(RUBY_LIB_LOCATION) -else - RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby" if !defined?(RUBY_LIB_LOCATION) -end - -$: << RUBY_LIB_LOCATION -$: << File.dirname(__FILE__) - -require 'vcenter_driver2' - -# Not supported -STDERR.puts "Migrate action is not supportef for vCenter" -exit -1 \ No newline at end of file diff --git a/src/vmm_mad/remotes/vcenter/migrate b/src/vmm_mad/remotes/vcenter/migrate new file mode 120000 index 0000000000..9c454e8cd4 --- /dev/null +++ b/src/vmm_mad/remotes/vcenter/migrate @@ -0,0 +1 @@ +../common/not_supported.sh \ No newline at end of file diff --git a/src/vmm_mad/remotes/vcenter/preconfigure b/src/vmm_mad/remotes/vcenter/preconfigure new file mode 120000 index 0000000000..300563f2ad --- /dev/null +++ b/src/vmm_mad/remotes/vcenter/preconfigure @@ -0,0 +1 @@ +../common/dummy.sh \ No newline at end of file