Skip to content

Commit 0a15f24

Browse files
authored
Add CreateReference method to StorageProviderService (cs3org#29)
* Add operation redirects: Code.CODE_REDIRECT and Status.target_uri * add CreateReference method for storage provider
1 parent 24586ee commit 0a15f24

File tree

2 files changed

+103
-0
lines changed

2 files changed

+103
-0
lines changed

cs3/storageprovider/v0alpha/storageprovider.proto

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ service StorageProviderService {
132132
// MUST return CODE_NOT_FOUND if the reference does not exist.
133133
// MUST return CODE_PRECONDITION_FAILED if the acl does not exist.
134134
rpc UpdateGrant(UpdateGrantRequest) returns (UpdateGrantResponse);
135+
// Creates a reference to another resource in the same cluster or another domain (OCM shares).
136+
// The references resource can be accessed by the protocol specificied in the request message.
137+
rpc CreateReference(CreateReferenceRequest) returns (CreateReferenceResponse);
135138
}
136139

137140
message AddGrantRequest {
@@ -593,3 +596,21 @@ message UpdateGrantResponse {
593596
// Opaque information.
594597
cs3.types.Opaque opaque = 2;
595598
}
599+
600+
message CreateReferenceRequest {
601+
// OPTIONAL.
602+
// Opaque information.
603+
cs3.types.Opaque opaque = 1;
604+
// REQUIRED.
605+
// The reference resource by RFC3986.
606+
string target_uri = 2;
607+
}
608+
609+
message CreateReferenceResponse {
610+
// REQUIRED.
611+
// The response status.
612+
cs3.rpc.Status status = 1;
613+
// OPTIONAL.
614+
// Opaque information.
615+
cs3.types.Opaque opaque = 2;
616+
}

docs/index.html

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,14 @@ <h2>Table of Contents</h2>
727727
<a href="#cs3.storageproviderv0alpha.CreateContainerResponse"><span class="badge">M</span>CreateContainerResponse</a>
728728
</li>
729729

730+
<li>
731+
<a href="#cs3.storageproviderv0alpha.CreateReferenceRequest"><span class="badge">M</span>CreateReferenceRequest</a>
732+
</li>
733+
734+
<li>
735+
<a href="#cs3.storageproviderv0alpha.CreateReferenceResponse"><span class="badge">M</span>CreateReferenceResponse</a>
736+
</li>
737+
730738
<li>
731739
<a href="#cs3.storageproviderv0alpha.DeleteRequest"><span class="badge">M</span>DeleteRequest</a>
732740
</li>
@@ -5364,6 +5372,72 @@ <h3 id="cs3.storageproviderv0alpha.CreateContainerResponse">CreateContainerRespo
53645372

53655373

53665374

5375+
<h3 id="cs3.storageproviderv0alpha.CreateReferenceRequest">CreateReferenceRequest</h3>
5376+
<p></p>
5377+
5378+
5379+
<table class="field-table">
5380+
<thead>
5381+
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
5382+
</thead>
5383+
<tbody>
5384+
5385+
<tr>
5386+
<td>opaque</td>
5387+
<td><a href="#cs3.types.Opaque">cs3.types.Opaque</a></td>
5388+
<td></td>
5389+
<td><p>OPTIONAL.
5390+
Opaque information. </p></td>
5391+
</tr>
5392+
5393+
<tr>
5394+
<td>target_uri</td>
5395+
<td><a href="#string">string</a></td>
5396+
<td></td>
5397+
<td><p>REQUIRED.
5398+
The reference resource by RFC3986. </p></td>
5399+
</tr>
5400+
5401+
</tbody>
5402+
</table>
5403+
5404+
5405+
5406+
5407+
5408+
<h3 id="cs3.storageproviderv0alpha.CreateReferenceResponse">CreateReferenceResponse</h3>
5409+
<p></p>
5410+
5411+
5412+
<table class="field-table">
5413+
<thead>
5414+
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
5415+
</thead>
5416+
<tbody>
5417+
5418+
<tr>
5419+
<td>status</td>
5420+
<td><a href="#cs3.rpc.Status">cs3.rpc.Status</a></td>
5421+
<td></td>
5422+
<td><p>REQUIRED.
5423+
The response status. </p></td>
5424+
</tr>
5425+
5426+
<tr>
5427+
<td>opaque</td>
5428+
<td><a href="#cs3.types.Opaque">cs3.types.Opaque</a></td>
5429+
<td></td>
5430+
<td><p>OPTIONAL.
5431+
Opaque information. </p></td>
5432+
</tr>
5433+
5434+
</tbody>
5435+
</table>
5436+
5437+
5438+
5439+
5440+
53675441
<h3 id="cs3.storageproviderv0alpha.DeleteRequest">DeleteRequest</h3>
53685442
<p></p>
53695443

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

7074+
<tr>
7075+
<td>CreateReference</td>
7076+
<td><a href="#cs3.storageproviderv0alpha.CreateReferenceRequest">CreateReferenceRequest</a></td>
7077+
<td><a href="#cs3.storageproviderv0alpha.CreateReferenceResponse">CreateReferenceResponse</a></td>
7078+
<td><p>Creates a reference to another resource in the same cluster or another domain (OCM shares).
7079+
The references resource can be accessed by the protocol specificied in the request message.</p></td>
7080+
</tr>
7081+
70007082
</tbody>
70017083
</table>
70027084

0 commit comments

Comments
 (0)