cloudmesh.oracle.storage.Provider

Module Contents

Classes

Provider

class cloudmesh.oracle.storage.Provider.Provider(service=None, config='~/.cloudmesh/cloudmesh.yaml')

Bases: cloudmesh.storage.StorageABC.StorageABC

sample
static _get_credentials(config)

Internal function to create a dict for the oraclesdk credentials.

Parameters

config – The credentials from the cloudmesh yaml file

Returns

the dict for the oraclesdk

static get_filename(filename)
update_dict(self, elements, kind=None)
ls_files(self, dir_path, recursive)
static get_os_path(file_name_path)
static extract_file_dict(filename, metadata)
get_and_extract_file_dict(self, filename)
bucket_create(self, name=None)
bucket_exists(self, name=None)
create_dir(self, directory=None)

creates a directory :param directory: the name of the directory :return: dict

list(self, source=None, dir_only=False, recursive=True)

lists the information as dict

Parameters
  • source – the source which either can be a directory or file

  • dir_only – Only the directory names

  • recursive – in case of directory the recursive refers to all subdirectories in the specified source

Returns

dict

delete(self, source=None, recursive=True)

deletes the source :param source: the source which either can be a directory or file :param recursive: in case of directory the recursive refers to all

subdirectories in the specified source

Returns

dict

put(self, source=None, destination=None, recursive=False)

puts the source on the service :param source: the source file :param destination: the destination which either can be a

directory or file

Parameters

recursive – in case of directory the recursive refers to all subdirectories in the specified source

Returns

dict

get(self, source=None, destination=None, recursive=True)

gets the source from the service :param source: the source which either can be a directory or file :param destination: the destination which either can be a directory

or file

Parameters

recursive – in case of directory the recursive refers to all subdirectories in the specified source

Returns

dict

search(self, directory=None, filename=None, recursive=False)

searches for the source in all the folders on the cloud.

Parameters
  • directory – the directory which either can be a directory or file

  • filename – filename

  • recursive – in case of directory the recursive refers to all subdirectories in the specified source

Returns

dict