Beispiel #1
0
 def __init__(self, value):
     super(ScheduleEntryList, self).__init__()
     if value[0] in ("'", '"') and value[-1] == value[0]:
         # Remove leading and trailing quotes for dos/cmd.exe users
         value = value[1:-1]
     dictval = shell_safe_json_parse(value)
     self.extend([
         ScheduleEntry(row['dayOfWeek'], int(row['startHourUtc']),
                       row.get('maintenanceWindow', None))
         for row in dictval
     ])
Beispiel #2
0
    def __init__(self, value):
        super(ScheduleEntryList, self).__init__()

        from azure.mgmt.redis.models import ScheduleEntry

        if value[0] in ("'", '"') and value[-1] == value[0]:
            # Remove leading and trailing quotes for dos/cmd.exe users
            value = value[1:-1]
        dictval = shell_safe_json_parse(value)
        self.extend([ScheduleEntry(day_of_week=row['dayOfWeek'],
                                   start_hour_utc=int(row['startHourUtc']),
                                   maintenance_window=row.get('maintenanceWindow', None)) for row in dictval])