git://git.onelab.eu
/
nodeconfig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
37133a8
)
remove legacy layer, just assume 4.3 and GetInterfaces
author
Thierry Parmentelat
<thierry.parmentelat@sophia.inria.fr>
Fri, 28 Jan 2011 08:31:13 +0000
(09:31 +0100)
committer
Thierry Parmentelat
<thierry.parmentelat@sophia.inria.fr>
Fri, 28 Jan 2011 08:31:13 +0000
(09:31 +0100)
PlanetLabConf/blacklist.php
patch
|
blob
|
history
PlanetLabConf/ntp.conf.php
patch
|
blob
|
history
PlanetLabConf/proxies.php
patch
|
blob
|
history
PlanetLabConf/sysctl-ip_forward.php
patch
|
blob
|
history
diff --git
a/PlanetLabConf/blacklist.php
b/PlanetLabConf/blacklist.php
index
33a04f9
..
bcc8d87
100755
(executable)
--- a/
PlanetLabConf/blacklist.php
+++ b/
PlanetLabConf/blacklist.php
@@
-9,8
+9,6
@@
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2004 The Trustees of Princeton University
#
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2004 The Trustees of Princeton University
#
-# $Id$
-#
*filter
-F BLACKLIST
*filter
-F BLACKLIST
@@
-21,18
+19,7
@@
require_once 'plc_api.php';
global $adm;
require_once 'plc_api.php';
global $adm;
-// backwards compatibility with the old 4.2 API
-global $__PLC_API_VERSION;
-if ( ! method_exists ($adm,"GetInterfaces"))
- $__PLC_API_VERSION = 4.2;
-else
- $__PLC_API_VERSION = 4.3;
-
-// Look up the node
-if ($__PLC_API_VERSION==4.2)
- $interfaces = $adm->GetNodeNetworks(array('ip' => $_SERVER['REMOTE_ADDR']));
-else
- $interfaces = $adm->GetInterfaces(array('ip' => $_SERVER['REMOTE_ADDR']));
+$interfaces = $adm->GetInterfaces(array('ip' => $_SERVER['REMOTE_ADDR']));
if (!empty($interfaces)) {
$nodes = $adm->GetNodes(array($interfaces[0]['node_id']));
if (!empty($nodes)) {
if (!empty($interfaces)) {
$nodes = $adm->GetNodes(array($interfaces[0]['node_id']));
if (!empty($nodes)) {
diff --git
a/PlanetLabConf/ntp.conf.php
b/PlanetLabConf/ntp.conf.php
index
afd0d76
..
616d8a7
100755
(executable)
--- a/
PlanetLabConf/ntp.conf.php
+++ b/
PlanetLabConf/ntp.conf.php
@@
-19,11
+19,7
@@
$file_name = $config_directory . $file_prefix . $default_name;
// Look up the node
// Look up the node
-// backwards compatibility with the old 4.2 API
-if ( ! method_exists ($adm,"GetInterfaces"))
- $interfaces = $adm->GetNodeNetworks(array('ip' => $_SERVER['REMOTE_ADDR']));
-else
- $interfaces = $adm->GetInterfaces(array('ip' => $_SERVER['REMOTE_ADDR']));
+$interfaces = $adm->GetInterfaces(array('ip' => $_SERVER['REMOTE_ADDR']));
if (!empty($interfaces)) {
$nodes = $adm->GetNodes(array($interfaces[0]['node_id']));
if (!empty($interfaces)) {
$nodes = $adm->GetNodes(array($interfaces[0]['node_id']));
diff --git
a/PlanetLabConf/proxies.php
b/PlanetLabConf/proxies.php
index
4431aca
..
f15d833
100755
(executable)
--- a/
PlanetLabConf/proxies.php
+++ b/
PlanetLabConf/proxies.php
@@
-9,25
+9,13
@@
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2004 The Trustees of Princeton University
#
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2004 The Trustees of Princeton University
#
-# $Id$
-#
<?php
// Get admin API handle
require_once 'plc_api.php';
global $adm;
<?php
// Get admin API handle
require_once 'plc_api.php';
global $adm;
-// Look up the node
-// backwards compatibility with the old 4.2 API
-global $__PLC_API_VERSION;
-if ( ! method_exists ($adm,"GetInterfaces"))
- $__PLC_API_VERSION = 4.2;
-else
- $__PLC_API_VERSION = 4.3;
-if ($__PLC_API_VERSION==4.2)
- $interfaces = $adm->GetNodeNetworks(array('ip' => $_SERVER['REMOTE_ADDR']));
-else
- $interfaces = $adm->GetInterfaces(array('ip' => $_SERVER['REMOTE_ADDR']));
+$interfaces = $adm->GetInterfaces(array('ip' => $_SERVER['REMOTE_ADDR']));
if (!empty($interfaces)) {
$nodes = $adm->GetNodes(array($interfaces[0]['node_id']));
if (!empty($interfaces)) {
$nodes = $adm->GetNodes(array($interfaces[0]['node_id']));
@@
-40,10
+28,7
@@
if (!isset($node)) {
exit();
}
exit();
}
-if ($__PLC_API_VERSION==4.2)
- $interfaces = $adm->GetInterfaces($node['nodenetwork_ids']);
-else
- $interfaces = $adm->GetInterfaces($node['interface_ids']);
+$interfaces = $adm->GetInterfaces($node['interface_ids']);
foreach ($interfaces as $interface) {
// XXX PL2896: need interfaces.device
foreach ($interfaces as $interface) {
// XXX PL2896: need interfaces.device
diff --git
a/PlanetLabConf/sysctl-ip_forward.php
b/PlanetLabConf/sysctl-ip_forward.php
index
1cc7e5b
..
47834aa
100755
(executable)
--- a/
PlanetLabConf/sysctl-ip_forward.php
+++ b/
PlanetLabConf/sysctl-ip_forward.php
@@
-1,7
+1,4
@@
<?php
<?php
-//
-// $Id$
-//
// Get admin API handle
require_once 'plc_api.php';
// Get admin API handle
require_once 'plc_api.php';
@@
-10,26
+7,13
@@
global $adm;
$ip_forward = 0;
// Look up the node
$ip_forward = 0;
// Look up the node
-// backwards compatibility with the old 4.2 API
-global $__PLC_API_VERSION;
-if ( ! method_exists ($adm,"GetInterfaces"))
- $__PLC_API_VERSION = 4.2;
-else
- $__PLC_API_VERSION = 4.3;
-
-if ($__PLC_API_VERSION==4.2)
- $interfaces = $adm->GetNodeNetworks(array('ip' => $_SERVER['REMOTE_ADDR']));
-else
- $interfaces = $adm->GetInterfaces(array('ip' => $_SERVER['REMOTE_ADDR']));
+$interfaces = $adm->GetInterfaces(array('ip' => $_SERVER['REMOTE_ADDR']));
if (!empty($interfaces)) {
$nodes = $adm->GetNodes(array($interfaces[0]['node_id']));
if (!empty($nodes)) {
$node = $nodes[0];
if (!empty($interfaces)) {
$nodes = $adm->GetNodes(array($interfaces[0]['node_id']));
if (!empty($nodes)) {
$node = $nodes[0];
- if ($__PLC_API_VERSION==4.2)
- $interfaces = $adm->GetInterfaces($node['nodenetwork_ids']);
- else
- $interfaces = $adm->GetInterfaces($node['interface_ids']);
+ $interfaces = $adm->GetInterfaces($node['interface_ids']);
foreach ($interfaces as $interface) {
// Nodes with proxy socket interfaces need to be able to forward
foreach ($interfaces as $interface) {
// Nodes with proxy socket interfaces need to be able to forward
@@
-44,7
+28,6
@@
if (!empty($interfaces)) {
?>
?>
-# $Id$
#
# sysctl configuration file to optionally enable/disable IP forwarding
#
#
# sysctl configuration file to optionally enable/disable IP forwarding
#