$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
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 <<<EOF
[main]
# Do not scan /etc/yum.repos.d/
}
}
+if (isset($_REQUEST['node_id'])) {
+ $node_id=intval($_REQUEST['node_id']);
+ echo "# node_id = " . $node_id . "\n";
+ # compute nodegroups
+ $nodes = $adm->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" ;
+ }
+ }
+
?>