karbor.services.operationengine.engine.triggers.timetrigger.timeformats package

Submodules

karbor.services.operationengine.engine.triggers.timetrigger.timeformats.calendar_time module

class karbor.services.operationengine.engine.triggers.timetrigger.timeformats.calendar_time.ICal(start_time, pattern)

Bases: karbor.services.operationengine.engine.triggers.timetrigger.timeformats.TimeFormat

icalendar.

classmethod check_time_format(pattern)

Check time format

Parameters

pattern – The pattern of the icalendar time

compute_next_time(current_time)

Compute next time

Parameters

current_time – the time before the next time

Returns

datetime or None

get_min_interval()

Get minimum interval of two adjacent time points

Returns

int(seconds) or None

karbor.services.operationengine.engine.triggers.timetrigger.timeformats.crontab_time module

class karbor.services.operationengine.engine.triggers.timetrigger.timeformats.crontab_time.Crontab(start_time, pattern)

Bases: karbor.services.operationengine.engine.triggers.timetrigger.timeformats.TimeFormat

classmethod check_time_format(pattern)

Check time format

Parameters

pattern – The pattern of the time

compute_next_time(current_time)

Compute next time

Parameters

current_time – the time before the next time

get_min_interval()

Get minimum interval of two adjacent time points

Module contents

time format base class

class karbor.services.operationengine.engine.triggers.timetrigger.timeformats.TimeFormat(start_time, pattern)

Bases: object

abstract classmethod check_time_format(pattern)

Check time format

Parameters

pattern – The pattern of the time

abstract compute_next_time(current_time)

Compute next time

Parameters

current_time – the time before the next time

abstract get_min_interval()

Get minimum interval of two adjacent time points