From: hickert Date: Tue, 18 Mar 2008 07:33:16 +0000 (+0000) Subject: Updated Workstation Startup X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7814ca6288504068b44345af8e2fc4e3ac3beed5;p=gosa.git Updated Workstation Startup -Implemented FAI / GOsa-si handling, the server/release listing is now fetched from the si server, but the packackes still not. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9908 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc index 0e0fcb87a..689bdfecd 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc @@ -1076,45 +1076,19 @@ class workstartup extends plugin /* Get the list of available servers and their releases. */ if($force || !isset($this->cache['SERVERS'])){ - $ldap = $this->config->get_ldap_link(); - $ldap->cd($this->config->current['BASE']); - $server_list = get_sub_list("(&(FAIrepository=*)(objectClass=FAIrepositoryServer))", - "",get_ou("serverou"),$this->config->current['BASE'],array("FAIrepository"),GL_NO_ACL_CHECK); - /* Only add inherit option, if we are part in an object group */ if($this->member_of_ogroup){ $this->cache['SERVERS']['inherited']=array(); } - /* Add auto value - */ - $this->cache['SERVERS']['auto'] = array(); - $sort_by = array("auto"); - $server_tmp = array("auto"=>array()); - foreach($server_list as $attr){ - if(isset($attr['FAIrepository'])){ - for($i = 0 ; $i < $attr['FAIrepository']['count'] ; $i ++ ){ - $rep = $attr['FAIrepository'][$i]; - $tmp = split("\|",$rep); - if(count($tmp)==4){ - $sections = split(",",$tmp[3]); - $release = $tmp[2]; - $server = $tmp[1]; - $url = $tmp[0]; - $server_tmp[$url][$release]=$release; - $server_tmp['auto'][$release]=$release; - $sort_by[$url] = $url; - } - } - } - } - natcasesort($sort_by); - foreach($sort_by as $name){ - $releases = $server_tmp[$name]; - natcasesort($releases); - $this->cache['SERVERS'][$name] = $releases; + $o_queue = new gosaSupportDaemon(); + $tmp = $o_queue->FAI_get_server(); + foreach($tmp as $entry){ + $rel = $entry['RELEASE']; + $this->cache['SERVERS']['auto'][$rel] = $rel; + $this->cache['SERVERS'][$entry['SERVER']][$rel] = $rel; } } @@ -1145,6 +1119,36 @@ class workstartup extends plugin } if($force || !isset($this->cache['CLASSES'][$release])){ + +# +# Currently not working here, it seems that my FAI environment is not +# configured to support GOsa-si FAI - Packages +# +# /* Get the list of available servers and their releases. +# */ +# if($force || !isset($this->cache['SERVERS'])){ +# +# /* Only add inherit option, if we are part in an object group +# */ +# if($this->member_of_ogroup){ +# $this->cache['SERVERS']['inherited']=array(); +# } +# +# $o_queue = new gosaSupportDaemon(); +# $tmp = $o_queue->FAI_get_classes(); +# print_a($tmp); +# echo $o_queue->get_error(); +# } +# +# +# +# + + + + + + /* Create a list of available releases. * $this->cache['RELEASE_DNS'][ou=siga...,c=de] = "siga"; * $this->cache['RELEASE_DNS'][ou=siga,ou=rc1,...,c=de] = "siga/rc1";