cloudmesh-cloud.cloudmesh.data.api.db.LocalDBProvider
¶
Module Contents¶
Classes¶
The local DB provider uses a folder with yaml files representing each cloud resource. |
-
class
cloudmesh-cloud.cloudmesh.data.api.db.LocalDBProvider.
LocalDBProvider
(db_path)¶ Bases:
cloudmesh.data.api.db.DBProviderABC
The local DB provider uses a folder with yaml files representing each cloud resource.
-
get
(self, file_name)¶ Get a CloudFile object corresponding to the given file name
- Parameters
file_name – Corresponds to the CloudFile’s name.
- Returns
A CloudFile object
-
list_files
(self)¶ Return a list of Cloud Files tracked in this DB
-
add
(self, cloud_file)¶ Add a new Cloud File to the local DB
- Parameters
cloud_file – A CloudFile instance.
-
delete
(self, cloud_file)¶ Remove a CloudFile from the local db
- Parameters
cloud_file – A could file entry
-
update
(self, cloud_file)¶ Update an existing Cloud File entry
- Parameters
cloud_file – A could file entry
-
_get_entry_name
(self, cloud_file)¶ Gets the file name for the db entry
- Parameters
cloud_file – A cloud file entry.
- Returns
A file location for the cloud entry on disk.
-
static
_read_file
(yaml_file_path)¶ Read a yaml file from disk and return the python object it represents.
-