API Reference

infinibox

class infinisdk.infinibox.InfiniBox(address, auth=None, use_ssl=False, ssl_cert=None)
SYSTEM_COMPONENTS_TYPE

alias of infinisdk.infinibox.components.InfiniBoxSystemComponents

SYSTEM_EVENTS_TYPE

alias of infinisdk.infinibox.events.Events

check_version()

Called automatically by the API on the first request made to the system. Should fetch and verify the system version to make sure it can be operated against.

get_model_name(long_name=False)

Retrieves the model name as reported by the system

get_name()

Returns the name of the system

get_serial(**kwargs)

Returns the serial number of the system

get_version()

Returns the product version of the system

is_logged_in()

Returns True if login() was called on this system, and logout() hasn’t been called yet

Iterate the list of systems related to the current system

login()

Verifies the current user against the system

logout()

Logs out the current user

Registers another system as related system to the current one

Unregisters another system from appearing the the current system’s related systems

update_name(name)

Update the name of the system

infinibox.api

infinibox.api is the sub-object responsible for sending API requests to the system. It also holds the current authentication information for the session.

class infinisdk.core.api.api.API(target, auth, use_ssl, ssl_cert)
clone_requests_session()

Return a copy of system session for cases we need to manipulate different attrs of the session for now, the cloned session has a copy of: headers, cookies, verify, cert, adapters

delete(path, **kwargs)

Shortcut for .request('delete')

disabled_login_refresh_context()

Inside this context, InfiniSDK will not attempt to refresh login cookies when logged out by expired cookies

get(path, **kwargs)

Shortcut for .request('get')

get_approval_context(value)

A context manager that controls whether requests are automatically approved (confirmed)

get_approved_context()

A context marking all operations as approved (confirmed)

get_auth()

Returns a tuple of the current username/password used by the API

get_auth_context(username, password, login=True)

Changes the API authentication information for the duration of the context:

>>> with system.api.get_auth_context('username', 'password'):
...     ... # execute operations as 'username'
get_unapproved_context()

A context marking all operations as unapproved (not confirmed)

load_credentials(creds)

Loads credentials from the given credentials

Parameters:creds – the result of a previous API.save_credentials() call
patch(path, **kwargs)

Shortcut for .request('patch')

post(path, **kwargs)

Shortcut for .request('post')

put(path, **kwargs)

Shortcut for .request('put')

request(http_method, path, assert_success=True, **kwargs)

Sends HTTP API request to the remote system

save_credentials()

Returns a copy of the current credentials, useful for loading them later

set_auth(username_or_auth, password=<NOTHING>, login=True)

Sets the username and password under which operations will be performed

Can be used both with a tuple argument or with two arguments (username, password):

>>> system.api.set_auth(('username', 'password'))
>>> system.api.set_auth('username', 'password')
set_interactive_approval()

Causes an interactive prompt whenever a command requires approval from the user

use_basic_auth_context()

Causes API requests to send auth through Basic authorization

class infinisdk.core.api.api.Response(resp, data, start_timestamp, end_timestamp)

System API request response

get_error()
Returns:The error portion of the response as returned from the system, or None if it doesn’t exist
get_json()
Returns:The JSON object returned from the system, or None if no json could be decoded
get_metadata()
Returns:The metadata portion of the response (paging information, etc.) as returned from the system, or None if it doesn’t exist
get_result()
Returns:The result of the API call, extracted from the response JSON object
response = None

Response object as returned from requests

sent_data = None

Data sent to on

url = None

The URL from which this response was obtained

infinibox.datasets

class infinisdk.infinibox.dataset.DatasetTypeBinder(object_type, system)
create_many(*args, **kwargs)

Creates multiple volumes with a single call. Parameters are just like volumes.create, only with the addition of the count parameter

Returns: list of volumes

Parameters:count – number of volumes to create. Defaults to 1.
class infinisdk.infinibox.dataset.Dataset(system, initial_data)
calculate_reclaimable_space()

Returns the space to be reclaimed if the dataset would be deleted according to delete simulation api

create_snapshot(name=None, **kwargs)

Creates a snapshot from this entity, if supported by the system Supports passing name, write_protected and all other snapshots creation fields

delete(force_if_snapshot_locked=<OMIT>)

Deletes this object.

disable_compression(**kwargs)

Set the value of the ‘compression_enabled’ field to False

disable_ssd(**kwargs)

Set the value of the ‘ssd_enabled’ field to False

disable_write_protection(**kwargs)

Set the value of the ‘write_protected’ field to False

enable_compression(**kwargs)

Set the value of the ‘compression_enabled’ field to True

enable_ssd(**kwargs)

Set the value of the ‘ssd_enabled’ field to True

enable_write_protection(**kwargs)

Set the value of the ‘write_protected’ field to True

get_allocated(**kwargs)

Obtains the value of the ‘allocated’ field

Returns:Capacity
get_capacity_savings(**kwargs)

Obtains the value of the ‘capacity_savings’ field

Returns:Capacity
get_children(**kwargs)

Retrieves all child entities for this entity (either clones or snapshots)

get_created_at(**kwargs)

Obtains the value of the ‘created_at’ field

Returns:Arrow
get_creation_time()

Retrieves creation time for this entity

get_dataset_type(**kwargs)

Obtains the value of the ‘dataset_type’ field

Returns:str
get_depth(**kwargs)

Obtains the value of the ‘depth’ field

Returns:int
get_family_id(**kwargs)

Obtains the value of the ‘family_id’ field

Returns:int
get_id(**kwargs)

Obtains the value of the ‘id’ field

Returns:int
get_lock_expires_at(**kwargs)

Obtains the value of the ‘lock_expires_at’ field

Returns:Arrow
get_lock_state(**kwargs)

Obtains the value of the ‘lock_state’ field

Returns:str
get_num_blocks(**kwargs)

Obtains the value of the ‘num_blocks’ field

Returns:int
get_pool(**kwargs)

Obtains the value of the ‘pool’ field

Returns:infinisdk.infinibox.pool.Pool object
get_pool_name(**kwargs)

Obtains the value of the ‘pool_name’ field

Returns:str
get_provisioning(**kwargs)

Obtains the value of the ‘provisioning’ field

Returns:str
get_qos_policy(**kwargs)

Obtains the value of the ‘qos_policy’ field

Returns:infinisdk.infinibox.qos_policy.QosPolicy object
get_qos_shared_policy(**kwargs)

Obtains the value of the ‘qos_shared_policy’ field

Returns:infinisdk.infinibox.qos_policy.QosPolicy object
get_replica_ids(**kwargs)

Obtains the value of the ‘replica_ids’ field

Returns:list
get_replication_types(**kwargs)

Obtains the value of the ‘replication_types’ field

Returns:list
get_rmr_snapshot_guid(**kwargs)

Obtains the value of the ‘rmr_snapshot_guid’ field

Returns:str
get_size(**kwargs)

Obtains the value of the ‘size’ field

Returns:Capacity
get_snapshot_expires_at(**kwargs)

Obtains the value of the ‘snapshot_expires_at’ field

Returns:int
get_snapshot_retention(**kwargs)

Obtains the value of the ‘snapshot_retention’ field

Returns:int
get_snapshots()

Retrieves all snapshot children of this entity

get_tenant(**kwargs)

Obtains the value of the ‘tenant’ field

Returns:infinisdk.infinibox.tenant.Tenant object
get_tree_allocated(**kwargs)

Obtains the value of the ‘tree_allocated’ field

Returns:Capacity
get_type(**kwargs)

Obtains the value of the ‘type’ field

Returns:str
get_updated_at(**kwargs)

Obtains the value of the ‘updated_at’ field

Returns:Arrow
get_used_size(**kwargs)

Obtains the value of the ‘used_size’ field

Returns:Capacity
has_children()

Returns whether or not this entity has children

is_compression_enabled(**kwargs)

Obtains the value of the ‘compression_enabled’ field

Returns:bool
is_compression_suppressed(**kwargs)

Obtains the value of the ‘compression_suppressed’ field

Returns:bool
is_mapped(**kwargs)

Obtains the value of the ‘mapped’ field

Returns:bool
is_master()

Returns whether or not this entity is a master entity (not a snapshot and not a clone)

is_replicated(from_cache=<DONT_CARE>)

Returns True if this volume is a part of a replica, whether as source or as target

is_rmr_active_active_peer(**kwargs)

Obtains the value of the ‘rmr_active_active_peer’ field

Returns:bool
is_rmr_source(**kwargs)

Obtains the value of the ‘rmr_source’ field

Returns:bool
is_rmr_target(**kwargs)

Obtains the value of the ‘rmr_target’ field

Returns:bool
is_snapshot()

Returns whether or not this entity is a snapshot

is_ssd_enabled(**kwargs)

Obtains the value of the ‘ssd_enabled’ field

Returns:bool
is_write_protected(**kwargs)

Obtains the value of the ‘write_protected’ field

Returns:bool
move_pool(target_pool, with_capacity=False)

Moves this entity to a new pool, optionally along with its needed capacity

refresh_snapshot(force_if_replicated_on_target=<OMIT>)

Refresh a snapshot with the most recent data from the parent :param force_if_replicated_on_target: (Only required on some InfiniBox versions) allows the refresh operation to occur on a dataset that is currently a replication target.

resize(delta)

Resize the entity by the given delta

restore(snapshot)

Restores this entity from a given snapshot object

update_compression_enabled

Updates the value of the ‘compression_enabled’ field

param value:The new compression_enabled value to be set (type: bool)
update_lock_expires_at(value, **kwargs)

Updates the value of the ‘lock_expires_at’ field

Parameters:value – The new lock_expires_at value to be set (type: Arrow)
update_provisioning(value, **kwargs)

Updates the value of the ‘provisioning’ field

Parameters:value – The new provisioning value to be set (type: str)
update_size(value, **kwargs)

Updates the value of the ‘size’ field

Parameters:value

The new size value to be set (type: Capacity)

update_ssd_enabled

Updates the value of the ‘ssd_enabled’ field

param value:The new ssd_enabled value to be set (type: bool)
update_write_protected

Updates the value of the ‘write_protected’ field

param value:The new write_protected value to be set (type: bool)

infinibox.volumes

class infinisdk.infinibox.volume.VolumesBinder(object_type, system)
create_group_snapshot(volumes, snap_prefix=<Autogenerate: {prefix}{short_uuid}_>, snap_suffix=<OMIT>)

Creates multiple snapshots with a single consistent point-in-time, returning the snapshots in respective order to parent volumes

Parameters:volumes – list of volumes we should create a snapshot of
class infinisdk.infinibox.volume.Volume(system, initial_data)
BINDER_CLASS

alias of VolumesBinder

calculate_reclaimable_space()

Returns the space to be reclaimed if the dataset would be deleted according to delete simulation api

clear_metadata()

Deletes all metadata keys for this object

classmethod construct(system, data)

Template method to enable customizing the object instantiation process.

This enables system components to be cached rather than re-fetched every time

classmethod create(system, **fields)

Creates a new object of this type

create_snapshot(name=None, **kwargs)

Creates a snapshot from this entity, if supported by the system Supports passing name, write_protected and all other snapshots creation fields

delete(force_if_snapshot_locked=<OMIT>)

Deletes this object.

disable_compression(**kwargs)

Set the value of the ‘compression_enabled’ field to False

disable_ssd(**kwargs)

Set the value of the ‘ssd_enabled’ field to False

disable_write_protection(**kwargs)

Set the value of the ‘write_protected’ field to False

enable_compression(**kwargs)

Set the value of the ‘compression_enabled’ field to True

enable_ssd(**kwargs)

Set the value of the ‘ssd_enabled’ field to True

enable_write_protection(**kwargs)

Set the value of the ‘write_protected’ field to True

get_all_metadata()
Returns:Dictionary of all keys and values associated as metadata for this object
get_allocated(**kwargs)

Obtains the value of the ‘allocated’ field

Returns:Capacity
get_capacity_savings(**kwargs)

Obtains the value of the ‘capacity_savings’ field

Returns:Capacity
get_children(**kwargs)

Retrieves all child entities for this entity (either clones or snapshots)

get_cons_group(**kwargs)

Obtains the value of the ‘cons_group’ field

Returns:infinisdk.infinibox.cons_group.ConsGroup object
get_created_at(**kwargs)

Obtains the value of the ‘created_at’ field

Returns:Arrow
classmethod get_creation_defaults()

Returns a dict representing the default arguments as implicitly constructed by infinisdk to fulfill a create call

Note

This will cause generation of defaults, which will have side effects if they are special values

Note

This does not necessarily generate all fields that are passable into create, only mandatory ‘fields

get_creation_time()

Retrieves creation time for this entity

get_data_snapshot_guid(**kwargs)

Obtains the value of the ‘data_snapshot_guid’ field

Returns:str
get_dataset_type(**kwargs)

Obtains the value of the ‘dataset_type’ field

Returns:str
get_depth(**kwargs)

Obtains the value of the ‘depth’ field

Returns:int
get_family_id(**kwargs)

Obtains the value of the ‘family_id’ field

Returns:int
get_field(field_name, from_cache=<DONT_CARE>, fetch_if_not_cached=True, raw_value=False)

Gets the value of a single field from the system

Parameters:
  • cache – Attempt to use the last cached version of the field value
  • fetch_if_not_cached – Pass False to force only from cache
get_fields(field_names=(), from_cache=<DONT_CARE>, fetch_if_not_cached=True, raw_value=False)

Gets a set of fields from the system

Parameters:
  • from_cache – Attempt to fetch the fields from the cache
  • fetch_if_not_cached – pass as False to force only from cache
Returns:

a dictionary of field names to their values

get_id(**kwargs)

