|
|
|
@ -22,43 +22,15 @@ from calculate.lib.cl_lang import setLocalTranslate
|
|
|
|
|
setLocalTranslate('cl_client3', sys.modules[__name__])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class VariableAcClientMerge(ActionVariable):
|
|
|
|
|
"""
|
|
|
|
|
Action variable which has value "up" for package install and
|
|
|
|
|
install this package
|
|
|
|
|
"""
|
|
|
|
|
nonchroot = True
|
|
|
|
|
|
|
|
|
|
def action(self, cl_action):
|
|
|
|
|
if cl_action in ("merge", "domain", "undomain"):
|
|
|
|
|
return "on"
|
|
|
|
|
return "off"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class VariableAcClientDomain(ActionVariable):
|
|
|
|
|
class VariableAcClientConfigure(ActionVariable):
|
|
|
|
|
"""
|
|
|
|
|
Action variable which has value "on" for domain action
|
|
|
|
|
"""
|
|
|
|
|
nonchroot = True
|
|
|
|
|
|
|
|
|
|
def action(self, cl_action):
|
|
|
|
|
remoteHost = self.Get("cl_remote_host")
|
|
|
|
|
remoteAuth = self.Get("os_remote_auth")
|
|
|
|
|
if cl_action == "domain":
|
|
|
|
|
if cl_action in ("domain", "undomain"):
|
|
|
|
|
return "on"
|
|
|
|
|
elif ((cl_action in ("merge", 'sync') and self.Get('cl_merge_pkg'))
|
|
|
|
|
and remoteHost and remoteAuth):
|
|
|
|
|
return "on"
|
|
|
|
|
return "off"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class VariableAcClientUndomain(ActionVariable):
|
|
|
|
|
"""
|
|
|
|
|
Action variable which has value "on" for undomain action
|
|
|
|
|
"""
|
|
|
|
|
nonchroot = True
|
|
|
|
|
else:
|
|
|
|
|
return "off"
|
|
|
|
|
|
|
|
|
|
def action(self, cl_action):
|
|
|
|
|
if cl_action in ("undomain",):
|
|
|
|
|
return "on"
|
|
|
|
|
return "off"
|
|
|
|
|