summaryrefslogtreecommitdiffstats
path: root/cobbler
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2008-07-25 15:46:07 -0400
committerMichael DeHaan <mdehaan@redhat.com>2008-07-25 15:46:07 -0400
commitd3722bd5712557aa1c9cf7e0fa62a312633bff88 (patch)
tree76910c895e522dcf8e8612fe908d558c120ace0e /cobbler
parent31b4a274050be9436e2a31b5501773c2c64586fe (diff)
downloadcobbler-d3722bd5712557aa1c9cf7e0fa62a312633bff88.tar.gz
cobbler-d3722bd5712557aa1c9cf7e0fa62a312633bff88.tar.xz
cobbler-d3722bd5712557aa1c9cf7e0fa62a312633bff88.zip
Add an extra refresh call, remove profile_change which was not being used
Diffstat (limited to 'cobbler')
-rw-r--r--cobbler/remote.py22
1 files changed, 2 insertions, 20 deletions
diff --git a/cobbler/remote.py b/cobbler/remote.py
index 6aeb446e..96d98ad5 100644
--- a/cobbler/remote.py
+++ b/cobbler/remote.py
@@ -199,24 +199,6 @@ class CobblerXMLRPCInterface:
self.log("get_settings",token=token)
return self.__get_all("settings")
- def profile_change(self,mac,newprofile,token=None,**rest):
- """
- If allow_cgi_profile_change is enabled in settings, this allows
- kickstarts to set the profile of a machine to another profile
- via a wget in %post. This has security implications.
- READ: https://fedorahosted.org/cobbler/wiki/AutoProfileChange
- """
-
- if not self.api.settings().allow_cgi_profile_change:
- return 1
-
- system = self.api.find_system(mac_address=mac)
- if system is None:
- return 2
-
- system.set_profile(newprofile)
- self.api.add_system(system)
-
def get_repo_config_for_profile(self,profile_name,**rest):
"""
Return the yum configuration a given profile should use to obtain
@@ -245,6 +227,7 @@ class CobblerXMLRPCInterface:
implications.
READ: https://fedorahosted.org/cobbler/wiki/AutoRegistration
"""
+ self._refresh()
if mac is None:
# don't go further if not being called by anaconda
@@ -285,8 +268,7 @@ class CobblerXMLRPCInterface:
"""
self.log("disable_netboot",token=token,name=name)
# used by nopxe.cgi
- self.api.clear()
- self.api.deserialize()
+ self._refresh()
if not self.api.settings().pxe_just_once:
# feature disabled!
return False