2. nidhogg API¶
-
class
nidhogg.core.
Nidhogg
(url, username, password, major, minor, verify, http=<class 'nidhogg.http.NidhoggHttp'>)¶ Bases:
object
This is the base class for connecting to a NETAPP filer.
It provides functions that have 7-mode filers and cluster-mode filers in common.
Subclasses:
-
apis
¶ List of API commands available with the current credentials.
Returns: list of API commands Return type: list of str or empty list
-
clustered
¶ True if the filer is a cluster-mode filer, false otherwise.
Return type: boolean
See sub classes.
- Go to
create_cifs_share()
(SevenMode) - Go to
create_cifs_share()
(ClusterMode)
- Go to
-
create_qtree
(volume, qtree, mode='007')¶ Create a qtree on the specified volume.
Parameters: - volume (str) – name of the volume
- qtree – name of the qtree to be created
- mode (str) – initial file system permissions of the qtree
Raises: NidhoggException – if an error occurs
-
create_snapshot
(*args, **kwargs)¶ See sub classes.
- Go to
create_snapshot()
(SevenMode) - Go to
create_snapshot()
(ClusterMode)
- Go to
-
delete_cifs_acl
(*args, **kwargs)¶ See sub classes.
- Go to
delete_cifs_acl()
(SevenMode) - Go to
delete_cifs_acl()
(ClusterMode)
- Go to
-
delete_cifs_acls
(*args, **kwargs)¶ See sub classes.
- Go to
delete_cifs_acls()
(SevenMode) - Go to
delete_cifs_acls()
(ClusterMode)
- Go to
Delete the share with the given name.
Parameters: share_name (str) – name of the share Raises: NidhoggException – if an error occurs
-
delete_qtree
(volume, qtree, force=False)¶ Delete a qtree on the specified volume.
Parameters: - volume (str) – name of the volume
- qtree (str) – name of the qtree to be deleted
- force (bool) – force deletion if true
Raises: NidhoggException – if an error occurs
-
delete_quota
(*args, **kwargs)¶ See sub classes.
- Go to
delete_quota()
(SevenMode) - Go to
delete_quota()
(ClusterMode)
- Go to
-
delete_snapshot
(volume, name)¶ Delete a snapshot.
Parameters: - volume (str) – name of the volume
- name (str) – name of the snapshot
Raises: NidhoggException – if an error occurs
-
exists_qtree
(volume, qtree)¶ Check if a qtree exits.
Parameters: - volume (str) – name of the volume
- qtree (str) – name of the qtree
Returns: true, if the qtree exists
Return type: bool
Raises: NidhoggException – if an error occurs
-
get_allocated_quota_ratio
¶ Return the ratio allocated quota size / volume size.
Parameters: - volume (str) – name of the volume
- volume_size_total (int) – if specified we have the total size already from a previous API call
Returns: ratio allocated quota size / volume size
Return type: int
Raises: NidhoggException – if an error occurs
-
get_allocated_quota_size
¶ Return the sum of all quotas of the specified volume.
Parameters: volume (str) – name of the volume Returns: sum of all qtree quotas on this volume in byte Return type: int Raises: NidhoggException – if an error occurs
-
get_quota
(*args, **kwargs)¶ See sub classes.
- Go to
get_quota()
(SevenMode) - Go to
get_quota()
(ClusterMode)
- Go to
-
get_snapmirror_status
(*args, **kwargs)¶ See sub classes.
- Go to
get_snapmirror_status()
(SevenMode) - Go to
get_snapmirror_status()
(ClusterMode)
- Go to
-
get_snapmirror_volume_status
(*args, **kwargs)¶ See sub classes.
- Go to
get_snapmirror_volume_status()
(SevenMode) - Go to
get_snapmirror_volume_status()
(ClusterMode)
- Go to
-
get_volumes
(filter_volume_names=[])¶ Return a list of snapable volumes of type
Volume
.Parameters: filter_volume_names (list of str) – consider only volumes that are in this list Returns: list of user home volumes Return type: list of Volume
Raises: NidhoggException – if an error occurs
-
get_volumes_with_quota_info
(filter_volume_names=[])¶ Return a list of snapable volumes of type
VolumeWithQuotaRatio
.Parameters: filter_volume_names (list of str) – consider only volumes that are in this list Returns: list of project home volumes Return type: list of VolumeWithQuotaRatio
Raises: NidhoggException – if an error occurs
-
has_forcegroup
¶ Check if this cifs share feature is available.
Returns: true, if feature is available Return type: bool
-
list_cifs_acls
(*args, **kwargs)¶ See sub classes.
- Go to
list_cifs_acls()
(SevenMode) - Go to
list_cifs_acls()
(ClusterMode)
- Go to
See sub classes.
- Go to
list_cifs_shares()
(SevenMode) - Go to
list_cifs_shares()
(ClusterMode)
- Go to
-
list_qtrees
(*args, **kwargs)¶ See sub classes.
- Go to
list_qtrees()
(SevenMode) - Go to
list_qtrees()
(ClusterMode)
- Go to
-
list_quotas
(*args, **kwargs)¶ See sub classes.
- Go to
list_quotas()
(SevenMode) - Go to
list_quotas()
(ClusterMode)
- Go to
-
list_snapable_volumes
()¶ Return a list of snapable volumes.
That means, ignore volumes that are used as a snapmirror destination.
Returns: list of snapable volumes Return type: list of Volume
Raises: NidhoggException – if an error occurs
-
list_snapmirror_destinations
(*args, **kwargs)¶ See sub classes.
- Go to
list_snapmirror_destinations()
(SevenMode) - Go to
list_snapmirror_destinations()
(ClusterMode)
- Go to
-
list_snapshots
(*args, **kwargs)¶ See sub classes.
- Go to
list_snapshots()
(SevenMode) - Go to
list_snapshots()
(ClusterMode)
- Go to
-
list_volumes
(*args, **kwargs)¶ See sub classes.
- Go to
list_volumes()
(SevenMode) - Go to
list_volumes()
(ClusterMode)
- Go to
-
ontapi_version
¶ ONTAPI version of the connected filer.
Returns: ontapi version Return type: str
-
set_cifs_acl
(*args, **kwargs)¶ See sub classes.
- Go to
set_cifs_acl()
(SevenMode) - Go to
set_cifs_acl()
(ClusterMode)
- Go to
-
set_quota
(*args, **kwargs)¶ See sub classes.
- Go to
set_quota()
(SevenMode) - Go to
set_quota()
(ClusterMode)
- Go to
-
update_snapmirror
(*args, **kwargs)¶ See sub classes.
- Go to
update_snapmirror()
(SevenMode) - Go to
update_snapmirror()
(ClusterMode)
- Go to
-
update_snapmirror_with_snapshot
(*args, **kwargs)¶ See sub classes.
- Go to
update_snapmirror_with_snapshot()
(SevenMode) - Go to
update_snapmirror_with_snapshot()
(ClusterMode)
- Go to
-
volume_info
(*args, **kwargs)¶ See sub classes.
- Go to
volume_info()
(SevenMode) - Go to
volume_info()
(ClusterMode)
- Go to
-
vserver
¶ Hostname of the connected filer.
Returns: hostname Return type: str
-
vserver_fqdn
¶ FQDN of the connected filer.
Returns: FQDN of the filer Return type: str
-
-
exception
nidhogg.core.
NidhoggException
¶ Bases:
Exception
Exception wrapper.