Obtains the value of the ‘id’ field

Returns:int
get_lock_expires_at(**kwargs)

Obtains the value of the ‘lock_expires_at’ field

Returns:Arrow
get_lock_state(**kwargs)

Obtains the value of the ‘lock_state’ field

Returns:str
get_lun(mapping_object)

Given either a host or a host cluster object, returns the single LUN object mapped to this volume.

An exception is raised if multiple matching LUs are found

Parameters:mapping_object – Either a host cluster or a host object to be checked
Returns:None if no lu is found for this entity
get_metadata_value(key, default=<NOTHING>)

Gets a metadata value, optionally specifying a default

Parameters:default – if specified, the value to retrieve if the metadata key doesn’t exist. if not specified, and the key does not exist, the operation will raise an exception
get_name(**kwargs)

Obtains the value of the ‘name’ field

Returns:str
get_nguid(**kwargs)

Obtains the value of the ‘nguid’ field

Returns:str
get_num_blocks(**kwargs)

Obtains the value of the ‘num_blocks’ field

Returns:int
get_parent(**kwargs)

Obtains the value of the ‘parent’ field

Returns:infinisdk.infinibox.volume.Volume object
get_pool(**kwargs)

Obtains the value of the ‘pool’ field

Returns:infinisdk.infinibox.pool.Pool object
get_pool_name(**kwargs)

Obtains the value of the ‘pool_name’ field

Returns:str
get_provisioning(**kwargs)

Obtains the value of the ‘provisioning’ field

Returns:str
get_qos_policy(**kwargs)

Obtains the value of the ‘qos_policy’ field

Returns:infinisdk.infinibox.qos_policy.QosPolicy object
get_qos_shared_policy(**kwargs)

Obtains the value of the ‘qos_shared_policy’ field

Returns:infinisdk.infinibox.qos_policy.QosPolicy object
get_replica_ids(**kwargs)

Obtains the value of the ‘replica_ids’ field

Returns:list
get_replication_types(**kwargs)

Obtains the value of the ‘replication_types’ field

Returns:list
get_rmr_snapshot_guid(**kwargs)

Obtains the value of the ‘rmr_snapshot_guid’ field

Returns:str
get_serial(**kwargs)

Obtains the value of the ‘serial’ field

Returns:SCSISerial
get_size(**kwargs)

Obtains the value of the ‘size’ field

Returns:Capacity
get_snapshot_expires_at(**kwargs)

Obtains the value of the ‘snapshot_expires_at’ field

Returns:int
get_snapshot_retention(**kwargs)

Obtains the value of the ‘snapshot_retention’ field

Returns:int
get_snapshots()

Retrieves all snapshot children of this entity

get_tenant(**kwargs)

Obtains the value of the ‘tenant’ field

Returns:infinisdk.infinibox.tenant.Tenant object
get_tree_allocated(**kwargs)

Obtains the value of the ‘tree_allocated’ field

Returns:Capacity
get_type(**kwargs)

Obtains the value of the ‘type’ field

Returns:str
get_udid(**kwargs)

Obtains the value of the ‘udid’ field

Returns:int
get_updated_at(**kwargs)

Obtains the value of the ‘updated_at’ field

Returns:Arrow
get_used_size(**kwargs)

Obtains the value of the ‘used_size’ field

Returns:Capacity
has_children()

Returns whether or not this entity has children

invalidate_cache(*field_names)

Discards the cached field values of this object, causing the next fetch to retrieve the fresh value from the system

is_compression_enabled(**kwargs)

Obtains the value of the ‘compression_enabled’ field

Returns:bool
is_compression_suppressed(**kwargs)

Obtains the value of the ‘compression_suppressed’ field

Returns:bool
is_in_system()

Returns whether or not the object actually exists

is_mapped(**kwargs)

Obtains the value of the ‘mapped’ field

Returns:bool
is_master()

Returns whether or not this entity is a master entity (not a snapshot and not a clone)

is_paths_available(**kwargs)

Obtains the value of the ‘paths_available’ field

Returns:bool
is_replicated(from_cache=<DONT_CARE>)

Returns True if this volume is a part of a replica, whether as source or as target

is_rmr_active_active_peer(**kwargs)

Obtains the value of the ‘rmr_active_active_peer’ field

Returns:bool
is_rmr_source(**kwargs)

Obtains the value of the ‘rmr_source’ field

Returns:bool
is_rmr_target(**kwargs)

Obtains the value of the ‘rmr_target’ field

Returns:bool
is_snapshot()

Returns whether or not this entity is a snapshot

is_ssd_enabled(**kwargs)

Obtains the value of the ‘ssd_enabled’ field

Returns:bool
is_write_protected(**kwargs)

Obtains the value of the ‘write_protected’ field

Returns:bool
move_pool(target_pool, with_capacity=False)

Moves this entity to a new pool, optionally along with its needed capacity

refresh_snapshot(force_if_replicated_on_target=<OMIT>)

Refresh a snapshot with the most recent data from the parent :param force_if_replicated_on_target: (Only required on some InfiniBox versions) allows the refresh operation to occur on a dataset that is currently a replication target.

resize(delta)

Resize the entity by the given delta

restore(snapshot)

Restores this entity from a given snapshot object

safe_delete(*args, **kwargs)

Tries to delete the object, doing nothing if the object cannot be found on the system

safe_get_field(field_name, default=<NOTHING>, **kwargs)

Like get_field(), only returns ‘default’ parameter if no result was found

set_metadata(key, value)

Sets metadata key in the system associated with this object

set_metadata_from_dict(data_dict)

Sets multiple metadata keys/values in the system associated with this object

unmap()

Unmaps a volume from its hosts

unset_metadata(key)

Deletes a metadata key for this object

update_compression_enabled

Updates the value of the ‘compression_enabled’ field

param value:The new compression_enabled value to be set (type: bool)
update_field(field_name, field_value)

Updates the value of a single field

update_fields(**update_dict)

Atomically updates a group of fields and respective values (given as a dictionary)

update_lock_expires_at(value, **kwargs)

Updates the value of the ‘lock_expires_at’ field

Parameters:value – The new lock_expires_at value to be set (type: Arrow)
update_name(value, **kwargs)

Updates the value of the ‘name’ field

Parameters:value – The new name value to be set (type: str)
update_provisioning(value, **kwargs)

Updates the value of the ‘provisioning’ field

Parameters:value – The new provisioning value to be set (type: str)
update_size(value, **kwargs)

Updates the value of the ‘size’ field

Parameters:value

The new size value to be set (type: Capacity)

update_ssd_enabled

Updates the value of the ‘ssd_enabled’ field

param value:The new ssd_enabled value to be set (type: bool)
update_udid(value, **kwargs)

Updates the value of the ‘udid’ field

Parameters:value – The new udid value to be set (type: int)
update_write_protected

Updates the value of the ‘write_protected’ field

param value:The new write_protected value to be set (type: bool)

infinibox.filesystems

class infinisdk.infinibox.filesystem.FilesystemBinder(object_type, system)
class infinisdk.infinibox.filesystem.Filesystem(system, initial_data)
BINDER_CLASS

alias of FilesystemBinder

calculate_reclaimable_space()

Returns the space to be reclaimed if the dataset would be deleted according to delete simulation api

clear_metadata()

Deletes all metadata keys for this object

classmethod construct(system, data)

Template method to enable customizing the object instantiation process.

This enables system components to be cached rather than re-fetched every time

classmethod create(system, **fields)

Creates a new object of this type

create_snapshot(name=None, **kwargs)

Creates a snapshot from this entity, if supported by the system Supports passing name, write_protected and all other snapshots creation fields

delete(force_if_snapshot_locked=<OMIT>)

Deletes this object.

disable_compression(**kwargs)

Set the value of the ‘compression_enabled’ field to False

disable_ssd(**kwargs)

Set the value of the ‘ssd_enabled’ field to False

disable_write_protection(**kwargs)

Set the value of the ‘write_protected’ field to False

enable_compression(**kwargs)

Set the value of the ‘compression_enabled’ field to True

enable_ssd(**kwargs)

Set the value of the ‘ssd_enabled’ field to True

enable_write_protection(**kwargs)

Set the value of the ‘write_protected’ field to True

get_all_metadata()
Returns:Dictionary of all keys and values associated as metadata for this object
get_allocated(**kwargs)

Obtains the value of the ‘allocated’ field

Returns:Capacity
get_atime_granularity(**kwargs)

Obtains the value of the ‘atime_granularity’ field

Returns:int
get_atime_mode(**kwargs)

Obtains the value of the ‘atime_mode’ field

Returns:str
get_capacity_savings(**kwargs)

Obtains the value of the ‘capacity_savings’ field

Returns:Capacity
get_children(**kwargs)

Retrieves all child entities for this entity (either clones or snapshots)

get_created_at(**kwargs)

Obtains the value of the ‘created_at’ field

Returns:Arrow
classmethod get_creation_defaults()

Returns a dict representing the default arguments as implicitly constructed by infinisdk to fulfill a create call

Note

This will cause generation of defaults, which will have side effects if they are special values

Note

This does not necessarily generate all fields that are passable into create, only mandatory ‘fields

get_creation_time()

Retrieves creation time for this entity

get_data_snapshot_guid(**kwargs)

Obtains the value of the ‘data_snapshot_guid’ field

Returns:str
get_dataset_type(**kwargs)

Obtains the value of the ‘dataset_type’ field

Returns:str
get_depth(**kwargs)

Obtains the value of the ‘depth’ field

Returns:int
get_family_id(**kwargs)

Obtains the value of the ‘family_id’ field

Returns:int
get_field(field_name, from_cache=<DONT_CARE>, fetch_if_not_cached=True, raw_value=False)

Gets the value of a single field from the system

Parameters:
  • cache – Attempt to use the last cached version of the field value
  • fetch_if_not_cached – Pass False to force only from cache
get_fields(field_names=(), from_cache=<DONT_CARE>, fetch_if_not_cached=True, raw_value=False)

Gets a set of fields from the system

Parameters:
  • from_cache – Attempt to fetch the fields from the cache
  • fetch_if_not_cached – pass as False to force only from cache
Returns:

a dictionary of field names to their values

get_id(**kwargs)

Obtains the value of the ‘id’ field

Returns:int
get_lock_expires_at(**kwargs)

Obtains the value of the ‘lock_expires_at’ field

Returns:Arrow
get_lock_state(**kwargs)

Obtains the value of the ‘lock_state’ field

Returns:str
get_metadata_value(key, default=<NOTHING>)

Gets a metadata value, optionally specifying a default

Parameters:default – if specified, the value to retrieve if the metadata key doesn’t exist. if not specified, and the key does not exist, the operation will raise an exception
get_name(**kwargs)

Obtains the value of the ‘name’ field

Returns:str
get_num_blocks(**kwargs)

Obtains the value of the ‘num_blocks’ field

Returns:int
get_parent(**kwargs)

Obtains the value of the ‘parent’ field

Returns:infinisdk.infinibox.filesystem.Filesystem object
get_pool(**kwargs)

Obtains the value of the ‘pool’ field

Returns:infinisdk.infinibox.pool.Pool object
get_pool_name(**kwargs)

Obtains the value of the ‘pool_name’ field

Returns:str
get_provisioning(**kwargs)

Obtains the value of the ‘provisioning’ field

Returns:str
get_qos_policy(**kwargs)

Obtains the value of the ‘qos_policy’ field

Returns:infinisdk.infinibox.qos_policy.QosPolicy object
get_qos_shared_policy(**kwargs)

Obtains the value of the ‘qos_shared_policy’ field

Returns:infinisdk.infinibox.qos_policy.QosPolicy object
get_replica_ids(**kwargs)

Obtains the value of the ‘replica_ids’ field

Returns:list
get_replication_types(**kwargs)

Obtains the value of the ‘replication_types’ field

Returns:list
get_rmr_snapshot_guid(**kwargs)

Obtains the value of the ‘rmr_snapshot_guid’ field

Returns:str
get_security_style(**kwargs)

Obtains the value of the ‘security_style’ field

Returns:str
get_size(**kwargs)

Obtains the value of the ‘size’ field

Returns:Capacity
get_snapdir_name(**kwargs)

Obtains the value of the ‘snapdir_name’ field

Returns:str
get_snapshot_expires_at(**kwargs)

Obtains the value of the ‘snapshot_expires_at’ field

Returns:int
get_snapshot_retention(**kwargs)

Obtains the value of the ‘snapshot_retention’ field

Returns:int
get_snapshots()

Retrieves all snapshot children of this entity

get_tenant(**kwargs)

Obtains the value of the ‘tenant’ field

Returns:infinisdk.infinibox.tenant.Tenant object
get_tree_allocated(**kwargs)

Obtains the value of the ‘tree_allocated’ field

Returns:Capacity
get_type(**kwargs)

Obtains the value of the ‘type’ field

Returns:str
get_updated_at(**kwargs)

Obtains the value of the ‘updated_at’ field

Returns:Arrow
get_used_size(**kwargs)

Obtains the value of the ‘used_size’ field

Returns:Capacity
has_children()

Returns whether or not this entity has children

invalidate_cache(*field_names)

Discards the cached field values of this object, causing the next fetch to retrieve the fresh value from the system

is_compression_enabled(**kwargs)

Obtains the value of the ‘compression_enabled’ field

Returns:bool
is_compression_suppressed(**kwargs)

Obtains the value of the ‘compression_suppressed’ field

Returns:bool
is_established(**kwargs)

Obtains the value of the ‘established’ field

Returns:bool
is_in_system()

Returns whether or not the object actually exists

is_mapped(**kwargs)

Obtains the value of the ‘mapped’ field

Returns:bool
is_master()

Returns whether or not this entity is a master entity (not a snapshot and not a clone)

is_replicated(from_cache=<DONT_CARE>)

Returns True if this volume is a part of a replica, whether as source or as target

is_rmr_active_active_peer(**kwargs)

Obtains the value of the ‘rmr_active_active_peer’ field

Returns:bool
is_rmr_source(**kwargs)

Obtains the value of the ‘rmr_source’ field

Returns:bool
is_rmr_target(**kwargs)

Obtains the value of the ‘rmr_target’ field

Returns:bool
is_snapdir_accessible(**kwargs)

Obtains the value of the ‘snapdir_accessible’ field

Returns:bool
is_snapshot()

Returns whether or not this entity is a snapshot

is_ssd_enabled(**kwargs)

Obtains the value of the ‘ssd_enabled’ field

Returns:bool
is_visible_in_snapdir(**kwargs)

Obtains the value of the ‘visible_in_snapdir’ field

Returns:bool
is_write_protected(**kwargs)

Obtains the value of the ‘write_protected’ field

Returns:bool
move_pool(target_pool, with_capacity=False)

Moves this entity to a new pool, optionally along with its needed capacity

refresh_snapshot(force_if_replicated_on_target=<OMIT>)

Refresh a snapshot with the most recent data from the parent :param force_if_replicated_on_target: (Only required on some InfiniBox versions) allows the refresh operation to occur on a dataset that is currently a replication target.

resize(delta)

Resize the entity by the given delta

restore(snapshot)

Restores this entity from a given snapshot object

safe_delete(*args, **kwargs)

Tries to delete the object, doing nothing if the object cannot be found on the system

safe_get_field(field_name, default=<NOTHING>, **kwargs)

Like get_field(), only returns ‘default’ parameter if no result was found

set_metadata(key, value)

Sets metadata key in the system associated with this object

set_metadata_from_dict(data_dict)

Sets multiple metadata keys/values in the system associated with this object

unset_metadata(key)

Deletes a metadata key for this object

update_atime_granularity(value, **kwargs)

Updates the value of the ‘atime_granularity’ field

Parameters:value – The new atime_granularity value to be set (type: int)
update_compression_enabled

Updates the value of the ‘compression_enabled’ field

param value:The new compression_enabled value to be set (type: bool)
update_field(field_name, field_value)

Updates the value of a single field

update_fields(**update_dict)

Atomically updates a group of fields and respective values (given as a dictionary)

update_lock_expires_at(value, **kwargs)

Updates the value of the ‘lock_expires_at’ field

Parameters:value – The new lock_expires_at value to be set (type: Arrow)
update_name(value, **kwargs)

Updates the value of the ‘name’ field

Parameters:value – The new name value to be set (type: str)
update_provisioning(value, **kwargs)

Updates the value of the ‘provisioning’ field

Parameters:value – The new provisioning value to be set (type: str)
update_size(value, **kwargs)

Updates the value of the ‘size’ field

Parameters:value

The new size value to be set (type: Capacity)

update_ssd_enabled

Updates the value of the ‘ssd_enabled’ field

param value:The new ssd_enabled value to be set (type: bool)
update_write_protected

Updates the value of the ‘write_protected’ field

param value:The new write_protected value to be set (type: bool)

infinibox.exports

class infinisdk.infinibox.export.Export(system, initial_data)
disable(**kwargs)

Set the value of the ‘enabled’ field to False

disable_32bit_file_id(**kwargs)

Set the value of the ‘32bit_file_id’ field to False

disable_make_all_users_anonymous(**kwargs)

Set the value of the ‘make_all_users_anonymous’ field to False

disable_privileged_port(**kwargs)

Set the value of the ‘privileged_port’ field to False

disable_snapdir_visible(**kwargs)

Set the value of the ‘snapdir_visible’ field to False

enable(**kwargs)

Set the value of the ‘enabled’ field to True

enable_32bit_file_id(**kwargs)

Set the value of the ‘32bit_file_id’ field to True

enable_make_all_users_anonymous(**kwargs)

Set the value of the ‘make_all_users_anonymous’ field to True

enable_privileged_port(**kwargs)

Set the value of the ‘privileged_port’ field to True

enable_snapdir_visible(**kwargs)

Set the value of the ‘snapdir_visible’ field to True

get_anonymous_gid(**kwargs)

Obtains the value of the ‘anonymous_gid’ field

Returns:int
get_anonymous_uid(**kwargs)

Obtains the value of the ‘anonymous_uid’ field

Returns:int
get_created_at(**kwargs)

Obtains the value of the ‘created_at’ field

Returns:Arrow
get_export_path(**kwargs)

Obtains the value of the ‘export_path’ field

Returns:str
get_filesystem(**kwargs)

Obtains the value of the ‘filesystem’ field

Returns:int
get_id(**kwargs)

Obtains the value of the ‘id’ field

Returns:int
get_inner_path(**kwargs)

Obtains the value of the ‘inner_path’ field

Returns:str
get_max_read(**kwargs)

Obtains the value of the ‘max_read’ field

Returns:Capacity
get_max_write(**kwargs)

Obtains the value of the ‘max_write’ field

Returns:Capacity
get_permissions(**kwargs)

Obtains the value of the ‘permissions’ field

Returns:list
get_pref_read(**kwargs)

Obtains the value of the ‘pref_read’ field

Returns:Capacity
get_pref_readdir(**kwargs)

Obtains the value of the ‘pref_readdir’ field

Returns:Capacity
get_pref_write(**kwargs)

Obtains the value of the ‘pref_write’ field

Returns:Capacity
get_tenant(**kwargs)

Obtains the value of the ‘tenant’ field

Returns:infinisdk.infinibox.tenant.Tenant object
get_transport_protocols(**kwargs)

Obtains the value of the ‘transport_protocols’ field

Returns:str
get_updated_at(**kwargs)

Obtains the value of the ‘updated_at’ field

Returns:Arrow
is_32bit_file_id(**kwargs)

Obtains the value of the ‘32bit_file_id’ field

Returns:bool
is_enabled(**kwargs)

Obtains the value of the ‘enabled’ field

Returns:bool
is_make_all_users_anonymous(**kwargs)

Obtains the value of the ‘make_all_users_anonymous’ field

Returns:bool
is_privileged_port(**kwargs)

Obtains the value of the ‘privileged_port’ field

Returns:bool
is_snapdir_visible(**kwargs)

Obtains the value of the ‘snapdir_visible’ field

Returns:bool
update_32bit_file_id

Updates the value of the ‘32bit_file_id’ field

param value:The new 32bit_file_id value to be set (type: bool)
update_anonymous_gid(value, **kwargs)

Updates the value of the ‘anonymous_gid’ field

Parameters:value – The new anonymous_gid value to be set (type: int)
update_anonymous_uid(value, **kwargs)

Updates the value of the ‘anonymous_uid’ field

Parameters:value – The new anonymous_uid value to be set (type: int)
update_enabled

Updates the value of the ‘enabled’ field

param value:The new enabled value to be set (type: bool)
update_make_all_users_anonymous

Updates the value of the ‘make_all_users_anonymous’ field

param value:The new make_all_users_anonymous value to be set (type: bool)
update_max_read(value, **kwargs)

Updates the value of the ‘max_read’ field

Parameters:value

The new max_read value to be set (type: Capacity)

update_max_write(value, **kwargs)

Updates the value of the ‘max_write’ field

Parameters:value

The new max_write value to be set (type: Capacity)

update_permissions(value, **kwargs)

Updates the value of the ‘permissions’ field

Parameters:value – The new permissions value to be set (type: list)
update_pref_read(value, **kwargs)

Updates the value of the ‘pref_read’ field

Parameters:value

The new pref_read value to be set (type: Capacity)

update_pref_readdir(value, **kwargs)

Updates the value of the ‘pref_readdir’ field

Parameters:value

The new pref_readdir value to be set (type: Capacity)

update_pref_write(value, **kwargs)

Updates the value of the ‘pref_write’ field

Parameters:value

The new pref_write value to be set (type: Capacity)

update_privileged_port

Updates the value of the ‘privileged_port’ field

param value:The new privileged_port value to be set (type: bool)
update_snapdir_visible

Updates the value of the ‘snapdir_visible’ field

param value:The new snapdir_visible value to be set (type: bool)
update_transport_protocols(value, **kwargs)

Updates the value of the ‘transport_protocols’ field

Parameters:value – The new transport_protocols value to be set (type: str)

infinibox.shares

class infinisdk.infinibox.share.Share(system, initial_data)
disable(**kwargs)

Set the value of the ‘enabled’ field to False

disable_access_based_enumeration(**kwargs)

Set the value of the ‘access_based_enumeration’ field to False

disable_require_encryption(**kwargs)

Set the value of the ‘require_encryption’ field to False

disable_snapdir_visible(**kwargs)

Set the value of the ‘snapdir_visible’ field to False

enable(**kwargs)

Set the value of the ‘enabled’ field to True

enable_access_based_enumeration(**kwargs)

Set the value of the ‘access_based_enumeration’ field to True

enable_require_encryption(**kwargs)

Set the value of the ‘require_encryption’ field to True

enable_snapdir_visible(**kwargs)

Set the value of the ‘snapdir_visible’ field to True

get_created_at(**kwargs)

Obtains the value of the ‘created_at’ field

Returns:Arrow
get_default_file_unix_permissions(**kwargs)

Obtains the value of the ‘default_file_unix_permissions’ field

Returns:str
get_default_folder_unix_permissions(**kwargs)

Obtains the value of the ‘default_folder_unix_permissions’ field

Returns:str
get_description(**kwargs)

Obtains the value of the ‘description’ field

Returns:str
get_filesystem(**kwargs)

Obtains the value of the ‘filesystem’ field

Returns:infinisdk.infinibox.filesystem.Filesystem object
get_id(**kwargs)

Obtains the value of the ‘id’ field

Returns:int
get_inner_path(**kwargs)

Obtains the value of the ‘inner_path’ field

Returns:str
get_name(**kwargs)

Obtains the value of the ‘name’ field

Returns:str
get_offline_caching(**kwargs)

Obtains the value of the ‘offline_caching’ field

Returns:str
get_tenant(**kwargs)

Obtains the value of the ‘tenant’ field

Returns:infinisdk.infinibox.tenant.Tenant object
get_updated_at(**kwargs)

Obtains the value of the ‘updated_at’ field

Returns:Arrow
is_access_based_enumeration(**kwargs)

Obtains the value of the ‘access_based_enumeration’ field

Returns:bool
is_enabled(**kwargs)

Obtains the value of the ‘enabled’ field

Returns:bool
is_require_encryption(**kwargs)

Obtains the value of the ‘require_encryption’ field

Returns:bool
is_snapdir_visible(**kwargs)

Obtains the value of the ‘snapdir_visible’ field

Returns:bool
update_access_based_enumeration

Updates the value of the ‘access_based_enumeration’ field

param value:The new access_based_enumeration value to be set (type: bool)
update_default_file_unix_permissions(value, **kwargs)

Updates the value of the ‘default_file_unix_permissions’ field

Parameters:value – The new default_file_unix_permissions value to be set (type: str)
update_default_folder_unix_permissions(value, **kwargs)

Updates the value of the ‘default_folder_unix_permissions’ field

Parameters:value – The new default_folder_unix_permissions value to be set (type: str)
update_description(value, **kwargs)

Updates the value of the ‘description’ field

Parameters:value – The new description value to be set (type: str)
update_enabled

Updates the value of the ‘enabled’ field

param value:The new enabled value to be set (type: bool)
update_field(field_name, field_value)

Updates the value of a single field

update_offline_caching(value, **kwargs)

Updates the value of the ‘offline_caching’ field

Parameters:value – The new offline_caching value to be set (type: str)
update_require_encryption

Updates the value of the ‘require_encryption’ field

param value:The new require_encryption value to be set (type: bool)
update_snapdir_visible

Updates the value of the ‘snapdir_visible’ field

param value:The new snapdir_visible value to be set (type: bool)

infinibox.shares.permissions

class infinisdk.infinibox.share_permission.SharePermission(system, initial_data)
get_access(**kwargs)

Obtains the value of the ‘access’ field

Returns:str
get_id(**kwargs)

Obtains the value of the ‘id’ field

Returns:int
get_share(**kwargs)

Obtains the value of the ‘share’ field

Returns:infinisdk.infinibox.share.Share object
get_sid(**kwargs)

Obtains the value of the ‘sid’ field

Returns:str
update_access(value, **kwargs)

Updates the value of the ‘access’ field

Parameters:value – The new access value to be set (type: str)

infinibox.replication_groups

class infinisdk.infinibox.replication_group.ReplicationGroup(system, initial_data)
get_created_at(**kwargs)

Obtains the value of the ‘created_at’ field

Returns:Arrow
get_id(**kwargs)

Obtains the value of the ‘id’ field

Returns:int
get_members_count(**kwargs)

Obtains the value of the ‘members_count’ field

Returns:int
get_name(**kwargs)

Obtains the value of the ‘name’ field

Returns:str
get_pool(**kwargs)

Obtains the value of the ‘pool’ field

Returns:infinisdk.infinibox.pool.Pool object
get_updated_at(**kwargs)

Obtains the value of the ‘updated_at’ field

Returns:Arrow
get_uuid(**kwargs)

Obtains the value of the ‘uuid’ field

Returns:str
is_replicated(**kwargs)

Obtains the value of the ‘replicated’ field

Returns:bool
update_name(value, **kwargs)

Updates the value of the ‘name’ field

Parameters:value – The new name value to be set (type: str)

infinibox.rg_replicas

class infinisdk.infinibox.rg_replica.RgReplica(system, initial_data)
get_base_action(**kwargs)

