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()

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

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)
auth_context

Deprecated since version 46.0: Use get_auth_context instead

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(**kwds)

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(**kwds)

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(**kwds)

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
no_response_logs_context

Deprecated since version 46.0: Use get_no_response_logs_context instead

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(**kwds)

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.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

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_child

Deprecated since version 95.0.1: Use create_snapshot instead

create_snapshot(name=None, write_protected=None, ssd_enabled=None)

Creates a snapshot from this entity, if supported by the system

delete()

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_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_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_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_snapshots()

Retrieves all snapshot children of this entity

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_replicated(from_cache=<DONT_CARE>)

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

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(*args, **kwargs)

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

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

trigger_data_restore_failure

Deprecated since version 78.0: Use trigger_restore_failure() instead

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_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.Filesystem(system, initial_data)
BINDER_CLASS

alias of FilesystemBinder

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_child

Deprecated since version 95.0.1: Use create_snapshot instead

create_snapshot(name=None, write_protected=None, ssd_enabled=None)

Creates a snapshot from this entity, if supported by the system

delete()

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_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_clones

Retrieves all clone children of this entity

Deprecated since version 64.0.1.

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_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_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_snapshots()

Retrieves all snapshot children of this entity

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_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(*args, **kwargs)

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

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

trigger_data_restore_failure

Deprecated since version 78.0: Use trigger_restore_failure() instead

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_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.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)

Creates a new object of this type

delete()

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_state(**kwargs)

Obtains the value of the ‘state’ 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
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

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 TypeBinder.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_fc_port

Deprecated since version 58.0: Use add_port() instead

add_port(*args, **kwargs)

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()

Deletes this object.

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_fc_ports

Deprecated since version 58.0: Use get_ports() instead

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_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_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_fc_port

Deprecated since version 58.0: Use remove_port() instead

remove_port(*args, **kwargs)

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

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_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_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>, **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
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 snapthot 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(*args, **kwargs)

Changes the replication type to ASYNC

Parameters:params – Optional dictionary containing additional parameters for the type change
change_type_to_sync(*args, **kwargs)

Changes the replication type to SYNC

Parameters:params – Optional dictionary containing additional parameters for the type change
delete(retain_staging_area=False, force_if_remote_error=False, force_on_target=False, force_if_no_remote_credentials=False)

Deletes this replica

get_assigned_sync_remote_ips(**kwargs)

Obtains the value of the ‘assigned_sync_remote_ips’ field

Returns:list
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_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_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()

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

get_remote_entity()

Fetches the remote replicated entity if available

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 corresponsing 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 consructed for the first time

get_remote_replica_id(**kwargs)

Obtains the value of the ‘remote_replica_id’ field

Returns:int
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_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(*args, **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(*args, **kwargs)

Returns whether or not this replica is in auto_suspended state

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(*args, **kwargs)

Returns whether or not this replica is in idle state

is_initial(**kwargs)

Obtains the value of the ‘initial’ field

Returns:bool
is_initial_replication(*args, **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()

Returns whether or not this replication is waiting to start initializing

is_replicating(*args, **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(*args, **kwargs)

Returns whether or not this replica is currently suspended

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(*args, **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(*args, **kwargs)

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_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_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)
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
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.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_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

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()

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_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

safe_delete(*args, **kwargs)

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

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.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

create_local_group

Deprecated since version 54.0: Use create_group instead

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)

Create a snapshot group out of the consistency group.

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

Create a snapshot group out of the consistency group.

delete(delete_members=None)

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_members()

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()
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_rmr_snapshot_guid(**kwargs)

Obtains the value of the ‘rmr_snapshot_guid’ 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
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

restore(snap_group)

Restores this consistency group from the specified sg

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.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_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
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

infinibox.qos_policies

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

alias of infinisdk.core.type_binder.TypeBinder

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()

Deletes this object.

get_all_metadata()
Returns:Dictionary of all keys and values associated as metadata for this object
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

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)

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)
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_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.

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()

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

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