-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathfilesystem.go
530 lines (453 loc) · 19.3 KB
/
filesystem.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
/*
Copyright (c) 2019 Dell Corporation
All Rights Reserved
*/
package gounity
import (
"context"
"errors"
"fmt"
"net/http"
"strconv"
"strings"
"github.com/dell/gounity/util"
"github.com/dell/gounity/api"
"github.com/dell/gounity/types"
)
// Filesystem structure
type Filesystem struct {
client *Client
}
// FsNameMaxLength provides the allowed max length for filesystem name
const (
FsNameMaxLength = 63
)
// AccessType type is string
type AccessType string
// AccessType constants
const (
ReadOnlyAccessType = AccessType("READ_ONLY")
ReadWriteAccessType = AccessType("READ_WRITE")
ReadOnlyRootAccessType = AccessType("READ_ONLY_ROOT")
ReadWriteRootAccessType = AccessType("READ_WRITE_ROOT")
)
// NFSShareDefaultAccess is string
type NFSShareDefaultAccess string
// NFSShareDefaultAccess constants
const (
NoneDefaultAccess = NFSShareDefaultAccess("0")
ReadOnlyDefaultAccess = NFSShareDefaultAccess("1")
ReadWriteDefaultAccess = NFSShareDefaultAccess("2")
ReadOnlyRootDefaultAccess = NFSShareDefaultAccess("3")
ReadWriteRootDefaultAccess = NFSShareDefaultAccess("4")
)
// ErrorFilesystemNotFound stores error for filesystem not found
var ErrorFilesystemNotFound = errors.New("Unable to find filesystem")
// FilesystemNotFoundErrorCode stores error code for filesystem not found
var FilesystemNotFoundErrorCode = "0x7d13005"
// AttachedSnapshotsErrorCode stores error code for attached snapshots
var AttachedSnapshotsErrorCode = "0x6000c17"
// MarkFilesystemForDeletion stores filesystem for deletion mark
var MarkFilesystemForDeletion = "csi-marked-filesystem-for-deletion(do not remove this from description)"
// NewFilesystem function returns filesystem
func NewFilesystem(client *Client) *Filesystem {
return &Filesystem{client}
}
// FindFilesystemByName - Find the Filesystem by it's name. If the Filesystem is not found, an error will be returned.
func (f *Filesystem) FindFilesystemByName(ctx context.Context, filesystemName string) (*types.Filesystem, error) {
if len(filesystemName) == 0 {
return nil, errors.New("Filesystem Name shouldn't be empty")
}
fileSystemResp := &types.Filesystem{}
err := f.client.executeWithRetryAuthenticate(ctx, http.MethodGet, fmt.Sprintf(api.UnityAPIGetResourceByNameWithFieldsURI, api.FileSystemAction, filesystemName, FileSystemDisplayFields), nil, fileSystemResp)
if err != nil {
if strings.Contains(err.Error(), FilesystemNotFoundErrorCode) {
return nil, ErrorFilesystemNotFound
}
return nil, err
}
return fileSystemResp, nil
}
// FindFilesystemByID - Find the Filesystem by it's Id. If the Filesystem is not found, an error will be returned.
func (f *Filesystem) FindFilesystemByID(ctx context.Context, filesystemID string) (*types.Filesystem, error) {
log := util.GetRunIDLogger(ctx)
if len(filesystemID) == 0 {
return nil, errors.New("Filesystem Id shouldn't be empty")
}
fileSystemResp := &types.Filesystem{}
err := f.client.executeWithRetryAuthenticate(ctx, http.MethodGet, fmt.Sprintf(api.UnityAPIGetResourceWithFieldsURI, api.FileSystemAction, filesystemID, FileSystemDisplayFields), nil, fileSystemResp)
if err != nil {
log.Debugf("Unable to find filesystem Id %s Error: %v", filesystemID, err)
if strings.Contains(err.Error(), FilesystemNotFoundErrorCode) {
return nil, ErrorFilesystemNotFound
}
return nil, err
}
return fileSystemResp, nil
}
// GetFilesystemIDFromResID - Returns the filesystem ID for the filesystem
func (f *Filesystem) GetFilesystemIDFromResID(ctx context.Context, filesystemResID string) (string, error) {
if filesystemResID == "" {
return "", errors.New("Filesystem Resource Id shouldn't be empty")
}
fileSystemResp := &types.StorageResourceParameters{}
err := f.client.executeWithRetryAuthenticate(ctx, http.MethodGet, fmt.Sprintf(api.UnityAPIGetResourceWithFieldsURI, api.StorageResourceAction, filesystemResID, StorageResourceDisplayFields), nil, fileSystemResp)
if err != nil {
return "", fmt.Errorf("get filesystem Id for %s failed with error: %v", filesystemResID, err)
}
return fileSystemResp.StorageResourceContent.Filesystem.ID, nil
}
// CreateFilesystem - Create a new filesystem on the array
func (f *Filesystem) CreateFilesystem(ctx context.Context, name, storagepool, description, nasServer string, size uint64, tieringPolicy, hostIOSize, supportedProtocol int, isThinEnabled, isDataReductionEnabled bool) (*types.Filesystem, error) {
log := util.GetRunIDLogger(ctx)
if name == "" {
return nil, errors.New("filesystem name should not be empty")
}
if len(name) > FsNameMaxLength {
return nil, fmt.Errorf("filesystem name %s should not exceed %d characters", name, FsNameMaxLength)
}
poolAPI := NewStoragePool(f.client)
pool, err := poolAPI.FindStoragePoolByID(ctx, storagepool)
if err != nil {
return nil, fmt.Errorf("unable to get PoolID (%s) Error:%v", storagepool, err)
}
storagePool := types.StoragePoolID{
PoolID: storagepool,
}
fileEventSettings := types.FileEventSettings{
IsCIFSEnabled: false, // Set to false to disable CIFS
IsNFSEnabled: true, // Set to true to enable NFS alone
}
nas := types.NasServerID{
NasServerID: nasServer,
}
fsParams := types.FsParameters{
StoragePool: &storagePool,
Size: size,
SupportedProtocol: supportedProtocol,
HostIOSize: hostIOSize,
NasServer: &nas,
FileEventSettings: fileEventSettings,
}
volAPI := NewVolume(f.client)
thinProvisioningLicenseInfoResp, err := volAPI.isFeatureLicensed(ctx, ThinProvisioning)
if err != nil {
return nil, fmt.Errorf("unable to get license info for feature: %s", ThinProvisioning)
}
dataReductionLicenseInfoResp, err := volAPI.isFeatureLicensed(ctx, DataReduction)
if err != nil {
return nil, fmt.Errorf("unable to get license info for feature: %s", DataReduction)
}
if thinProvisioningLicenseInfoResp.LicenseInfoContent.IsInstalled && thinProvisioningLicenseInfoResp.LicenseInfoContent.IsValid {
fsParams.IsThinEnabled = strconv.FormatBool(isThinEnabled)
} else if isThinEnabled == true {
return nil, fmt.Errorf("thin provisioning is not supported on array and hence cannot create Filesystem")
}
if dataReductionLicenseInfoResp.LicenseInfoContent.IsInstalled && dataReductionLicenseInfoResp.LicenseInfoContent.IsValid {
fsParams.IsDataReductionEnabled = strconv.FormatBool(isDataReductionEnabled)
} else if isDataReductionEnabled == true {
return nil, fmt.Errorf("data reduction is not supported on array and hence cannot create Filesystem")
}
if pool != nil && pool.StoragePoolContent.PoolFastVP.Status != 0 {
log.Debug("FastVP is enabled")
fastVPParameters := types.FastVPParameters{
TieringPolicy: tieringPolicy,
}
fsParams.FastVPParameters = &fastVPParameters
} else {
log.Debug("FastVP is not enabled")
if tieringPolicy != 0 {
return nil, fmt.Errorf("fastVP is not enabled and requested tiering policy is: %d ", tieringPolicy)
}
}
fileReqParam := types.FsCreateParam{
Name: name,
Description: description,
FsParameters: &fsParams,
}
fileResp := &types.Filesystem{}
err = f.client.executeWithRetryAuthenticate(ctx,
http.MethodPost, fmt.Sprintf(api.UnityAPIStorageResourceActionURI, api.CreateFSAction), fileReqParam, fileResp)
if err != nil {
return nil, err
}
return fileResp, nil
}
// DeleteFilesystem delete by its ID. If the Filesystem is not present on the array, an error will be returned.
func (f *Filesystem) DeleteFilesystem(ctx context.Context, filesystemID string) error {
log := util.GetRunIDLogger(ctx)
if len(filesystemID) == 0 {
return errors.New("Filesystem Id cannot be empty")
}
filesystemResp, err := f.FindFilesystemByID(ctx, filesystemID)
if err != nil {
return err
}
resourceID := filesystemResp.FileContent.StorageResource.ID
deleteErr := f.client.executeWithRetryAuthenticate(ctx, http.MethodDelete, fmt.Sprintf(api.UnityAPIGetResourceURI, api.StorageResourceAction, resourceID), nil, nil)
if deleteErr != nil {
if strings.Contains(deleteErr.Error(), AttachedSnapshotsErrorCode) {
err := f.updateDescription(ctx, filesystemID, MarkFilesystemForDeletion)
if err != nil {
return fmt.Errorf("mark filesystem %s for deletion failed. Error: %v", filesystemID, err)
}
return nil
}
return fmt.Errorf("delete Filesystem %s Failed. Error: %v", filesystemID, deleteErr)
}
log.Debugf("Delete Filesystem %s Successful", filesystemID)
return nil
}
// Update description of filesystem
func (f *Filesystem) updateDescription(ctx context.Context, filesystemID, description string) error {
if len(filesystemID) == 0 {
return errors.New("Filesystem Id cannot be empty")
}
filesystemResp, err := f.FindFilesystemByID(ctx, filesystemID)
if err != nil {
return err
}
resourceID := filesystemResp.FileContent.StorageResource.ID
filesystemModifyParam := types.FsModifyParameters{
Description: description,
}
err = f.client.executeWithRetryAuthenticate(ctx, http.MethodPost, fmt.Sprintf(api.UnityModifyFilesystemURI, resourceID), filesystemModifyParam, nil)
if err != nil {
return fmt.Errorf("update filesystem: %s description failed with error: %v", resourceID, err)
}
return nil
}
// CreateNFSShare - Create NFS Share for a File system
func (f *Filesystem) CreateNFSShare(ctx context.Context, name, path, filesystemID string, nfsShareDefaultAccess NFSShareDefaultAccess) (*types.Filesystem, error) {
if len(filesystemID) == 0 {
return nil, errors.New("Filesystem Id cannot be empty")
}
filesystemResp, err := f.FindFilesystemByID(ctx, filesystemID)
if err != nil {
return nil, err
}
resourceID := filesystemResp.FileContent.StorageResource.ID
nfsShareParam := types.NFSShareParameters{
DefaultAccess: string(nfsShareDefaultAccess),
}
nfsShareCreateReqParam := types.NFSShareCreateParam{
Name: name,
Path: path,
NFSShareParameters: &nfsShareParam,
}
nfsShares := []types.NFSShareCreateParam{nfsShareCreateReqParam}
filesystemModifyParam := types.FsModifyParameters{
NFSShares: &nfsShares,
}
err = f.client.executeWithRetryAuthenticate(ctx, http.MethodPost, fmt.Sprintf(api.UnityModifyFilesystemURI, resourceID), filesystemModifyParam, nil)
if err != nil {
return nil, fmt.Errorf("create NFS Share failed. Error: %v", err)
}
filesystemResp, err = f.FindFilesystemByID(ctx, filesystemID)
if err != nil {
return nil, ErrorFilesystemNotFound
}
return filesystemResp, nil
}
// CreateNFSShareFromSnapshot - Create NFS Share for a File system Snapshot
func (f *Filesystem) CreateNFSShareFromSnapshot(ctx context.Context, name, path, snapshotID string, nfsShareDefaultAccess NFSShareDefaultAccess) (*types.NFSShare, error) {
if len(snapshotID) == 0 {
return nil, errors.New("Snapshot Id cannot be empty")
}
snapshotContent := types.SnapshotIDContent{
ID: snapshotID,
}
nfsShareCreateReq := types.NFSShareCreateFromSnapParam{
Name: name,
Path: path,
DefaultAccess: string(nfsShareDefaultAccess),
Snapshot: snapshotContent,
}
nfsShareResp := &types.NFSShare{}
err := f.client.executeWithRetryAuthenticate(ctx, http.MethodPost, fmt.Sprintf(api.UnityAPIInstanceTypeResources, api.NfsShareAction), nfsShareCreateReq, nfsShareResp)
if err != nil {
return nil, fmt.Errorf("create NFS Share: %s failed. Error: %v", name, err)
}
return nfsShareResp, nil
}
// FindNFSShareByName - Find the NFS Share by it's name. If the NFS Share is not found, an error will be returned.
func (f *Filesystem) FindNFSShareByName(ctx context.Context, nfsSharename string) (*types.NFSShare, error) {
if len(nfsSharename) == 0 {
return nil, errors.New("NFS Share Name shouldn't be empty")
}
nfsShareResp := &types.NFSShare{}
err := f.client.executeWithRetryAuthenticate(ctx, http.MethodGet, fmt.Sprintf(api.UnityAPIGetResourceByNameWithFieldsURI, api.NfsShareAction, nfsSharename, NFSShareDisplayfields), nil, nfsShareResp)
if err != nil {
return nil, fmt.Errorf("unable to find NFS Share. Error: %v", err)
}
return nfsShareResp, nil
}
// FindNFSShareByID - Find the NFS Share by it's Id. If the NFS Share is not found, an error will be returned.
func (f *Filesystem) FindNFSShareByID(ctx context.Context, nfsShareID string) (*types.NFSShare, error) {
if len(nfsShareID) == 0 {
return nil, errors.New("NFS Share Id shouldn't be empty")
}
nfsShareResp := &types.NFSShare{}
err := f.client.executeWithRetryAuthenticate(ctx, http.MethodGet, fmt.Sprintf(api.UnityAPIGetResourceWithFieldsURI, api.NfsShareAction, nfsShareID, NFSShareDisplayfields), nil, nfsShareResp)
if err != nil {
return nil, fmt.Errorf("unable to find NFS Share: %s. Error: %v", nfsShareID, err)
}
return nfsShareResp, nil
}
// ModifyNFSShareHostAccess - Modify the host access on NFS Share
func (f *Filesystem) ModifyNFSShareHostAccess(ctx context.Context, filesystemID, nfsShareID string, hostIDs []string, accessType AccessType) error {
log := util.GetRunIDLogger(ctx)
if len(filesystemID) == 0 {
return errors.New("Filesystem Id cannot be empty")
}
filesystemResp, err := f.FindFilesystemByID(ctx, filesystemID)
if err != nil {
return ErrorFilesystemNotFound
}
resourceID := filesystemResp.FileContent.StorageResource.ID
hostsIDsContent := []types.HostIDContent{}
for _, hostID := range hostIDs {
hostIDContent := types.HostIDContent{
ID: hostID,
}
hostsIDsContent = append(hostsIDsContent, hostIDContent)
}
nfsShareParameters := types.NFSShareParameters{}
if accessType == ReadOnlyAccessType {
nfsShareParameters.ReadOnlyHosts = &hostsIDsContent
} else if accessType == ReadWriteAccessType {
nfsShareParameters.ReadWriteHosts = &hostsIDsContent
} else if accessType == ReadOnlyRootAccessType {
nfsShareParameters.ReadOnlyRootAccessHosts = &hostsIDsContent
} else if accessType == ReadWriteRootAccessType {
nfsShareParameters.RootAccessHosts = &hostsIDsContent
}
nfsShare := types.StorageResourceParam{
ID: nfsShareID,
}
nfsShareModifyContent := types.NFSShareModifyContent{
NFSShare: &nfsShare,
NFSShareParameters: &nfsShareParameters,
}
nfsSharesModifyContent := []types.NFSShareModifyContent{nfsShareModifyContent}
nfsShareModifyReq := types.NFSShareModify{
NFSSharesModifyContent: &nfsSharesModifyContent,
}
err = f.client.executeWithRetryAuthenticate(ctx, http.MethodPost, fmt.Sprintf(api.UnityModifyFilesystemURI, resourceID), nfsShareModifyReq, nil)
if err != nil {
return fmt.Errorf("modify NFS Share failed. Error: %v", err)
}
log.Debugf("Modify NFS share: %s successful. Added host with access %s", nfsShareID, accessType)
return nil
}
// ModifyNFSShareCreatedFromSnapshotHostAccess - Modify the host access on NFS Share
func (f *Filesystem) ModifyNFSShareCreatedFromSnapshotHostAccess(ctx context.Context, nfsShareID string, hostIDs []string, accessType AccessType) error {
if nfsShareID == "" {
return errors.New("NFS Share Id cannot be empty")
}
hostsIDsContent := []types.HostIDContent{}
for _, hostID := range hostIDs {
hostIDContent := types.HostIDContent{
ID: hostID,
}
hostsIDsContent = append(hostsIDsContent, hostIDContent)
}
nfsShareModifyReq := types.NFSShareCreateFromSnapModify{}
if accessType == ReadOnlyAccessType {
nfsShareModifyReq.ReadOnlyHosts = &hostsIDsContent
} else if accessType == ReadWriteAccessType {
nfsShareModifyReq.ReadWriteHosts = &hostsIDsContent
} else if accessType == ReadOnlyRootAccessType {
nfsShareModifyReq.ReadOnlyRootAccessHosts = &hostsIDsContent
} else if accessType == ReadWriteRootAccessType {
nfsShareModifyReq.RootAccessHosts = &hostsIDsContent
}
err := f.client.executeWithRetryAuthenticate(ctx, http.MethodPost, fmt.Sprintf(api.UnityModifyNFSShareURI, api.NfsShareAction, nfsShareID), nfsShareModifyReq, nil)
if err != nil {
return fmt.Errorf("modify NFS Share %s failed. Error: %v", nfsShareID, err)
}
return nil
}
// DeleteNFSShare by its ID. If the NFSShare is not present on the array, an error will be returned.
func (f *Filesystem) DeleteNFSShare(ctx context.Context, filesystemID, nfsShareID string) error {
log := util.GetRunIDLogger(ctx)
if len(filesystemID) == 0 {
return errors.New("Filesystem Id cannot be empty")
}
filesystemResp, err := f.FindFilesystemByID(ctx, filesystemID)
if err != nil {
return ErrorFilesystemNotFound
}
resourceID := filesystemResp.FileContent.StorageResource.ID
if len(nfsShareID) == 0 {
return errors.New("NFS Share Id cannot be empty")
}
_, err = f.FindNFSShareByID(ctx, nfsShareID)
if err != nil {
return fmt.Errorf("unable to find NFS Share. Error: %v", err)
}
nfsShare := types.StorageResourceParam{
ID: nfsShareID,
}
nfsShareDeleteContent := types.NFSShareModifyContent{
NFSShare: &nfsShare,
}
nfsSharesDeleteContent := []types.NFSShareModifyContent{nfsShareDeleteContent}
nfsShareDeleteReq := types.NFSShareDelete{
NFSSharesDeleteContent: &nfsSharesDeleteContent,
}
deleteErr := f.client.executeWithRetryAuthenticate(ctx, http.MethodPost, fmt.Sprintf(api.UnityModifyFilesystemURI, resourceID), nfsShareDeleteReq, nil)
if deleteErr != nil {
return fmt.Errorf("delete NFS Share: %s Failed. Error: %v", nfsShareID, deleteErr)
}
log.Infof("Delete NFS Share: %s Successful", nfsShareID)
return nil
}
// DeleteNFSShareCreatedFromSnapshot by its ID. If the NFSShare is not present on the array, an error will be returned.
func (f *Filesystem) DeleteNFSShareCreatedFromSnapshot(ctx context.Context, nfsShareID string) error {
if len(nfsShareID) == 0 {
return errors.New("NFS Share Id cannot be empty")
}
_, err := f.FindNFSShareByID(ctx, nfsShareID)
if err != nil {
return fmt.Errorf("unable to find NFS Share %s. Error: %v", nfsShareID, err)
}
err = f.client.executeWithRetryAuthenticate(ctx, http.MethodDelete, fmt.Sprintf(api.UnityAPIGetResourceURI, api.NfsShareAction, nfsShareID), nil, nil)
if err != nil {
return fmt.Errorf("delete NFS Share: %s Failed. Error: %v", nfsShareID, err)
}
return nil
}
// FindNASServerByID - Find the NAS Server by it's Id. If the NAS Server is not found, an error will be returned.
func (f *Filesystem) FindNASServerByID(ctx context.Context, nasServerID string) (*types.NASServer, error) {
if len(nasServerID) == 0 {
return nil, errors.New("NAS Server Id shouldn't be empty")
}
nasServerResp := &types.NASServer{}
err := f.client.executeWithRetryAuthenticate(ctx, http.MethodGet, fmt.Sprintf(api.UnityAPIGetResourceWithFieldsURI, api.NasServerAction, nasServerID, NasServerDisplayfields), nil, nasServerResp)
if err != nil {
return nil, fmt.Errorf("unable to find NAS Server: %s. Error: %v", nasServerID, err)
}
return nasServerResp, nil
}
// ExpandFilesystem Filesystem Expand volume to provided capacity
func (f *Filesystem) ExpandFilesystem(ctx context.Context, filesystemID string, newSize uint64) error {
log := util.GetRunIDLogger(ctx)
filesystem, err := f.FindFilesystemByID(ctx, filesystemID)
if err != nil {
return fmt.Errorf("unable to find filesystem Id %s. Error: %v", filesystemID, err)
}
if filesystem.FileContent.SizeTotal == newSize {
log.Infof("New Volume size (%d) is same as existing Volume size (%d). Ignoring expand volume operation.", newSize, filesystem.FileContent.SizeTotal)
return nil
} else if filesystem.FileContent.SizeTotal > newSize {
return fmt.Errorf("requested new capacity smaller than existing capacity")
}
fsExpandParams := types.FsExpandParameters{
Size: newSize,
}
fsExpandReqParam := types.FsExpandModifyParam{
FsParameters: &fsExpandParams,
}
return f.client.executeWithRetryAuthenticate(ctx, http.MethodPost, fmt.Sprintf(api.UnityModifyFilesystemURI, filesystem.FileContent.StorageResource.ID), fsExpandReqParam, nil)
}