Obtains the value of the ‘base_action’ field

Returns:str
get_created_at(**kwargs)

Obtains the value of the ‘created_at’ field

Returns:Arrow
get_id(**kwargs)

Obtains the value of the ‘id’ field

Returns:int

Obtains the value of the ‘link’ field

Returns:infinisdk.infinibox.link.Link object

Obtains the value of the ‘local_link_guid’ field

Returns:str
get_pool(**kwargs)

Obtains the value of the ‘pool’ field

Returns:infinisdk.infinibox.pool.Pool object
get_remote_pool_id(**kwargs)

Obtains the value of the ‘remote_pool_id’ field

Returns:int
get_remote_replica_id(**kwargs)

Obtains the value of the ‘remote_replica_id’ field

Returns:int
get_remote_replication_group_id(**kwargs)

Obtains the value of the ‘remote_replication_group_id’ field

Returns:int
get_remote_replication_group_name(**kwargs)

Obtains the value of the ‘remote_replication_group_name’ field

Returns:str
get_replica_configuration_guid(**kwargs)

Obtains the value of the ‘replica_configuration_guid’ field

Returns:str
get_replication_group(**kwargs)

Obtains the value of the ‘replication_group’ field

Returns:infinisdk.infinibox.replication_group.ReplicationGroup object
get_replication_type(**kwargs)

Obtains the value of the ‘replication_type’ field

Returns:str
get_role(**kwargs)

Obtains the value of the ‘role’ field

Returns:str
get_rpo(**kwargs)

Obtains the value of the ‘rpo’ field

Returns:timedelta
get_state(**kwargs)

Obtains the value of the ‘state’ field

Returns:str
get_state_description(**kwargs)

Obtains the value of the ‘state_description’ field

Returns:str
get_state_reason(**kwargs)

Obtains the value of the ‘state_reason’ field

Returns:str
get_sync_interval(**kwargs)

Obtains the value of the ‘sync_interval’ field

Returns:timedelta
get_updated_at(**kwargs)

Obtains the value of the ‘updated_at’ field

Returns:Arrow
resume()

Resumes this rg_replica

suspend()

Suspends this rg_replica

sync()

Starts a sync job

update_rpo(value, **kwargs)

Updates the value of the ‘rpo’ field

Parameters:value – The new rpo value to be set (type: timedelta)
update_sync_interval(value, **kwargs)

Updates the value of the ‘sync_interval’ field

Parameters:value – The new sync_interval value to be set (type: timedelta)

infinibox.pools

infinibox.pools is of type PoolBinder described below.

class infinisdk.infinibox.pool.PoolBinder(object_type, system)

Implements system.pools

get_administered_pools()

Returns the pools that can be managed by the current user

class infinisdk.infinibox.pool.Pool(system, initial_data)
BINDER_CLASS

alias of PoolBinder

clear_metadata()

Deletes all metadata keys for this object

classmethod construct(system, data)

Template method to enable customizing the object instantiation process.

This enables system components to be cached rather than re-fetched every time

classmethod create(system, **fields)

Create a new pool

delete(**kwargs)

Deletes this object.

disable_compression(**kwargs)

Set the value of the ‘compression_enabled’ field to False

disable_ssd(**kwargs)

Set the value of the ‘ssd_enabled’ field to False

enable_compression(**kwargs)

Set the value of the ‘compression_enabled’ field to True

enable_ssd(**kwargs)

Set the value of the ‘ssd_enabled’ field to True

get_all_metadata()
Returns:Dictionary of all keys and values associated as metadata for this object
get_allocated_physical_capacity(**kwargs)

Obtains the value of the ‘allocated_physical_capacity’ field

Returns:Capacity
get_capacity_savings(**kwargs)

Obtains the value of the ‘capacity_savings’ field

Returns:Capacity
get_created_at(**kwargs)

Obtains the value of the ‘created_at’ field

Returns:Arrow
classmethod get_creation_defaults()

Returns a dict representing the default arguments as implicitly constructed by infinisdk to fulfill a create call

Note

This will cause generation of defaults, which will have side effects if they are special values

Note

This does not necessarily generate all fields that are passable into create, only mandatory ‘fields

get_entities_count(**kwargs)

Obtains the value of the ‘entities_count’ field

Returns:int
get_field(field_name, from_cache=<DONT_CARE>, fetch_if_not_cached=True, raw_value=False)

Gets the value of a single field from the system

Parameters:
  • cache – Attempt to use the last cached version of the field value
  • fetch_if_not_cached – Pass False to force only from cache
get_fields(field_names=(), from_cache=<DONT_CARE>, fetch_if_not_cached=True, raw_value=False)

Gets a set of fields from the system

Parameters:
  • from_cache – Attempt to fetch the fields from the cache
  • fetch_if_not_cached – pass as False to force only from cache
Returns:

a dictionary of field names to their values

get_filesystem_snapshots_count(**kwargs)

Obtains the value of the ‘filesystem_snapshots_count’ field

Returns:int
get_filesystems_count(**kwargs)

Obtains the value of the ‘filesystems_count’ field

Returns:int
get_free_physical_capacity(**kwargs)

Obtains the value of the ‘free_physical_capacity’ field

Returns:Capacity
get_free_virtual_capacity(**kwargs)

Obtains the value of the ‘free_virtual_capacity’ field

Returns:Capacity
get_id(**kwargs)

Obtains the value of the ‘id’ field

Returns:int
get_max_extend(**kwargs)

Obtains the value of the ‘max_extend’ field

Returns:Capacity
get_metadata_value(key, default=<NOTHING>)

Gets a metadata value, optionally specifying a default

Parameters:default – if specified, the value to retrieve if the metadata key doesn’t exist. if not specified, and the key does not exist, the operation will raise an exception
get_name(**kwargs)

Obtains the value of the ‘name’ field

Returns:str
get_owners(**kwargs)

Obtains the value of the ‘owners’ field

Returns:list
get_physical_capacity(**kwargs)

Obtains the value of the ‘physical_capacity’ field

Returns:Capacity
get_physical_capacity_critical(**kwargs)

Obtains the value of the ‘physical_capacity_critical’ field

Returns:int
get_physical_capacity_warning(**kwargs)

Obtains the value of the ‘physical_capacity_warning’ field

Returns:int
get_qos_policies(**kwargs)

Obtains the value of the ‘qos_policies’ field

Returns:list
get_reserved_capacity(**kwargs)

Obtains the value of the ‘reserved_capacity’ field

Returns:Capacity
get_snapshots_count(**kwargs)

Obtains the value of the ‘snapshots_count’ field

Returns:int
get_standard_entities_count(**kwargs)

Obtains the value of the ‘standard_entities_count’ field

Returns:int
get_standard_filesystem_snapshots_count(**kwargs)

Obtains the value of the ‘standard_filesystem_snapshots_count’ field

Returns:int
get_standard_filesystems_count(**kwargs)

Obtains the value of the ‘standard_filesystems_count’ field

Returns:int
get_standard_snapshots_count(**kwargs)

Obtains the value of the ‘standard_snapshots_count’ field

Returns:int
get_standard_volumes_count(**kwargs)

Obtains the value of the ‘standard_volumes_count’ field

Returns:int
get_state(**kwargs)

Obtains the value of the ‘state’ field

Returns:str
get_tenant(**kwargs)

Obtains the value of the ‘tenant’ field

Returns:infinisdk.infinibox.tenant.Tenant object
get_type(**kwargs)

Obtains the value of the ‘type’ field

Returns:str
get_updated_at(**kwargs)

Obtains the value of the ‘updated_at’ field

Returns:Arrow
get_virtual_capacity(**kwargs)

Obtains the value of the ‘virtual_capacity’ field

Returns:Capacity
get_volumes_count(**kwargs)

Obtains the value of the ‘volumes_count’ field

Returns:int
get_vvol_entities_count(**kwargs)

Obtains the value of the ‘vvol_entities_count’ field

Returns:int
get_vvol_snapshots_count(**kwargs)

Obtains the value of the ‘vvol_snapshots_count’ field

Returns:int
get_vvol_volumes_count(**kwargs)

Obtains the value of the ‘vvol_volumes_count’ field

Returns:int
invalidate_cache(*field_names)

Discards the cached field values of this object, causing the next fetch to retrieve the fresh value from the system

is_compression_enabled(**kwargs)

Obtains the value of the ‘compression_enabled’ field

Returns:bool
is_in_system()

Returns whether or not the object actually exists

is_ssd_enabled(**kwargs)

Obtains the value of the ‘ssd_enabled’ field

Returns:bool
safe_delete(*args, **kwargs)

Tries to delete the object, doing nothing if the object cannot be found on the system

safe_get_field(field_name, default=<NOTHING>, **kwargs)

Like get_field(), only returns ‘default’ parameter if no result was found

set_metadata(key, value)

Sets metadata key in the system associated with this object

set_metadata_from_dict(data_dict)

Sets multiple metadata keys/values in the system associated with this object

set_owners(users)

sets the owners of this pool, replacing previous owners

unset_metadata(key)

Deletes a metadata key for this object

update_compression_enabled

Updates the value of the ‘compression_enabled’ field

param value:The new compression_enabled value to be set (type: bool)
update_field(field_name, field_value)

Updates the value of a single field

update_fields(**update_dict)

Atomically updates a group of fields and respective values (given as a dictionary)

update_max_extend(value, **kwargs)

Updates the value of the ‘max_extend’ field

Parameters:value

The new max_extend value to be set (type: Capacity)

update_name(value, **kwargs)

Updates the value of the ‘name’ field

Parameters:value – The new name value to be set (type: str)
update_physical_capacity(value, **kwargs)

Updates the value of the ‘physical_capacity’ field

Parameters:value

The new physical_capacity value to be set (type: Capacity)

update_physical_capacity_critical(value, **kwargs)

Updates the value of the ‘physical_capacity_critical’ field

Parameters:value – The new physical_capacity_critical value to be set (type: int)
update_physical_capacity_warning(value, **kwargs)

Updates the value of the ‘physical_capacity_warning’ field

Parameters:value – The new physical_capacity_warning value to be set (type: int)
update_ssd_enabled

Updates the value of the ‘ssd_enabled’ field

param value:The new ssd_enabled value to be set (type: bool)
update_virtual_capacity(value, **kwargs)

Updates the value of the ‘virtual_capacity’ field

Parameters:value

The new virtual_capacity value to be set (type: Capacity)

infinibox.hosts

infinibox.hosts is of type HostBinder described below.

class infinisdk.infinibox.host.HostBinder(object_type, system)

Implements system.hosts

choose(*predicates, **kw)

Chooses a random element out of those returned. Raises ObjectNotFound if none were returned

create(*args, **kwargs)

Creates an object on the system

find(*predicates, **kw)

Queries objects according to predicates. Can receive arguments in two possible forms:

  1. Direct keyword arguments, for filtering for equality:

    system.volumes.find(size=GiB)
    
  2. Complex predicates, using the comparators:

    system.volumes.find(system.volumes.fields.size > GiB)
    system.volumes.find(Q.name != 'some_name')
    
Returns:Lazy query result object.
get(*predicates, **kw)

Finds exactly one object matching criteria. Raises ObjectNotFound if not found, TooManyObjectsFound if more than one is found

get_by_id(id)

Obtains an object with a specific id

get_by_id_lazy(id)

Obtains an object with a specified id without checking if it exists or querying it on the way.

This is useful assuming the next operation is a further query/update on this object.

get_host_by_initiator_address(address)
Returns:a host object defined on a system having the specified FC address configured, None if none exists
get_host_id_by_initiator_address(address)
Returns:an id of a host object defined on a system having the specified FC address configured, None if none exists
get_mutable_fields()

Returns a list of all mutable fields for this object type

has_registered_initiator_address(address)
Returns:whether or not there exists a host object on the system with the specified FC address configured
safe_choose(*predicates, **kw)

Like choose, but returns None when not found

safe_get(*predicates, **kw)

Like get(), only returns None if no objects were found

safe_get_by_id(id)

Like get_by_id, only returning None if the object could not be found

sample(*predicates, **kw)

Chooses a random sample out of those returned. Raises ValueError if there are not enough items

to_list()

Returns the entire set of objects as a Python list

Caution

Queries are lazy by default to avoid heavy API calls and repetitive page requests. Using to_list will forcibly iterate and fetch all objects, which might be a very big collection. This can cause issues like slowness and memory exhaustion

Individual host objects are of type Host:

class infinisdk.infinibox.host.Host(system, initial_data)
BINDER_CLASS

alias of HostBinder

add_port(address)

Adds a port address to this host

Parameters:address (Either an infi.dtypes.wwn.WWN or infi.dtypes.iqn.iSCSIName. Plain strings are assumed to be WWNs) – the port address to add
clear_metadata()

Deletes all metadata keys for this object

classmethod construct(system, data)

Template method to enable customizing the object instantiation process.

This enables system components to be cached rather than re-fetched every time

classmethod create(system, **fields)

Creates a new object of this type

delete(**kwargs)

Deletes this object.

disable_optimized(**kwargs)

Set the value of the ‘optimized’ field to False

enable_optimized(**kwargs)

Set the value of the ‘optimized’ field to True

get_all_metadata()
Returns:Dictionary of all keys and values associated as metadata for this object
get_cluster(**kwargs)

Obtains the value of the ‘cluster’ field

Returns:infinisdk.infinibox.host_cluster.HostCluster object
get_created_at(**kwargs)

Obtains the value of the ‘created_at’ field

Returns:Arrow
classmethod get_creation_defaults()

Returns a dict representing the default arguments as implicitly constructed by infinisdk to fulfill a create call

Note

This will cause generation of defaults, which will have side effects if they are special values

Note

