fs interface — VMware Salt API
fs interface
The LoadedMod class allows for the module loaded onto the sub to return custom sequencing, for instance it can be iterated over to return all functions
Delete a file from the database.
Parameters
| file_uuid: | UUID of the file in question |
|---|---|
| saltenv: | Salt environment in which to look for the file |
| path: | Fully-qualified path of the file. |
Note, use file_uuid or saltenv and path, but not both.
Return True if file exists.
For more information on files and environments, see the VMware Salt documentation on Broadcom's TechDocs.
Parameters
| file_uuid: | UUID of the file in question |
|---|---|
| saltenv: | Salt environment in which to look for the file |
| path: | Fully-qualified path of the file. |
Note, use file_uuid or saltenv and path, but not both.
List all files in the given Salt environment.
For more information on files and environments, see the VMware Salt documentation on Broadcom's TechDocs.
Parameters
| saltenv: | Salt environment in which to look for the files |
|---|---|
| include_fs_metadata: | If True, include a dictonary key that has metadata associated with the file. |
Get a list of all available Salt environments
For more information on files and environments, see the VMware Salt documentation on Broadcom's TechDocs.
Get a file from the database. Returns a dictionary with the file's metadata and a data field with the actual file contents.
For more information on files and environments, see the VMware Salt documentation on Broadcom's TechDocs.
Parameters
| file_uuid: | UUID of the file in question |
|---|---|
| saltenv: | Salt environment in which to look for the file |
| path: | Fully-qualified path of the file. |
Note, use file_uuid or saltenv and path, but not both.
Return access metadata for this file.
Parameters
| file_uuid: | UUID referencing desired file. |
|---|
Add or update a file to the database
For more information on files and environments, see the VMware Salt documentation on Broadcom's TechDocs.
Parameters
| file_uuid: | UUID of the file in question |
|---|---|
| saltenv: | Salt environment in which to look for the file |
| path: | Fully-qualified path of the file. |
| contents: | The file's contents. If the file is plain text then contents is the literal content of the file. If it is a binary format then contents should be base64-encoded. |
| content_type: | MIME content-type. Will be guessed if passed in as None. |
Note, use file_uuid or saltenv and path, but not both.
Save access metadata for this file.
Parameters
| file_uuid: | UUID referencing desired file. |
|---|---|
| access_payload: | Dictionary containing role names as keys and a list of allowed access types as values |
Add or update a file to the database
For more information on files and environments, see the VMware Salt documentation on Broadcom's TechDocs.
Parameters
| file_uuid: | UUID of the file in question |
|---|---|
| saltenv: | Salt environment in which to look for the file |
| path: | Fully-qualified path of the file. |
| contents: | The file's contents. If the file is plain text then contents is the literal content of the file. If it is a binary format then contents should be base64-encoded. |
| content_type: | MIME content-type. Will be guessed if passed in as None. |
Note, use file_uuid or saltenv and path, but not both.