@@ -102,6 +102,30 @@ service Controller {
102
102
}
103
103
}
104
104
105
+ service GroupController {
106
+ option (alpha_service) = true ;
107
+
108
+ rpc GroupControllerGetCapabilities (
109
+ GroupControllerGetCapabilitiesRequest )
110
+ returns (GroupControllerGetCapabilitiesResponse ) {}
111
+
112
+ rpc CreateVolumeGroupSnapshot (CreateVolumeGroupSnapshotRequest )
113
+ returns (CreateVolumeGroupSnapshotResponse ) {
114
+ option (alpha_method) = true ;
115
+ }
116
+
117
+ rpc DeleteVolumeGroupSnapshot (DeleteVolumeGroupSnapshotRequest )
118
+ returns (DeleteVolumeGroupSnapshotResponse ) {
119
+ option (alpha_method) = true ;
120
+ }
121
+
122
+ rpc GetVolumeGroupSnapshot (
123
+ GetVolumeGroupSnapshotRequest )
124
+ returns (GetVolumeGroupSnapshotResponse ) {
125
+ option (alpha_method) = true ;
126
+ }
127
+ }
128
+
105
129
service Node {
106
130
rpc NodeStageVolume (NodeStageVolumeRequest )
107
131
returns (NodeStageVolumeResponse ) {}
@@ -181,6 +205,15 @@ message PluginCapability {
181
205
// returned by NodeGetInfo to ensure that a given volume is
182
206
// accessible from a given node when scheduling workloads.
183
207
VOLUME_ACCESSIBILITY_CONSTRAINTS = 2 ;
208
+
209
+ // GROUP_CONTROLLER_SERVICE indicates that the Plugin provides
210
+ // RPCs for operating on groups of volumes. Plugins MAY provide
211
+ // this capability.
212
+ // The presence of this capability determines whether the CO will
213
+ // attempt to invoke the REQUIRED GroupController service RPCs, as
214
+ // well as specific RPCs as indicated by
215
+ // GroupControllerGetCapabilities.
216
+ GROUP_CONTROLLER_SERVICE = 3 ;
184
217
}
185
218
Type type = 1 ;
186
219
}
@@ -1163,6 +1196,21 @@ message Snapshot {
1163
1196
// `volume_content_source` in a `CreateVolumeRequest`. The default
1164
1197
// value is false. This field is REQUIRED.
1165
1198
bool ready_to_use = 5 ;
1199
+
1200
+ // The ID of the volume group snapshot that this snapshot is part of.
1201
+ // It uniquely identifies the group snapshot on the storage system.
1202
+ // This field is OPTIONAL.
1203
+ // If this snapshot is a member of a volume group snapshot, and it
1204
+ // MUST NOT be deleted as a stand alone snapshot, then the SP
1205
+ // MUST provide the ID of the volume group snapshot in this field.
1206
+ // If provided, CO MUST use this field in subsequent volume group
1207
+ // snapshot operations to indicate that this snapshot is part of the
1208
+ // specified group snapshot.
1209
+ // If not provided, CO SHALL treat the snapshot as independent,
1210
+ // and SP SHALL allow it to be deleted separately.
1211
+ // If this message is inside a VolumeGroupSnapshot message, the value
1212
+ // MUST be the same as the group_snapshot_id in that message.
1213
+ string group_snapshot_id = 6 [(alpha_field) = true ];
1166
1214
}
1167
1215
message DeleteSnapshotRequest {
1168
1216
// The ID of the snapshot to be deleted.
@@ -1634,3 +1682,169 @@ message NodeExpandVolumeResponse {
1634
1682
// The capacity of the volume in bytes. This field is OPTIONAL.
1635
1683
int64 capacity_bytes = 1 ;
1636
1684
}
1685
+ message GroupControllerGetCapabilitiesRequest {
1686
+ // Intentionally empty.
1687
+ }
1688
+
1689
+ message GroupControllerGetCapabilitiesResponse {
1690
+ // All the capabilities that the group controller service supports.
1691
+ // This field is OPTIONAL.
1692
+ repeated GroupControllerServiceCapability capabilities = 1 ;
1693
+ }
1694
+
1695
+ // Specifies a capability of the group controller service.
1696
+ message GroupControllerServiceCapability {
1697
+ message RPC {
1698
+ enum Type {
1699
+ UNKNOWN = 0 ;
1700
+
1701
+ // Indicates that the group controller plugin supports
1702
+ // creating, deleting, and getting details of a volume
1703
+ // group snapshot.
1704
+ CREATE_DELETE_GET_VOLUME_GROUP_SNAPSHOT = 1
1705
+ [(alpha_enum_value) = true ];
1706
+ }
1707
+
1708
+ Type type = 1 ;
1709
+ }
1710
+
1711
+ oneof type {
1712
+ // RPC that the controller supports.
1713
+ RPC rpc = 1 ;
1714
+ }
1715
+ }
1716
+ message CreateVolumeGroupSnapshotRequest {
1717
+ option (alpha_message) = true ;
1718
+
1719
+ // The suggested name for the group snapshot. This field is REQUIRED
1720
+ // for idempotency.
1721
+ // Any Unicode string that conforms to the length limit is allowed
1722
+ // except those containing the following banned characters:
1723
+ // U+0000-U+0008, U+000B, U+000C, U+000E-U+001F, U+007F-U+009F.
1724
+ // (These are control characters other than commonly used whitespace.)
1725
+ string name = 1 ;
1726
+
1727
+ // volume IDs of the source volumes to be snapshotted together.
1728
+ // This field is REQUIRED.
1729
+ repeated string source_volume_ids = 2 ;
1730
+
1731
+ // Secrets required by plugin to complete
1732
+ // ControllerCreateVolumeGroupSnapshot request.
1733
+ // This field is OPTIONAL. Refer to the `Secrets Requirements`
1734
+ // section on how to use this field.
1735
+ // The secrets provided in this field SHOULD be the same for
1736
+ // all group snapshot operations on the same group snapshot.
1737
+ map <string , string > secrets = 3 [(csi_secret) = true ];
1738
+
1739
+ // Plugin specific parameters passed in as opaque key-value pairs.
1740
+ // This field is OPTIONAL. The Plugin is responsible for parsing and
1741
+ // validating these parameters. COs will treat these as opaque.
1742
+ map <string , string > parameters = 4 ;
1743
+ }
1744
+
1745
+ message CreateVolumeGroupSnapshotResponse {
1746
+ option (alpha_message) = true ;
1747
+
1748
+ // Contains all attributes of the newly created group snapshot.
1749
+ // This field is REQUIRED.
1750
+ VolumeGroupSnapshot group_snapshot = 1 ;
1751
+ }
1752
+
1753
+ message VolumeGroupSnapshot {
1754
+ option (alpha_message) = true ;
1755
+
1756
+ // The identifier for this group snapshot, generated by the plugin.
1757
+ // This field MUST contain enough information to uniquely identify
1758
+ // this specific snapshot vs all other group snapshots supported by
1759
+ // this plugin.
1760
+ // This field SHALL be used by the CO in subsequent calls to refer to
1761
+ // this group snapshot.
1762
+ // The SP is NOT responsible for global uniqueness of
1763
+ // group_snapshot_id across multiple SPs.
1764
+ // This field is REQUIRED.
1765
+ string group_snapshot_id = 1 ;
1766
+
1767
+ // A list of snapshots belonging to this group.
1768
+ // This field is REQUIRED.
1769
+ repeated Snapshot snapshots = 2 ;
1770
+
1771
+ // Timestamp of when the volume group snapshot was taken.
1772
+ // This field is REQUIRED.
1773
+ .google.protobuf.Timestamp creation_time = 3 ;
1774
+
1775
+ // Indicates if all individual snapshots in the group snapshot
1776
+ // are ready to use as a `volume_content_source` in a
1777
+ // `CreateVolumeRequest`. The default value is false.
1778
+ // If any snapshot in the list of snapshots in this message have
1779
+ // ready_to_use set to false, the SP MUST set this field to false.
1780
+ // If all of the snapshots in the list of snapshots in this message
1781
+ // have ready_to_use set to true, the SP SHOULD set this field to
1782
+ // true.
1783
+ // This field is REQUIRED.
1784
+ bool ready_to_use = 4 ;
1785
+ }
1786
+ message DeleteVolumeGroupSnapshotRequest {
1787
+ option (alpha_message) = true ;
1788
+
1789
+ // The ID of the group snapshot to be deleted.
1790
+ // This field is REQUIRED.
1791
+ string group_snapshot_id = 1 ;
1792
+
1793
+ // A list of snapshot IDs that are part of this group snapshot.
1794
+ // If SP does not need to rely on this field to delete the snapshots
1795
+ // in the group, it SHOULD check this field and report an error
1796
+ // if it has the ability to detect a mismatch.
1797
+ // Some SPs require this list to delete the snapshots in the group.
1798
+ // If SP needs to use this field to delete the snapshots in the
1799
+ // group, it MUST report an error if it has the ability to detect
1800
+ // a mismatch.
1801
+ // This field is REQUIRED.
1802
+ repeated string snapshot_ids = 2 ;
1803
+
1804
+ // Secrets required by plugin to complete group snapshot deletion
1805
+ // request.
1806
+ // This field is OPTIONAL. Refer to the `Secrets Requirements`
1807
+ // section on how to use this field.
1808
+ // The secrets provided in this field SHOULD be the same for
1809
+ // all group snapshot operations on the same group snapshot.
1810
+ map <string , string > secrets = 3 [(csi_secret) = true ];
1811
+ }
1812
+
1813
+ message DeleteVolumeGroupSnapshotResponse {
1814
+ // Intentionally empty.
1815
+ option (alpha_message) = true ;
1816
+ }
1817
+ message GetVolumeGroupSnapshotRequest {
1818
+ option (alpha_message) = true ;
1819
+
1820
+ // The ID of the group snapshot to fetch current group snapshot
1821
+ // information for.
1822
+ // This field is REQUIRED.
1823
+ string group_snapshot_id = 1 ;
1824
+
1825
+ // A list of snapshot IDs that are part of this group snapshot.
1826
+ // If SP does not need to rely on this field to get the snapshots
1827
+ // in the group, it SHOULD check this field and report an error
1828
+ // if it has the ability to detect a mismatch.
1829
+ // Some SPs require this list to get the snapshots in the group.
1830
+ // If SP needs to use this field to get the snapshots in the
1831
+ // group, it MUST report an error if it has the ability to detect
1832
+ // a mismatch.
1833
+ // This field is REQUIRED.
1834
+ repeated string snapshot_ids = 2 ;
1835
+
1836
+ // Secrets required by plugin to complete
1837
+ // GetVolumeGroupSnapshot request.
1838
+ // This field is OPTIONAL. Refer to the `Secrets Requirements`
1839
+ // section on how to use this field.
1840
+ // The secrets provided in this field SHOULD be the same for
1841
+ // all group snapshot operations on the same group snapshot.
1842
+ map <string , string > secrets = 3 [(csi_secret) = true ];
1843
+ }
1844
+
1845
+ message GetVolumeGroupSnapshotResponse {
1846
+ option (alpha_message) = true ;
1847
+
1848
+ // This field is REQUIRED
1849
+ VolumeGroupSnapshot group_snapshot = 1 ;
1850
+ }
0 commit comments