summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Peck <bpeck@redhat.com>2012-08-03 11:15:11 -0400
committerGerrit Code Review <gerrit@beaker-project.org>2012-08-03 11:15:11 -0400
commit1e5e70bef36024430e2ced9f4bee67d2c64e3fb2 (patch)
tree9c6f5248edfdb06b7ebb16d201f973b35d666482
parentd94af5bf03937cf467d376991679caa4e6375b03 (diff)
parenta28578acfb3b525be31a3af6eadc98112a60a3df (diff)
Merge "[RFE] support url method for deleteing a systems pxe record" into develop
-rw-r--r--IntegrationTests/src/bkr/inttest/server/kickstarts/Fedora16-scheduler-defaults.expected12
-rw-r--r--IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux3-scheduler-defaults.expected12
-rw-r--r--IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux4-scheduler-defaults.expected12
-rw-r--r--IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux6-scheduler-defaults.expected12
-rw-r--r--IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux6-scheduler-http.expected12
-rw-r--r--IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux6-scheduler-ondisk.expected12
-rw-r--r--IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux6-scheduler-partitions.expected12
-rw-r--r--IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux6-scheduler-repos.expected12
-rw-r--r--IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux6-scheduler-s390x.expected12
-rw-r--r--IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux7-scheduler-defaults.expected12
-rw-r--r--IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux7-scheduler-s390x.expected21
-rw-r--r--IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinuxServer5-scheduler-defaults.expected12
-rw-r--r--LabController/proxy/src/bkr/labcontroller/main.py51
-rw-r--r--Server/bkr/server/snippets/clear_netboot6
-rw-r--r--Server/bkr/server/snippets/postreboot9
-rw-r--r--Server/bkr/server/snippets/rhts_pre6
16 files changed, 80 insertions, 145 deletions
diff --git a/IntegrationTests/src/bkr/inttest/server/kickstarts/Fedora16-scheduler-defaults.expected b/IntegrationTests/src/bkr/inttest/server/kickstarts/Fedora16-scheduler-defaults.expected
index e5c843f..869e7c5 100644
--- a/IntegrationTests/src/bkr/inttest/server/kickstarts/Fedora16-scheduler-defaults.expected
+++ b/IntegrationTests/src/bkr/inttest/server/kickstarts/Fedora16-scheduler-defaults.expected
@@ -72,11 +72,7 @@ vim-enhanced
%pre --log=/dev/console
# Check in with Beaker Server
-python << _EOF_
-import xmlrpclib
-server = xmlrpclib.Server("http://lab.test-kickstart.invalid:8000")
-server.install_start("test01.test-kickstart.invalid")
-_EOF_
+wget -O - http://lab.test-kickstart.invalid:8000/install_start/test01.test-kickstart.invalid
wget -O /tmp/anamon 'http://lab.test-kickstart.invalid/beaker/anamon'
python /tmp/anamon --recipe-id @RECIPEID@ --xmlrpc-url 'http://lab.test-kickstart.invalid:8000/RPC2'
@@ -268,11 +264,7 @@ setenv NFSSERVERS "RHEL3,rhel3-nfs.test-kickstart.invalid:/export/home RHEL4,rhe
setenv LOOKASIDE http://download.test-kickstart.invalid/lookaside/
setenv BUILDURL http://download.test-kickstart.invalid
EOF
-python << _EOF_
-import xmlrpclib
-server = xmlrpclib.Server("http://lab.test-kickstart.invalid:8000")
-server.clear_netboot("test01.test-kickstart.invalid")
-_EOF_
+wget -O - http://lab.test-kickstart.invalid:8000/nopxe/test01.test-kickstart.invalid
# Error: no snippet data for Fedora_post
# Error: no snippet data for system_post
diff --git a/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux3-scheduler-defaults.expected b/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux3-scheduler-defaults.expected
index 261ed7e..395ecfc 100644
--- a/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux3-scheduler-defaults.expected
+++ b/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux3-scheduler-defaults.expected
@@ -71,11 +71,7 @@ vim-enhanced
(
PATH=/usr/bin:$PATH
# Check in with Beaker Server
-python << _EOF_
-import xmlrpclib
-server = xmlrpclib.Server("http://lab.test-kickstart.invalid:8000")
-server.install_start("test01.test-kickstart.invalid")
-_EOF_
+wget -O - http://lab.test-kickstart.invalid:8000/install_start/test01.test-kickstart.invalid
wget -O /tmp/anamon 'http://lab.test-kickstart.invalid/beaker/anamon'
python /tmp/anamon --recipe-id @RECIPEID@ --xmlrpc-url 'http://lab.test-kickstart.invalid:8000/RPC2'
@@ -289,11 +285,7 @@ setenv NFSSERVERS "RHEL3,rhel3-nfs.test-kickstart.invalid:/export/home RHEL4,rhe
setenv LOOKASIDE http://download.test-kickstart.invalid/lookaside/
setenv BUILDURL http://download.test-kickstart.invalid
EOF
-python << _EOF_
-import xmlrpclib
-server = xmlrpclib.Server("http://lab.test-kickstart.invalid:8000")
-server.clear_netboot("test01.test-kickstart.invalid")
-_EOF_
+wget -O - http://lab.test-kickstart.invalid:8000/nopxe/test01.test-kickstart.invalid
# Error: no snippet data for RedHatEnterpriseLinux3_post
# Error: no snippet data for system_post
diff --git a/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux4-scheduler-defaults.expected b/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux4-scheduler-defaults.expected
index 548d7a8..e351f11 100644
--- a/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux4-scheduler-defaults.expected
+++ b/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux4-scheduler-defaults.expected
@@ -69,11 +69,7 @@ vim-enhanced
%pre --log=/dev/console
# Check in with Beaker Server
-python << _EOF_
-import xmlrpclib
-server = xmlrpclib.Server("http://lab.test-kickstart.invalid:8000")
-server.install_start("test01.test-kickstart.invalid")
-_EOF_
+wget -O - http://lab.test-kickstart.invalid:8000/install_start/test01.test-kickstart.invalid
wget -O /tmp/anamon 'http://lab.test-kickstart.invalid/beaker/anamon'
python /tmp/anamon --recipe-id @RECIPEID@ --xmlrpc-url 'http://lab.test-kickstart.invalid:8000/RPC2'
@@ -268,11 +264,7 @@ setenv NFSSERVERS "RHEL3,rhel3-nfs.test-kickstart.invalid:/export/home RHEL4,rhe
setenv LOOKASIDE http://download.test-kickstart.invalid/lookaside/
setenv BUILDURL http://download.test-kickstart.invalid
EOF
-python << _EOF_
-import xmlrpclib
-server = xmlrpclib.Server("http://lab.test-kickstart.invalid:8000")
-server.clear_netboot("test01.test-kickstart.invalid")
-_EOF_
+wget -O - http://lab.test-kickstart.invalid:8000/nopxe/test01.test-kickstart.invalid
# Error: no snippet data for RedHatEnterpriseLinux4_post
# Error: no snippet data for system_post
diff --git a/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux6-scheduler-defaults.expected b/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux6-scheduler-defaults.expected
index 2136f4d..bd4c972 100644
--- a/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux6-scheduler-defaults.expected
+++ b/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux6-scheduler-defaults.expected
@@ -80,11 +80,7 @@ vim-enhanced
%pre --log=/dev/console
# Check in with Beaker Server
-python << _EOF_
-import xmlrpclib
-server = xmlrpclib.Server("http://lab.test-kickstart.invalid:8000")
-server.install_start("test01.test-kickstart.invalid")
-_EOF_
+wget -O - http://lab.test-kickstart.invalid:8000/install_start/test01.test-kickstart.invalid
wget -O /tmp/anamon 'http://lab.test-kickstart.invalid/beaker/anamon'
python /tmp/anamon --recipe-id @RECIPEID@ --xmlrpc-url 'http://lab.test-kickstart.invalid:8000/RPC2'
@@ -330,11 +326,7 @@ setenv NFSSERVERS "RHEL3,rhel3-nfs.test-kickstart.invalid:/export/home RHEL4,rhe
setenv LOOKASIDE http://download.test-kickstart.invalid/lookaside/
setenv BUILDURL http://download.test-kickstart.invalid
EOF
-python << _EOF_
-import xmlrpclib
-server = xmlrpclib.Server("http://lab.test-kickstart.invalid:8000")
-server.clear_netboot("test01.test-kickstart.invalid")
-_EOF_
+wget -O - http://lab.test-kickstart.invalid:8000/nopxe/test01.test-kickstart.invalid
# Error: no snippet data for RedHatEnterpriseLinux6_post
# Error: no snippet data for system_post
diff --git a/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux6-scheduler-http.expected b/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux6-scheduler-http.expected
index 72351d9..d965c38 100644
--- a/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux6-scheduler-http.expected
+++ b/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux6-scheduler-http.expected
@@ -79,11 +79,7 @@ vim-enhanced
%pre --log=/dev/console
# Check in with Beaker Server
-python << _EOF_
-import xmlrpclib
-server = xmlrpclib.Server("http://lab.test-kickstart.invalid:8000")
-server.install_start("test01.test-kickstart.invalid")
-_EOF_
+wget -O - http://lab.test-kickstart.invalid:8000/install_start/test01.test-kickstart.invalid
wget -O /tmp/anamon 'http://lab.test-kickstart.invalid/beaker/anamon'
python /tmp/anamon --recipe-id @RECIPEID@ --xmlrpc-url 'http://lab.test-kickstart.invalid:8000/RPC2'
@@ -329,11 +325,7 @@ setenv NFSSERVERS "RHEL3,rhel3-nfs.test-kickstart.invalid:/export/home RHEL4,rhe
setenv LOOKASIDE http://download.test-kickstart.invalid/lookaside/
setenv BUILDURL http://download.test-kickstart.invalid
EOF
-python << _EOF_
-import xmlrpclib
-server = xmlrpclib.Server("http://lab.test-kickstart.invalid:8000")
-server.clear_netboot("test01.test-kickstart.invalid")
-_EOF_
+wget -O - http://lab.test-kickstart.invalid:8000/nopxe/test01.test-kickstart.invalid
# Error: no snippet data for RedHatEnterpriseLinux6_post
# Error: no snippet data for system_post
diff --git a/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux6-scheduler-ondisk.expected b/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux6-scheduler-ondisk.expected
index 37a6086..ef4139c 100644
--- a/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux6-scheduler-ondisk.expected
+++ b/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux6-scheduler-ondisk.expected
@@ -84,11 +84,7 @@ vim-enhanced
%pre --log=/dev/console
# Check in with Beaker Server
-python << _EOF_
-import xmlrpclib
-server = xmlrpclib.Server("http://lab.test-kickstart.invalid:8000")
-server.install_start("test01.test-kickstart.invalid")
-_EOF_
+wget -O - http://lab.test-kickstart.invalid:8000/install_start/test01.test-kickstart.invalid
wget -O /tmp/anamon 'http://lab.test-kickstart.invalid/beaker/anamon'
python /tmp/anamon --recipe-id @RECIPEID@ --xmlrpc-url 'http://lab.test-kickstart.invalid:8000/RPC2'
@@ -334,11 +330,7 @@ setenv NFSSERVERS "RHEL3,rhel3-nfs.test-kickstart.invalid:/export/home RHEL4,rhe
setenv LOOKASIDE http://download.test-kickstart.invalid/lookaside/
setenv BUILDURL http://download.test-kickstart.invalid
EOF
-python << _EOF_
-import xmlrpclib
-server = xmlrpclib.Server("http://lab.test-kickstart.invalid:8000")
-server.clear_netboot("test01.test-kickstart.invalid")
-_EOF_
+wget -O - http://lab.test-kickstart.invalid:8000/nopxe/test01.test-kickstart.invalid
# Error: no snippet data for RedHatEnterpriseLinux6_post
# Error: no snippet data for system_post
diff --git a/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux6-scheduler-partitions.expected b/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux6-scheduler-partitions.expected
index 9284aea..cacb4a2 100644
--- a/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux6-scheduler-partitions.expected
+++ b/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux6-scheduler-partitions.expected
@@ -85,11 +85,7 @@ vim-enhanced
%pre --log=/dev/console
# Check in with Beaker Server
-python << _EOF_
-import xmlrpclib
-server = xmlrpclib.Server("http://lab.test-kickstart.invalid:8000")
-server.install_start("test01.test-kickstart.invalid")
-_EOF_
+wget -O - http://lab.test-kickstart.invalid:8000/install_start/test01.test-kickstart.invalid
wget -O /tmp/anamon 'http://lab.test-kickstart.invalid/beaker/anamon'
python /tmp/anamon --recipe-id @RECIPEID@ --xmlrpc-url 'http://lab.test-kickstart.invalid:8000/RPC2'
@@ -335,11 +331,7 @@ setenv NFSSERVERS "RHEL3,rhel3-nfs.test-kickstart.invalid:/export/home RHEL4,rhe
setenv LOOKASIDE http://download.test-kickstart.invalid/lookaside/
setenv BUILDURL http://download.test-kickstart.invalid
EOF
-python << _EOF_
-import xmlrpclib
-server = xmlrpclib.Server("http://lab.test-kickstart.invalid:8000")
-server.clear_netboot("test01.test-kickstart.invalid")
-_EOF_
+wget -O - http://lab.test-kickstart.invalid:8000/nopxe/test01.test-kickstart.invalid
# Error: no snippet data for RedHatEnterpriseLinux6_post
# Error: no snippet data for system_post
diff --git a/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux6-scheduler-repos.expected b/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux6-scheduler-repos.expected
index 4c70717..c90f31d 100644
--- a/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux6-scheduler-repos.expected
+++ b/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux6-scheduler-repos.expected
@@ -80,11 +80,7 @@ vim-enhanced
%pre --log=/dev/console
# Check in with Beaker Server
-python << _EOF_
-import xmlrpclib
-server = xmlrpclib.Server("http://lab.test-kickstart.invalid:8000")
-server.install_start("test01.test-kickstart.invalid")
-_EOF_
+wget -O - http://lab.test-kickstart.invalid:8000/install_start/test01.test-kickstart.invalid
wget -O /tmp/anamon 'http://lab.test-kickstart.invalid/beaker/anamon'
python /tmp/anamon --recipe-id @RECIPEID@ --xmlrpc-url 'http://lab.test-kickstart.invalid:8000/RPC2'
@@ -338,11 +334,7 @@ setenv NFSSERVERS "RHEL3,rhel3-nfs.test-kickstart.invalid:/export/home RHEL4,rhe
setenv LOOKASIDE http://download.test-kickstart.invalid/lookaside/
setenv BUILDURL http://download.test-kickstart.invalid
EOF
-python << _EOF_
-import xmlrpclib
-server = xmlrpclib.Server("http://lab.test-kickstart.invalid:8000")
-server.clear_netboot("test01.test-kickstart.invalid")
-_EOF_
+wget -O - http://lab.test-kickstart.invalid:8000/nopxe/test01.test-kickstart.invalid
# Error: no snippet data for RedHatEnterpriseLinux6_post
# Error: no snippet data for system_post
diff --git a/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux6-scheduler-s390x.expected b/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux6-scheduler-s390x.expected
index 5a57e10..deb33d6 100644
--- a/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux6-scheduler-s390x.expected
+++ b/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux6-scheduler-s390x.expected
@@ -75,11 +75,7 @@ vim-enhanced
%pre --log=/dev/console
# Check in with Beaker Server
-python << _EOF_
-import xmlrpclib
-server = xmlrpclib.Server("http://lab.test-kickstart.invalid:8000")
-server.install_start("test02.test-kickstart.invalid")
-_EOF_
+wget -O - http://lab.test-kickstart.invalid:8000/install_start/test02.test-kickstart.invalid
wget -O /tmp/anamon 'http://lab.test-kickstart.invalid/beaker/anamon'
python /tmp/anamon --recipe-id @RECIPEID@ --xmlrpc-url 'http://lab.test-kickstart.invalid:8000/RPC2'
@@ -293,11 +289,7 @@ setenv NFSSERVERS "RHEL3,rhel3-nfs.test-kickstart.invalid:/export/home RHEL4,rhe
setenv LOOKASIDE http://download.test-kickstart.invalid/lookaside/
setenv BUILDURL http://download.test-kickstart.invalid
EOF
-python << _EOF_
-import xmlrpclib
-server = xmlrpclib.Server("http://lab.test-kickstart.invalid:8000")
-server.clear_netboot("test02.test-kickstart.invalid")
-_EOF_
+wget -O - http://lab.test-kickstart.invalid:8000/nopxe/test02.test-kickstart.invalid
# Error: no snippet data for RedHatEnterpriseLinux6_post
# Error: no snippet data for system_post
diff --git a/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux7-scheduler-defaults.expected b/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux7-scheduler-defaults.expected
index 247d83e..2a50388 100644
--- a/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux7-scheduler-defaults.expected
+++ b/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux7-scheduler-defaults.expected
@@ -77,11 +77,7 @@ vim-enhanced
%pre --log=/dev/console
# Check in with Beaker Server
-python << _EOF_
-import xmlrpclib
-server = xmlrpclib.Server("http://lab.test-kickstart.invalid:8000")
-server.install_start("test01.test-kickstart.invalid")
-_EOF_
+wget -O - http://lab.test-kickstart.invalid:8000/install_start/test01.test-kickstart.invalid
wget -O /tmp/anamon 'http://lab.test-kickstart.invalid/beaker/anamon'
python /tmp/anamon --recipe-id @RECIPEID@ --xmlrpc-url 'http://lab.test-kickstart.invalid:8000/RPC2'
@@ -298,11 +294,7 @@ setenv NFSSERVERS "RHEL3,rhel3-nfs.test-kickstart.invalid:/export/home RHEL4,rhe
setenv LOOKASIDE http://download.test-kickstart.invalid/lookaside/
setenv BUILDURL http://download.test-kickstart.invalid
EOF
-python << _EOF_
-import xmlrpclib
-server = xmlrpclib.Server("http://lab.test-kickstart.invalid:8000")
-server.clear_netboot("test01.test-kickstart.invalid")
-_EOF_
+wget -O - http://lab.test-kickstart.invalid:8000/nopxe/test01.test-kickstart.invalid
# Error: no snippet data for RedHatEnterpriseLinux7_post
# Error: no snippet data for system_post
diff --git a/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux7-scheduler-s390x.expected b/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux7-scheduler-s390x.expected
index 3d626c9..306cb54 100644
--- a/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux7-scheduler-s390x.expected
+++ b/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux7-scheduler-s390x.expected
@@ -76,11 +76,7 @@ vim-enhanced
%pre --log=/dev/console
# Check in with Beaker Server
-python << _EOF_
-import xmlrpclib
-server = xmlrpclib.Server("http://lab.test-kickstart.invalid:8000")
-server.install_start("test02.test-kickstart.invalid")
-_EOF_
+wget -O - http://lab.test-kickstart.invalid:8000/install_start/test02.test-kickstart.invalid
wget -O /tmp/anamon 'http://lab.test-kickstart.invalid/beaker/anamon'
python /tmp/anamon --recipe-id @RECIPEID@ --xmlrpc-url 'http://lab.test-kickstart.invalid:8000/RPC2'
@@ -291,11 +287,7 @@ setenv NFSSERVERS "RHEL3,rhel3-nfs.test-kickstart.invalid:/export/home RHEL4,rhe
setenv LOOKASIDE http://download.test-kickstart.invalid/lookaside/
setenv BUILDURL http://download.test-kickstart.invalid
EOF
-python << _EOF_
-import xmlrpclib
-server = xmlrpclib.Server("http://lab.test-kickstart.invalid:8000")
-server.clear_netboot("test02.test-kickstart.invalid")
-_EOF_
+wget -O - http://lab.test-kickstart.invalid:8000/nopxe/test02.test-kickstart.invalid
# Error: no snippet data for RedHatEnterpriseLinux7_post
# Error: no snippet data for system_post
@@ -314,11 +306,8 @@ END
-%post --nochroot
+%post
+sync
+wget -O - http://lab.test-kickstart.invalid:8000/postreboot/test02.test-kickstart.invalid
sync
-python << _EOF_
-import xmlrpclib
-server = xmlrpclib.Server("http://lab.test-kickstart.invalid:8000")
-server.reboot("test02.test-kickstart.invalid")
-_EOF_
%end
diff --git a/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinuxServer5-scheduler-defaults.expected b/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinuxServer5-scheduler-defaults.expected
index 4781d22..97a5f57 100644
--- a/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinuxServer5-scheduler-defaults.expected
+++ b/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinuxServer5-scheduler-defaults.expected
@@ -72,11 +72,7 @@ vim-enhanced
%pre --log=/dev/console
# Check in with Beaker Server
-python << _EOF_
-import xmlrpclib
-server = xmlrpclib.Server("http://lab.test-kickstart.invalid:8000")
-server.install_start("test01.test-kickstart.invalid")
-_EOF_
+wget -O - http://lab.test-kickstart.invalid:8000/install_start/test01.test-kickstart.invalid
wget -O /tmp/anamon 'http://lab.test-kickstart.invalid/beaker/anamon'
python /tmp/anamon --recipe-id @RECIPEID@ --xmlrpc-url 'http://lab.test-kickstart.invalid:8000/RPC2'
@@ -298,11 +294,7 @@ setenv NFSSERVERS "RHEL3,rhel3-nfs.test-kickstart.invalid:/export/home RHEL4,rhe
setenv LOOKASIDE http://download.test-kickstart.invalid/lookaside/
setenv BUILDURL http://download.test-kickstart.invalid
EOF
-python << _EOF_
-import xmlrpclib
-server = xmlrpclib.Server("http://lab.test-kickstart.invalid:8000")
-server.clear_netboot("test01.test-kickstart.invalid")
-_EOF_
+wget -O - http://lab.test-kickstart.invalid:8000/nopxe/test01.test-kickstart.invalid
# Error: no snippet data for RedHatEnterpriseLinuxServer5_post
# Error: no snippet data for system_post
diff --git a/LabController/proxy/src/bkr/labcontroller/main.py b/LabController/proxy/src/bkr/labcontroller/main.py
index 89b1996..7e52371 100644
--- a/LabController/proxy/src/bkr/labcontroller/main.py
+++ b/LabController/proxy/src/bkr/labcontroller/main.py
@@ -11,6 +11,7 @@ from datetime import datetime
import SocketServer
import DocXMLRPCServer
import socket
+import xmlrpclib
from bkr.common.helpers import RepeatTimer
from bkr.labcontroller.proxy import Proxy
@@ -25,8 +26,46 @@ logger = logging.getLogger(__name__)
set_except_hook()
+class XMLRPCServer(DocXMLRPCServer.DocXMLRPCServer):
+ def __init__(self, *args, **kwargs):
+ self.get_funcs = {}
+ DocXMLRPCServer.DocXMLRPCServer.__init__(self, *args, **kwargs)
+
+ def register_get_function(self, function, name=None):
+ if name is None:
+ name = function.__name__
+ self.get_funcs[name] = function
+
+ def _get_dispatch(self, method, params):
+ func = None
+ try:
+ # check to see if a matching get_function has been registered
+ func = self.get_funcs[method]
+ except KeyError:
+ pass
+ if func is not None:
+ return func(*params)
+ else:
+ raise Exception('method "%s" is not supported' % method)
+
class XMLRPCRequestHandler(DocXMLRPCServer.DocXMLRPCRequestHandler):
rpc_paths = ('/', '/RPC2', '/server')
+
+ def do_GET(self):
+ if self.is_rpc_path_valid():
+ DocXMLRPCServer.DocXMLRPCRequestHandler.do_GET(self)
+ else:
+ args = self.path.split('/')
+ try:
+ response = self.server._get_dispatch(args[1], args[2:])
+ except Exception, e:
+ response = str(e)
+ self.send_response(200)
+ self.send_header("Content-type", "text/html")
+ self.send_header("Content-length", str(len(response)))
+ self.end_headers()
+ self.wfile.write(response)
+
def do_POST(self):
"""
This is a replacement for the real do_POST, to work around RHBZ#789790.
@@ -76,11 +115,11 @@ class XMLRPCRequestHandler(DocXMLRPCServer.DocXMLRPCRequestHandler):
class ForkingXMLRPCServer (SocketServer.ForkingMixIn,
- DocXMLRPCServer.DocXMLRPCServer):
+ XMLRPCServer):
allow_reuse_address = True
def __init__(self, *args, **kwargs):
- DocXMLRPCServer.DocXMLRPCServer.__init__(self, *args,
+ XMLRPCServer.__init__(self, *args,
requestHandler=XMLRPCRequestHandler, **kwargs)
def _dispatch(self, method, params):
@@ -88,7 +127,7 @@ class ForkingXMLRPCServer (SocketServer.ForkingMixIn,
"""
start = datetime.utcnow()
try:
- result=DocXMLRPCServer.DocXMLRPCServer._dispatch(self, method, params)
+ result=XMLRPCServer._dispatch(self, method, params)
except:
logger.debug('Time: %s %s %s', datetime.utcnow() - start, str(method), str(params)[0:50])
raise
@@ -130,6 +169,12 @@ def main_loop(conf=None, foreground=False):
login.start()
server = ForkingXMLRPCServer(("", 8000), allow_none=True)
server.register_instance(proxy)
+ # register nopxe and install_start as get methods
+ # http://Example.com:8000/nopxe/fqdn <- Remove netboot record for fqdn
+ # http://Example.com:8000/install_start/fqdn <- Register start of install
+ server.register_get_function(proxy.clear_netboot, 'nopxe')
+ server.register_get_function(proxy.install_start)
+ server.register_get_function(proxy.postreboot)
try:
server.serve_forever()
except (ShutdownException, KeyboardInterrupt):
diff --git a/Server/bkr/server/snippets/clear_netboot b/Server/bkr/server/snippets/clear_netboot
index 2c78760..d6fefa7 100644
--- a/Server/bkr/server/snippets/clear_netboot
+++ b/Server/bkr/server/snippets/clear_netboot
@@ -1,5 +1 @@
-python << _EOF_
-import xmlrpclib
-server = xmlrpclib.Server("http://{{ system.lab_controller.fqdn }}:8000")
-server.clear_netboot("{{ system.fqdn }}")
-_EOF_
+wget -O - http://{{ system.lab_controller.fqdn }}:8000/nopxe/{{ system.fqdn }}
diff --git a/Server/bkr/server/snippets/postreboot b/Server/bkr/server/snippets/postreboot
index e9ea60e..2d1d939 100644
--- a/Server/bkr/server/snippets/postreboot
+++ b/Server/bkr/server/snippets/postreboot
@@ -1,10 +1,7 @@
{% if postreboot is defined %}
-%post --nochroot
+%post
+sync
+wget -O - http://{{ system.lab_controller.fqdn }}:8000/postreboot/{{ system.fqdn }}
sync
-python << _EOF_
-import xmlrpclib
-server = xmlrpclib.Server("http://{{ system.lab_controller.fqdn }}:8000")
-server.reboot("{{ system.fqdn }}")
-_EOF_
{{ end }}
{% endif %}
diff --git a/Server/bkr/server/snippets/rhts_pre b/Server/bkr/server/snippets/rhts_pre
index d1755af..92240bd 100644
--- a/Server/bkr/server/snippets/rhts_pre
+++ b/Server/bkr/server/snippets/rhts_pre
@@ -1,10 +1,6 @@
{% if recipe %}
# Check in with Beaker Server
-python << _EOF_
-import xmlrpclib
-server = xmlrpclib.Server("http://{{ system.lab_controller.fqdn }}:8000")
-server.install_start("{{ system.fqdn }}")
-_EOF_
+wget -O - http://{{ system.lab_controller.fqdn }}:8000/install_start/{{ system.fqdn }}
{% endif %}
{#