threefoldtech / rfs

A fuse filesystem in rust
Apache License 2.0
1 stars 1 forks source link

Add config command to modify FL #63

Closed AbdelrahmanElawady closed 3 days ago

AbdelrahmanElawady commented 1 month ago

Description

Add config command to modify FL files and list FL metadata. By default it replaces the current tags/stores with the user provided ones but can be disabled with --replace=false

Example usage:

listing metadata:

$ rfs config --meta flist.fl
tags:
        author=me
        version=255
routes:
        range:[0-255] store:s3://172.17.0.2:9000/test

Modifying with replacement:

$ rfs config --meta flist.fl --tag author=not-me --store dir:///tmp/store
tags:
        author=not-me
routes:
        range:[0-255] store:dir:///tmp/store

Modifying without replacement:

$ rfs config --meta flist.fl --tag version=0.1.0 --store 00-80=dir:///tmp/store2 --replace=false
tags:
        author=not-me
        version=0.1.0
routes:
        range:[0-255] store:dir:///tmp/store
        range:[0-128] store:dir:///tmp/store2