This does not necessarily generate all fields that are passable into create, only mandatory ‘fields

get_field(field_name, from_cache=<DONT_CARE>, fetch_if_not_cached=True, raw_value=False)

Gets the value of a single field from the system

Parameters:
  • cache – Attempt to use the last cached version of the field value
  • fetch_if_not_cached – Pass False to force only from cache
get_fields(field_names=(), from_cache=<DONT_CARE>, fetch_if_not_cached=True, raw_value=False)

Gets a set of fields from the system

Parameters:
  • from_cache – Attempt to fetch the fields from the cache
  • fetch_if_not_cached – pass as False to force only from cache
Returns:

a dictionary of field names to their values

get_host_type(**kwargs)

Obtains the value of the ‘host_type’ field

Returns:str
get_id(**kwargs)

Obtains the value of the ‘id’ field

Returns:int
get_luns(*args, **kwargs)

Returns all LUNs mapped to this object

Returns:A collection of LogicalUnit objects
get_metadata_value(key, default=<NOTHING>)

Gets a metadata value, optionally specifying a default

Parameters:default – if specified, the value to retrieve if the metadata key doesn’t exist. if not specified, and the key does not exist, the operation will raise an exception
get_name(**kwargs)

Obtains the value of the ‘name’ field

Returns:str
get_ports(**kwargs)

Obtains the value of the ‘ports’ field

Returns:list
get_san_client_type(**kwargs)

Obtains the value of the ‘san_client_type’ field

Returns:str
get_security_chap_inbound_username(**kwargs)

Obtains the value of the ‘security_chap_inbound_username’ field

Returns:str
get_security_chap_outbound_username(**kwargs)

Obtains the value of the ‘security_chap_outbound_username’ field

Returns:str
get_security_method(**kwargs)

Obtains the value of the ‘security_method’ field

Returns:str
get_subsystem_nqn(**kwargs)

Obtains the value of the ‘subsystem_nqn’ field

Returns:str
get_tenant(**kwargs)

Obtains the value of the ‘tenant’ field

Returns:infinisdk.infinibox.tenant.Tenant object
get_updated_at(**kwargs)

Obtains the value of the ‘updated_at’ field

Returns:Arrow
invalidate_cache(*field_names)

Discards the cached field values of this object, causing the next fetch to retrieve the fresh value from the system

is_in_system()

Returns whether or not the object actually exists

is_optimized(**kwargs)

Obtains the value of the ‘optimized’ field

Returns:bool
is_security_chap_has_inbound_secret(**kwargs)

Obtains the value of the ‘security_chap_has_inbound_secret’ field

Returns:bool
is_security_chap_has_outbound_secret(**kwargs)

Obtains the value of the ‘security_chap_has_outbound_secret’ field

Returns:bool
is_volume_mapped(volume)

Returns whether or not a given volume is mapped to this object

map_volume(volume, lun=None)

Maps a volume to this object, possibly specifying the logical unit number (LUN) to use

Returns:a LogicalUnit object representing the added LUN
remove_port(address)

Removes a port address to this host

safe_delete(*args, **kwargs)

Tries to delete the object, doing nothing if the object cannot be found on the system

safe_get_field(field_name, default=<NOTHING>, **kwargs)

Like get_field(), only returns ‘default’ parameter if no result was found

set_metadata(key, value)

Sets metadata key in the system associated with this object

set_metadata_from_dict(data_dict)

Sets multiple metadata keys/values in the system associated with this object

unmap_volume(volume=None, lun=None)

Unmaps a volume either by specifying the volume or the lun it occupies

unset_metadata(key)

Deletes a metadata key for this object

update_field(field_name, field_value)

Updates the value of a single field

update_fields(**update_dict)

Atomically updates a group of fields and respective values (given as a dictionary)

update_host_type(value, **kwargs)

Updates the value of the ‘host_type’ field

Parameters:value – The new host_type value to be set (type: str)
update_name(value, **kwargs)

Updates the value of the ‘name’ field

Parameters:value – The new name value to be set (type: str)
update_optimized

Updates the value of the ‘optimized’ field

param value:The new optimized value to be set (type: bool)
update_security_chap_inbound_secret(value, **kwargs)

Updates the value of the ‘security_chap_inbound_secret’ field

Parameters:value – The new security_chap_inbound_secret value to be set (type: str)
update_security_chap_inbound_username(value, **kwargs)

Updates the value of the ‘security_chap_inbound_username’ field

Parameters:value – The new security_chap_inbound_username value to be set (type: str)
update_security_chap_outbound_secret(value, **kwargs)

Updates the value of the ‘security_chap_outbound_secret’ field

Parameters:value – The new security_chap_outbound_secret value to be set (type: str)
update_security_chap_outbound_username(value, **kwargs)

Updates the value of the ‘security_chap_outbound_username’ field

Parameters:value – The new security_chap_outbound_username value to be set (type: str)
update_security_method(value, **kwargs)

Updates the value of the ‘security_method’ field

Parameters:value – The new security_method value to be set (type: str)

infinibox.clusters

class infinisdk.infinibox.host_cluster.HostCluster(system, initial_data)
get_created_at(**kwargs)

Obtains the value of the ‘created_at’ field

Returns:Arrow
get_host_type(**kwargs)

Obtains the value of the ‘host_type’ field

Returns:str
get_hosts(**kwargs)

Obtains the value of the ‘hosts’ field

Returns:list
get_id(**kwargs)

Obtains the value of the ‘id’ field

Returns:int
get_name(**kwargs)

Obtains the value of the ‘name’ field

Returns:str
get_san_client_type(**kwargs)

Obtains the value of the ‘san_client_type’ field

Returns:str
get_tenant(**kwargs)

Obtains the value of the ‘tenant’ field

Returns:infinisdk.infinibox.tenant.Tenant object
get_updated_at(**kwargs)

Obtains the value of the ‘updated_at’ field

Returns:Arrow
update_name(value, **kwargs)

Updates the value of the ‘name’ field

Parameters:value – The new name value to be set (type: str)

infinibox.replicas

class infinisdk.infinibox.replica.ReplicaBinder(object_type, system)

Implements system.replicas

replicate_cons_group(cg, remote_cg=None, remote_pool=<OMIT>, **kw)

Convenience wrapper around ReplicaBinder.replicate_entity()

Seealso:replicate_entity()
replicate_entity(entity, link, remote_pool=None, remote_entity=None, **kw)

Replicates a entity or CG, creating its remote replica on the specified pool

Parameters:
  • remote_pool – if omitted, remote_entity must be specified. Otherwise, means creating target entity
  • remote_entity – if omitted, remote_pool must be specified. Otherwise, means creating based on existing entity on target
  • member_mappings – required if remote_entity is specified and is a consistency group. This parameter is a dictionary mapping local member entities to remote ones
replicate_entity_create_target(entity, link, remote_pool=<OMIT>, remote_entity_names=<OMIT>, **kw)

Replicates an entity, creating its remote replica on the specified pool

Parameters:
  • remote_pool – Remote pool to use for entity creation on the remote side
  • remote_entity_names – A list or tuple containing the entity names created on remote side. In case of cg - controls the entity names, not the cg name.
replicate_entity_existing_target(entity, link, remote_entity, member_mappings=None, **kw)

Replicates an entity, using a formatted/empty entity on the other side

Parameters:
  • remote_entity – Remote entity to use for replication
  • member_mappings – required if remote_entity is specified and is a consistency group. This parameter is a dictionary mapping local member entities to remote ones
replicate_entity_take_snap(entity, link, remote_entity, member_mappings=None, **kw)

Replicates a entity, using the currently found data on both sides as a reference.

Parameters:
  • entity – Local entity to use
  • remote_entity – Remote entity to use
  • member_mappings – required if remote_entity is specified and is a consistency group. This parameter is a dictionary mapping local member entities to tuples of (entity, remote_entity)
replicate_entity_use_base(entity, link, local_snapshot, remote_snapshot, member_mappings=None, **kw)

Replicates an entity, using an existing remote entity and a base snapshot on both sides

Parameters:
  • local_snapshot – Local base snapshot to use
  • remote_snapshot – Remote base snapshot to use
  • member_mappings – required if remote_entity is specified and is a consistency group. This parameter is a dictionary mapping local member entities to tuples of (local_snapshot, remote_snapshot)
replicate_volume(volume, remote_volume=None, **kw)

Convenience wrapper around ReplicaBinder.replicate_entity()

Seealso:replicate_entity()
class infinisdk.infinibox.replica.Replica(system, initial_data)
BINDER_CLASS

alias of ReplicaBinder

change_role(entity_pairs=<OMIT>)

Changes the role of this replica from source to target or vice-versa

change_type_to_async(params=None)

Changes the replication type to ASYNC

Parameters:params – Optional dictionary containing additional parameters for the type change
change_type_to_sync(params=None)

Changes the replication type to SYNC

Parameters:params – Optional dictionary containing additional parameters for the type change
delete(retain_staging_area=<OMIT>, force_if_remote_error=<OMIT>, force_on_target=<OMIT>, force_if_no_remote_credentials=<OMIT>, force_on_local=<OMIT>, keep_serial_on_local=<OMIT>)

Deletes this replica

disable_preferred(**kwargs)

Set the value of the ‘preferred’ field to False

enable_preferred(**kwargs)

Set the value of the ‘preferred’ field to True

get_assigned_sync_remote_ips(**kwargs)

Obtains the value of the ‘assigned_sync_remote_ips’ field

Returns:list
get_base_action(**kwargs)

Obtains the value of the ‘base_action’ field

Returns:str
get_created_at(**kwargs)

Obtains the value of the ‘created_at’ field

Returns:Arrow
get_description(**kwargs)

Obtains the value of the ‘description’ field

Returns:str
get_entity_pairs(**kwargs)

Obtains the value of the ‘entity_pairs’ field

Returns:list
get_entity_type(**kwargs)

Obtains the value of the ‘entity_type’ field

Returns:str
get_id(**kwargs)

Obtains the value of the ‘id’ field

Returns:int
get_job_state(**kwargs)

Obtains the value of the ‘job_state’ field

Returns:str
get_jobs(**kwargs)

Obtains the value of the ‘jobs’ field

Returns:list
get_last_replicated_guid(**kwargs)

Obtains the value of the ‘last_replicated_guid’ field

Returns:str
get_last_synchronized(**kwargs)

Obtains the value of the ‘last_synchronized’ field

Returns:Arrow
get_latency(**kwargs)

Obtains the value of the ‘latency’ field

Returns:int

Obtains the value of the ‘link’ field

Returns:infinisdk.infinibox.link.Link object
get_local_cg()

Returns the local cg, assuming this is a consistency group replica

get_local_cg_id(**kwargs)

Obtains the value of the ‘local_cg_id’ field

Returns:int
get_local_cg_name(**kwargs)

Obtains the value of the ‘local_cg_name’ field

Returns:str
get_local_data_entities()

Returns all local volumes, whether as part of a consistency group, filesystem or a single volume

get_local_entity()

Returns the local entity used for replication, be it a volume, filesystem or a consistency group

get_local_entity_name(**kwargs)

Obtains the value of the ‘local_entity_name’ field

Returns:str
get_local_filesystem()

Returns the local volume, assuming there is exactly one

get_local_pool_id(**kwargs)

Obtains the value of the ‘local_pool_id’ field

Returns:int
get_local_pool_name(**kwargs)

Obtains the value of the ‘local_pool_name’ field

Returns:str
get_local_volume()

Returns the local volume, assuming there is exactly one

get_lock_remote_snapshot_retention(**kwargs)

Obtains the value of the ‘lock_remote_snapshot_retention’ field

Returns:timedelta
get_next_job_start_time(**kwargs)

Obtains the value of the ‘next_job_start_time’ field

Returns:Arrow
get_next_restore_point(**kwargs)

Obtains the value of the ‘next_restore_point’ field

Returns:Arrow
get_pending_job_count(**kwargs)

Obtains the value of the ‘pending_job_count’ field

Returns:int
get_permanent_failure_wait_interval(**kwargs)

Obtains the value of the ‘permanent_failure_wait_interval’ field

Returns:timedelta
get_progress(**kwargs)

Obtains the value of the ‘progress’ field

Returns:int
get_remote_cg_id(**kwargs)

Obtains the value of the ‘remote_cg_id’ field

Returns:int
get_remote_cg_name(**kwargs)

Obtains the value of the ‘remote_cg_name’ field

Returns:str
get_remote_data_entities(from_cache=False)

Returns all local volumes, whether as part of a consistency group, filesystem or a single volume

get_remote_entity(from_cache=False, safe=False)

Fetches the remote replicated entity if available

get_remote_entity_name(**kwargs)

Obtains the value of the ‘remote_entity_name’ field

Returns:str
get_remote_entity_pairs()

Returns the entity_pairs configuration as held by the remote replica

Note

this uses the remote command execution API to run the command over the inter-system link

get_remote_pool_id(**kwargs)

Obtains the value of the ‘remote_pool_id’ field

Returns:int
get_remote_pool_name(**kwargs)

Obtains the value of the ‘remote_pool_name’ field

Returns:str
get_remote_replica(from_cache=False, safe=False)

Get the corresponding replica object in the remote machine. For this to work, the SDK user should call the register_related_system method of the Infinibox object when a link to a remote system is constructed for the first time

get_remote_replica_id(**kwargs)

Obtains the value of the ‘remote_replica_id’ field

Returns:int
get_remote_snapshot_suffix(**kwargs)

Obtains the value of the ‘remote_snapshot_suffix’ field

Returns:str
get_replication_type(**kwargs)

Obtains the value of the ‘replication_type’ field

Returns:str
get_restore_point(**kwargs)

Obtains the value of the ‘restore_point’ field

