summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6f29a43)
raw | patch | inline | side by side (parent: 6f29a43)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 30 Jul 2009 14:12:38 +0000 (14:12 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 30 Jul 2009 14:12:38 +0000 (14:12 +0000) |
-Added FAIlvmDevice handling to lvm devices
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13965 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13965 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/fai/admin/fai/class_faiDiskEntry.inc | patch | blob | history | |
gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc | patch | blob | history |
diff --git a/gosa-plugins/fai/admin/fai/class_faiDiskEntry.inc b/gosa-plugins/fai/admin/fai/class_faiDiskEntry.inc
index 6e002f5ac4ac2bfd8c99057a2c5197382365c450..a1f0e420e8e9cf34b6938194007111b681e54a00 100644 (file)
function faiDiskEntry (&$config, $dn= NULL,$parent,$disk,$type)
{
plugin::plugin ($config, $dn);
-
+
// Set default attributes
$this->parent = $parent;
$this->FAIdiskType = $type;
// an existing disk, load disk info now.
if($disk){
+ // Get devices used in volume base disks.
+ if($disk['FAIlvmDevice']){
+ $this->lvmDevices = $disk['FAIlvmDevice'];
+ }
+
// Get disk status
$this->status = $disk['status'];
$list = array();
foreach($this->lvmDevices as $device){
- $list[$device['name']] = $device['name'];
+ $list[$device] = $device;
- if(isset($objs[$device['name']]['FAIpartitionSize'])){
- $list[$device['name']].= _("Size").": ";
- $list[$device['name']].= $objs[$device['name']]['FAIpartitionSize'];
+ if(isset($objs[$device]['FAIpartitionSize'])){
+ $list[$device].= _("Size").": ";
+ $list[$device].= $objs[$device]['FAIpartitionSize'];
}
}
return($list);
$tmp['status'] = $this->status;
$tmp['FAIdiskType'] = $this->FAIdiskType;
+ $tmp['FAIlvmDevice'] = array();
+ foreach($this->lvmDevices as $dev){
+ $tmp['FAIlvmDevice'][] = $dev;
+ }
+
/* Assemble flags */
$tmp['FAIdiskOption'] = array("fstabkey:".$this->fstabkey, "disklabel:".$this->disklabel);
diff --git a/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc b/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc
index ad1cc3a570a61d54356bebe72ba8f9799ad3d702..9534a765e1afef84ca18981a5b89c3b45e717139 100644 (file)
var $objectclasses = array("top","FAIclass","FAIpartitionTable");
var $subAttributes = array("cn","description");
- var $subPartAttributes = array("cn","FAIpartitionNr","FAIpartitionSize","FAImountPoint","FAIfsType","FAIpartitionType","FAImountOptions","FAIfsOptions","FAIpartitionFlags","description","FAIfsCreateOptions","FAIfsTuneOptions","FAIfsOptions","FAIpartitionFlags");
+ var $subPartAttributes = array("cn","FAIpartitionNr","FAIpartitionSize","FAImountPoint","FAIfsType","FAIpartitionType","FAImountOptions","FAIfsOptions","FAIpartitionFlags","description","FAIfsCreateOptions","FAIfsTuneOptions","FAIfsOptions","FAIpartitionFlags","FAIlvmDevice");
var $sub64coded = array();
var $subBinary = array();
if(isset($disk['FAIdiskOption'])){
$disk_attrs['FAIdiskOption'] = $disk['FAIdiskOption'];
}
+ if(isset($disk['FAIlvmDevice'])){
+ $disk_attrs['FAIlvmDevice'] = $disk['FAIlvmDevice'];
+ }
if(empty($disk_attrs['description']) && $disk['status'] == "edited"){
$disk_attrs['description'] = array();