MCPcopy Create free account
hub / github.com/apache/mesos / Flags

Method Flags

src/examples/test_csi_plugin.cpp:113–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111{
112public:
113 Flags()
114 {
115 const hashset<string> supportedApiVersions =
116 {mesos::csi::v0::API_VERSION, mesos::csi::v1::API_VERSION};
117
118 add(&Flags::api_version,
119 "api_version",
120 "If set, the plugin would only serve CSI calls of the specified API\n"
121 "version. Otherwise, the plugin serves all supported API versions by\n"
122 "default. (Supported values: " + stringify(supportedApiVersions) + ")",
123 [=](const Option<string>& apiVersion) {
124 return apiVersion.isNone() ||
125 supportedApiVersions.contains(apiVersion.get())
126 ? Option<Error>::none() : Error("Unsupported API version");
127 });
128
129 add(&Flags::endpoint,
130 "endpoint",
131 "Path to the Unix domain socket the plugin should bind to.");
132
133 add(&Flags::work_dir,
134 "work_dir",
135 "Path to the work directory of the plugin.");
136
137 add(&Flags::available_capacity,
138 "available_capacity",
139 "The available disk capacity managed by the plugin, in addition\n"
140 "to the pre-existing volumes specified in the --volumes flag.");
141
142 add(&Flags::create_parameters,
143 "create_parameters",
144 "The parameters required for volume creation. The parameters are\n"
145 "specified as a semicolon-delimited list of param=value pairs.\n"
146 "(Example: 'param1=value1;param2=value2')");
147
148 add(&Flags::volume_metadata,
149 "volume_metadata",
150 "The static properties to add to the contextual information of each\n"
151 "volume. The metadata are specified as a semicolon-delimited list of\n"
152 "prop=value pairs. (Example: 'prop1=value1;prop2=value2')");
153
154 add(&Flags::volumes,
155 "volumes",
156 "Creates preprovisioned volumes upon start-up. The volumes are\n"
157 "specified as a semicolon-delimited list of name:capacity pairs.\n"
158 "If a volume with the same name already exists, the pair will be\n"
159 "ignored. (Example: 'volume1:1GB;volume2:2GB')");
160
161 add(&Flags::volume_id_path,
162 "volume_id_path",
163 "When set to true, this flag causes the volume ID of all volumes to\n"
164 "be set to the volume's path.",
165 true);
166
167 add(&Flags::forward,
168 "forward",
169 "If set, the plugin forwards all requests to the specified Unix\n"
170 "domain socket. (Example: 'unix:///path/to/socket')");

Callers

nothing calls this directly

Calls 6

addFunction · 0.50
stringifyFunction · 0.50
ErrorFunction · 0.50
isNoneMethod · 0.45
containsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected