The cinder.volume.drivers.datacore.passwd Module

The cinder.volume.drivers.datacore.passwd Module

Password storage.

class FileStorage(file_path)

Bases: object

Represents a file as a dictionary.

close()

Close the file.

load()

Reads the file and returns corresponded dictionary object.

Returns:The dictionary that represents the file content.
open()

Open a file for simultaneous reading and writing.

If the specified file does not exist, it will be created with the 0600 access permissions for the current user, if needed the appropriate directories will be created with the 0750 access permissions for the current user.

save(storage)

Writes the specified dictionary to the file.

Parameters:storage – Dictionary that should be written to the file.
class PasswordFileStorage(file_path)

Bases: object

Password storage implementation.

It stores passwords in a file in a clear text. The password file must be secured by setting up file permissions.

delete_password(resource, username)

Delete the stored credential for the resource.

Parameters:
  • resource – Resource name for which credential was stored
  • username – User name
get_password(resource, username)

Returns the stored password for the resource.

If the password does not exist, it will return None

Parameters:
  • resource – Resource name for which credential was stored
  • username – User name
Return password:
 

Password

set_password(resource, username, password)

Store the credential for the resource.

Parameters:
  • resource – Resource name for which credential will be stored
  • username – User name
  • password – Password
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.