From: Thierry Parmentelat Date: Tue, 24 Jun 2008 16:12:40 +0000 (+0000) Subject: cross-module change for 4.2 X-Git-Tag: nodeconfig-4.2-5~4 X-Git-Url: http://git.onelab.eu/?p=nodeconfig.git;a=commitdiff_plain;h=bdb5c16c87d57edb1d2c03fa340cc060f449e211 cross-module change for 4.2 - NodeManager/conf_files set node_id when invoking source URL - nodeconfig/yum.conf.php : no functional change, but uses node_id to gather nodegroups and displays them in comments --- diff --git a/PlanetLabConf/yum.conf.php b/PlanetLabConf/yum.conf.php index 9eaf430..c15ea78 100755 --- a/PlanetLabConf/yum.conf.php +++ b/PlanetLabConf/yum.conf.php @@ -14,28 +14,7 @@ include('plc_config.php'); $PLC_NAME = PLC_NAME; $PLC_BOOT_HOST = PLC_BOOT_HOST; -$oldrepos = array(array('FedoraCore2Base', 'Fedora Core 2 Base', 'stock-fc2'), - array('FedoraCore2Updates', 'Fedora Core 2 Updates', 'updates-fc2'), - array('ThirdParty', 'Third Party RPMS', '3rdparty')); - -$repos = array(array('ThirdParty', 'Third Party RPMS', '3rdparty')); - - -if (isset($_REQUEST['alpha'])) { - $repos[] = array('PlanetLabAlpha', 'PlanetLab Alpha RPMS', 'planetlab-alpha'); -} elseif (isset($_REQUEST['beta'])) { - $repos[] = array('PlanetLabBeta', 'PlanetLab Beta RPMS', 'planetlab-beta'); -} elseif (isset($_REQUEST['rollout'])) { - $repos[] = array('PlanetLab', 'PlanetLab RPMS', 'planetlab-rollout'); -} else { - $repos[] = array('PlanetLab', 'PlanetLab RPMS', 'planetlab'); -} - -if (isset($_REQUEST['gpgcheck'])) { - $gpgcheck = $_REQUEST['gpgcheck']; -} else { - $gpgcheck = 0; -} +////////////////////////////// mirror list // Requesting a mirror list. Yum bombs out completely if a repository // is (even temporarily) unavailable, so if CoBlitz is down, provide a @@ -84,7 +63,38 @@ if (isset($_REQUEST['mirrorlist']) && exit; } +////////////////////////////// plain yum.conf + +// Get admin API handle +require_once 'plc_api.php'; +global $adm; + // Requesting yum.conf. See above for the mirrorlist definition. + +#$oldrepos = array(array('FedoraCore2Base', 'Fedora Core 2 Base', 'stock-fc2'), +# array('FedoraCore2Updates', 'Fedora Core 2 Updates', 'updates-fc2'), +# array('ThirdParty', 'Third Party RPMS', '3rdparty')); + +$repos = array(array('ThirdParty', 'Third Party RPMS', '3rdparty')); + + +if (isset($_REQUEST['alpha'])) { + $repos[] = array('PlanetLabAlpha', 'PlanetLab Alpha RPMS', 'planetlab-alpha'); +} elseif (isset($_REQUEST['beta'])) { + $repos[] = array('PlanetLabBeta', 'PlanetLab Beta RPMS', 'planetlab-beta'); +} elseif (isset($_REQUEST['rollout'])) { + $repos[] = array('PlanetLab', 'PlanetLab RPMS', 'planetlab-rollout'); +} else { + $repos[] = array('PlanetLab', 'PlanetLab RPMS', 'planetlab'); +} + +if (isset($_REQUEST['gpgcheck'])) { + $gpgcheck = $_REQUEST['gpgcheck']; +} else { + $gpgcheck = 0; +} + + echo <<GetNodes(array('node_id'=>$node_id)); + $nodegroup_ids = $nodes[0]['nodegroup_ids']; + $nodegroups = $adm->GetNodeGroups($nodegroup_ids); + foreach ($nodegroups as $nodegroup) { + echo "# in nodegroup " . $nodegroup['name'] . "\n" ; + } + } + ?>