[prev in list] [next in list] [prev in thread] [next in thread] 

List:       asterisk-dev
Subject:    Re: [asterisk-dev] [Code Review] 2693: ARI: Implement /recordings/stored API's
From:       "David Lee" <reviewboard () asterisk ! org>
Date:       2013-07-29 22:21:06
Message-ID: 20130729222106.3991.93297 () hotblack ! digium ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2693/
-----------------------------------------------------------

(Updated July 29, 2013, 5:21 p.m.)


Review request for Asterisk Developers.


Changes
-------

Updated for trunk reorg.


Bugs: ASTERISK-21582
    https://issues.asterisk.org/jira/browse/ASTERISK-21582


Repository: Asterisk


Description
-------

This patch implements the ARI API's for stored recordings. While the
original task only specified deleting a recording, it was simple
enough to implement the GET for all recordings, and for an individual
recording.

The recording playback operation was modified to use the same code for
accessing the recording as the REST API, so that they will behave
consistently.

There were several problems with the api-docs that were also fixed,
bringing the ARI spec in line with the implementation. There were some
'wishful thinking' fields on the stored recording model (duration and
timestamp) that were removed, because I ended up not implementing a
metadata file to go along with the recording to store such information.

The GET /recordings/live operation was removed, since it's not really
that useful to get a list of all recordings that are currently going
on in the system. (At least, if we did that, we'd probably want to
also list all of the current playbacks. Which seems weird.)


Diffs (updated)
-----

  /trunk/include/asterisk/stasis_app_recording.h 395718 
  /trunk/res/Makefile 395718 
  /trunk/res/ari/ari_model_validators.h 395718 
  /trunk/res/ari/ari_model_validators.c 395718 
  /trunk/res/ari/resource_recordings.h 395718 
  /trunk/res/ari/resource_recordings.c 395718 
  /trunk/res/res_ari_recordings.c 395718 
  /trunk/res/res_stasis_playback.c 395718 
  /trunk/res/res_stasis_recording.c 395718 
  /trunk/res/stasis_recording/stored.c PRE-CREATION 
  /trunk/rest-api/api-docs/recordings.json 395718 

Diff: https://reviewboard.asterisk.org/r/2693/diff/


Testing
-------

Used Swagger-UI to poke around the API. Verified that you couldn't
delete anything outside the recording's directory.


Thanks,

David Lee


[Attachment #5 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://reviewboard.asterisk.org/r/2693/">https://reviewboard.asterisk.org/r/2693/</a>
  </td>
    </tr>
   </table>
   <br />




<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('https://reviewboard.asterisk.org/static/rb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for Asterisk Developers.</div>
<div>By David Lee.</div>


<p style="color: grey;"><i>Updated July 29, 2013, 5:21 p.m.</i></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Updated for trunk reorg.</pre>  </td>
 </tr>
</table>





<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="https://issues.asterisk.org/jira/browse/ASTERISK-21582">ASTERISK-21582</a>


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
Asterisk
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">This patch implements the ARI API&#39;s for stored recordings. While the \
original task only specified deleting a recording, it was simple enough to implement \
the GET for all recordings, and for an individual recording.

The recording playback operation was modified to use the same code for
accessing the recording as the REST API, so that they will behave
consistently.

There were several problems with the api-docs that were also fixed,
bringing the ARI spec in line with the implementation. There were some
&#39;wishful thinking&#39; fields on the stored recording model (duration and
timestamp) that were removed, because I ended up not implementing a
metadata file to go along with the recording to store such information.

The GET /recordings/live operation was removed, since it&#39;s not really
that useful to get a list of all recordings that are currently going
on in the system. (At least, if we did that, we&#39;d probably want to
also list all of the current playbacks. Which seems weird.)</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Used Swagger-UI to poke around the API. Verified that you couldn&#39;t \
delete anything outside the recording&#39;s directory.</pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> \
(updated)</h1> <ul style="margin-left: 3em; padding-left: 0;">

 <li>/trunk/include/asterisk/stasis_app_recording.h <span style="color: \
grey">(395718)</span></li>

 <li>/trunk/res/Makefile <span style="color: grey">(395718)</span></li>

 <li>/trunk/res/ari/ari_model_validators.h <span style="color: \
grey">(395718)</span></li>

 <li>/trunk/res/ari/ari_model_validators.c <span style="color: \
grey">(395718)</span></li>

 <li>/trunk/res/ari/resource_recordings.h <span style="color: \
grey">(395718)</span></li>

 <li>/trunk/res/ari/resource_recordings.c <span style="color: \
grey">(395718)</span></li>

 <li>/trunk/res/res_ari_recordings.c <span style="color: grey">(395718)</span></li>

 <li>/trunk/res/res_stasis_playback.c <span style="color: grey">(395718)</span></li>

 <li>/trunk/res/res_stasis_recording.c <span style="color: grey">(395718)</span></li>

 <li>/trunk/res/stasis_recording/stored.c <span style="color: \
grey">(PRE-CREATION)</span></li>

 <li>/trunk/rest-api/api-docs/recordings.json <span style="color: \
grey">(395718)</span></li>

</ul>

<p><a href="https://reviewboard.asterisk.org/r/2693/diff/" style="margin-left: \
3em;">View Diff</a></p>







  </td>
 </tr>
</table>




  </div>
 </body>
</html>



--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic