Skip to content

Commit 7273479

Browse files
authored
Merge pull request #165 from ddebroy/docsv1
Add Docs for v1 APIs
2 parents 50e651f + a3688c7 commit 7273479

File tree

4 files changed

+462
-0
lines changed

4 files changed

+462
-0
lines changed

docs/apis/disk_v1.md

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
# CSI Proxy Disk v1 API
2+
<a name="top"></a>
3+
4+
## Table of Contents
5+
6+
- [Disk RPCs](#v1.DiskRPCs)
7+
8+
- [Disk Messages](#v1.DiskMessages)
9+
10+
11+
<a name="v1.DiskRPCs"></a>
12+
## v1 Disk RPCs
13+
14+
| Method Name | Request Type | Response Type | Description |
15+
| ----------- | ------------ | ------------- | ------------|
16+
| ListDiskLocations | [ListDiskLocationsRequest](#v1.ListDiskLocationsRequest) | [ListDiskLocationsResponse](#v1.ListDiskLocationsResponse) | ListDiskLocations returns locations &lt;Adapter, Bus, Target, LUN ID&gt; of all disk devices enumerated by the host. |
17+
| PartitionDisk | [PartitionDiskRequest](#v1.PartitionDiskRequest) | [PartitionDiskResponse](#v1.PartitionDiskResponse) | PartitionDisk initializes and partitions a disk device with the GPT partition style (if the disk has not been partitioned already) and returns the resulting volume device ID. |
18+
| Rescan | [RescanRequest](#v1.RescanRequest) | [RescanResponse](#v1.RescanResponse) | Rescan refreshes the host&#39;s storage cache. |
19+
| ListDiskIDs | [ListDiskIDsRequest](#v1.ListDiskIDsRequest) | [ListDiskIDsResponse](#v1.ListDiskIDsResponse) | ListDiskIDs returns a map of DiskID objects where the key is the disk number. |
20+
| GetDiskStats | [GetDiskStatsRequest](#v1.GetDiskStatsRequest) | [GetDiskStatsResponse](#v1.GetDiskStatsResponse) | GetDiskStats returns the stats of a disk (currently it returns the disk size). |
21+
| SetDiskState | [SetDiskStateRequest](#v1.SetDiskStateRequest) | [SetDiskStateResponse](#v1.SetDiskStateResponse) | SetDiskState sets the offline/online state of a disk. |
22+
| GetDiskState | [GetDiskStateRequest](#v1.GetDiskStateRequest) | [GetDiskStateResponse](#v1.GetDiskStateResponse) | GetDiskState gets the offline/online state of a disk. |
23+
24+
25+
<a name="v1.DiskMessages"></a>
26+
<p align="right"><a href="#top">Top</a></p>
27+
28+
## v1 Disk Messages
29+
30+
<a name="v1.DiskIDs"></a>
31+
### DiskIDs
32+
33+
| Field | Type | Label | Description |
34+
| ----- | ---- | ----- | ----------- |
35+
| page83 | string | | The disk page83 id. |
36+
| serial_number | string | | The disk serial number. |
37+
38+
<a name="v1.DiskLocation"></a>
39+
### DiskLocation
40+
41+
| Field | Type | Label | Description |
42+
| ----- | ---- | ----- | ----------- |
43+
| Adapter | string | | |
44+
| Bus | string | | |
45+
| Target | string | | |
46+
| LUNID | string | | |
47+
48+
<a name="v1.GetDiskStateRequest"></a>
49+
### GetDiskStateRequest
50+
51+
| Field | Type | Label | Description |
52+
| ----- | ---- | ----- | ----------- |
53+
| disk_number | uint32 | | Disk device number of the disk. |
54+
55+
<a name="v1.GetDiskStateResponse"></a>
56+
### GetDiskStateResponse
57+
58+
| Field | Type | Label | Description |
59+
| ----- | ---- | ----- | ----------- |
60+
| is_online | bool | | Online state of the disk. true for online, false for offline. |
61+
62+
<a name="v1.GetDiskStatsRequest"></a>
63+
### GetDiskStatsRequest
64+
65+
| Field | Type | Label | Description |
66+
| ----- | ---- | ----- | ----------- |
67+
| disk_number | uint32 | | Disk device number of the disk to get the stats from. |
68+
69+
<a name="v1.GetDiskStatsResponse"></a>
70+
### GetDiskStatsResponse
71+
72+
| Field | Type | Label | Description |
73+
| ----- | ---- | ----- | ----------- |
74+
| total_bytes | int64 | | Total size of the volume. |
75+
76+
<a name="v1.ListDiskIDsRequest"></a>
77+
78+
### ListDiskIDsRequest
79+
Intentionally empty.
80+
81+
<a name="v1.ListDiskIDsResponse"></a>
82+
### ListDiskIDsResponse
83+
84+
| Field | Type | Label | Description |
85+
| ----- | ---- | ----- | ----------- |
86+
| diskIDs | [ListDiskIDsResponse.DiskIDsEntry](#v1.ListDiskIDsResponse.DiskIDsEntry) | repeated | Map of disk numbers and disk identifiers associated with each disk device.
87+
88+
the case is intentional for protoc to generate the field as DiskIDs |
89+
90+
<a name="v1.ListDiskIDsResponse.DiskIDsEntry"></a>
91+
### ListDiskIDsResponse.DiskIDsEntry
92+
93+
| Field | Type | Label | Description |
94+
| ----- | ---- | ----- | ----------- |
95+
| key | uint32 | | |
96+
| value | [DiskIDs](#v1.DiskIDs) | | |
97+
98+
<a name="v1.ListDiskLocationsRequest"></a>
99+
100+
### ListDiskLocationsRequest
101+
Intentionally empty.
102+
103+
<a name="v1.ListDiskLocationsResponse"></a>
104+
### ListDiskLocationsResponse
105+
106+
| Field | Type | Label | Description |
107+
| ----- | ---- | ----- | ----------- |
108+
| disk_locations | [ListDiskLocationsResponse.DiskLocationsEntry](#v1.ListDiskLocationsResponse.DiskLocationsEntry) | repeated | Map of disk number and &lt;adapter, bus, target, lun ID&gt; associated with each disk device. |
109+
110+
<a name="v1.ListDiskLocationsResponse.DiskLocationsEntry"></a>
111+
### ListDiskLocationsResponse.DiskLocationsEntry
112+
113+
| Field | Type | Label | Description |
114+
| ----- | ---- | ----- | ----------- |
115+
| key | uint32 | | |
116+
| value | [DiskLocation](#v1.DiskLocation) | | |
117+
118+
<a name="v1.PartitionDiskRequest"></a>
119+
### PartitionDiskRequest
120+
121+
| Field | Type | Label | Description |
122+
| ----- | ---- | ----- | ----------- |
123+
| disk_number | uint32 | | Disk device number of the disk to partition. |
124+
125+
<a name="v1.PartitionDiskResponse"></a>
126+
### PartitionDiskResponse
127+
Intentionally empty.
128+
129+
<a name="v1.RescanRequest"></a>
130+
### RescanRequest
131+
Intentionally empty.
132+
133+
<a name="v1.RescanResponse"></a>
134+
135+
### RescanResponse
136+
Intentionally empty.
137+
138+
<a name="v1.SetDiskStateRequest"></a>
139+
### SetDiskStateRequest
140+
141+
| Field | Type | Label | Description |
142+
| ----- | ---- | ----- | ----------- |
143+
| disk_number | uint32 | | Disk device number of the disk. |
144+
| is_online | bool | | Online state to set for the disk. true for online, false for offline. |
145+
146+
<a name="v1.SetDiskStateResponse"></a>
147+
### SetDiskStateResponse
148+
Intentionally empty.

docs/apis/filesystem_v1.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# CSI Proxy FileSystem v1 API
2+
<a name="top"></a>
3+
4+
## Table of Contents
5+
6+
- [FileSystem RPCs](#v1.FileSystemRPCs)
7+
8+
- [FileSystem Messages](#v1.FileSystemMessages)
9+
10+
11+
<a name="v1.FileSystemRPCs"></a>
12+
13+
## v1 FileSystem RPCs
14+
15+
| Method Name | Request Type | Response Type | Description |
16+
| ----------- | ------------ | ------------- | ------------|
17+
| PathExists | [PathExistsRequest](#v1.PathExistsRequest) | [PathExistsResponse](#v1.PathExistsResponse) | PathExists checks if the requested path exists in the host filesystem. |
18+
| Mkdir | [MkdirRequest](#v1.MkdirRequest) | [MkdirResponse](#v1.MkdirResponse) | Mkdir creates a directory at the requested path in the host filesystem. |
19+
| Rmdir | [RmdirRequest](#v1.RmdirRequest) | [RmdirResponse](#v1.RmdirResponse) | Rmdir removes the directory at the requested path in the host filesystem. This may be used for unlinking a symlink created through CreateSymlink. |
20+
| CreateSymlink | [CreateSymlinkRequest](#v1.CreateSymlinkRequest) | [CreateSymlinkResponse](#v1.CreateSymlinkResponse) | CreateSymlink creates a symbolic link called target_path that points to source_path in the host filesystem (target_path is the name of the symbolic link created, source_path is the existing path). |
21+
| IsSymlink | [IsSymlinkRequest](#v1.IsSymlinkRequest) | [IsSymlinkResponse](#v1.IsSymlinkResponse) | IsSymlink checks if a given path is a symlink. |
22+
23+
24+
<a name="v1.FileSystemMessages"></a>
25+
<p align="right"><a href="#top">Top</a></p>
26+
## v1 FileSystem Messages
27+
28+
<a name="v1.CreateSymlinkRequest"></a>
29+
### CreateSymlinkRequest
30+
31+
| Field | Type | Label | Description |
32+
| ----- | ---- | ----- | ----------- |
33+
| source_path | string | | The path of the existing directory to be linked. All special characters allowed by Windows in path names will be allowed except for restrictions noted below. For details, please check: https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
34+
| target_path | string | | Target path is the location of the new directory entry to be created in the host's filesystem. All special characters allowed by Windows in path names will be allowed except for restrictions noted below. For details, please check: https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
35+
36+
37+
Restrictions: Only absolute path (indicated by a drive letter prefix: e.g. &#34;C:\&#34;) is accepted. The path prefix needs needs to match the paths specified as kubelet-path parameter of csi-proxy. UNC paths of the form &#34;\\server\share\path\file&#34; are not allowed. All directory separators need to be backslash character: &#34;\&#34;. Characters: .. / : | ? * in the path are not allowed. source_path cannot already exist in the host filesystem. Maximum path length will be capped to 260 characters.
38+
39+
<a name="v1.CreateSymlinkResponse"></a>
40+
### CreateSymlinkResponse
41+
Intentionally empty.
42+
43+
<a name="v1.IsSymlinkRequest"></a>
44+
### IsSymlinkRequest
45+
46+
| Field | Type | Label | Description |
47+
| ----- | ---- | ----- | ----------- |
48+
| path | string | | The path whose existence as a symlink we want to check in the host&#39;s filesystem. |
49+
50+
51+
<a name="v1.IsSymlinkResponse"></a>
52+
### IsSymlinkResponse
53+
54+
| Field | Type | Label | Description |
55+
| ----- | ---- | ----- | ----------- |
56+
| is_symlink | bool | | Indicates whether the path in IsSymlinkRequest is a symlink. |
57+
58+
<a name="v1.MkdirRequest"></a>
59+
### MkdirRequest
60+
61+
| Field | Type | Label | Description |
62+
| ----- | ---- | ----- | ----------- |
63+
| path | string | | The path to create in the host&#39;s filesystem. All special characters allowed by Windows in path names will be allowed except for restrictions noted below. For details, please check: https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file Non-existent parent directories in the path will be automatically created. Directories will be created with Read and Write privileges of the Windows User account under which csi-proxy is started (typically LocalSystem).
64+
65+
Restrictions: Only absolute path (indicated by a drive letter prefix: e.g. &#34;C:\&#34;) is accepted. Depending on the context parameter of this function, the path prefix needs to match the paths specified either as kubelet-csi-plugins-path or as kubelet-pod-path parameters of csi-proxy. The path parameter cannot already exist in the host&#39;s filesystem. UNC paths of the form &#34;\\server\share\path\file&#34; are not allowed. All directory separators need to be backslash character: &#34;\&#34;. Characters: .. / : | ? * in the path are not allowed. Maximum path length will be capped to 260 characters.
66+
67+
<a name="v1.MkdirResponse"></a>
68+
### MkdirResponse
69+
Intentionally empty.
70+
71+
<a name="v1.PathExistsRequest"></a>
72+
### PathExistsRequest
73+
74+
| Field | Type | Label | Description |
75+
| ----- | ---- | ----- | ----------- |
76+
| path | string | | The path whose existence we want to check in the host&#39;s filesystem |
77+
78+
<a name="v1.PathExistsResponse"></a>
79+
### PathExistsResponse
80+
81+
| Field | Type | Label | Description |
82+
| ----- | ---- | ----- | ----------- |
83+
| exists | bool | | Indicates whether the path in PathExistsRequest exists in the host&#39;s filesystem |
84+
85+
<a name="v1.RmdirRequest"></a>
86+
### RmdirRequest
87+
88+
| Field | Type | Label | Description |
89+
| ----- | ---- | ----- | ----------- |
90+
| path | string | | The path to remove in the host&#39;s filesystem. All special characters allowed by Windows in path names will be allowed except for restrictions noted below. For details, please check: https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
91+
| force | bool | | Force remove all contents under path (if any). |
92+
93+
Restrictions: Only absolute path (indicated by a drive letter prefix: e.g. &#34;C:\&#34;) is accepted. Depending on the context parameter of this function, the path prefix needs to match the paths specified either as kubelet-csi-plugins-path or as kubelet-pod-path parameters of csi-proxy. UNC paths of the form &#34;\\server\share\path\file&#34; are not allowed. All directory separators need to be backslash character: &#34;\&#34;. Characters: .. / : | ? * in the path are not allowed. Path cannot be a file of type symlink. Maximum path length will be capped to 260 characters.
94+
95+
<a name="v1.RmdirResponse"></a>
96+
### RmdirResponse
97+
Intentionally empty.

docs/apis/smb_v1.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# CSI Proxy SMB v1 API
2+
<a name="top"></a>
3+
4+
## Table of Contents
5+
6+
- [SMB RPCs](#v1.SMBRPCs)
7+
8+
- [SMB Messages](#v1.SMBMessages)
9+
10+
11+
<a name="v1.SMBRPCs"></a>
12+
13+
## v1 SMB RPCs
14+
15+
| Method Name | Request Type | Response Type | Description |
16+
| ----------- | ------------ | ------------- | ------------|
17+
| NewSmbGlobalMapping | [NewSmbGlobalMappingRequest](#v1.NewSmbGlobalMappingRequest) | [NewSmbGlobalMappingResponse](#v1.NewSmbGlobalMappingResponse) | NewSmbGlobalMapping creates an SMB mapping on the SMB client to an SMB share. |
18+
| RemoveSmbGlobalMapping | [RemoveSmbGlobalMappingRequest](#v1.RemoveSmbGlobalMappingRequest) | [RemoveSmbGlobalMappingResponse](#v1.RemoveSmbGlobalMappingResponse) | RemoveSmbGlobalMapping removes the SMB mapping to an SMB share. |
19+
20+
21+
<a name="v1.SMBMessages"></a>
22+
<p align="right"><a href="#top">Top</a></p>
23+
24+
## v1 SMB Messages
25+
26+
<a name="v1.NewSmbGlobalMappingRequest"></a>
27+
### NewSmbGlobalMappingRequest
28+
29+
| Field | Type | Label | Description |
30+
| ----- | ---- | ----- | ----------- |
31+
| remote_path | string | | A remote SMB share to mount All unicode characters allowed in SMB server name specifications are permitted except for restrictions below
32+
| local_path | string | | Optional local path to mount the smb on |
33+
| username | string | | Username credential associated with the share |
34+
| password | string | | Password credential associated with the share |
35+
36+
Restrictions: SMB remote path specified in the format: \\server-name\sharename, \\server.fqdn\sharename or \\a.b.c.d\sharename If not an IP address, share name has to be a valid DNS name. UNC specifications to local paths or prefix: \\?\ is not allowed. Characters: &#43; [ ] &#34; / : ; | &lt; &gt; , ? * = $ are not allowed.
37+
38+
<a name="v1.NewSmbGlobalMappingResponse"></a>
39+
### NewSmbGlobalMappingResponse
40+
Intentionally empty.
41+
42+
<a name="v1.RemoveSmbGlobalMappingRequest"></a>
43+
### RemoveSmbGlobalMappingRequest
44+
45+
| Field | Type | Label | Description |
46+
| ----- | ---- | ----- | ----------- |
47+
| remote_path | string | | A remote SMB share mapping to remove All unicode characters allowed in SMB server name specifications are permitted except for restrictions below
48+
49+
Restrictions: SMB share specified in the format: \\server-name\sharename, \\server.fqdn\sharename or \\a.b.c.d\sharename If not an IP address, share name has to be a valid DNS name. UNC specifications to local paths or prefix: \\?\ is not allowed. Characters: &#43; [ ] &#34; / : ; | &lt; &gt; , ? * = $ are not allowed.
50+
51+
<a name="v1.RemoveSmbGlobalMappingResponse"></a>
52+
53+
### RemoveSmbGlobalMappingResponse
54+
Intentionally empty.

0 commit comments

Comments
 (0)