mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-22 13:33:52 +03:00
feature #2587: Added a DEFAULT_DEV_PREFIX for CD-ROM devices
This commit is contained in:
parent
0a71139b34
commit
d1a2b207f2
@ -43,6 +43,7 @@ public:
|
||||
SqlDB * db,
|
||||
const string& __default_type,
|
||||
const string& __default_dev_prefix,
|
||||
const string& __default_cdrom_dev_prefix,
|
||||
vector<const Attribute *>& restricted_attrs,
|
||||
vector<const Attribute *> hook_mads,
|
||||
const string& remotes_location,
|
||||
|
@ -176,11 +176,14 @@ MAC_PREFIX = "02:00"
|
||||
# CDROM Image file holding a CDROM
|
||||
# DATABLOCK Image file holding a datablock,
|
||||
# always created as an empty block
|
||||
#
|
||||
# DEFAULT_DEVICE_PREFIX: This can be set to
|
||||
# hd IDE prefix
|
||||
# sd SCSI
|
||||
# xvd XEN Virtual Disk
|
||||
# vd KVM virtual disk
|
||||
#
|
||||
# DEFAULT_CDROM_DEVICE_PREFIX: Same as above but for CDROM devices.
|
||||
#*******************************************************************************
|
||||
|
||||
#DATASTORE_LOCATION = /var/lib/one/datastores
|
||||
@ -192,6 +195,7 @@ DATASTORE_CAPACITY_CHECK = "yes"
|
||||
DEFAULT_IMAGE_TYPE = "OS"
|
||||
DEFAULT_DEVICE_PREFIX = "hd"
|
||||
|
||||
DEFAULT_CDROM_DEVICE_PREFIX = "hd"
|
||||
|
||||
#*******************************************************************************
|
||||
# Information Driver Configuration
|
||||
|
@ -36,6 +36,7 @@ ImagePool::ImagePool(
|
||||
SqlDB * db,
|
||||
const string& __default_type,
|
||||
const string& __default_dev_prefix,
|
||||
const string& __default_cdrom_dev_prefix,
|
||||
vector<const Attribute *>& restricted_attrs,
|
||||
vector<const Attribute *> hook_mads,
|
||||
const string& remotes_location,
|
||||
@ -47,7 +48,7 @@ ImagePool::ImagePool(
|
||||
_default_type = __default_type;
|
||||
_default_dev_prefix = __default_dev_prefix;
|
||||
|
||||
_default_cdrom_dev_prefix = "hd";
|
||||
_default_cdrom_dev_prefix = __default_cdrom_dev_prefix;
|
||||
|
||||
// Init inherit attributes
|
||||
vector<const Attribute *>::const_iterator it;
|
||||
|
@ -440,6 +440,7 @@ void Nebula::start(bool bootstrap_only)
|
||||
string mac_prefix;
|
||||
string default_image_type;
|
||||
string default_device_prefix;
|
||||
string default_cdrom_device_prefix;
|
||||
|
||||
time_t expiration_time;
|
||||
time_t vm_expiration;
|
||||
@ -518,10 +519,12 @@ void Nebula::start(bool bootstrap_only)
|
||||
nebula_configuration->get("DEFAULT_IMAGE_TYPE", default_image_type);
|
||||
nebula_configuration->get("DEFAULT_DEVICE_PREFIX",
|
||||
default_device_prefix);
|
||||
|
||||
nebula_configuration->get("DEFAULT_CDROM_DEVICE_PREFIX",
|
||||
default_cdrom_device_prefix);
|
||||
ipool = new ImagePool(db,
|
||||
default_image_type,
|
||||
default_device_prefix,
|
||||
default_cdrom_device_prefix,
|
||||
img_restricted_attrs,
|
||||
image_hooks,
|
||||
remotes_location,
|
||||
|
@ -282,6 +282,7 @@ void OpenNebulaTemplate::set_conf_default()
|
||||
# DATASTORE_CAPACITY_CHECK
|
||||
# DEFAULT_IMAGE_TYPE
|
||||
# DEFAULT_DEVICE_PREFIX
|
||||
# DEFAULT_CDROM_DEVICE_PREFIX
|
||||
#*******************************************************************************
|
||||
*/
|
||||
//DATASTORE_LOCATION
|
||||
@ -311,6 +312,10 @@ void OpenNebulaTemplate::set_conf_default()
|
||||
|
||||
attribute = new SingleAttribute("DEFAULT_DEVICE_PREFIX",value);
|
||||
conf_default.insert(make_pair(attribute->name(),attribute));
|
||||
|
||||
//DEFAULT_CDROM_DEVICE_PREFIX
|
||||
attribute = new SingleAttribute("DEFAULT_CDROM_DEVICE_PREFIX",value);
|
||||
conf_default.insert(make_pair(attribute->name(),attribute));
|
||||
/*
|
||||
#*******************************************************************************
|
||||
# Auth Manager Configuration
|
||||
|
Loading…
Reference in New Issue
Block a user