From d9907f271ac59075ff40e686887b6cc57b9701b1 Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Wed, 14 Mar 2012 12:20:06 +0100 Subject: [PATCH] feature #1112: Dummy datastore driver --- install.sh | 6 ++++++ src/datastore_mad/remotes/dummy/cp | 19 +++++++++++++++++++ src/datastore_mad/remotes/dummy/mkfs | 19 +++++++++++++++++++ src/datastore_mad/remotes/dummy/rm | 19 +++++++++++++++++++ 4 files changed, 63 insertions(+) create mode 100755 src/datastore_mad/remotes/dummy/cp create mode 100755 src/datastore_mad/remotes/dummy/mkfs create mode 100755 src/datastore_mad/remotes/dummy/rm diff --git a/install.sh b/install.sh index d49113c7f9..70bd372da3 100755 --- a/install.sh +++ b/install.sh @@ -236,6 +236,7 @@ VAR_DIRS="$VAR_LOCATION/remotes \ $VAR_LOCATION/remotes/hooks \ $VAR_LOCATION/remotes/hooks/ft \ $VAR_LOCATION/remotes/datastore \ + $VAR_LOCATION/remotes/datastore/dummy \ $VAR_LOCATION/remotes/datastore/fs \ $VAR_LOCATION/remotes/datastore/vmware \ $VAR_LOCATION/remotes/datastore/iscsi \ @@ -391,6 +392,7 @@ INSTALL_FILES=( TM_DUMMY_FILES:$VAR_LOCATION/remotes/tm/dummy TM_LVM_FILES:$VAR_LOCATION/remotes/tm/lvm DATASTORE_DRIVER_COMMON_SCRIPTS:$VAR_LOCATION/remotes/datastore/ + DATASTORE_DRIVER_DUMMY_SCRIPTS:$VAR_LOCATION/remotes/datastore/dummy DATASTORE_DRIVER_FS_SCRIPTS:$VAR_LOCATION/remotes/datastore/fs DATASTORE_DRIVER_VMWARE_SCRIPTS:$VAR_LOCATION/remotes/datastore/vmware DATASTORE_DRIVER_ISCSI_SCRIPTS:$VAR_LOCATION/remotes/datastore/iscsi @@ -821,6 +823,10 @@ TM_ISCSI_FILES="src/tm_mad/iscsi/clone \ DATASTORE_DRIVER_COMMON_SCRIPTS="src/datastore_mad/remotes/xpath.rb \ src/datastore_mad/remotes/libfs.sh" +DATASTORE_DRIVER_DUMMY_SCRIPTS="src/datastore_mad/remotes/dummy/cp \ + src/datastore_mad/remotes/dummy/mkfs \ + src/datastore_mad/remotes/dummy/rm" + DATASTORE_DRIVER_FS_SCRIPTS="src/datastore_mad/remotes/fs/cp \ src/datastore_mad/remotes/fs/mkfs \ src/datastore_mad/remotes/fs/rm" diff --git a/src/datastore_mad/remotes/dummy/cp b/src/datastore_mad/remotes/dummy/cp new file mode 100755 index 0000000000..d915146f42 --- /dev/null +++ b/src/datastore_mad/remotes/dummy/cp @@ -0,0 +1,19 @@ +#!/bin/sh + +# -------------------------------------------------------------------------- # +# Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.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. # +#--------------------------------------------------------------------------- # + +echo "dummy_path 1024" diff --git a/src/datastore_mad/remotes/dummy/mkfs b/src/datastore_mad/remotes/dummy/mkfs new file mode 100755 index 0000000000..d915146f42 --- /dev/null +++ b/src/datastore_mad/remotes/dummy/mkfs @@ -0,0 +1,19 @@ +#!/bin/sh + +# -------------------------------------------------------------------------- # +# Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.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. # +#--------------------------------------------------------------------------- # + +echo "dummy_path 1024" diff --git a/src/datastore_mad/remotes/dummy/rm b/src/datastore_mad/remotes/dummy/rm new file mode 100755 index 0000000000..6c1cd9257d --- /dev/null +++ b/src/datastore_mad/remotes/dummy/rm @@ -0,0 +1,19 @@ +#!/bin/sh + +# -------------------------------------------------------------------------- # +# Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.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. # +#--------------------------------------------------------------------------- # + +exit 0