Ejemplo n.º 1
0
 def __init__(self, **kwargs):
     self.values = kwargs
     self.identifier = kwargs['TaskIdentifier']
     self.cancellable = kwargs.get('IsCancellable')
     self.started = parse_timestamp(kwargs.get('Started'))
     self.completed = parse_timestamp(kwargs.get('Completed'))
     self.initiated_by = kwargs.get('InitiatedBy')
     self.complete_reason = kwargs.get('CompleteReason')
     self.status = {}
     for k, v in (kwargs.get('Status') or {}).iteritems():
         if k == 'State':
             self.status[k] = task_state.get(v)
         else:
             self.status[k] = v
     self.task_type = event_type.get(kwargs.get('Type'))
Ejemplo n.º 2
0
 def __init__(self, **kwargs):
     self.values = kwargs
     self.identifier = kwargs['EventIdentifier']
     self.occurred_on = parse_timestamp(kwargs['OccurredOn'])
     self.description = kwargs['Description']
     self.site_name = kwargs.get('SiteName')
     self.completed_successfully = kwargs.get('EventCompletedSuccessfully')
     self.event_type = event_type[kwargs['EventType']]
     self.entity_type = entity_type[kwargs['EntityType']]
Ejemplo n.º 3
0
 def __init__(self, **kwargs):
     self.values = kwargs
     self.identifier = kwargs['EventIdentifier']
     self.occurred_on = parse_timestamp(kwargs['OccurredOn'])
     self.description = kwargs['Description']
     self.site_name = kwargs.get('SiteName')
     self.completed_successfully = kwargs.get('EventCompletedSuccessfully')
     self.event_type = event_type[kwargs['EventType']]
     self.entity_type = entity_type[kwargs['EntityType']]
Ejemplo n.º 4
0
 def __init__(self, **kwargs):
     self.values = kwargs
     self.vpgs = list([i["identifier"] for i in kwargs.get("AffectedVpgs", [])])
     self.zorgs = list([i["identifier"] for i in kwargs.get("AffectedZorgs", [])])
     self.help_identifier = kwargs.get("HelpIdentifier")
     self.site_identifier = (kwargs.get("Site") or {}).get("identifier")
     self.turned_on = parse_timestamp(kwargs["TurnedOn"])
     self.description = kwargs["Description"]
     self.entity = kwargs.get("Entity")
     self.level = kwargs.get("Level")
     self.is_dismissed = kwargs.get("IsDismissed")
Ejemplo n.º 5
0
 def __init__(self, **kwargs):
     self.values = kwargs
     self.vpgs = list(
         [i['identifier'] for i in kwargs.get('AffectedVpgs', [])])
     self.zorgs = list(
         [i['identifier'] for i in kwargs.get('AffectedZorgs', [])])
     self.help_identifier = kwargs.get('HelpIdentifier')
     self.site_identifier = (kwargs.get('Site') or {}).get('identifier')
     self.turned_on = parse_timestamp(kwargs['TurnedOn'])
     self.description = kwargs['Description']
     self.entity = kwargs.get('Entity')
     self.level = kwargs.get('Level')
     self.is_dismissed = kwargs.get('IsDismissed')