You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: netapp_dataops_k8s/netapp_dataops/netapp_dataops_k8s_cli.py
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -689,16 +689,16 @@
689
689
Create a new FlexCache volume.
690
690
691
691
Required Options/Arguments:
692
-
\t-f, --flexcache-vol=\tName of flexcache volume
693
-
\t-s, --source-svm=\tSource SVM name
694
-
\t-v, --source-vol=\tSource volume name
695
-
\t-z, --flexcache-size=\tSize of flexcache volume (Format: '1024Mi', '100Gi', '10Ti', etc.).
696
-
\t-b, --backend-name=\tName of tridentbackendconfig.
692
+
\t-f, --flexcache-vol=\t\tName of flexcache volume
693
+
\t-s, --source-svm=\t\tSource SVM name
694
+
\t-v, --source-vol=\t\tSource volume name
695
+
\t-z, --flexcache-size=\t\tSize of flexcache volume (Format: '1024Mi', '100Gi', '10Ti', etc.).
696
+
\t-b, --backend-name=\t\tName of tridentbackendconfig.
697
697
698
698
Optional Options/Arguments:
699
-
\t-h, --help\t\tPrint help text.
700
-
\t-c, --junction=\t\tThe junction path for the FlexCache volume.
701
-
\t-n, --namespace=\tKubernetes namespace to create the new PersistentVolumeClaim (PVC) in. If not specified, the PVC will be created in the "default" namespace.
699
+
\t-h, --help\t\t\tPrint help text.
700
+
\t-c, --junction=\t\t\tThe junction path for the FlexCache volume.
701
+
\t-n, --namespace=\t\tKubernetes namespace to create the new PersistentVolumeClaim (PVC) in. If not specified, the PVC will be created in the "default" namespace.
702
702
\t-t, --trident-namespace=\tKubernetes namespace where Trident is installed. If not specified, the namespace "trident" will be used.
Copy file name to clipboardExpand all lines: netapp_dataops_traditional/Examples/README.md
-5Lines changed: 0 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,3 @@ This directory contains different examples including Jupyter Notebooks, YAML fil
9
9
10
10
In this example we demonstrate an AI workflow in a Jupyter Notebook using Keras and MLflow. This notebook's goal is to give you an understanding of how to use the DataOps Toolkit with MLFlow for dataset-to-model traceability.
11
11
12
-
## SageMaker Notebook Instances with FSx for NetApp ONTAP
Copy file name to clipboardExpand all lines: netapp_dataops_traditional/README.md
+86-1Lines changed: 86 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,6 +91,7 @@ Data volume management operations:
91
91
-[List all data volumes.](#cli-list-volumes)
92
92
-[Mount an existing data volume locally as "read-only" or "read-write".](#cli-mount-volume)
93
93
-[Unmount an existing data volume.](#cli-unmount-volume)
94
+
-[Create a new flexcache volume.](#cli-create-flexcache)
94
95
95
96
Snapshot management operations:
96
97
-[Create a new snapshot for a data volume.](#cli-create-snapshot)
@@ -400,6 +401,51 @@ Unmounting volume at '/test1'.
400
401
Volume unmounted successfully.
401
402
```
402
403
404
+
<aname="cli-create-flexcache"></a>
405
+
406
+
#### Create a New FlexCache Volume
407
+
408
+
The NetApp DataOps Toolkit can be used to create a new FlexCache volume. A FlexCache volume acts as a local cache for a remote volume, enabling faster access to frequently used data. The command for creating a new FlexCache volume is `netapp_dataops_cli.py create flexcache`.
409
+
410
+
The following options/arguments are required:
411
+
412
+
```
413
+
-n, --flexcache-vol= Name of the FlexCache volume to be created.
414
+
-v, --source-volume= Name of the source volume.
415
+
-s, --source-svm= Name of the source SVM.
416
+
```
417
+
418
+
The following options/arguments are optional:
419
+
420
+
```
421
+
-t, --flexcache-svm= Name of the SVM where the FlexCache volume will reside.
422
+
-u, --cluster-name= Non-default hosting cluster.
423
+
-j, --junction= Custom junction path for the FlexCache volume to be exported at. If not specified, junction path will be: ("/"+FlexCache Volume Name).
424
+
-z, --flexcache-size= Size of the FlexCache volume. Format: '1024MB', '100GB', '10TB', etc. (default is 10% of the origin volume size or 1GB per constituent, whichever is greater).
425
+
-e, --export-policy= NFS export policy to use for the FlexCache volume (default: 'default').
426
+
-m, --mountpoint= Local mountpoint to mount the FlexCache volume after creation. If not specified, the volume will not be mounted locally. On Linux hosts, must be run as root if specified.
427
+
-x, --readonly= Mount the FlexCache volume as read-only if True. (default is False).
428
+
-h, --help Print help text.
429
+
```
430
+
431
+
##### Example Usage
432
+
433
+
Create a FlexCache volume named 'cache1' in SVM 'svm0' for the source volume 'source1' in the source SVM 'svm1'.
@@ -943,7 +989,7 @@ Setting state to snapmirrored, action:resync
943
989
The NetApp DataOps Toolkit can also be utilized as a library of functions that can be imported into any Python program or Jupyter Notebook. In this manner, data scientists and data engineers can easily incorporate data management tasks into their existing projects, programs, and workflows. This functionality is only recommended for advanced users who are proficient in Python.
Note: The prerequisite steps outlined in the [Getting Started](#getting-started) section still appy when the toolkit is being utilized as an importable library of functions.
@@ -957,6 +1003,7 @@ Data volume management operations:
957
1003
-[List all data volumes.](#lib-list-volumes)
958
1004
-[Mount an existing data volume locally as read-only or read-write.](#lib-mount-volume)
959
1005
-[Unmount an existing data volume.](#lib-unmount-volume)
1006
+
-[Create a new flexcache volume.](#lib-create-flexcache)
960
1007
961
1008
Snapshot management operations:
962
1009
-[Create a new snapshot for a data volume.](#lib-create-snapshot)
@@ -1223,6 +1270,44 @@ APIConnectionError # The storage system/service API returned an err
1223
1270
InvalidVolumeParameterError # An invalid parameter was specified.
1224
1271
```
1225
1272
1273
+
<aname="lib-create-flexcache"></a>
1274
+
1275
+
#### Create a New FlexCache Volume
1276
+
1277
+
The NetApp DataOps Toolkit can be used to create a new FlexCache volume as part of any Python program or workflow. A FlexCache volume acts as a local cache for a remote volume, enabling faster access to frequently used data. This functionality is useful for distributed environments where data needs to be accessed quickly and efficiently.
1278
+
1279
+
##### Function Definition
1280
+
1281
+
```py
1282
+
defcreate_flexcache(
1283
+
source_vol: str, # Name of the source volume (required).
1284
+
source_svm: str, # Name of the source SVM (required).
1285
+
flexcache_vol: str, # Name of the FlexCache volume to be created (required).
1286
+
flexcache_svm: str=None, # Name of the SVM where the FlexCache volume will reside (optional, defaults to config SVM).
1287
+
cluster_name: str=None, # Non-default cluster name, same credentials as the default credentials should be used (optional).
1288
+
flexcache_size: str=None, # Size of the FlexCache volume. Format: '1024MB', '100GB', '10TB', etc. (optional). Default is 10% of the source volume size or 1GB per constituent, whichever is greater.
1289
+
junction: str=None, # Custom junction path for the FlexCache volume to be exported at. If not specified, junction path will be: ("/"+FlexCache Volume Name).
1290
+
export_policy: str="default", # NFS export policy to use for the FlexCache volume (default: 'default').
1291
+
mountpoint: str=None, # Local mountpoint to mount the FlexCache volume after creation. If not specified, the volume will not be mounted locally. On Linux hosts, must be run as root if specified.
1292
+
readonly: bool=False, # Mount the FlexCache volume as read-only if True.
1293
+
print_output: bool=False# Denotes whether or not to print messages to the console during execution.
1294
+
):
1295
+
```
1296
+
1297
+
##### Return Value
1298
+
1299
+
None
1300
+
1301
+
##### Error Handling
1302
+
1303
+
If an error is encountered, the function will raise an exception of one of the following types. These exception types are defined in `netapp_dataops.traditional`.
1304
+
1305
+
```py
1306
+
InvalidConfigError # Config file is missing or contains an invalid value.
1307
+
APIConnectionError # The storage system/service API returned an error.
1308
+
InvalidVolumeParameterError # An invalid parameter was specified.
0 commit comments