Volume-related Utilities and helpers.
Encode pool into host info.
Unprovision old volumes to prevent data leaking between users.
Extract Host, Backend or Pool information from host string.
Parameters: |
|
---|---|
Returns: | expected level of information |
host = 'HostA@BackendB#PoolC‘ ret = extract_host(host, ‘host’) # ret is ‘HostA’ ret = extract_host(host, ‘backend’) # ret is 'HostA@BackendB‘ ret = extract_host(host, ‘pool’) # ret is ‘PoolC’
host = 'HostX@BackendY‘ ret = extract_host(host, ‘pool’) # ret is None ret = extract_host(host, ‘pool’, True) # ret is ‘_pool0’
Generate a random password from the supplied symbol groups.
At least one symbol from each group will be included. Unpredictable results if length is less than the number of symbol groups.
Believed to be reasonably secure (with a reasonable password length!)