def get_healthcheck_cmd(self) -> str: cmd = self.config_dict.get('healthcheck_cmd', None) if cmd is None: raise InvalidInstanceConfig( "healthcheck mode 'cmd' requires a healthcheck_cmd to run") else: return cmd
def decompose_instance(instance): """Get (job_name, action_name) from an instance.""" decomposed = instance.split(SPACER) if len(decomposed) != 2: raise InvalidInstanceConfig('Invalid instance name: %s' % instance) return (decomposed[0], decomposed[1])