Returns:Arrow
get_role(**kwargs)

Obtains the value of the ‘role’ field

Returns:str
get_rpo(**kwargs)

Obtains the value of the ‘rpo’ field

Returns:timedelta
get_rpo_state(**kwargs)

Obtains the value of the ‘rpo_state’ field

Returns:str
get_rpo_type(**kwargs)

Obtains the value of the ‘rpo_type’ field

Returns:str
get_snapshots_retention(**kwargs)

Obtains the value of the ‘snapshots_retention’ field

Returns:int
get_staging_area_allocated_size(**kwargs)

Obtains the value of the ‘staging_area_allocated_size’ field

Returns:Capacity
get_started_at(**kwargs)

Obtains the value of the ‘started_at’ field

Returns:Arrow
get_state(**kwargs)

Obtains the value of the ‘state’ field

Returns:str
get_state_description(**kwargs)

Obtains the value of the ‘state_description’ field

Returns:str
get_state_reason(**kwargs)

Obtains the value of the ‘state_reason’ field

Returns:str
get_sync_duration(**kwargs)

Obtains the value of the ‘sync_duration’ field

Returns:int
get_sync_interval(**kwargs)

Obtains the value of the ‘sync_interval’ field

Returns:timedelta
get_sync_state(**kwargs)

Obtains the value of the ‘sync_state’ field

Returns:str
get_temporary_failure_retry_count(**kwargs)

Obtains the value of the ‘temporary_failure_retry_count’ field

Returns:int
get_temporary_failure_retry_interval(**kwargs)

Obtains the value of the ‘temporary_failure_retry_interval’ field

Returns:timedelta
get_throughput(**kwargs)

Obtains the value of the ‘throughput’ field

Returns:int
get_updated_at(**kwargs)

Obtains the value of the ‘updated_at’ field

Returns:Arrow
is_active(**kwargs)

Returns whether or not the replica is currently active

is_async_mode(**kwargs)

Obtains the value of the ‘async_mode’ field

Returns:bool
is_auto_suspended(**kwargs)

Returns whether or not this replica is in auto_suspended state

is_concurrent_replica(**kwargs)

Obtains the value of the ‘concurrent_replica’ field

Returns:bool
is_consistency_group()

Returns whether this replica is configured with a consistency group as a local entity

is_domino(**kwargs)

Obtains the value of the ‘domino’ field

Returns:bool
is_filesystem()

Returns True if this replica replicates a single filesystem entity

is_idle(**kwargs)

Returns whether or not this replica is in idle state

is_including_snapshots(**kwargs)

Obtains the value of the ‘including_snapshots’ field

Returns:bool
is_initial(**kwargs)

Obtains the value of the ‘initial’ field

Returns:bool
is_initial_replication(**kwargs)

Returns whether or not this replica is in initiating state

is_initializing()

Returns True if the replica sync state is ‘INITIALIZING’

is_initializing_pending()

Returns True if the replica sync state is ‘INITIALIZING_PENDING’

is_out_of_sync()

Returns True if the replica sync state is ‘OUT_OF_SYNC’

is_pending(**kwargs)

Returns whether or not this replication is waiting to start initializing

is_preferred(**kwargs)

Obtains the value of the ‘preferred’ field

Returns:bool
is_replicating(**kwargs)

Returns whether or not this replica is in replicating state

is_source(*args, **kwargs)

A predicate returning whether or not the replica is currently in the “source” role

is_suspended(**kwargs)

Returns whether or not this replica is currently suspended

is_suspended_from_local(**kwargs)

Obtains the value of the ‘suspended_from_local’ field

Returns:bool
is_sync_in_progress()

Returns True if this replica sync state is ‘SYNC_IN_PROGRESS’

is_synchronized()

Returns True if this replica sync state is ‘SYNCHRONIZED’

is_target(*args, **kwargs)

A predicate returning whether or not the replica is currently in the “target” role

is_user_suspended(**kwargs)

Returns whether or not this replica is currently suspended due to a user request

is_volume()

Returns True if this replica replicates a single volume entity

resume()

Resumes this replica

suspend()

Suspends this replica

switch_role()

Switches replica role - sync replicas only

sync()

Starts a sync job

update_description(value, **kwargs)

Updates the value of the ‘description’ field

Parameters:value – The new description value to be set (type: str)
update_lock_remote_snapshot_retention(value, **kwargs)

Updates the value of the ‘lock_remote_snapshot_retention’ field

Parameters:value – The new lock_remote_snapshot_retention value to be set (type: timedelta)
update_permanent_failure_wait_interval(value, **kwargs)

Updates the value of the ‘permanent_failure_wait_interval’ field

Parameters:value – The new permanent_failure_wait_interval value to be set (type: timedelta)
update_preferred

Updates the value of the ‘preferred’ field

param value:The new preferred value to be set (type: bool)
update_remote_snapshot_suffix(value, **kwargs)

Updates the value of the ‘remote_snapshot_suffix’ field

Parameters:value – The new remote_snapshot_suffix value to be set (type: str)
update_rpo(value, **kwargs)

Updates the value of the ‘rpo’ field

Parameters:value – The new rpo value to be set (type: timedelta)
update_snapshots_retention(value, **kwargs)

Updates the value of the ‘snapshots_retention’ field

Parameters:value – The new snapshots_retention value to be set (type: int)
update_sync_interval(value, **kwargs)

Updates the value of the ‘sync_interval’ field

Parameters:value – The new sync_interval value to be set (type: timedelta)
update_temporary_failure_retry_count(value, **kwargs)

Updates the value of the ‘temporary_failure_retry_count’ field

Parameters:value – The new temporary_failure_retry_count value to be set (type: int)
update_temporary_failure_retry_interval(value, **kwargs)

Updates the value of the ‘temporary_failure_retry_interval’ field

Parameters:value – The new temporary_failure_retry_interval value to be set (type: timedelta)

infinibox.network_spaces

class infinisdk.infinibox.network_space.NetworkSpace(system, initial_data)
disable_automatic_ip_failback(**kwargs)

Set the value of the ‘automatic_ip_failback’ field to False

enable_automatic_ip_failback(**kwargs)

Set the value of the ‘automatic_ip_failback’ field to True

get_id(**kwargs)

Obtains the value of the ‘id’ field

Returns:int
get_interfaces(**kwargs)

Obtains the value of the ‘interfaces’ field

Returns:list
get_ips(**kwargs)

Obtains the value of the ‘ips’ field

Returns:list
get_mtu(**kwargs)

Obtains the value of the ‘mtu’ field

Returns:int
get_name(**kwargs)

Obtains the value of the ‘name’ field

Returns:str
get_network_config(**kwargs)

Obtains the value of the ‘network_config’ field

Returns:Munch
get_properties(**kwargs)

Obtains the value of the ‘properties’ field

Returns:Munch
get_rate_limit(**kwargs)

Obtains the value of the ‘rate_limit’ field

Returns:int
get_service(**kwargs)

Obtains the value of the ‘service’ field

Returns:str
get_tenant(**kwargs)

Obtains the value of the ‘tenant’ field

Returns:infinisdk.infinibox.tenant.Tenant object
is_automatic_ip_failback(**kwargs)

Obtains the value of the ‘automatic_ip_failback’ field

Returns:bool
update_automatic_ip_failback

Updates the value of the ‘automatic_ip_failback’ field

param value:The new automatic_ip_failback value to be set (type: bool)
update_interfaces(value, **kwargs)

Updates the value of the ‘interfaces’ field

Parameters:value – The new interfaces value to be set (type: list)
update_mtu(value, **kwargs)

Updates the value of the ‘mtu’ field

Parameters:value – The new mtu value to be set (type: int)
update_name(value, **kwargs)

Updates the value of the ‘name’ field

Parameters:value – The new name value to be set (type: str)
update_network_config(value, **kwargs)

Updates the value of the ‘network_config’ field

Parameters:value – The new network_config value to be set (type: Munch)
update_properties(value, **kwargs)

Updates the value of the ‘properties’ field

Parameters:value – The new properties value to be set (type: Munch)
update_rate_limit(value, **kwargs)

Updates the value of the ‘rate_limit’ field

Parameters:value – The new rate_limit value to be set (type: int)

infinibox.events

class infinisdk.core.events.Events(system)
class infinisdk.core.events.Event(system, initial_data)
BINDER_CLASS

alias of Events

get_affected_entity_id(**kwargs)

Obtains the value of the ‘affected_entity_id’ field

Returns:str
get_code(**kwargs)

Obtains the value of the ‘code’ field

Returns:str
get_description(**kwargs)

Obtains the value of the ‘description’ field

Returns:str
get_description_template(**kwargs)

Obtains the value of the ‘description_template’ field

Returns:str
get_id(**kwargs)

Obtains the value of the ‘id’ field

Returns:int
get_level(**kwargs)

Obtains the value of the ‘level’ field

Returns:str
get_reporter(**kwargs)

Obtains the value of the ‘reporter’ field

Returns:str
get_source_node_id(**kwargs)

Obtains the value of the ‘source_node_id’ field

Returns:int
get_system_version(**kwargs)

Obtains the value of the ‘system_version’ field

Returns:str
get_tenant(**kwargs)

Obtains the value of the ‘tenant’ field

Returns:infinisdk.infinibox.tenant.Tenant object
get_timestamp(**kwargs)

Obtains the value of the ‘timestamp’ field

Returns:Arrow
get_username(**kwargs)

Obtains the value of the ‘username’ field

Returns:str
get_visibility(**kwargs)

Obtains the value of the ‘visibility’ field

Returns:str
class infinisdk.infinibox.events.Events(system)

infinibox.users

class infinisdk.infinibox.user.User(system, initial_data)
BINDER_CLASS

alias of infinisdk.core.type_binder.TypeBinder

classmethod construct(system, data)

Template method to enable customizing the object instantiation process.

This enables system components to be cached rather than re-fetched every time

classmethod create(system, **fields)

Creates a new object of this type

delete(**kwargs)

Deletes this object.

disable(**kwargs)

Set the value of the ‘enabled’ field to False

enable(**kwargs)

Set the value of the ‘enabled’ field to True

classmethod get_creation_defaults()

Returns a dict representing the default arguments as implicitly constructed by infinisdk to fulfill a create call

Note

This will cause generation of defaults, which will have side effects if they are special values

Note

This does not necessarily generate all fields that are passable into create, only mandatory ‘fields

get_email(**kwargs)

Obtains the value of the ‘email’ field

Returns:str
get_field(field_name, from_cache=<DONT_CARE>, fetch_if_not_cached=True, raw_value=False)

Gets the value of a single field from the system

Parameters:
  • cache – Attempt to use the last cached version of the field value
  • fetch_if_not_cached – Pass False to force only from cache
get_fields(field_names=(), from_cache=<DONT_CARE>, fetch_if_not_cached=True, raw_value=False)

Gets a set of fields from the system

Parameters:
  • from_cache – Attempt to fetch the fields from the cache
  • fetch_if_not_cached – pass as False to force only from cache
Returns:

a dictionary of field names to their values

get_id(**kwargs)

Obtains the value of the ‘id’ field

Returns:int
get_name(**kwargs)

Obtains the value of the ‘name’ field

Returns:str
get_owned_pools()

Returns the pools that are owned by this user

get_password_digest_version(**kwargs)

Obtains the value of the ‘password_digest_version’ field

Returns:int
get_role(**kwargs)

Obtains the value of the ‘role’ field

Returns:str
get_roles(**kwargs)

Obtains the value of the ‘roles’ field

Returns:list
get_type(**kwargs)

Obtains the value of the ‘type’ field

Returns:str
invalidate_cache(*field_names)

Discards the cached field values of this object, causing the next fetch to retrieve the fresh value from the system

is_enabled(**kwargs)

Obtains the value of the ‘enabled’ field

Returns:bool
is_in_system()

Returns whether or not the object actually exists

is_is_digest_sufficient(**kwargs)

Obtains the value of the ‘is_digest_sufficient’ field

Returns:bool
safe_delete(*args, **kwargs)

Tries to delete the object, doing nothing if the object cannot be found on the system

safe_get_field(field_name, default=<NOTHING>, **kwargs)

Like get_field(), only returns ‘default’ parameter if no result was found

update_email(value, **kwargs)

Updates the value of the ‘email’ field

Parameters:value – The new email value to be set (type: str)
update_enabled

Updates the value of the ‘enabled’ field

param value:The new enabled value to be set (type: bool)
update_field(field_name, field_value)

Updates the value of a single field

update_fields(**update_dict)

Atomically updates a group of fields and respective values (given as a dictionary)

update_name(value, **kwargs)

Updates the value of the ‘name’ field

Parameters:value – The new name value to be set (type: str)
update_password(value, **kwargs)

Updates the value of the ‘password’ field

Parameters:value – The new password value to be set (type: str)
update_role(value, **kwargs)

Updates the value of the ‘role’ field

Parameters:value – The new role value to be set (type: str)
update_roles(value, **kwargs)

Updates the value of the ‘roles’ field

Parameters:value – The new roles value to be set (type: list)

infinibox.ldap_configs

class infinisdk.infinibox.ldap_config.LDAPConfigBinder(object_type, system)
define(*args, **kwargs)

Alias for .create

set_order(configs)

Reorders LDAP configurations’ priorities

class infinisdk.infinibox.ldap_config.LDAPConfig(system, initial_data)
BINDER_CLASS

alias of LDAPConfigBinder

create_group(name, dn, role)

Maps a specified group in the LDAP directory to a specified role in the system

get_id(**kwargs)

Obtains the value of the ‘id’ field

Returns:int
get_name(**kwargs)

Obtains the value of the ‘name’ field

Returns:str
modify(**kwargs)

