From f0167f2012a6233922f350411fde7b34383f4270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20S=2E=20Montero?= Date: Tue, 21 Jul 2009 15:17:12 +0000 Subject: [PATCH] removed unused driver files git-svn-id: http://svn.opennebula.org/one/trunk@711 3034c82b-c49b-4eb3-8279-a7acafdc01c0 --- src/tm_mad/vmware/Java/TMClone.java | 323 --------------------------- src/tm_mad/vmware/Java/tm_clone.sh | 62 ----- src/tm_mad/vmware/ssh/tm_clone.sh | 60 ----- src/tm_mad/vmware/ssh/tm_context.sh | 69 ------ src/tm_mad/vmware/ssh/tm_delete.sh | 38 ---- src/tm_mad/vmware/ssh/tm_ln.sh | 35 --- src/tm_mad/vmware/ssh/tm_mkimage.sh | 50 ----- src/tm_mad/vmware/ssh/tm_mv.sh | 69 ------ src/tm_mad/vmware/ssh/tm_vmware.conf | 6 - src/tm_mad/vmware/ssh/tm_vmwarerc | 22 -- 10 files changed, 734 deletions(-) delete mode 100644 src/tm_mad/vmware/Java/TMClone.java delete mode 100644 src/tm_mad/vmware/Java/tm_clone.sh delete mode 100755 src/tm_mad/vmware/ssh/tm_clone.sh delete mode 100755 src/tm_mad/vmware/ssh/tm_context.sh delete mode 100755 src/tm_mad/vmware/ssh/tm_delete.sh delete mode 100755 src/tm_mad/vmware/ssh/tm_ln.sh delete mode 100755 src/tm_mad/vmware/ssh/tm_mkimage.sh delete mode 100755 src/tm_mad/vmware/ssh/tm_mv.sh delete mode 100644 src/tm_mad/vmware/ssh/tm_vmware.conf delete mode 100644 src/tm_mad/vmware/ssh/tm_vmwarerc diff --git a/src/tm_mad/vmware/Java/TMClone.java b/src/tm_mad/vmware/Java/TMClone.java deleted file mode 100644 index c8c5423ddf..0000000000 --- a/src/tm_mad/vmware/Java/TMClone.java +++ /dev/null @@ -1,323 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */ -/* Complutense de Madrid (dsa-research.org) */ -/* */ -/* 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. */ -/* -------------------------------------------------------------------------- */ - - -import com.vmware.vim.*; -import com.vmware.apputils.*; -import com.vmware.apputils.vim.*; - -import java.util.*; -import java.net.*; -import java.io.*; -import javax.net.ssl.*; - -import org.w3c.dom.Document; -import org.w3c.dom.*; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.DocumentBuilder; - - -/* - * Used to stage VMs in the ESXi Server - * Accepts a Source and Destination, of the form - * machineSource:path_to_source machineDest:path_to_dest - * although the path to dest will be used to extract the one-id - * and files stored in datastore/one-id - */ - -public class TMClone -{ - private String oneID = ""; - - // Helpers from VI samples - private static ServiceContent content; - private static AppUtil cb = null; - private static VimPortType service; - - private String datastore = ""; - private String datacenter = ""; - - private String pathToVm = ""; - - /* Copies a VM from local FS to ESXi - * @param pathToVm localpath of the VM - */ - private void copyVM() throws Exception - { - String [] listOfVMFiles = getDirFiles(pathToVm); - - for(int i=0; i 0) - { - out.write(buf, 0, len); - out.flush(); - } - conn.getResponseMessage(); - conn.disconnect(); - out.close(); - } - - /* Returns list of files available on a folder - * @param localDir local path containing files to be listed - * @return list of files or null if none - */ - private String [] getDirFiles(String localDir) throws Exception - { - File temp = new File(localDir); - String [] listOfFiles = temp.list(); - - if(listOfFiles != null) - { - return listOfFiles; - } - else - { - return null; - } - } - - /* - * Gets http connection to ESXi server - * @param urlString contact point to the ESXi server - * @returns http connection to ESXi server - */ - private HttpURLConnection getConnection(String urlString) throws Exception - { - String cookieString = getCookie(); - trustAllHttpsCertificates(); - - HostnameVerifier hv = new HostnameVerifier() - { - public boolean verify(String urlHostName, SSLSession session) - { - return true; - } - }; - - HttpsURLConnection.setDefaultHostnameVerifier(hv); - URL url = new URL(urlString); - HttpURLConnection conn = (HttpURLConnection) url.openConnection(); - conn.setDoOutput(true); - - conn.setRequestProperty( - org.apache.axis.transport.http.HTTPConstants.HEADER_COOKIE, - cookieString); - - conn.setRequestProperty( - org.apache.axis.transport.http.HTTPConstants.HEADER_CONTENT_TYPE, - "application/octet-stream"); - - conn.setRequestProperty( - org.apache.axis.transport.http.HTTPConstants.HEADER_EXPECT, - "100-continue"); - conn.setRequestMethod("PUT"); - return conn; - } - - private static void trustAllHttpsCertificates() throws Exception - { - javax.net.ssl.TrustManager[] trustAllCerts = - new javax.net.ssl.TrustManager[1]; - javax.net.ssl.TrustManager tm = new myTMan(); - trustAllCerts[0] = tm; - javax.net.ssl.SSLContext sc = javax.net.ssl.SSLContext.getInstance("SSL"); - sc.init(null, trustAllCerts, null); - javax.net.ssl.HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()); - } - - - - /* - * Get ESXi cookie - * @return string ESXi cookie - */ - private String getCookie() throws Exception - { - com.vmware.vim.VimPortType test = cb.getConnection().getService(); - org.apache.axis.client.Stub st = (org.apache.axis.client.Stub)test; - org.apache.axis.client.Call callObj = st._getCall(); - org.apache.axis.MessageContext msgContext = callObj.getMessageContext(); - String cookieString - = (String)msgContext.getProperty( - org.apache.axis.transport.http.HTTPConstants.HEADER_COOKIE); - return cookieString; - } - - - - TMClone(String source, String destiny) throws Exception - { - String[] connectionArgs = new String[6]; - - String hostName = destiny.substring(0,destiny.indexOf(":")); - pathToVm = source.substring(source.indexOf(":")+1, - source.length()); - oneID = destiny.substring(destiny.indexOf(":")+1, - destiny.length()); - oneID = oneID.substring(0,oneID.lastIndexOf("/") ); - oneID = oneID.substring(0,oneID.lastIndexOf("/") ); - oneID = oneID.substring(oneID.lastIndexOf("/")+1 ); - - connectionArgs[0]="--url"; - connectionArgs[1]="https://" + hostName + ":8008/sdk"; - connectionArgs[2]="--username"; - connectionArgs[3]= System.getProperty("username"); - connectionArgs[4]="--password"; - connectionArgs[5]= System.getProperty("password"); - - cb = AppUtil.initialize("TMClone", null, connectionArgs); - cb.connect(); - - // Todo change hardcoding - ManagedObjectReference hostMor = - cb.getServiceUtil().getDecendentMoRef(null, - "HostSystem", - hostName); - - // TODO make this dymamic. - datacenter = "ha-datacenter"; - - datastore = "datastore1"; - - com.vmware.apputils.vim.ServiceConnection sc = cb.getConnection(); - content = sc.getServiceContent(); - service = sc.getService(); - } - - protected void finalize() throws Throwable - { - cb.disConnect(); - } - - public static void main(String[] args) - { - boolean success = true; - - // first, make redirection - - PrintStream stdout = System.out; - PrintStream stderr = System.err; - - System.setOut(stderr); - System.setErr(stdout); - - if(args.length!=2) - { - success = false; - } - else - { - try - { - TMClone tmc = new TMClone(args[0],args[1]); - tmc.copyVM(); - } - catch(Exception e) - { - e.printStackTrace(); - success = false; - } - } - - if (success) - { - System.exit(0); - } - else - { - System.exit(-1); - } - } - - - public static class myTMan implements javax.net.ssl.TrustManager, - javax.net.ssl.X509TrustManager - { - public java.security.cert.X509Certificate[] getAcceptedIssuers() - { - return null; - } - public boolean isServerTrusted( - java.security.cert.X509Certificate[] certs) - { - return true; - } - public boolean isClientTrusted( - java.security.cert.X509Certificate[] certs) - { - return true; - } - public void checkServerTrusted( - java.security.cert.X509Certificate[] certs, String authType) - throws java.security.cert.CertificateException - { - return; - } - public void checkClientTrusted( - java.security.cert.X509Certificate[] certs, String authType) - throws java.security.cert.CertificateException - { - return; - } - } -} diff --git a/src/tm_mad/vmware/Java/tm_clone.sh b/src/tm_mad/vmware/Java/tm_clone.sh deleted file mode 100644 index cdaf747e64..0000000000 --- a/src/tm_mad/vmware/Java/tm_clone.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash - -# -------------------------------------------------------------------------- # -# Copyright 2002-2009, Distributed Systems Architecture Group, Universidad # -# Complutense de Madrid (dsa-research.org) # -# # -# 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. # -#--------------------------------------------------------------------------- # - - -#Setup driver variables -DRIVER_NAME="tm_vmware" - -if [ -z "${ONE_LOCATION}" ]; then - DRIVERRC=/etc/one/${DRIVER_NAME}/${DRIVER_NAME}rc - TMCOMMON=/usr/lib/one/mads/tm_common.sh -else - DRIVERRC=$ONE_LOCATION/etc/${DRIVER_NAME}/${DRIVER_NAME}rc - TMCOMMON=$ONE_LOCATION/lib/mads/tm_common.sh -fi - -. $TMCOMMON - -# Export the im_mad specific rc - -export_rc_vars $DRIVERRC - -echo $VMWARE_TRUSTORE - -LOG_FILE=$DRIVER_NAME - -MAD_FILE="TMClone" - -if [ -z "${ONE_LOCATION}" ]; then - MAD_LOG_PATH=/var/log/one/$LOG_FILE.log -else - MAD_LOG_PATH=$ONE_LOCATION/var/$LOG_FILE.log -fi - -# Execute the actual MAD -if [ -n "${ONE_MAD_DEBUG}" ]; then - exec_and_log "exec nice -n $PRIORITY java -cp .:$CLASSPATH \ - -Djavax.net.ssl.trustStore=$VMWARE_TRUSTORE -Dusername=$USERNAME \ - -Dpassword=$PASSWORD -Xmx1024M $MAD_FILE $*" -else - exec nice -n $PRIORITY java -cp .:$CLASSPATH \ - -Djavax.net.ssl.trustStore=$VMWARE_TRUSTORE -Dusername=$USERNAME \ - -Dpassword=$PASSWORD -Xmx1024M $MAD_FILE $* 2> /dev/null -fi - - - diff --git a/src/tm_mad/vmware/ssh/tm_clone.sh b/src/tm_mad/vmware/ssh/tm_clone.sh deleted file mode 100755 index 3bd2c8ec83..0000000000 --- a/src/tm_mad/vmware/ssh/tm_clone.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash - -# -------------------------------------------------------------------------- # -# Copyright 2002-2009, Distributed Systems Architecture Group, Universidad # -# Complutense de Madrid (dsa-research.org) # -# # -# 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. # -#--------------------------------------------------------------------------- # - -SRC=$1 -DST=$2 - -if [ -z "${ONE_LOCATION}" ]; then - TMCOMMON=/usr/lib/one/mads/tm_common.sh -else - TMCOMMON=$ONE_LOCATION/lib/mads/tm_common.sh -fi - -. $TMCOMMON - -SRC_PATH=`arg_path $SRC` -DST_PATH=`arg_path $DST` - -# Get rid of path/images, we don't need it -DST_PATH=`dirname $DST_PATH` - -SRC_HOST=`arg_host $SRC` -DST_HOST=`arg_host $DST` - -log "$1 $2" -log "DST: $DST_PATH" - -BASE_SRC=`basename $SRC_PATH` -BASE_DST=`basename $DST_PATH` - -case $SRC in -http://*) - log "Downloading $SRC" - exec_and_log "ssh $DST_HOST wget -O $DST_PATH $SRC_PATH" - ;; - -*) - log "Cloning $SRC" - scp -r $SRC $DST_HOST:/vmfs/volumes/$DATASTORE/ - ssh $DST_HOST "cd /vmfs/volumes/$DATASTORE ; mv $BASE_SRC $BASE_DST" - ;; -esac - -ssh $DST_HOST chmod a+w /vmfs/volumes/$DATASTORE/$BASE_DST - diff --git a/src/tm_mad/vmware/ssh/tm_context.sh b/src/tm_mad/vmware/ssh/tm_context.sh deleted file mode 100755 index 298a3772e4..0000000000 --- a/src/tm_mad/vmware/ssh/tm_context.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash - -# -------------------------------------------------------------------------- # -# Copyright 2002-2009, Distributed Systems Architecture Group, Universidad # -# Complutense de Madrid (dsa-research.org) # -# # -# 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. # -#--------------------------------------------------------------------------- # - -# Parameters: a b c d e f g h -# SRC: a b c d e f g -# DST: h -while (( "$#" )); do - if [ "$#" == "1" ]; then - DST=$1 - else - SRC="$SRC $1" - fi - shift -done - - -if [ -z "${ONE_LOCATION}" ]; then - TMCOMMON=/usr/lib/one/mads/tm_common.sh -else - TMCOMMON=$ONE_LOCATION/lib/mads/tm_common.sh -fi - -. $TMCOMMON - - -DST_PATH=`arg_path $DST` -DST_FILE=`basename $DST_PATH` -DST_PATH=`dirname $DST_PATH` -DST_DIR=`dirname $DST_PATH` -DST_HASH=`echo -n $DST | md5sum | awk '{print $1}'` -TMP_DIR="$ONE_LOCATION/var/$DST_HASH" -ISO_DIR="$TMP_DIR/isofiles" -DST_HOST=`arg_host $DST` -DST_ONEID_FOLDER=`dirname $DST_PATH` -DST_ONEID_FOLDER=`basename $DST_ONEID_FOLDER` - -exec_and_log "mkdir -p $ISO_DIR" - -for f in $SRC; do - case $f in - http://*) - exec_and_log "wget -O $ISO_DIR $f" - ;; - - *) - exec_and_log "cp -R $f $ISO_DIR" - ;; - esac -done - -exec_and_log "mkisofs -o $TMP_DIR/$DST_FILE -J -R $ISO_DIR" -scp $TMP_DIR/$DST_FILE $DST_HOST:/vmfs/volumes/$DATASTORE/$DST_ONEID_FOLDER -exec_and_log "rm -rf $TMP_DIR" diff --git a/src/tm_mad/vmware/ssh/tm_delete.sh b/src/tm_mad/vmware/ssh/tm_delete.sh deleted file mode 100755 index 60e0e0a028..0000000000 --- a/src/tm_mad/vmware/ssh/tm_delete.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -# -------------------------------------------------------------------------- # -# Copyright 2002-2009, Distributed Systems Architecture Group, Universidad # -# Complutense de Madrid (dsa-research.org) # -# # -# 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. # -#--------------------------------------------------------------------------- # - -SRC=$1 -DST=$2 - -if [ -z "${ONE_LOCATION}" ]; then - TMCOMMON=/usr/lib/one/mads/tm_common.sh -else - TMCOMMON=$ONE_LOCATION/lib/mads/tm_common.sh -fi - -. $TMCOMMON - -SRC_PATH=`arg_path $SRC` -SRC_HOST=`arg_host $SRC` - -# We just need the bit -SRC_PATH=`basename $SRC_PATH` - -log "Deleting $SRC_PATH" -exec_and_log "ssh $SRC_HOST rm -rf /vmfs/volumes/$DATASTORE/$SRC_PATH" diff --git a/src/tm_mad/vmware/ssh/tm_ln.sh b/src/tm_mad/vmware/ssh/tm_ln.sh deleted file mode 100755 index 15a5e80d4b..0000000000 --- a/src/tm_mad/vmware/ssh/tm_ln.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -# -------------------------------------------------------------------------- # -# Copyright 2002-2009, Distributed Systems Architecture Group, Universidad # -# Complutense de Madrid (dsa-research.org) # -# # -# 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. # -#--------------------------------------------------------------------------- # - -SRC=$1 -DST=$2 - -if [ -z "${ONE_LOCATION}" ]; then - TMCOMMON=/usr/lib/one/mads/tm_common.sh - TM_COMMANDS_LOCATION=/usr/lib/one/tm_commands/ -else - TMCOMMON=$ONE_LOCATION/lib/mads/tm_common.sh - TM_COMMANDS_LOCATION=$ONE_LOCATION/lib/tm_commands/ -fi - -. $TMCOMMON - -log "Link $SRC_PATH (non shared dir, will clone)" -#exec_and_log "ln -s $SRC_PATH $DST_PATH" -exec $TM_COMMANDS_LOCATION/ssh/tm_clone.sh $SRC $DST diff --git a/src/tm_mad/vmware/ssh/tm_mkimage.sh b/src/tm_mad/vmware/ssh/tm_mkimage.sh deleted file mode 100755 index d76b88585c..0000000000 --- a/src/tm_mad/vmware/ssh/tm_mkimage.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash - -# -------------------------------------------------------------------------- # -# Copyright 2002-2009, Distributed Systems Architecture Group, Universidad # -# Complutense de Madrid (dsa-research.org) # -# # -# 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. # -#--------------------------------------------------------------------------- # - -if [ -z "${ONE_LOCATION}" ]; then - TMCOMMON=/usr/lib/one/mads/tm_common.sh -else - TMCOMMON=$ONE_LOCATION/lib/mads/tm_common.sh -fi - -. $TMCOMMON - -SIZE=$1 -FSTYPE=$2 -DST=$3 - -DST_PATH=`arg_path $DST` -DST_HOST=`arg_host $DST` -DST_DIR=`dirname $DST_PATH` -# Get rid of path/images, we don't need it -DST_DIR=`dirname $DST_DIR` - -DST_HASH=`echo -n $DST | md5sum | awk '{print $1}'` -TMP_DIR="$ONE_LOCATION/var/$DST_HASH" -NAME_OF_CONTEXT_FILE=`basename $DST_PATH` - -DST_ONEID_FOLDER=`basename $DST_DIR` - -exec_and_log "mkdir -p $TMP_DIR" - -ssh $DST_HOST \"cd /vmfs/volumes/$DATASTORE; mkdir $DST_DIR\" -exec_and_log "dd if=/dev/zero of=$TMP_DIR/$NAME_OF_CONTEXT_FILE bs=1 count=1 seek=${SIZE}M" -exec_and_log "mkfs -t $FSTYPE -F $TMP_DIR/$NAME_OF_CONTEXT_FILE" -scp $TMP_DIR/$NAME_OF_CONTEXT_FILE $DST_HOST:/vmfs/volumes/$DATASTORE/$DST_ONEID_FOLDER -ssh $DST_HOST chmod a+rw $DST_PATH diff --git a/src/tm_mad/vmware/ssh/tm_mv.sh b/src/tm_mad/vmware/ssh/tm_mv.sh deleted file mode 100755 index 6ba3a07460..0000000000 --- a/src/tm_mad/vmware/ssh/tm_mv.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash - -# -------------------------------------------------------------------------- # -# Copyright 2002-2009, Distributed Systems Architecture Group, Universidad # -# Complutense de Madrid (dsa-research.org) # -# # -# 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. # -#--------------------------------------------------------------------------- # - -SRC=$1 -DST=$2 - -if [ -z "${ONE_LOCATION}" ]; then - TMCOMMON=/usr/lib/one/mads/tm_common.sh -else - TMCOMMON=$ONE_LOCATION/lib/mads/tm_common.sh -fi - -. $TMCOMMON - -SRC_PATH=`arg_path $SRC` -DST_PATH=`arg_path $DST` - -SRC_HOST=`arg_host $SRC` -DST_HOST=`arg_host $DST` - -if [ $SRC_HOST -ne `hostname` ]; then - $VM_ID=`sed -e 's/.*\/\([0-9]\+\)\/images\/.*/\1/` - $VM_NAME=one-$VM_ID - $LAST_BIT_OF_PATH=`basename $SRC_PATH` - if [ $LAST_BIT_OF_PATH -eq "images" ]; then - SRC_PATH="/vmfs/volumes/$DATASTORE/"$VM_NAME - else - SRC_PATH="/vmfs/volumes/$DATASTORE/"$VM_NAME"/$LAST_BIT_OF_PATH - fi -fi - -if [ $DST_HOST -ne `hostname` ]; then - $VM_ID=`sed -e 's/.*\/\([0-9]\+\)\/images\/.*/\1/` - $VM_NAME=one-$VM_ID - $LAST_BIT_OF_PATH=`basename $DST_PATH` - if [ $LAST_BIT_OF_PATH -eq "images" ]; then - DST_PATH="/vmfs/volumes/$DATASTORE/"$VM_NAME - else - DST_PATH="/vmfs/volumes/$DATASTORE/"$VM_NAME"/$LAST_BIT_OF_PATH - fi -fi - - -DST_DIR=`dirname $DST_PATH` - -if [ -d $DST_PATH ]; then - DST_ONEID_FOLDER=`basename ` -else -fi - -log "Moving $SRC_PATH" -scp -r $SRC $DST_HOST:/vmfs/volumes/$DATASTORE/$ -ssh $SRC_HOST rm -rf $SRC_PATH diff --git a/src/tm_mad/vmware/ssh/tm_vmware.conf b/src/tm_mad/vmware/ssh/tm_vmware.conf deleted file mode 100644 index 0123f1c2ff..0000000000 --- a/src/tm_mad/vmware/ssh/tm_vmware.conf +++ /dev/null @@ -1,6 +0,0 @@ -CLONE = vmware/tm_clone.sh -LN = vmware/tm_ln.sh -MKSWAP = dummy/tm_dymmy.sh -MKIMAGE = vmware/tm_mkimage.sh -DELETE = vmware/tm_delete.sh -MV = vmware/tm_mv.sh diff --git a/src/tm_mad/vmware/ssh/tm_vmwarerc b/src/tm_mad/vmware/ssh/tm_vmwarerc deleted file mode 100644 index e73ea58caf..0000000000 --- a/src/tm_mad/vmware/ssh/tm_vmwarerc +++ /dev/null @@ -1,22 +0,0 @@ -# -------------------------------------------------------------------------- # -# Copyright 2002-2009, Distributed Systems Architecture Group, Universidad # -# Complutense de Madrid (dsa-research.org) # -# # -# 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. # -#--------------------------------------------------------------------------- # - -# Uncomment the following line to active MAD debug -#ONE_MAD_DEBUG=1 - -# Name of the ESX(i) datastore -DATASTORE=datastore1