From: hickert Date: Thu, 30 Jul 2009 14:12:38 +0000 (+0000) Subject: Updated FAI partition handling X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=95b01c1496dace4f6e217171e3cf60b1b9c4fa39;p=gosa.git Updated FAI partition handling -Added FAIlvmDevice handling to lvm devices git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13965 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/fai/admin/fai/class_faiDiskEntry.inc b/gosa-plugins/fai/admin/fai/class_faiDiskEntry.inc index 6e002f5ac..a1f0e420e 100644 --- a/gosa-plugins/fai/admin/fai/class_faiDiskEntry.inc +++ b/gosa-plugins/fai/admin/fai/class_faiDiskEntry.inc @@ -31,7 +31,7 @@ class faiDiskEntry extends plugin function faiDiskEntry (&$config, $dn= NULL,$parent,$disk,$type) { plugin::plugin ($config, $dn); - + // Set default attributes $this->parent = $parent; $this->FAIdiskType = $type; @@ -41,6 +41,11 @@ class faiDiskEntry extends plugin // 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']; @@ -270,11 +275,11 @@ class faiDiskEntry extends plugin $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); @@ -409,6 +414,11 @@ class faiDiskEntry extends plugin $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 ad1cc3a57..9534a765e 100644 --- a/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc +++ b/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc @@ -8,7 +8,7 @@ class faiPartitionTable extends plugin 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(); @@ -548,6 +548,9 @@ class faiPartitionTable extends plugin 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();