mirror of
https://github.com/OpenNebula/one.git
synced 2025-02-22 17:57:46 +03:00
Get rid of not used defaults for IM and TM drivers
git-svn-id: http://svn.opennebula.org/one/trunk@390 3034c82b-c49b-4eb3-8279-a7acafdc01c0
This commit is contained in:
parent
1d94e0ba52
commit
c13cbce13a
@ -40,7 +40,8 @@ public:
|
||||
int userid,
|
||||
const map<string,string>& attrs,
|
||||
bool sudo,
|
||||
VirtualMachinePool * pool);
|
||||
VirtualMachinePool * pool):
|
||||
Mad(userid,attrs,sudo), vmpool(pool){};
|
||||
|
||||
virtual ~TransferManagerDriver(){};
|
||||
|
||||
@ -55,20 +56,15 @@ public:
|
||||
* TODO: What do we need here? Check on-going xfr?
|
||||
*/
|
||||
void recover();
|
||||
|
||||
|
||||
private:
|
||||
friend class TransferManager;
|
||||
|
||||
/**
|
||||
* Configuration file for the driver
|
||||
*/
|
||||
Template driver_conf;
|
||||
|
||||
/**
|
||||
* Pointer to the Virtual Machine Pool, to access VMs
|
||||
*/
|
||||
VirtualMachinePool * vmpool;
|
||||
|
||||
VirtualMachinePool * vmpool;
|
||||
|
||||
/**
|
||||
* Sends a transfer request to the MAD: "TRANSFER ID XFR_FILE"
|
||||
* @param oid the virtual machine id.
|
||||
|
@ -57,36 +57,29 @@ MAC_PREFIX = "00:03"
|
||||
# arguments : for the driver executable, usually a probe configuration file,
|
||||
# can be an absolute path or relative to $ONE_LOCATION/etc (or
|
||||
# /etc/one/ if OpenNebula was installed in /)
|
||||
#
|
||||
# default : default values and configuration parameters for the driver, can
|
||||
# be an absolute path or relative to $ONE_LOCATION/etc (or
|
||||
# /etc/one/ if OpenNebula was installed in /)
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
IM_MAD = [
|
||||
name = "im_xen",
|
||||
executable = "one_im_ssh",
|
||||
arguments = "im_xen/im_xen.conf",
|
||||
default = "im_xen/im_xen.conf" ]
|
||||
arguments = "im_xen/im_xen.conf" ]
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# KVM Information Driver Manager sample configuration
|
||||
#-------------------------------------------------------------------------------
|
||||
# IM_MAD = [
|
||||
#IM_MAD = [
|
||||
# name = "im_kvm",
|
||||
# executable = "one_im_ssh",
|
||||
# arguments = "im_kvm/im_kvm.conf",
|
||||
# default = "im_kvm/im_kvm.conf" ]
|
||||
# arguments = "im_kvm/im_kvm.conf" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# EC2 Information Driver Manager sample configuration
|
||||
#-------------------------------------------------------------------------------
|
||||
# IM_MAD = [
|
||||
#IM_MAD = [
|
||||
# name = "im_ec2",
|
||||
# executable = "one_im_ec2",
|
||||
# arguments = "im_ec2/im_ec2.conf",
|
||||
# default = "im_ec2/im_ec2.conf" ]
|
||||
# arguments = "im_ec2/im_ec2.conf" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
@ -119,11 +112,11 @@ VM_MAD = [
|
||||
#-------------------------------------------------------------------------------
|
||||
# KVM Virtualization Driver Manager sample configuration
|
||||
#-------------------------------------------------------------------------------
|
||||
# VM_MAD = [
|
||||
# name = "vmm_kvm",
|
||||
# executable = "one_vmm_kvm",
|
||||
# default = "vmm_kvm/vmm_kvm.conf",
|
||||
# type = "kvm" ]
|
||||
#VM_MAD = [
|
||||
# name = "vmm_kvm",
|
||||
# executable = "one_vmm_kvm",
|
||||
# default = "vmm_kvm/vmm_kvm.conf",
|
||||
# type = "kvm" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
@ -132,14 +125,13 @@ VM_MAD = [
|
||||
# relative to $ONE_LOCATION/etc (or /etc/one/ if OpenNebula was
|
||||
# installed in /).
|
||||
#-------------------------------------------------------------------------------
|
||||
# VM_MAD = [
|
||||
# name = "vmm_ec2",
|
||||
# executable = "one_vmm_ec2",
|
||||
# arguments = "vmm_ec2/vmm_ec2.conf",
|
||||
# type = "xml" ]
|
||||
#VM_MAD = [
|
||||
# name = "vmm_ec2",
|
||||
# executable = "one_vmm_ec2",
|
||||
# arguments = "vmm_ec2/vmm_ec2.conf",
|
||||
# type = "xml" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Transfer Manager Driver Configuration
|
||||
#-------------------------------------------------------------------------------
|
||||
@ -154,34 +146,27 @@ VM_MAD = [
|
||||
# arguments : for the driver executable, usually a commands configuration file
|
||||
# , can be an absolute path or relative to $ONE_LOCATION/etc (or
|
||||
# /etc/one/ if OpenNebula was installed in /)
|
||||
#
|
||||
# default : default values and configuration parameters for the driver, can
|
||||
# be an absolute path or relative to $ONE_LOCATION/etc (or
|
||||
# /etc/one/ if OpenNebula was installed in /)
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
TM_MAD = [
|
||||
name = "tm_ssh",
|
||||
executable = "one_tm",
|
||||
arguments = "tm_ssh/tm_ssh.conf",
|
||||
default = "tm_ssh/tm_ssh.conf" ]
|
||||
arguments = "tm_ssh/tm_ssh.conf" ]
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# NFS Transfer Manager Driver sample configuration
|
||||
#-------------------------------------------------------------------------------
|
||||
# TM_MAD = [
|
||||
# name = "tm_nfs",
|
||||
# executable = "one_tm",
|
||||
# arguments = "tm_nfs/tm_nfs.conf",
|
||||
# default = "tm_nfs/tm_nfs.conf" ]
|
||||
#TM_MAD = [
|
||||
# name = "tm_nfs",
|
||||
# executable = "one_tm",
|
||||
# arguments = "tm_nfs/tm_nfs.conf" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Dummy Transfer Manager Driver sample configuration
|
||||
#-------------------------------------------------------------------------------
|
||||
# TM_MAD = [
|
||||
# name = "tm_dummy",
|
||||
# executable = "one_tm",
|
||||
# arguments = "tm_dummy/tm_dummy.conf",
|
||||
# default = "tm_dummy/tm_dummy.conf" ]
|
||||
#TM_MAD = [
|
||||
# name = "tm_dummy",
|
||||
# executable = "one_tm",
|
||||
# arguments = "tm_dummy/tm_dummy.conf" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
@ -20,58 +20,6 @@
|
||||
#include "LifeCycleManager.h"
|
||||
#include <sstream>
|
||||
|
||||
TransferManagerDriver::TransferManagerDriver(
|
||||
int userid,
|
||||
const map<string,string>& attrs,
|
||||
bool sudo,
|
||||
VirtualMachinePool * pool):
|
||||
Mad(userid,attrs,sudo),driver_conf(true),vmpool(pool)
|
||||
{
|
||||
map<string,string>::const_iterator it;
|
||||
char * error_msg = 0;
|
||||
const char * cfile;
|
||||
string file;
|
||||
int rc;
|
||||
|
||||
it = attrs.find("DEFAULT");
|
||||
|
||||
if ( it != attrs.end() )
|
||||
{
|
||||
if (it->second[0] != '/') //Look in ONE_LOCATION/etc or in "/etc/one"
|
||||
{
|
||||
Nebula& nd = Nebula::instance();
|
||||
|
||||
file = nd.get_defaults_location() + it->second;
|
||||
cfile = file.c_str();
|
||||
}
|
||||
else //Absolute Path
|
||||
{
|
||||
cfile = it->second.c_str();
|
||||
}
|
||||
|
||||
rc = driver_conf.parse(cfile, &error_msg);
|
||||
|
||||
if ( rc != 0 )
|
||||
{
|
||||
ostringstream oss;
|
||||
|
||||
if ( error_msg != 0 )
|
||||
{
|
||||
oss << "Error loading driver configuration file " << cfile <<
|
||||
" : " << error_msg;
|
||||
|
||||
free(error_msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
oss << "Error loading driver configuration file " << cfile;
|
||||
}
|
||||
|
||||
Nebula::log("TM", Log::ERROR, oss);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ************************************************************************** */
|
||||
/* Driver ASCII Protocol Implementation */
|
||||
/* ************************************************************************** */
|
||||
@ -235,4 +183,3 @@ void TransferManagerDriver::recover()
|
||||
{
|
||||
Nebula::log("TM",Log::INFO,"Recovering TM drivers");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user