Modifies the LDAP configuration

test()

Tests the LDAP configuration

update_name(value, **kwargs)

Updates the value of the ‘name’ field

Parameters:value – The new name value to be set (type: str)

infinibox.notification_targets

class infinisdk.infinibox.notification_target.NotificationTarget(system, initial_data)
disable_tls(**kwargs)

Set the value of the ‘tls’ field to False

enable_tls(**kwargs)

Set the value of the ‘tls’ field to True

get_auth_protocol(**kwargs)

Obtains the value of the ‘auth_protocol’ field

Returns:str
get_auth_type(**kwargs)

Obtains the value of the ‘auth_type’ field

Returns:str
get_community(**kwargs)

Obtains the value of the ‘community’ field

Returns:str
get_engine(**kwargs)

Obtains the value of the ‘engine’ field

Returns:str
get_facility(**kwargs)

Obtains the value of the ‘facility’ field

Returns:str
get_from_address(**kwargs)

Obtains the value of the ‘from_address’ field

Returns:str
get_host(**kwargs)

Obtains the value of the ‘host’ field

Returns:str
get_id(**kwargs)

Obtains the value of the ‘id’ field

Returns:int
get_name(**kwargs)

Obtains the value of the ‘name’ field

Returns:str
get_password(**kwargs)

Obtains the value of the ‘password’ field

Returns:str
get_port(**kwargs)

Obtains the value of the ‘port’ field

Returns:int
get_private_key(**kwargs)

Obtains the value of the ‘private_key’ field

Returns:str
get_private_protocol(**kwargs)

Obtains the value of the ‘private_protocol’ field

Returns:str
get_protocol(**kwargs)

Obtains the value of the ‘protocol’ field

Returns:str
get_transport(**kwargs)

Obtains the value of the ‘transport’ field

Returns:str
get_username(**kwargs)

Obtains the value of the ‘username’ field

Returns:str
get_version(**kwargs)

Obtains the value of the ‘version’ field

Returns:str
get_visibility(**kwargs)

Obtains the value of the ‘visibility’ field

Returns:str
is_tls(**kwargs)

Obtains the value of the ‘tls’ field

Returns:bool
test(recipients=None)

Tests the SMTP gateway, by sending a test email to one or several recipients

Parameters:recipients – Either a single email or a list of emails to send to (only for SMTP)
update_auth_protocol(value, **kwargs)

Updates the value of the ‘auth_protocol’ field

Parameters:value – The new auth_protocol value to be set (type: str)
update_auth_type(value, **kwargs)

Updates the value of the ‘auth_type’ field

Parameters:value – The new auth_type value to be set (type: str)
update_community(value, **kwargs)

Updates the value of the ‘community’ field

Parameters:value – The new community value to be set (type: str)
update_engine(value, **kwargs)

Updates the value of the ‘engine’ field

Parameters:value – The new engine value to be set (type: str)
update_facility(value, **kwargs)

Updates the value of the ‘facility’ field

Parameters:value – The new facility value to be set (type: str)
update_from_address(value, **kwargs)

Updates the value of the ‘from_address’ field

Parameters:value – The new from_address value to be set (type: str)
update_host(value, **kwargs)

Updates the value of the ‘host’ field

Parameters:value – The new host value to be set (type: str)
update_name(value, **kwargs)

Updates the value of the ‘name’ field

Parameters:value – The new name value to be set (type: str)
update_password(value, **kwargs)

Updates the value of the ‘password’ field

Parameters:value – The new password value to be set (type: str)
update_port(value, **kwargs)

Updates the value of the ‘port’ field

Parameters:value – The new port value to be set (type: int)
update_private_key(value, **kwargs)

Updates the value of the ‘private_key’ field

Parameters:value – The new private_key value to be set (type: str)
update_private_protocol(value, **kwargs)

Updates the value of the ‘private_protocol’ field

Parameters:value – The new private_protocol value to be set (type: str)
update_tls

Updates the value of the ‘tls’ field

param value:The new tls value to be set (type: bool)
update_transport(value, **kwargs)

Updates the value of the ‘transport’ field

Parameters:value – The new transport value to be set (type: str)
update_username(value, **kwargs)

Updates the value of the ‘username’ field

Parameters:value – The new username value to be set (type: str)
update_version(value, **kwargs)

Updates the value of the ‘version’ field

Parameters:value – The new version value to be set (type: str)
update_visibility(value, **kwargs)

Updates the value of the ‘visibility’ field

Parameters:value – The new visibility value to be set (type: str)

infinibox.cons_groups

class infinisdk.infinibox.cons_group.ConsGroup(system, initial_data)
add_member(member, **kwargs)

Adds a member data entity to this consistency group

Parameters:remote_entity – Assuming this CG is currently being replicated, specifies the remote entity for the member replication
create_snapgroup(name=None, prefix=None, suffix=None, lock_expires_at=None)

Create a snapshot group out of the consistency group.

create_snapshot(name=None, prefix=None, suffix=None, lock_expires_at=None)

Create a snapshot group out of the consistency group.

delete(delete_members=<OMIT>, force_if_snapshot_locked=<OMIT>)

Deletes the consistency group

Parameters:delete_members – if True, deletes the member datasets as well as the group itself
get_created_at(**kwargs)

Obtains the value of the ‘created_at’ field

Returns:Arrow
get_id(**kwargs)

Obtains the value of the ‘id’ field

Returns:int
get_lock_expires_at(**kwargs)

Obtains the value of the ‘lock_expires_at’ field

Returns:Arrow
get_lock_state(**kwargs)

Obtains the value of the ‘lock_state’ field

Returns:str
get_members(**kwargs)

Retrieves a lazy query for the consistency group’s member datasets

Note

in many cases you should prefer to collect the result of this method as a list using to_list(): .. code-block:: python

member_list = cg.get_members().to_list()
Parameters:kwargs – Optional parameter containing filterable fields of cg member for filtering the members returned
get_members_count(**kwargs)

Obtains the value of the ‘members_count’ field

Returns:int
get_name(**kwargs)

Obtains the value of the ‘name’ field

Returns:str
get_parent(**kwargs)

Obtains the value of the ‘parent’ field

Returns:infinisdk.infinibox.cons_group.ConsGroup object
get_pool(**kwargs)

Obtains the value of the ‘pool’ field

Returns:infinisdk.infinibox.pool.Pool object
get_pool_name(**kwargs)

Obtains the value of the ‘pool_name’ field

Returns:str
get_replication_types(**kwargs)

Obtains the value of the ‘replication_types’ field

Returns:list
get_rmr_snapshot_guid(**kwargs)

Obtains the value of the ‘rmr_snapshot_guid’ field

Returns:str
get_tenant(**kwargs)

Obtains the value of the ‘tenant’ field

Returns:infinisdk.infinibox.tenant.Tenant object
get_type(**kwargs)

Obtains the value of the ‘type’ field

Returns:str
get_updated_at(**kwargs)

Obtains the value of the ‘updated_at’ field

Returns:Arrow
is_replicated(**kwargs)

Obtains the value of the ‘replicated’ field

Returns:bool
is_snapgroup()

Checks if this is a snapshot group (as opposed to consistency group)

move_pool(target_pool, with_capacity=False)

Moves this entity to a new pool, optionally along with its needed capacity

refresh_snapgroup()

Refresh a snapshot group with the most recent data from the parent consistency group

refresh_snapshot()

Refresh a snapshot group with the most recent data from the parent consistency group

remove_member(member, retain_staging_area=False, create_replica=False, replica_name=<OMIT>, force_if_no_remote_credentials=False, force_if_remote_error=False, force_on_target=False, force_on_local=<OMIT>, keep_serial_on_local=<OMIT>)

Removes a volume member from this consistency group

restore(snap_group)

Restores this consistency group from the specified sg

update_lock_expires_at(value, **kwargs)

Updates the value of the ‘lock_expires_at’ field

Parameters:value – The new lock_expires_at value to be set (type: Arrow)
update_name(value, **kwargs)

Updates the value of the ‘name’ field

Parameters:value – The new name value to be set (type: str)

infinibox.components

class infinisdk.infinibox.components.InfiniBoxSystemComponents(system)
find(*predicates, **kw)

Queries objects according to predicates. Can receive arguments in two possible forms:

  1. Direct keyword arguments, for filtering for equality:

    system.volumes.find(size=GiB)
    
  2. Complex predicates, using the comparators:

    system.volumes.find(system.volumes.fields.size > GiB)
    system.volumes.find(Q.name != 'some_name')
    
Returns:Lazy query result object.
class infinisdk.infinibox.components.Nodes(object_type, system)
class infinisdk.infinibox.components.Node(system, initial_data)
BINDER_CLASS

alias of Nodes

get_api_id(**kwargs)

Obtains the value of the ‘api_id’ field

Returns:int
get_core_service()

Gets the core service running on this node

get_drives(**kwargs)

Obtains the value of the ‘drives’ field

Returns:list
get_eth_ports(**kwargs)

Obtains the value of the ‘eth_ports’ field

Returns:list
get_fc_ports(**kwargs)

Obtains the value of the ‘fc_ports’ field

Returns:list
get_ib_ports(**kwargs)

Obtains the value of the ‘ib_ports’ field

Returns:list
get_index(**kwargs)

Obtains the value of the ‘index’ field

Returns:int
get_management_service()

Gets the management service running on this node

get_model(**kwargs)

Obtains the value of the ‘model’ field

Returns:str
get_name(**kwargs)

Obtains the value of the ‘name’ field

Returns:str
get_security(**kwargs)

Obtains the value of the ‘security’ field

Returns:Munch
get_service(service_name)

Get a service object by its type name

Parameters:service_name – the service name (mgmt/core/etc.)
get_services(**kwargs)

Obtains the value of the ‘services’ field

Returns:list
get_state(**kwargs)

Obtains the value of the ‘state’ field

Returns:str
get_tpm(**kwargs)

Obtains the value of the ‘tpm’ field

Returns:Munch
class infinisdk.infinibox.components.Enclosure(system, initial_data)
get_api_id(**kwargs)

Obtains the value of the ‘api_id’ field

Returns:int
get_drives(**kwargs)

Obtains the value of the ‘drives’ field

Returns:list
get_index(**kwargs)

Obtains the value of the ‘index’ field

Returns:int
get_state(**kwargs)

Obtains the value of the ‘state’ field

Returns:str
class infinisdk.infinibox.components.Drive(system, initial_data)
get_capacity(**kwargs)

Obtains the value of the ‘capacity’ field

Returns:Capacity
get_enclosure(**kwargs)

Obtains the value of the ‘enclosure’ field

Returns:int
get_enclosure_index(**kwargs)

Obtains the value of the ‘enclosure_index’ field

Returns:int
get_index(**kwargs)

Obtains the value of the ‘index’ field

Returns:int
get_serial_number(**kwargs)

Obtains the value of the ‘serial_number’ field

Returns:str
get_state(**kwargs)

Obtains the value of the ‘state’ field

Returns:str
is_encryption_state(**kwargs)

Obtains the value of the ‘encryption_state’ field

Returns:bool
class infinisdk.infinibox.components.FcPort(system, initial_data)
BINDER_CLASS

alias of FcPorts

disable()

Disables the FC Port

enable(role)

Enables the FC port with the specified role (SOFT_PORT/HARD_PORT)

get_api_id(**kwargs)

Obtains the value of the ‘api_id’ field

Returns:int
get_index(**kwargs)

Obtains the value of the ‘index’ field

Returns:int

Obtains the value of the ‘link_state’ field

Returns:str
get_node(**kwargs)

Obtains the value of the ‘node’ field

Returns:int
get_role(**kwargs)

Obtains the value of the ‘role’ field

Returns:str
get_soft_target_addresses(**kwargs)

Obtains the value of the ‘soft_target_addresses’ field

Returns:list
get_state(**kwargs)

Obtains the value of the ‘state’ field

Returns:str
get_switch_vendor(**kwargs)

Obtains the value of the ‘switch_vendor’ field

Returns:str
get_wwpn(**kwargs)

Obtains the value of the ‘wwpn’ field

Returns:WWN
is_enabled(**kwargs)

Obtains the value of the ‘enabled’ field

Returns:bool
class infinisdk.infinibox.components.FcPorts(object_type, system)

infinibox.qos_policies

class infinisdk.infinibox.qos_policy.QosPolicyBinder(object_type, system)
class infinisdk.infinibox.qos_policy.QosPolicy(system, initial_data)
BINDER_CLASS

alias of QosPolicyBinder

clear_metadata()

Deletes all metadata keys for this object

classmethod construct(system, data)

Template method to enable customizing the object instantiation process.

This enables system components to be cached rather than re-fetched every time

classmethod create(system, **fields)

Creates a new object of this type

delete(**kwargs)

Deletes this object.

get_all_metadata()
Returns:Dictionary of all keys and values associated as metadata for this object
get_assigned_entities()

Returns the assigned entities of this QOS policy

get_burst_factor(**kwargs)

Obtains the value of the ‘burst_factor’ field

Returns:float
get_created_at(**kwargs)

Obtains the value of the ‘created_at’ field

Returns:Arrow
classmethod get_creation_defaults()

Returns a dict representing the default arguments as implicitly constructed by infinisdk to fulfill a create call

Note

This will cause generation of defaults, which will have side effects if they are special values

Note

This does not necessarily generate all fields that are passable into create, only mandatory ‘fields

get_field(field_name, from_cache=<DONT_CARE>, fetch_if_not_cached=True, raw_value=False)

Gets the value of a single field from the system

Parameters:
  • cache – Attempt to use the last cached version of the field value
  • fetch_if_not_cached – Pass False to force only from cache
