Skip to content

Commit

Permalink
Add CreateReference method to StorageProviderService (cs3org#29)
Browse files Browse the repository at this point in the history
* Add operation redirects: Code.CODE_REDIRECT and Status.target_uri

* add CreateReference method for storage provider
  • Loading branch information
labkode authored Aug 27, 2019
1 parent 24586ee commit 0a15f24
Show file tree
Hide file tree
Showing 2 changed files with 103 additions and 0 deletions.
21 changes: 21 additions & 0 deletions cs3/storageprovider/v0alpha/storageprovider.proto
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ service StorageProviderService {
// MUST return CODE_NOT_FOUND if the reference does not exist.
// MUST return CODE_PRECONDITION_FAILED if the acl does not exist.
rpc UpdateGrant(UpdateGrantRequest) returns (UpdateGrantResponse);
// Creates a reference to another resource in the same cluster or another domain (OCM shares).
// The references resource can be accessed by the protocol specificied in the request message.
rpc CreateReference(CreateReferenceRequest) returns (CreateReferenceResponse);
}

message AddGrantRequest {
Expand Down Expand Up @@ -593,3 +596,21 @@ message UpdateGrantResponse {
// Opaque information.
cs3.types.Opaque opaque = 2;
}

message CreateReferenceRequest {
// OPTIONAL.
// Opaque information.
cs3.types.Opaque opaque = 1;
// REQUIRED.
// The reference resource by RFC3986.
string target_uri = 2;
}

message CreateReferenceResponse {
// REQUIRED.
// The response status.
cs3.rpc.Status status = 1;
// OPTIONAL.
// Opaque information.
cs3.types.Opaque opaque = 2;
}
82 changes: 82 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,14 @@ <h2>Table of Contents</h2>
<a href="#cs3.storageproviderv0alpha.CreateContainerResponse"><span class="badge">M</span>CreateContainerResponse</a>
</li>

<li>
<a href="#cs3.storageproviderv0alpha.CreateReferenceRequest"><span class="badge">M</span>CreateReferenceRequest</a>
</li>

<li>
<a href="#cs3.storageproviderv0alpha.CreateReferenceResponse"><span class="badge">M</span>CreateReferenceResponse</a>
</li>

<li>
<a href="#cs3.storageproviderv0alpha.DeleteRequest"><span class="badge">M</span>DeleteRequest</a>
</li>
Expand Down Expand Up @@ -5364,6 +5372,72 @@ <h3 id="cs3.storageproviderv0alpha.CreateContainerResponse">CreateContainerRespo



<h3 id="cs3.storageproviderv0alpha.CreateReferenceRequest">CreateReferenceRequest</h3>
<p></p>


<table class="field-table">
<thead>
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>

<tr>
<td>opaque</td>
<td><a href="#cs3.types.Opaque">cs3.types.Opaque</a></td>
<td></td>
<td><p>OPTIONAL.
Opaque information. </p></td>
</tr>

<tr>
<td>target_uri</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p>REQUIRED.
The reference resource by RFC3986. </p></td>
</tr>

</tbody>
</table>





<h3 id="cs3.storageproviderv0alpha.CreateReferenceResponse">CreateReferenceResponse</h3>
<p></p>


<table class="field-table">
<thead>
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>

<tr>
<td>status</td>
<td><a href="#cs3.rpc.Status">cs3.rpc.Status</a></td>
<td></td>
<td><p>REQUIRED.
The response status. </p></td>
</tr>

<tr>
<td>opaque</td>
<td><a href="#cs3.types.Opaque">cs3.types.Opaque</a></td>
<td></td>
<td><p>OPTIONAL.
Opaque information. </p></td>
</tr>

</tbody>
</table>





<h3 id="cs3.storageproviderv0alpha.DeleteRequest">DeleteRequest</h3>
<p></p>

Expand Down Expand Up @@ -6997,6 +7071,14 @@ <h3 id="cs3.storageproviderv0alpha.StorageProviderService">StorageProviderServic
MUST return CODE_PRECONDITION_FAILED if the acl does not exist.</p></td>
</tr>

<tr>
<td>CreateReference</td>
<td><a href="#cs3.storageproviderv0alpha.CreateReferenceRequest">CreateReferenceRequest</a></td>
<td><a href="#cs3.storageproviderv0alpha.CreateReferenceResponse">CreateReferenceResponse</a></td>
<td><p>Creates a reference to another resource in the same cluster or another domain (OCM shares).
The references resource can be accessed by the protocol specificied in the request message.</p></td>
</tr>

</tbody>
</table>

Expand Down

0 comments on commit 0a15f24

Please sign in to comment.