Add CSV import support for non-TrueNAS sources
- Add truenas_migrate/csv_source.py: parses SMB and NFS share definitions from customer-supplied CSV files; returns same dict shape as parse_archive() so migrate.py is untouched - Add smb_shares_template.csv and nfs_shares_template.csv with annotated headers and example rows (# comment rows are skipped by the parser) - Update cli.py: interactive wizard gains a source-type step (archive vs CSV); run() resolves CSV source via --smb-csv / --nfs-csv args; --debug-tar is now optional; argparse validates mutual exclusion of archive and CSV flags Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
7
smb_shares_template.csv
Normal file
7
smb_shares_template.csv
Normal file
@@ -0,0 +1,7 @@
|
||||
name,path,comment,purpose,ro,browsable,guestok,abe,hostsallow,hostsdeny,timemachine,enabled
|
||||
# Required columns : name path
|
||||
# purpose values : NO_PRESET DEFAULT_SHARE ENHANCED_TIMEMACHINE MULTI_PROTOCOL_NFS PRIVATE_DATASETS WORM_DROPBOX
|
||||
# List columns : hostsallow hostsdeny (space-separated; e.g. "192.168.1.10 192.168.1.11")
|
||||
# Boolean columns : ro browsable guestok abe timemachine enabled (true or false)
|
||||
# Lines starting with # are ignored. Delete the example row below and add your shares.
|
||||
example-share,/mnt/pool/share,Example share description,NO_PRESET,false,true,false,false,,,false,true
|
||||
|
Can't render this file because it contains an unexpected character in line 4 and column 68.
|
Reference in New Issue
Block a user