oadrReportRequest.xml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <oadr:oadrReportRequest>
  2. <ei:reportRequestID>{{ report_request.report_request_id }}</ei:reportRequestID>
  3. <ei:reportSpecifier xmlns:xcal="urn:ietf:params:xml:ns:icalendar-2.0">
  4. <ei:reportSpecifierID>{{ report_request.report_specifier.report_specifier_id }}</ei:reportSpecifierID>
  5. <xcal:granularity>
  6. <xcal:duration>{{ report_request.report_specifier.granularity|timedeltaformat }}</xcal:duration>
  7. </xcal:granularity>
  8. <ei:reportBackDuration>
  9. <xcal:duration>{{ report_request.report_specifier.report_back_duration|timedeltaformat }}</xcal:duration>
  10. </ei:reportBackDuration>
  11. {% if report_request.report_specifier.report_interval %}
  12. <ei:reportInterval>
  13. <xcal:properties>
  14. <xcal:dtstart>
  15. <xcal:date-time>{{ report_request.report_specifier.report_interval.dtstart|datetimeformat }}</xcal:date-time>
  16. </xcal:dtstart>
  17. <xcal:duration>
  18. <xcal:duration>{{ report_request.report_specifier.report_interval.duration|timedeltaformat }}</xcal:duration>
  19. </xcal:duration>
  20. {% if report_request.report_specifier.report_interval.tolerance %}
  21. <xcal:tolerance>
  22. <xcal:tolerate>
  23. <xcal:startafter>{{ report_request.report_specifier.report_interval.tolerance.tolerate.startafter|timedeltaformat }}</xcal:startafter>
  24. </xcal:tolerate>
  25. </xcal:tolerance>
  26. {% endif %}
  27. {% if report_request.report_specifier.report_interval.notification %}
  28. <ei:x-eiNotification>
  29. <xcal:duration>{{ report_request.report_specifier.report_interval.notification|timedeltaformat }}</xcal:duration>
  30. </ei:x-eiNotification>
  31. {% endif %}
  32. {% if report_request.report_specifier.report_interval.ramp_up %}
  33. <ei:x-eiRampUp>
  34. <xcal:duration>{{ report_request.report_specifier.report_interval.ramp_up|timedeltaformat }}</xcal:duration>
  35. </ei:x-eiRampUp>
  36. {% endif %}
  37. {% if report_request.report_specifier.report_interval.recovery %}
  38. <ei:x-eiRecovery>
  39. <xcal:duration>{{ report_request.report_specifier.report_interval.recovery|timedeltaformat }}</xcal:duration>
  40. </ei:x-eiRecovery>
  41. {% endif %}
  42. </xcal:properties>
  43. </ei:reportInterval>
  44. {% endif %}
  45. <ei:specifierPayload>
  46. <ei:rID>{{ report_request.report_specifier.specifier_payload.r_id }}</ei:rID>
  47. <ei:readingType>{{ report_request.report_specifier.specifier_payload.reading_type }}</ei:readingType>
  48. </ei:specifierPayload>
  49. </ei:reportSpecifier>
  50. </oadr:oadrReportRequest>