1. Get me started!¶
-
nidhogg.
get_netapp
(url, username, password, verify=False)¶ Return the correct connection object to the filer.
You do not have to care if the filer is a cluster-mode or a seven-mode filer.
Note
Provided user must be authorized to use the Netapp API of the filer.
Parameters: - url (str) – hostname of the netapp filer
- username (str) – username to connect to the Netapp API.
- password (str) – password of the provided user
- verify (bool) – check SSL certificate
Returns: Nidhogg instance
Return type: SevenMode
(if the filer is a seven-mode filer)Return type: ClusterMode
(if the filer is a cluster-mode filer)Example:
import nidhogg filer = nidhogg.get_netapp("filer99.example.com", "<username>", "<password>") filer.list_volumes()
-
nidhogg.
get_best_volume_by_size
(volumes, filter_func=None, **kwargs)¶ Return the best volume from the list of volumes with the biggest free size.
Apply filter function before if specified.
Parameters: - volumes (list of
Volume
) – list of volumes - filter_func (function) – filter function applied before
Returns: volume with the biggest free size
Return type: - volumes (list of
-
nidhogg.
get_best_volume_by_quota
(volumes, filter_func=None, **kwargs)¶ Return the best volume from the list of volumes with the smallest quota ration.
Parameters: - volumes (list of
VolumeWithQuotaRatio
) – list of volumes - filter_func (function) – filter function applied before
Returns: volume with the smallest quota ratio (allocated quota size / volume size)
Return type: - volumes (list of