def _check_access_priv(self, required_privilege_level): """Raise an exception if client privilege is insufficient for server_obj. (See the documentation above for the boolean version of this function). """ auth_user, prog_name, user, host, uuid = _get_client_info() priv_level = self._get_priv_level(auth_user) if (PRIVILEGE_LEVELS.index(priv_level) < PRIVILEGE_LEVELS.index(required_privilege_level)): err = self.CONNECT_DENIED_PRIV_TMPL % ( priv_level, required_privilege_level, user, host, prog_name, uuid) LOG.warning(err) # Raise an exception to be sent back to the client. raise cherrypy.HTTPError(403, err) return True
def _check_access_priv(self, required_privilege_level): """Raise an exception if client privilege is insufficient. (See the documentation above for the boolean version of this function). """ auth_user, prog_name, user, host, uuid = _get_client_info() priv_level = self._get_priv_level(auth_user) if (PRIVILEGE_LEVELS.index(priv_level) < PRIVILEGE_LEVELS.index(required_privilege_level)): err = self.CONNECT_DENIED_PRIV_TMPL % ( priv_level, required_privilege_level, user, host, prog_name, uuid) LOG.warning(err) # Raise an exception to be sent back to the client. raise cherrypy.HTTPError(403, err) return True
options=["name", "address", "hardwired"], default="name"), 'target': vdr(vtype='string', default="google.com"), 'host': vdr(vtype='string'), }, 'suite host scanning': { 'hosts': vdr(vtype='string_list', default=["localhost"]) }, 'authentication': { # Allow owners to grant public shutdown rights at the most, not full # control. 'public': vdr( vtype='string', options=PRIVILEGE_LEVELS[:PRIVILEGE_LEVELS.index('shutdown') + 1], default="state-totals"), 'hashes': vdr( vtype='string_list', options=['md5', 'sha1', 'sha256', 'sha512'], default=['sha256', 'md5']), 'scan hash': vdr( vtype='string', options=['md5', 'sha1', 'sha256', 'sha512'], default='md5'), }, } def upg(cfg, descr): add_bin_dir = converter(lambda x: x + '/bin', "Added + '/bin' to path")
"dummy mode": {"disable suite event hooks": vdr(vtype="boolean", default=True)}, "reference test": { "suite shutdown event handler": vdr(vtype="string", default="cylc hook check-triggering"), "required run mode": vdr(vtype="string", options=["live", "simulation", "dummy", ""]), "allow task failures": vdr(vtype="boolean", default=False), "expected task failures": vdr(vtype="string_list", default=[]), "live mode suite timeout": vdr(vtype="interval_minutes", default=DurationFloat(60)), "dummy mode suite timeout": vdr(vtype="interval_minutes", default=DurationFloat(60)), "simulation mode suite timeout": vdr(vtype="interval_minutes", default=DurationFloat(60)), }, "authentication": { # Allow owners to grant public shutdown rights at the most, not # full control. "public": vdr( vtype="string", options=PRIVILEGE_LEVELS[: PRIVILEGE_LEVELS.index("shutdown") + 1], default=GLOBAL_CFG.get(["authentication", "public"]), ) }, }, "scheduling": { "initial cycle point": vdr(vtype="cycletime"), "final cycle point": vdr(vtype="final_cycletime"), "initial cycle point constraints": vdr(vtype="string_list", default=[]), "final cycle point constraints": vdr(vtype="string_list", default=[]), "hold after point": vdr(vtype="cycletime"), "cycling mode": vdr( vtype="string", default=Calendar.MODE_GREGORIAN, options=(Calendar.MODES.keys() + ["integer"]) ), "runahead limit": vdr(vtype="cycleinterval"), "max active cycle points": vdr(vtype="integer", default=3),
options=["name", "address", "hardwired"], default="name"), 'target': vdr(vtype='string', default="google.com"), 'host': vdr(vtype='string'), }, 'suite host scanning': { 'hosts': vdr(vtype='string_list', default=["localhost"]) }, 'authentication': { # Allow owners to grant public shutdown rights at the most, not full # control. 'public': vdr(vtype='string', options=PRIVILEGE_LEVELS[:PRIVILEGE_LEVELS.index('shutdown') + 1], default="state-totals"), 'hashes': vdr(vtype='string_list', options=['md5', 'sha1', 'sha256', 'sha512'], default=['sha256', 'md5']), 'scan hash': vdr(vtype='string', options=['md5', 'sha1', 'sha256', 'sha512'], default='md5'), }, } def upg(cfg, descr): """Upgrader."""
options=["name", "address", "hardwired"], default="name"), 'target': vdr(vtype='string', default="google.com"), 'host': vdr(vtype='string'), }, 'suite host scanning': { 'hosts': vdr(vtype='string_list', default=["localhost"]) }, 'authentication': { # Allow owners to grant public shutdown rights at the most, not full # control. 'public': vdr(vtype='string', options=(PRIVILEGE_LEVELS[:PRIVILEGE_LEVELS.index(PRIV_SHUTDOWN) + 1]), default=PRIV_STATE_TOTALS), }, } def upg(cfg, descr): """Upgrader.""" add_bin_dir = converter(lambda x: x + '/bin', "Added + '/bin' to path") use_ssh = converter(lambda x: "ssh", "set to 'ssh'") u = upgrader(cfg, descr) u.deprecate('5.1.1', ['editors', 'in-terminal'], ['editors', 'terminal']) u.deprecate('5.1.1', ['task hosts'], ['hosts']) u.deprecate('5.1.1', ['hosts', 'local'], ['hosts', 'localhost']) u.deprecate('5.1.1', ['hosts', '__MANY__', 'workspace directory'],
'expected task failures': [VDR.V_STRING_LIST], 'live mode suite timeout': [VDR.V_INTERVAL, DurationFloat(60)], 'dummy mode suite timeout': [VDR.V_INTERVAL, DurationFloat(60)], 'dummy-local mode suite timeout': [VDR.V_INTERVAL, DurationFloat(60)], 'simulation mode suite timeout': [VDR.V_INTERVAL, DurationFloat(60)], }, 'authentication': { # Allow owners to grant public shutdown rights at the most, not # full control. 'public': ([VDR.V_STRING, ''] + PRIVILEGE_LEVELS[:PRIVILEGE_LEVELS.index(PRIV_SHUTDOWN) + 1]), }, }, 'scheduling': { 'initial cycle point': [VDR.V_CYCLE_POINT], 'final cycle point': [VDR.V_STRING], 'initial cycle point constraints': [VDR.V_STRING_LIST], 'final cycle point constraints': [VDR.V_STRING_LIST], 'hold after point': [VDR.V_CYCLE_POINT], 'cycling mode': ([VDR.V_STRING, Calendar.MODE_GREGORIAN] + Calendar.MODES.keys() + ["integer"]), 'runahead limit': [VDR.V_STRING], 'max active cycle points': [VDR.V_INTEGER, 3], 'spawn to max active cycle points': [VDR.V_BOOLEAN], 'queues': { 'default': {
'allow task failures': vdr(vtype='boolean', default=False), 'expected task failures': vdr(vtype='string_list', default=[]), 'live mode suite timeout': vdr( vtype='interval', default=DurationFloat(60)), 'dummy mode suite timeout': vdr( vtype='interval', default=DurationFloat(60)), 'simulation mode suite timeout': vdr( vtype='interval', default=DurationFloat(60)), }, 'authentication': { # Allow owners to grant public shutdown rights at the most, not # full control. 'public': vdr( vtype='string', options=PRIVILEGE_LEVELS[ :PRIVILEGE_LEVELS.index('shutdown') + 1], default=GLOBAL_CFG.get(['authentication', 'public'])) }, }, 'scheduling': { 'initial cycle point': vdr(vtype='cycletime'), 'final cycle point': vdr(vtype='final_cycletime'), 'initial cycle point constraints': vdr( vtype='string_list', default=[]), 'final cycle point constraints': vdr(vtype='string_list', default=[]), 'hold after point': vdr(vtype='cycletime'), 'cycling mode': vdr( vtype='string', default=Calendar.MODE_GREGORIAN, options=(Calendar.MODES.keys() + ["integer"])), 'runahead limit': vdr(vtype='cycleinterval'),
'live mode suite timeout': vdr( vtype='interval', default=DurationFloat(60)), 'dummy mode suite timeout': vdr( vtype='interval', default=DurationFloat(60)), 'dummy-local mode suite timeout': vdr( vtype='interval', default=DurationFloat(60)), 'simulation mode suite timeout': vdr( vtype='interval', default=DurationFloat(60)), }, 'authentication': { # Allow owners to grant public shutdown rights at the most, not # full control. 'public': vdr( vtype='string', options=PRIVILEGE_LEVELS[ :PRIVILEGE_LEVELS.index(PRIV_SHUTDOWN) + 1], default=glbl_cfg().get(['authentication', 'public'])) }, }, 'scheduling': { 'initial cycle point': vdr(vtype='cycletime'), 'final cycle point': vdr(vtype='final_cycletime'), 'initial cycle point constraints': vdr( vtype='string_list', default=[]), 'final cycle point constraints': vdr(vtype='string_list', default=[]), 'hold after point': vdr(vtype='cycletime'), 'cycling mode': vdr( vtype='string', default=Calendar.MODE_GREGORIAN, options=(Calendar.MODES.keys() + ["integer"])), 'runahead limit': vdr(vtype='cycleinterval'),