get_fields(field_names=(), from_cache=<DONT_CARE>, fetch_if_not_cached=True, raw_value=False)

Gets a set of fields from the system

Parameters:
  • from_cache – Attempt to fetch the fields from the cache
  • fetch_if_not_cached – pass as False to force only from cache
Returns:

a dictionary of field names to their values

get_id(**kwargs)

Obtains the value of the ‘id’ field

Returns:int
get_max_bps(**kwargs)

Obtains the value of the ‘max_bps’ field

Returns:int
get_max_ops(**kwargs)

Obtains the value of the ‘max_ops’ field

Returns:int
get_metadata_value(key, default=<NOTHING>)

Gets a metadata value, optionally specifying a default

Parameters:default – if specified, the value to retrieve if the metadata key doesn’t exist. if not specified, and the key does not exist, the operation will raise an exception
get_name(**kwargs)

Obtains the value of the ‘name’ field

Returns:str
get_type(**kwargs)

Obtains the value of the ‘type’ field

Returns:str
get_updated_at(**kwargs)

Obtains the value of the ‘updated_at’ field

Returns:Arrow
invalidate_cache(*field_names)

Discards the cached field values of this object, causing the next fetch to retrieve the fresh value from the system

is_burst_enabled(**kwargs)

Obtains the value of the ‘burst_enabled’ field

Returns:bool
is_in_system()

Returns whether or not the object actually exists

safe_delete(*args, **kwargs)

Tries to delete the object, doing nothing if the object cannot be found on the system

safe_get_field(field_name, default=<NOTHING>, **kwargs)

Like get_field(), only returns ‘default’ parameter if no result was found

set_metadata(key, value)

Sets metadata key in the system associated with this object

set_metadata_from_dict(data_dict)

Sets multiple metadata keys/values in the system associated with this object

unset_metadata(key)

Deletes a metadata key for this object

update_burst_factor(value, **kwargs)

Updates the value of the ‘burst_factor’ field

Parameters:value – The new burst_factor value to be set (type: float)
update_field(field_name, field_value)

Updates the value of a single field

update_fields(**update_dict)

Atomically updates a group of fields and respective values (given as a dictionary)

update_max_bps(value, **kwargs)

Updates the value of the ‘max_bps’ field

Parameters:value – The new max_bps value to be set (type: int)
update_max_ops(value, **kwargs)

Updates the value of the ‘max_ops’ field

Parameters:value – The new max_ops value to be set (type: int)
update_name(value, **kwargs)

Updates the value of the ‘name’ field

Parameters:value – The new name value to be set (type: str)
update_type(value, **kwargs)

Updates the value of the ‘type’ field

Parameters:value – The new type value to be set (type: str)

infinibox.tenants

class infinisdk.infinibox.tenant.Tenant(system, initial_data)
get_anonymous_gid(**kwargs)

Obtains the value of the ‘anonymous_gid’ field

Returns:int
get_anonymous_uid(**kwargs)

Obtains the value of the ‘anonymous_uid’ field

Returns:int
get_capacity(**kwargs)

Obtains the value of the ‘capacity’ field

Returns:Munch
get_created_at(**kwargs)

Obtains the value of the ‘created_at’ field

Returns:Arrow
get_entity_counts(**kwargs)

Obtains the value of the ‘entity_counts’ field

Returns:Munch
get_id(**kwargs)

Obtains the value of the ‘id’ field

Returns:int
get_name(**kwargs)

Obtains the value of the ‘name’ field

Returns:str
get_nfs_allow_unmapped_users(**kwargs)

Obtains the value of the ‘nfs_allow_unmapped_users’ field

Returns:str
get_nfs_group_policy(**kwargs)

Obtains the value of the ‘nfs_group_policy’ field

Returns:str
get_short_tenant_key(**kwargs)

Obtains the value of the ‘short_tenant_key’ field

Returns:int
get_updated_at(**kwargs)

Obtains the value of the ‘updated_at’ field

Returns:Arrow
is_visible_to_sysadmin(**kwargs)

Obtains the value of the ‘visible_to_sysadmin’ field

Returns:bool
update_anonymous_gid(value, **kwargs)

Updates the value of the ‘anonymous_gid’ field

Parameters:value – The new anonymous_gid value to be set (type: int)
update_anonymous_uid(value, **kwargs)

Updates the value of the ‘anonymous_uid’ field

Parameters:value – The new anonymous_uid value to be set (type: int)
update_name(value, **kwargs)

Updates the value of the ‘name’ field

Parameters:value – The new name value to be set (type: str)
update_nfs_allow_unmapped_users(value, **kwargs)

Updates the value of the ‘nfs_allow_unmapped_users’ field

Parameters:value – The new nfs_allow_unmapped_users value to be set (type: str)
update_nfs_group_policy(value, **kwargs)

Updates the value of the ‘nfs_group_policy’ field

Parameters:value – The new nfs_group_policy value to be set (type: str)

infinibox.smb_groups

class infinisdk.infinibox.smb_group.SMBGroup(system, initial_data)
get_domain_members(**kwargs)

Obtains the value of the ‘domain_members’ field

Returns:list
get_gid(**kwargs)

Obtains the value of the ‘gid’ field

Returns:int
get_id(**kwargs)

Obtains the value of the ‘id’ field

Returns:int
get_name(**kwargs)

Obtains the value of the ‘name’ field

Returns:str
get_privileges(**kwargs)

Obtains the value of the ‘privileges’ field

Returns:list
get_sid(**kwargs)

Obtains the value of the ‘sid’ field

Returns:str
get_tenant(**kwargs)

Obtains the value of the ‘tenant’ field

Returns:infinisdk.infinibox.tenant.Tenant object
get_uid(**kwargs)

Obtains the value of the ‘uid’ field

Returns:int
update_domain_members(value, **kwargs)

Updates the value of the ‘domain_members’ field

Parameters:value – The new domain_members value to be set (type: list)
update_gid(value, **kwargs)

Updates the value of the ‘gid’ field

Parameters:value – The new gid value to be set (type: int)
update_privileges(value, **kwargs)

Updates the value of the ‘privileges’ field

Parameters:value – The new privileges value to be set (type: list)
update_uid(value, **kwargs)

Updates the value of the ‘uid’ field

Parameters:value – The new uid value to be set (type: int)

infinibox.smb_users

class infinisdk.infinibox.smb_user.SMBUser(system, initial_data)
disable(**kwargs)

Set the value of the ‘enabled’ field to False

enable(**kwargs)

Set the value of the ‘enabled’ field to True

get_groups(**kwargs)

Obtains the value of the ‘groups’ field

Returns:list
get_id(**kwargs)

Obtains the value of the ‘id’ field

Returns:int
get_name(**kwargs)

Obtains the value of the ‘name’ field

Returns:str
get_primary_group(**kwargs)

Obtains the value of the ‘primary_group’ field

Returns:infinisdk.infinibox.smb_group.SMBGroup object
get_privileges(**kwargs)

Obtains the value of the ‘privileges’ field

Returns:list
get_sid(**kwargs)

Obtains the value of the ‘sid’ field

Returns:str
get_tenant(**kwargs)

Obtains the value of the ‘tenant’ field

Returns:infinisdk.infinibox.tenant.Tenant object
get_uid(**kwargs)

Obtains the value of the ‘uid’ field

Returns:int
is_enabled(**kwargs)

Obtains the value of the ‘enabled’ field

Returns:bool
update_enabled

Updates the value of the ‘enabled’ field

param value:The new enabled value to be set (type: bool)
update_groups(value, **kwargs)

Updates the value of the ‘groups’ field

Parameters:value – The new groups value to be set (type: list)
update_name(value, **kwargs)

Updates the value of the ‘name’ field

Parameters:value – The new name value to be set (type: str)
update_password(value, **kwargs)

Updates the value of the ‘password’ field

Parameters:value – The new password value to be set (type: str)
update_primary_group(value, **kwargs)

Updates the value of the ‘primary_group’ field

Parameters:value – The new primary_group value to be set (type: infinisdk.infinibox.smb_group.SMBGroup object)
update_privileges(value, **kwargs)

Updates the value of the ‘privileges’ field

Parameters:value – The new privileges value to be set (type: list)
update_uid(value, **kwargs)

Updates the value of the ‘uid’ field

Parameters:value – The new uid value to be set (type: int)

infinibox.active_directory_domains

class infinisdk.infinibox.active_directory.ActiveDirectoryDomains(system)
create(*, domain, org_unit=<OMIT>, preferred_ips, username, password, tenant=None)

Join an active directory domain

Parameters:
  • domain (str) – the domain to join
  • org_unit (str) – the organization unit
  • preferred_ips (list[str]) – a list of ips
  • username (str) – the username for the domain
  • password (str) – the password for the domain
  • tenant (infinisdk.infinibox.tenant.Tenant) – the tenant object
Returns:

Dictionary with fields: “tenant_id”, “domain”, “org_unit”, “preferred_ips”

Return type:

dict

get()

Obtains the active directory domain

Returns:Dictionary with fields: “tenant_id”, “domain”, “org_unit”, “preferred_ips”
Return type:dict
join(*, domain, org_unit=<OMIT>, preferred_ips, username, password, tenant=None)

Join an active directory domain

Parameters:
  • domain (str) – the domain to join
  • org_unit (str) – the organization unit
  • preferred_ips (list[str]) – a list of ips
  • username (str) – the username for the domain
  • password (str) – the password for the domain
  • tenant (infinisdk.infinibox.tenant.Tenant) – the tenant object
Returns:

Dictionary with fields: “tenant_id”, “domain”, “org_unit”, “preferred_ips”

Return type:

dict

leave(*, username, password)

Leave the active directory domain

Parameters:
  • username (str) – the username for the domain
  • password (str) – the password for the domain

Base Objects

class infinisdk.infinibox.system_object.InfiniBoxObject(system, initial_data)

Infinibox Utilities

class infinisdk.infinibox.lun.LogicalUnit(system, id, lun, clustered, host_cluster_id, volume_id, host_id, **kwargs)
__int__()

Same as get_lun()

delete()

Deletes (or unmaps) this LU

get_cluster()

Returns the cluster to which this LUN belongs

get_host()

Returns the host to which this LUN belongs

get_lun()

Returns the logical unit number of this LU

get_volume()

Returns the volume mapped to this LU

unmap()

Deletes (or unmaps) this LU

class infinisdk.infinibox.scsi_serial.SCSISerial(serial)
ieee_company_id = None

the IEEE company id (24 bits)

serial = None

the string representation (hexadecimal) of the serial number

system_id = None

unique system id (16 bits)

volume_id = None

the volume id (64 bits)

Core Facilities

class infinisdk.core.type_binder.TypeBinder(object_type, system)
create(*args, **kwargs)

Creates an object on the system

class infinisdk.core.type_binder.MonomorphicBinder(object_type, system)
find(*predicates, **kw)

Queries objects according to predicates. Can receive arguments in two possible forms:

  1. Direct keyword arguments, for filtering for equality:

    system.volumes.find(size=GiB)
    
  2. Complex predicates, using the comparators:

    system.volumes.find(system.volumes.fields.size > GiB)
    system.volumes.find(Q.name != 'some_name')
    
Returns:Lazy query result object.
get_by_id(id)

Obtains an object with a specific id

get_by_id_lazy(id)

Obtains an object with a specified id without checking if it exists or querying it on the way.

This is useful assuming the next operation is a further query/update on this object.

get_mutable_fields()

Returns a list of all mutable fields for this object type

safe_get_by_id(id)

Like get_by_id, only returning None if the object could not be found

class infinisdk.core.system_object.SystemObject(system, initial_data)

System object, that has query methods, creation and deletion

BINDER_CLASS

alias of infinisdk.core.type_binder.TypeBinder

classmethod construct(system, data)

Template method to enable customizing the object instantiation process.

This enables system components to be cached rather than re-fetched every time

classmethod create(system, **fields)

Creates a new object of this type

delete(**kwargs)

Deletes this object.

classmethod get_creation_defaults()

Returns a dict representing the default arguments as implicitly constructed by infinisdk to fulfill a create call

Note

This will cause generation of defaults, which will have side effects if they are special values

Note

This does not necessarily generate all fields that are passable into create, only mandatory ‘fields

get_field(field_name, from_cache=<DONT_CARE>, fetch_if_not_cached=True, raw_value=False)

Gets the value of a single field from the system

Parameters:
  • cache – Attempt to use the last cached version of the field value
  • fetch_if_not_cached – Pass False to force only from cache
get_fields(field_names=(), from_cache=<DONT_CARE>, fetch_if_not_cached=True, raw_value=False)

Gets a set of fields from the system

Parameters:
  • from_cache – Attempt to fetch the fields from the cache
  • fetch_if_not_cached – pass as False to force only from cache
Returns:

a dictionary of field names to their values

invalidate_cache(*field_names)

Discards the cached field values of this object, causing the next fetch to retrieve the fresh value from the system

is_in_system()

Returns whether or not the object actually exists

safe_delete(*args, **kwargs)

Tries to delete the object, doing nothing if the object cannot be found on the system

safe_get_field(field_name, default=<NOTHING>, **kwargs)

Like get_field(), only returns ‘default’ parameter if no result was found

update_field(field_name, field_value)

Updates the value of a single field

update_fields(**update_dict)

Atomically updates a group of fields and respective values (given as a dictionary)

class infinisdk.core.object_query.ObjectQuery(system, url, object_type)
infinisdk.core.extensions.add_method(objtype, name=None)

Exceptions

class infinisdk.core.exceptions.ObjectNotFound

Thrown when using .get(), when no results are found but the code expects a single object

class infinisdk.core.exceptions.TooManyObjectsFound

Thrown when using .get(), when more than one result is found but the code expects a single object