Storage Appliance API v3.1.x

Copyright (C) Nexenta Systems, Inc. All rights reserved.


1  API Overview
2  Block Diagram
3  Terms and Conventions
4  Object Model
5  Data Types
  5.1  Primitive Data Types
  5.2  Receiving an Array
  5.3  Receiving a Dictionary
  5.4  Receiving Complex Data Types
  5.5  Passing an Array
  5.6  Passing a Dictionary
6  Groups of Appliances Management
  6.1  create - Create a new group of two or more appliances. To ...
  6.2  get_all - Returns array of all supported groups of all types ...
  6.3  get_all_members - Get the list of all members in all groups ...
  6.4  get_group_types - Returns array of supported group types, for instance ['basic'] ...
  6.5  get_members - For a given group, get its member appliances
7  General Appliance Management
  7.1  add_swap - Add zvol as an additional swap area
  7.2  configure_ugen_device - Configuring generic USB device
  7.3  create_checkpoint - Create checkpoint from specified system snapshot
  7.4  dbus_auth_iptable_is_set - Determine whether the specified deny or allow access rule is ...
  7.5  dbus_auth_iptable_list - Get all iptable access rules. Background: The appliance provides secure ...
  7.6  dbus_auth_iptable_set - Deny or allow access to the appliance from the specified ...
  7.7  dbus_auth_iptable_unset - Remove deny or allow access rule from the appliance's iptable. ...
  7.8  dbus_auth_keys_add - Add new key to the client key authorization table. Background: ...
  7.9  dbus_auth_keys_list - Get all authorization keys and their IDs. Background: The appliance ...
  7.10  dbus_auth_keys_remove - Remove authentication key.
  7.11  delete_swap - Remove zvol swap area - undo the effect of com.nexenta.nms.Appliance::add_swap ...
  7.12  get_cpu_info - Get detailed per-CPU information
  7.13  get_etchosts_rec - Given a hostname or a part of a hostname, or ...
  7.14  get_fqdn - Get a fully qualified domain name (FQDN) of the appliance. ...
  7.15  get_general_diagnostics - Get general diagnostics
  7.16  get_host_by_addr - Get hostname by IP address
  7.17  get_kbd_layouts - Get all supported keyboard layouts
  7.18  get_license_info - Get license information
  7.19  get_memstat - Get RAM utilization information
  7.20  get_saved_configurations - Get the list of all available saved configurations.
  7.21  get_serial_names - Get the list of names of all available serial ports ...
  7.22  get_subtimezones - Get time zones for the specified country located in the ...
  7.23  get_timezone_continent - Get time zone code for the specified country
  7.24  get_timezone_continents - Get all time zone continents
  7.25  get_timezone_country_code - Get time zone code for the specified country
  7.26  get_timezones - Given a time zone continent, get all its time zones ...
  7.27  get_uptime - Get appliance's uptime, including the following information: The current time, ...
  7.28  group_configuration_sync_set - Synchronize group configuration by enabling or disabling
  7.29  list_appliances - Get all SSH-bound as well as dynamically discovered on a ...
  7.30  list_conf_ugen_hid_devs - Get configuration of all USB devices
  7.31  list_swap - Get summary information about total swap space usage, existing swap ...
  7.32  list_unconf_hid_devs - Get list of unconfigured USB devices
  7.33  ns_getent - Get local and LDAP based users, groups, and netgroups ...
  7.34  ns_group_del - Delete the specified group
  7.35  ns_group_exists - Find out whether a given group exists; if found, the ...
  7.36  ns_group_get - Given a local or LDAP defined group, get properties such ...
  7.37  ns_group_idmap_get - Get identity mapping for a given Unix group.
  7.38  ns_group_set - Modify existing local group or create a new group, if ...
  7.39  ns_netgroup - Get a list of hosts (computers) included in a given ...
  7.40  ns_user_del - Delete the specified user
  7.41  ns_user_exists - Find out whether a given user exists; if found, the ...
  7.42  ns_user_get - Given a local or LDAP defined user, get properties such ...
  7.43  ns_user_idmap_get - Get identity mapping for a given Unix user.
  7.44  ns_user_set - Modify existing local user or add new local user, if ...
  7.45  ping_tcp - Ping host via TCP
  7.46  poweroff - Get descriptions of the saved appliance's configurations
  7.47  reboot - Reboot the appliance
  7.48  reset_ugen_configuration - Reset the current USB devices configuration
  7.49  restore_configuration - Restore appliance's configuration from the most recent copy stored at ...
  7.50  restore_volume_services - Restore volume services
  7.51  save_configuration - Save appliance's configuration at a pre-defined location. The current location ...
  7.52  set_etchosts_rec - Add, replace or delete a record from the appliance's local ...
  7.53  set_license_key - Update license key
  7.54  ssh_bind - SSH-bind a given (user, appliance) to the specified remote host. ...
  7.55  ssh_check_binding - Check whether the specified appliance's user is SSH-bound to the ...
  7.56  ssh_list_bindings - Get all existing SSH bound hosts
  7.57  ssh_unbind - SSH-unbind a given (user, appliance) from the specified remote host. ...
  7.58  ssl_bind - Add a new certificate to LDAP managed database
  7.59  ssl_check_binding - Check whether the specified certificate exists in database
  7.60  ssl_direct_bind - Add a new certificate to LDAP managed database
  7.61  ssl_list_bindings - Get trusted host information for all existing certificates
  7.62  ssl_list_certificates - Get certificate files
  7.63  ssl_list_certinfos - Get certificate information for all existing certificates
  7.64  ssl_unbind - Remove the specified certificate from database - compare with com.nexenta.nms.Appliance::ssl_unbind_by_hostname ...
  7.65  ssl_unbind_by_hostname - Remove certificate from the LDAP managed database
  7.66  stat_file - Collects and returns info for file path, including file type, ...
  7.67  sysnotice_check - Check NMS sytem notice file
  7.68  sysnotice_set - Update NMS sytem notice file
  7.69  sysnotice_unset - Clear NMS sytem notice file
  7.70  upgradable_packages - Get the list of packages which will be upgraded ...
  7.71  upgradable_packages_check - Determine what packages require upgrade
  7.72  upgrade_check - Check for appliance software upgrades
8  Appliance Backup
  8.1  get_saved_configurations - Returns a list of existing saved appliance configurations
  8.2  get_state - Returns current state of a save/restore process
  8.3  restore_app_configuration - Restores appliance configuration
  8.4  save_app_configuration - Save appliance configuration
9  Statistic Collection
10  Virtual Container
  10.1  destroy - Destroy child object specified by its name
  10.2  get_child_prop - For a given (contained) child, get the specified property ...
  10.3  get_child_props - For a given (contained) child get { propname => value ...
  10.4  get_names - Get array of all (contained) children names matching the specified ...
  10.5  get_names_by_prop - Get array of all (container) children which has matching property ...
  10.6  object_exists - Verify that object exists
  10.7  set_child_prop - For a given (contained) child update the specified property with ...
  10.8  trylock - Make an attempt to lock the specified child
  10.9  unlock - Unlock the specified child
11  Folder (Filesystem)
  11.1  add_group_acl - Add the group's permissions to access a given folder and ...
  11.2  add_user_acl - Add the user's permissions to access a given folder and ...
  11.3  clone - Creates a clone of a given snapshot. The operation results ...
  11.4  create - Create a "path" of folders
  11.5  create_snapshot - Snapshot a given folder and possibly its sub-folders
  11.6  create_with_props - Create a "path" of folders. This API allows to specify ...
  11.7  del_group_acl - Remove the group's permissions from the folder's ACL
  11.8  del_user_acl - Remove the user's permissions from the folder's ACL
  11.9  get_acl - Get folder's ACL for the entities matching the specified pattern ...
  11.10  get_acl_by_index - Retrieve complete folder's ACL, and possibly check for duplicate entries. ...
  11.11  get_aclinfo - Get ACL related static information: groups of permissions and descriptions ...
  11.12  get_all_names - Get array of all (contained) children names matching the specified ...
  11.13  get_groupspace - Get groupspace specified parameters
  11.14  get_groupspace_types - Get available groupspace types
  11.15  get_prop_valid_values - Get valid range and/or enumeration for a given folder's property. ...
  11.16  get_subfolder_names - Get sub-folder names
  11.17  get_userspace - Get userspace specified parameters
  11.18  get_userspace_types - Get available userspace types
  11.19  get_version_info - Get folder's ZFS version
  11.20  has_zfs_prop - Determine whether zfs property exists or not
  11.21  inherit_prop - Restore system-default inheritance of a given ZFS property. The method ...
  11.22  promote - Promotes a cloned dataset to no longer be dependent on ...
  11.23  reset_acl - Reset the folder's ACLs to the system default (POSIX, built-in) ...
  11.24  set_group_acl - Set the group's permissions to access a given folder and ...
  11.25  set_group_owner - Change the group ownership of a given folder
  11.26  set_user_acl - Set the user's permissions to access a given folder and ...
  11.27  set_user_owner - Change the user ownership of a given folder
  11.28  upgrade - Upgrade folder's ZFS version
  11.29  upgrade_folders - Upgrade folder's ZFS version recursively
12  Folder and Snapshot Indexing Facility (Search Engine)
  12.1  create - Create indexer for the specified folder. Once created, the indexer ...
  12.2  search - Search the folder and its snapshot(s).
13  iSCSI Initiator
  13.1  get_all_luns - Get all iSCSI attached LUNs (disks).
  13.2  get_connections - Get all connections for the given iSCSI session between the ...
  13.3  get_defaults - Get the configured Initiator parameters. The list includes: InitiatorName, InitiatorAlias, ...
  13.4  get_discovery - List (TargetName, TargetAddress, TPGT) triplets for all configured discoveries. ...
  13.5  get_discovery_state - Get the discovery state (enabled or disabled) for the specified ...
  13.6  get_luns - Get LUNs of the specified iSCSI Target.
  13.7  get_sessions - Get a list of active iSCSI sessions.
  13.8  get_target_config - Get the iSCSI Target configuration. The list of configurable parameters ...
  13.9  get_target_props - Get iSCSI Target default and user-defined parameters.
  13.10  get_targets - List available iSCSI Targets. The result can be used to ...
  13.11  get_volumes - Get the list of the volumes which are connected via ...
  13.12  list_discovery - List the current discovery settings for the specified discovery method ...
  13.13  remove_target - Remove a set of specified target parameters
  13.14  set_default - Update the specified Initiator parameter. The list includes: InitiatorName, InitiatorAlias, ...
  13.15  set_target_config - Update the iSCSI Target configuration.
  13.16  setup_discovery - Setup iSCSI discovery
14  JBOD Management
  14.1  get_all_indicators - Returns status for ident LEDs for each element in the ...
  14.2  get_elements - Returns the list of elements. For type 'slot' all elements ...
  14.3  get_failed_sensors - Returns the list of sensors with failures. To get more ...
  14.4  get_picture - Returns picture or raises exception if there was no item ...
  14.5  get_sensors - Returns list of sensors in the JBOD. For each one ...
  14.6  ident_off - Turnes off ident LED for given element
  14.7  ident_on - Turnes on ident LED for given element
  14.8  ident_state - Returns current status of ident LED for given element ...
  14.9  ident_toggle - Toggles ident LED on given element. It's a wrapper on ...
15  Job Management
  15.1  cleanup_jobs - Delete completed Jobs with expired 'autocleanup' and 'keeptime' parameters ...
  15.2  destroy_job - Delete/Cancel Job
  15.3  get_jobparams - Get parameters of currently running Job
  15.4  get_jobs - Get the list of currently running Jobs in Json format ...
  15.5  get_jobtype_param_descs - Get the description of Job start parameters of specified type ...
  15.6  get_jobtypes - Get the list
  15.7  get_pid_by_unique_param - Get the list of Jobs according to specified unique startup ...
  15.8  get_pids_by_param - Get the list of Jobs according to specified startup parameter ...
  15.9  start_job - Start the specified Job with specified parameters
16  Log Viewing Facility
  16.1  get_linecount - Get the current position (line number) in the file ...
  16.2  get_lines - Retrieve the specified number of lines from the log file ...
  16.3  get_tail - Retrieve file's tail
17  Logical and Physical Disk Management
  17.1  blink_running - Checks, if blinking is in proccess
  17.2  blink_start - Enabled blinking for Disk
  17.3  blink_stop - Disable blinking for Disk
  17.4  cache - Retrieve, enable and disable on-disk read and write cache. The ...
  17.5  clear_slotmap - Clear slotmap file content
  17.6  disk_is_avail - Determine whether the specified disk (LUN) is available for usage, ...
  17.7  get_lun_replacement_info - Get LUN replacement information
  17.8  get_slotmap - Get slot mapping information
  17.9  have_slotmap - Checks existence of the slotmap file according to type ...
  17.10  hba_command - Execute 'cfgadm -c operation' on each hbas
  17.11  hba_list - Get all hbas by executing 'cfgadm -anl'
  17.12  lunsync - Resynchronize appliance's LUNs. Re-enumerates devices in the appliance. This interface ...
  17.13  mounted_disks - Get all mounted disks. The disk is considered mounted if ...
  17.14  set_slotmap - Set slotmap parameters
18  SMTP Mailer
  18.1  check_support_request_ready - Check if the diagnostic logs are collected to be send ...
  18.2  prepare_support_request - Collect diagnostic messages and prepare support request
  18.3  save_support_request - Saves support request in specified folder
  18.4  send_support_request - Prepare and send support request
  18.5  send_test - Send verification e-mail
19  Network Management
  19.1  add_route - Add a route to a given destination via the specified ...
  19.2  delete_route - Delete a route, given destination and gateway.
  19.3  find_gateway_hostname - Given remote IP address, find the corresponding gateway.
  19.4  gateway - Get appliance's default gateway.
  19.5  get_nmv_props - Get NMV specific properties
  19.6  get_nmv_url - Get Nexenta Management View URL for the appliance.
  19.7  get_routes - Get all routes.
  19.8  host_to_ipaddr - Get IP address by hosname
  19.9  is_port_free - Check if specified port is free
  19.10  nameservers - Get name servers.
  19.11  primary - Get primary network interface.
  19.12  set_gateway - Set appliance's default gateway.
  19.13  set_nameservers - Set name servers. Appliance may have up to 3 configured ...
  19.14  set_nmv_props - Set NMV specific properties
  19.15  set_primary - Set primary network interface.
20  Network Interface Management
  20.1  check_static - Checks staticaly defined network interface
  20.2  create_aggr - Create an 802.3ad aggregated network interface (link).
  20.3  create_ipalias - Create IP alias (aka "logical IP interface").
  20.4  create_vlan - Create VLAN interface.
  20.5  destroy_aggr - Destroy the specified aggregated link. This operation reverses the effect ...
  20.6  destroy_ipalias - Destroy the specified IP alias (aka "logical IP interface"). ...
  20.7  destroy_vlan - Destroy the specified VLAN interface.
  20.8  get_max_mtu - Get maximum MTU size supported by a given network interface ...
  20.9  get_min_mtu - Get minimum MTU size supported by a given network interface ...
  20.10  get_names_by_type - Returns list of network interface names with passed TYPE ...
  20.11  get_other_drv_ifaces - Helper method that returns an array of all network interfaces ...
  20.12  ipaddr_to_dev - Gets interface name by IP address
  20.13  is_capable - Helper method that determines whether a given network interface driver ...
  20.14  is_drv_locked - Helper method that evaluates the following condition: one or more ...
  20.15  is_drv_reload_required - Helper method that determines whether the network interface driver must ...
  20.16  refresh - Refresh network interface object
  20.17  set_dhcp - Configure the specified network interface via DHCP. Note that unlike ...
  20.18  set_macaddr - Set MAC address of given network interface.
  20.19  set_static - Statically configure the specified network interface. Compare with com.nexenta.nms.NetworkInterface::set_dhcp. ...
  20.20  set_static_extended - Statically configure the specified network interface with aditional parameters. ...
  20.21  set_unconfigure - Unconfigure the spesified network interface. This operation reverses the effect ...
21  Network Storage Service
  21.1  get_share_confopts - Get static configuration options associated with the specified storage access ...
  21.2  get_shared_folders - Get all folders shared via the specified storage access protocol ...
  21.3  get_shareopts - Get configuration options associated with the specified share
  21.4  is_folder_shared - Find out whether the specified folder is shared via the ...
  21.5  share_folder - Share the specified folder via the specified storage access protocol ...
  21.6  unshare_all - Unshare the specified folder globally, as far as all or ...
  21.7  unshare_folder - Unshare the specified folder from access via the specified storage ...
22  Virtual Base Object
  22.1  get_prop - Get property value
  22.2  get_props - Get { propname => value } dictionary of all properties ...
  22.3  set_prop - Set property value
  22.4  set_props - Set properties according to dictionary
  22.5  trylock_self - Make an attempt to lock object. Unlike com.nexenta.nms.Container::trylock it ...
  22.6  unlock_self - Unlock object. Unlike com.nexenta.nms.Container::unlock it unlocks object self, not ...
23  Plugin
  23.1  get_group_names - Get array of all (or filtered) group names.
  23.2  get_group_plugins - Get array of all the plugins in a group ...
  23.3  get_group_props - Get dictionary with all the properties of a group, or ...
  23.4  get_ipc_info - Gets interface dicitonary { ipc_name => (name, suffix)} for given ...
  23.5  get_ipc_srvpool - Determines if specified plugin can work with Server Pool ...
  23.6  get_plugins_by_caps - Returns all plugins with required capability.
  23.7  list_remote - Get { plugin => plugin_properties } dictionary of all available ...
  23.8  preinst_check - Does plugin preinstallation checks, and returns values indicating if reboot ...
  23.9  resolve_lun_to_services - For a given zvol, get all services available on it. ...
  23.10  resolve_zfsname_to_services - Gets services running on a ZFS object.
24  Service Account Management
25  Reporting Facility (Services, Performance, Capacity)
  25.1  send - Send report to general e-mail address
26  Virtual Runner
  26.1  disable - Disable the specified runner, ie stop (suspend) its execution. The ...
  26.2  enable - Enable the specified runner. The runner must be registered (see ...
  26.3  execute - Execute the specified runner. The operation allows to run the ...
  26.4  get_init_params - Get initial parameters for specified Script Runner
  26.5  get_init_tunables - Get initial tunables for specified Script Runner
  26.6  get_tunables - Get the runner's tunables and their descriptions. For defintion of ...
  26.7  is_registered - Check whether the specified runner is registered with the appliance. ...
  26.8  register - Register the specified runner. The operation validates runner's parameters and ...
  26.9  reset - Destroy job which is linked to specified Runner
  26.10  set_tunable - Modify the runner's (tunable) property value. A given runner may ...
  26.11  unregister - Unregister the specified runner. The operation reverses the effect of ...
27  User scripts Management
  27.1  create - Create a new user defined scirpt
28  Nexenta Management Server
  28.1  append_log - Add lines to Server log
  28.2  event_broadcast - Create event broadcast message
  28.3  fma_event_callback - Passthrough fma event to report a fault
  28.4  get_const - Get predefined system constants
  28.5  get_extended_lock_info - Get extended lock information.
  28.6  get_locks - Get all existing NMS locks.
  28.7  get_reply_timeout - Get Nexenta Management Server D-Bus reply timeout.
  28.8  is_locked_by_client - Check if Server is locked by client
  28.9  list_props - Get all NMS properties (name, value pairs) and their descriptions. ...
  28.10  nmdtrace_status - Get Restart Nexenta DTrace statistic service status.
  28.11  register_local_client - Register local NMS client - an external local process that ...
  28.12  reread_config - Re-read server configuration.
  28.13  restart_nmcd - Restart Nexenta Management Console daemon.
  28.14  restart_nmdtrace - Restart Nexenta DTrace statistic service daemon. Nexenta DTrace Service is ...
  28.15  set_reply_timeout - Set Nexenta Management Server D-Bus reply timeout.
  28.16  unregister_local_client - Unregister local NMS client.
29  Service Management Facility (SMF)
  29.1  clear - Clear maintaince state of specified service
  29.2  disable - Disable the specified SMF service
  29.3  enable - Enable the specified SMF service. Clears the maintenance state, if ...
  29.4  fmri_validate - Validate specified service
  29.5  get_logfile - Get the service's logfile name
  29.6  get_state - Get the current state of the specified service
  29.7  reread_config - Re-read and re-apply services configuration. The operation effectively updates the ...
  29.8  restart - Restart the specified SMF service. The operation is equivalent to ...
  29.9  wait_for - Wait for specific state of service
30  AutoScrub (volume scrubbing) Service
31  Virtual Automatic Storage Service
  31.1  can_tier_copy_acls - Checks is there a possibility to copy ACLs using rsync ...
  31.2  execute - Execute the specified storage (auto-) service instance. This SA-API method ...
  31.3  get_sock_stats - Get just-in-time transport statistics. The method can be used to ...
  31.4  is_daemon - Find out whether the service is daemon
  31.5  is_running - Find out whether the service is currently running
  31.6  is_scheduled - Find out whether the service is scheduled
  31.7  seconds_until_next_run - For a given auto-service, returns the number of seconds remaining ...
32  AutoSnap (snapshot) Service
33  AutoTier (data replication) Service
34  Network Services Management
  34.1  confcheck - Check service state and configuration
  34.2  get_conffiles - List of service configuration files
  34.3  get_confmethods - The list of the available network service methods
  34.4  get_confmethods_desc - Get the list of the available network service methods and ...
  34.5  get_confopts - Returns the list of possible commands for setting up the ...
  34.6  get_logfiles - List of service log files
  34.7  get_smbadmlist - Returns information about the current workgroup or domain
  34.8  set_confopts - Setup configuration method.
35  Snapshot Management
  35.1  create - Create (ie, take) snapshots, recursively or non-recursively, depending on the ...
  35.2  get_groupspace - Get groupspace specified parameters
  35.3  get_groupspace_types - Get available groupspace types
  35.4  get_snapshot_names - Get existing snapshots of the specified folder and possibly its ...
  35.5  get_userspace - Get userspace specified parameters
  35.6  get_userspace_types - Get available userspace types
  35.7  has_zfs_prop - Determine whether zfs property exists or not
  35.8  rename - Give a new name to snapthot
  35.9  rollback - Rollback a folder to a given snapshot
36  NMS Pool Management
  36.1  disable - Disable NMS Pool support
  36.2  enable - Enable NMS Pool support
  36.3  get_pool - Get additional information about NMS Pool
  36.4  kill_nms - Kill the process with specified PID
  36.5  start_nms - Starts new NMS instance
37  Support information collector
  37.1  get_sub_categories - Get sub categories
  37.2  get_top_categories - Get top categories
38  System Upgrade, Rollback and Checkpoint Management
  38.1  activate_rootfs - Activate, that is make default, the specified system checkpoint. This ...
  38.2  destroy_rootfs - Destroy the specified system checkpoint. Note that the appliance will ...
  38.3  get_rootfs_names - Get the names of all existing root filesystems a.k.a system ...
  38.4  get_rootfs_prop - Get the specified property of the system checkpoint
  38.5  get_rootfs_props - Get properties of the specified system checkpoint
  38.6  get_upgrade_info - Get detailed appliance software upgrade status
39  Fault Management
  39.1  clear - Clear specific fault ID
  39.2  clear_all - Clear all faults generated by the specified fault trigger ...
  39.3  event - Create and send event accroding to the specific trigger ...
  39.4  fault - Generate fault notification
  39.5  get_faults - Get faults generated so far by the specified fault trigger; ...
40  Volume (Pool)
  40.1  attach_lun - Attach to an existing mirror if the mirror containing ...
  40.2  clear_lun - Clear device errors in a volume. Device errors are periodically ...
  40.3  create_reserve - Creates new reserve folder
  40.4  detach_lun - Detach device from a mirror
  40.5  free_reserve - Removes folder with reserve
  40.6  get_all_names - Get array of all (contained) children names matching the specified ...
  40.7  get_available_spares - Returns hash of disks which can be used in hot ...
  40.8  get_groupspace - Get groupspace specified parameters
  40.9  get_groupspace_types - Get available groupspace types
  40.10  get_import_volumes - Get information on all or selected volumes that can be ...
  40.11  get_luns - Get LUNs of a given volume
  40.12  get_luns_for_all_volumes - Get all LUNs contained (or used) by the appliance's volumes ...
  40.13  get_prop_valid_values - Get valid range and/or enumeration for a given volume's property. ...
  40.14  get_shared_volumes - Get the list of all volumes which are shared ...
  40.15  get_status - Get volume's status
  40.16  get_userspace - Get userspace specified parameters
  40.17  get_userspace_types - Get available userspace types
  40.18  get_version_info - Get volume's ZFS version
  40.19  has_reserve - Determine if volume already has reserve folder
  40.20  has_zfs_prop - Determine whether zfs property exists or not
  40.21  has_zpool_prop - Determine whether zpool property exists or not
  40.22  history - Get volume history records, in terms of executed ZFS commands ...
  40.23  offline_lun - Take the specified physical device offline. While the device is ...
  40.24  online_lun - Bring the specified physical device online. This operation is not ...
  40.25  recover_faulted_luns - Recover faulted devices in a volume. This operation is currently ...
  40.26  remove_lun - Permanently remove a given device from the volume. This method ...
  40.27  replace_lun - Replace device in a mirror. The operation replaces with ...
  40.28  resolve_lun_to_volumes - Resolves LUN to its container volume(s).
  40.29  set_property - Set zpool specified property
  40.30  upgrade - Upgrade volume's ZFS version. WARNING: special consideration need to be ...
  40.31  vol_create - Create a volume
  40.32  vol_export - Export the specified volume. This will also cleanup/destroy: (1) all ...
  40.33  vol_grow - Grow a volume
  40.34  vol_import - Import a volume
41  Zvol (Emulated Volume-based Block Device)
  41.1  clone - Clone a given zvol. The operation results in a writable ...
  41.2  create - Create new zvol. Background: the appliance provides an easy iSCSI ...
  41.3  create_snapshot - Snapshot a given zvol
  41.4  create_with_props - Create a new zvol. This API allows to specify creation ...
  41.5  get_prop_valid_values - Get valid range and/or enumeration for a given zvol's property. ...
  41.6  has_zfs_prop - Determine whether zfs property exists or not
42  Examples and Usage Cases
  42.1  C/C++ - Examples in C/C++
  42.2  Perl - Examples in Perl
  42.3  Python - Examples in Python
  42.4  Ruby - Examples in Ruby

1  API Overview

Welcome to the NexentaStor Storage Appliance API (SA-API) Reference documentation. This API reference provides comprehensive information allowing to build new and extend existing management services, management clients and applications on top of NexentaStor.

Storage Appliance API (SA-API) uses RPC-like D-Bus protocol that employes TCP/IP transport. D-Bus is a powerful and flexible inter-process communication (IPC) mechanism that allows: for the service providers - to register the provided services, and for the clients - to lookup on the network and use the provided services in a location-independent way. NexentaStor leverages D-Bus to provide universal and comprehensive API to manage and monitor all aspects of the appliance's operation. For more information on dbus visit the D-Bus Project Homepage. There are many good introductions and tutorials available on the web, including for instance this D-Bus Tutorial.

Since SA-API provides a higher level abstraction on top of D-Bus, knowledge of these materials is, however, not a prerequisite. SA-API makes it easy to create new, or modify existing applications in C or C++, Perl, Python or Ruby. More language specific SA-API extensions may be added in the future. Still, for reference purposes the corresponding sources are listed below:

LANGUAGE COMMENT
C/C++SA-API is layered on top native libraries for Windows, Linux and MacOSX operating systems. The libraries are provided with the NexentaStor software development kit (SDK). NexentaStor SDK contains tutorials and examples written in C and C++.
PerlSA-API uses Perl D-Bus bindings realized via Net::DBus package. The package comes with Perl tutorials and Perl examples.
PythonSA-API utilizes Pythin D-Bus bindings. Similarly, the Python D-Bus Tutorial contains easy introduction and multiple Python examples.
RubySA-API is layered on top of Ruby D-bus bindings. The Ruby D-Bus project contains reference documentation, Ruby tutorials and examples.

The API provides access to the appliance's management objects and services. The appliance's management object hierarchy includes: lun, volume, folder, snapshot, network, network interface, network service, storage service, indexer, zvol, statistic collector, fault trigger, reporter, and others. Each object implements and publishes a part of the API, which makes the latter a by-product of two interrelated but still distinctly separate driving "forces": the appliance's object taxonomy and the required functionality of the 2nd tier NAS.

All client management applications use SA-API to monitor and administer the appliance. This ensures consistent view of the appliance from all clients, transactional behavior of all management administrative and monitoring operations, and easy third-party integrations.

The currently existing management clients include: management console (NMC) and web GUI (Nexenta Management View a.k.a. NMV), fault triggers and storage services, statistic collectors and daily/weekly reporters. All of them execute management operations first by acquiring an object proxy, and second, by calling one of the object's APIs. The SA-API supports many-to-many operation, in the sense that it allows to communicate to multiple statically bound or dynamically discovered appliances on the Internet/Intranet, and at the same time supports multi-user access to any given appliance.

SA-API has bindings for C, C++, Perl, Python and Ruby. This documentation contains examples and samples to demonstrate SA-API in these languages.

The prerequisites to using SA-API include:

The API can be used to take the full advantage of the NexentaStor capabilities, which include unlimited including unlimited incremental backups or 'snapshots', snapshot mirroring (replication), block level mirroring ('CDP'), integrated search, and the inherent virtualization, performance, thin provisioning and more. The following block diagram shows Nexenta Management Server - the sole provider of the API - and some of its clients.

2  Block Diagram

NexentaStor Architecture Block Diagram

3  Terms and Conventions

DOCUMENT CONVENTION COMMENT
value1 | value2 ...Enumeration. The '|' delimited list denotes enumerated list of values. For instance, 0 | 1 specifies a boolean value (passed as a parameter or returned by an SA-API method call) that can have one of the listed values: 0 or 1
true, falseAs far as SA-API and this document, "true" and "non-zero" on one hand, and "false" and "zero" on another are used interchangeably. There are no special "true" and "false" values. The preferred way to pass a boolean value in a method call is to specify 1, although you may use any non-zero value
array of (item-type)Array of items of the type 'item-type'. In this document, round brackets () are used to denote linear arrays containing items of the same type. For instance, 'array of (string)' means arrays of strings. Specification 'array of (string) foo()' indicates that the method foo() returns array of strings. Simlarly, 'bar (array of (string) param)' means that the type of the 1st argument of the method bar() is an array of strings. For more information on the SA-API data types, please see Section Data Types below.
dictionary {key-type => value-type}Dictionary of records, whereby each record has a key of type 'key-type' and a value of type 'value-type'. By convention, curly braces {} denote dictionaries. For more information on the SA-API data types, please see Section Data Types below

TERM COMMENT
SA-APINexentaStor Storage Appliance application programming interface
NMSNexenta Management Server, the sole provider of the SA-API
NMCNexenta Management Console, the appliance's management CLI
VolumeNexentaStor volume is a ZFS pool with certain additional attributes. There is a one-to-one relationship between a volume and the underlying ZFS pool
FolderNexentaStor folder is a ZFS filesystem
AutoSnap, AutoTier, AutoSync, AutoCdpTypes of appliance's storage services. For more information, please refer to NexentaStor User Guide
RunnerTriggers, Collectors, Reporters, and Indexers - also commonly called "runners" - are pluggable modules that perform specific Fault Management, Performance Monitoring, Reporting, and archive Indexing tasks. All specific runners inherit Virtual Runner SA-API interfaces
LunPhysical and logical drives, attached to the appliance directly or via iSCSI or FC SAN, are commonly called LUNs. The terms "LUN", "hard drive" and "disk" are used interchangeably
ZvolEmulated (virtual) block device based on a given appliance's volume

4  Object Model

NexentaStor management object model is designed to provision, manage, monitor, and control the life-cycle of all components that comprise the appliance, including network and data services, volumes (pools) and folders (filesystems), snapshots and zvols (virtual block devices), LUNs (physical and virtual disks), and more. The management architecture is in basic ways similar to CORBA and Java RMI, whereby object proxies on the client side are used to represent remote (implementation) objects, on a remote appliance.

The following lists all SA-API proxy objects - interface objects representing appliance's objects and services. The table comprises the following information:

NexentaStor SDK comes with a number of local (client-side) helpers. This includes nms_client_init() - to initialize SA-API client, and nms_remote_obj() - to acquire SA-API interface proxy object associated with a given appliance (identified by its hostname or IP address). Both nms_client_init() and nms_remote_obj() are provided with the language-specific bindings and demonstrated in the Section Examples and Usage Cases below.

SA-API interface (proxy) objectD-Bus nameReference sectionInherits
NZA::appl_group'/Root/ApplGroup'Groups of Appliances ManagementVirtual Container Virtual Base Object
NZA::appliance'/Root/Appliance'General Appliance ManagementVirtual Base Object
NZA::appl_backup'/Root/ApplianceBackup'Appliance BackupVirtual Base Object
NZA::collector'/Root/Runner/Collector'Statistic CollectionVirtual Runner Virtual Container Virtual Base Object
com.nexenta.nms.Container'Abstract Class'Virtual ContainerVirtual Base Object
NZA::folder'/Root/Folder'Folder (Filesystem)Virtual Container Virtual Base Object
NZA::indexer'/Root/Runner/Indexer'Folder and Snapshot Indexing Facility (Search Engine)Virtual Runner Virtual Container Virtual Base Object
NZA::iscsi'/Root/Iscsi'iSCSI InitiatorVirtual Base Object
NZA::jbod'/Root/Jbod'JBOD ManagementVirtual Container Virtual Base Object
NZA::job'/Root/Job'Job ManagementVirtual Container Virtual Base Object
NZA::logviewer'/Root/LogViewer'Log Viewing FacilityVirtual Base Object
NZA::lun'/Root/Lun'Logical and Physical Disk ManagementVirtual Container Virtual Base Object
NZA::mailer'/Root/Mailer'SMTP MailerVirtual Base Object
NZA::network'/Root/Network'Network ManagementVirtual Base Object
NZA::netif'/Root/Network/Interface'Network Interface ManagementVirtual Container Virtual Base Object
NZA::netstorsvc'/Root/NetworkStorageService'Network Storage ServiceVirtual Container Virtual Base Object
com.nexenta.nms.Object'Abstract Class'Virtual Base Object
NZA::plugin'/Root/Plugin'PluginVirtual Container Virtual Base Object
NZA::remote_app_account'/Root/RemoteAppAccount'Service Account ManagementVirtual Base Object
NZA::reporter'/Root/Runner/Reporter'Reporting Facility (Services, Performance, Capacity)Virtual Runner Virtual Container Virtual Base Object
NZA::runner'/Root/Runner'Virtual RunnerVirtual Container Virtual Base Object
NZA::script'/Root/Runner/ScriptRunner'User scripts ManagementVirtual Runner Virtual Container Virtual Base Object
NZA::server'/Root/Server'Nexenta Management ServerVirtual Base Object
NZA::smf'/Root/Smf'Service Management Facility (SMF)Virtual Container Virtual Base Object
NZA::auto_scrub'/Root/Smf/AutoService/AutoScrub'AutoScrub (volume scrubbing) ServiceVirtual Automatic Storage Service Service Management Facility (SMF) Virtual Container Virtual Base Object
NZA::autosvc'/Root/Smf/AutoService'Virtual Automatic Storage ServiceService Management Facility (SMF) Virtual Container Virtual Base Object
NZA::auto_snap'/Root/Smf/AutoService/AutoSnap'AutoSnap (snapshot) ServiceVirtual Automatic Storage Service Service Management Facility (SMF) Virtual Container Virtual Base Object
NZA::auto_tier'/Root/Smf/AutoService/AutoTier'AutoTier (data replication) ServiceVirtual Automatic Storage Service Service Management Facility (SMF) Virtual Container Virtual Base Object
NZA::netsvc'/Root/Smf/NetworkService'Network Services ManagementService Management Facility (SMF) Virtual Container Virtual Base Object
NZA::snapshot'/Root/Snapshot'Snapshot ManagementVirtual Container Virtual Base Object
NZA::srvpool'/Root/SrvPool'NMS Pool ManagementVirtual Base Object
NZA::support'/Root/Support'Support information collectorVirtual Base Object
NZA::syspool'/Root/Syspool'System Upgrade, Rollback and Checkpoint ManagementVirtual Container Virtual Base Object
NZA::trigger'/Root/Runner/Trigger'Fault ManagementVirtual Runner Virtual Container Virtual Base Object
NZA::volume'/Root/Volume'Volume (Pool)Virtual Container Virtual Base Object
NZA::zvol'/Root/Zvol'Zvol (Emulated Volume-based Block Device)Virtual Container Virtual Base Object

All SA-API interface objects without exception are extensions of SA-API generic Virtual Object. Thus, all methods provided by the Virtual Object are polymorphically available via SA-API interface objects listed in the table above. For instance, appliance->get_props() returns appliance's properties, as per com.nexenta.nms.Object::get_props specification.

Majority of the listed SA-API interface objects extend Virtual Container interface. SA-API Container is an abstraction to aggregate multiple objects of the same type: snapshots, volumes, folders, network services, network interfaces, runners, LUNs (disks), storage services. A typical sequence of steps to execute an operation on a specific (contained) object instance includes:

SA-API Virtual Container abstraction is repeatedly demonstrated throughout this reference; for specific examples in C, Perl, Python and Ruby please refer to Section Examples and Usage Cases below.

5  Data Types

SA-API "data type" is either a primitive data type or a complex type built based on the primitive data types, similar to abstract data types in Java and struct data types in C and C++. SA-API data types are used to define arguments and return values in the SA-API methods listed in this reference documentation. The primitive data types include:

PRIMITIVE DATA TYPE DESCRIPTION
string zero terminated string of bytes
int32 integer value
bool bolean value: 0 - false, 1 - true

The complex data types are:

COMPLEX DATA TYPE DESCRIPTION
array linear array containing items of the same data type. By convention, an array is denoted as (type), where type is typically one of the primitive types listed above. For instance, notation "array of (string)" means arrays of strings
dictionary dictionary or hash containing records of data. Each record in the dictionary has two distinct elements: key and value, whereby the key can be used to access the value directly. Throughout this documentation, dictionaries are denoted using curly braces {}, for instance: dictionary { string => bool } would mean a dictionary containing records consisting of two primitive elements: string key and boolean value

Rest of this section demonstrates usage of these SA-API data types in different languages.

5.1  Primitive Data Types

As far as Perl, Python and Ruby, SA-API primitive types are in fact the corresponding programming language's primitive types: no translation necessary. The next table shows a correspondence between D-Bus and C/C++ data types:
PRIMITIVE DATA TYPE C/C++ TYPE
string DBUS_TYPE_STRING
int32 DBUS_TYPE_INT32
bool DBUS_TYPE_BOOLEAN

None of the primitive data types require any special preparation for using it as an argument in the SA-API method call: it is enough to declare a C variable using one of the listed DBUS_TYPE_??? primitives, and then pass a pointer to it in an SA-API method call.

Processing SA-API results is also easy. The following example prints a string  returned by an SA-API call

	char *str;
	if (nms_get_basic (msg, DBUS_TYPE_STRING, &str))
		printf ("Received = %s\n", str);
		else printf ("Error getting string  value");
For a complete example in C, see Section C/C++ below.

5.2  Receiving an Array

The following example in C prints an array type returned by an SA-API method; this type of array is denoted in this document as array of (string)

	char **array;
	int count, i;
	count = nms_get_basic (msg, DBUS_TYPE_CHAR_ARRAY, &array);
	for (i = 0; i < count; i++){
		printf ("item = %s\n", array[i]);
	};

This snippet of Perl code simply prints a returned array of strings denoted in this document as array of (string). Note that SA-API complex data type array  is a regular Perl array, while SA-API dictionary  is simply a Perl hash.

	for my $item (@$array) {
		print "item=$item\n";
	}
For a complete and working example in Perl, see Section Perl below.

5.3  Receiving a Dictionary

The following example in C prints a dictionary type returned by an SA-API method; this type of dictionary is denoted in this document as dictionary {string => string}

	char **dict;
	int count, i;
	count = nms_get_basic (msg, DBUS_TYPE_CHAR_DICT, &dict);
	for (i = 0; i < count; i++){
		printf ("%s => %s\n", dict[i * 2], dict[i * 2 + 1]);
	};
For a complete example in C, see Section C/C++ below.

Next is a Perl code sample that does the same: prints a returned dictionary {string => string}. Note that complex data types are always returned by reference.

	for my $key (keys %$dict) {
		print "key=$key, value=$dict->{$key}\n";
	}

5.4  Receiving Complex Data Types

Low-level C functions do not support retrieving complex data types directly. In that case DBus functions should be used. The following example in C prints a dictionary of string arrays returned by an SA-API method; this type of dictionary is denoted in this document as dictionary {string => array of (string)}

	msg = nms_execute (proxy, "get_luns",
			DBUS_TYPE_STRING, &volume_name,
			DBUS_TYPE_INVALID);
	printf ("\nLUNS list: \n");

	if (msg) {
		int current_type;
		struct DBusMessageIter iter, subiter, item;
		char *path, *val;
		int arg_type = dbus_message_iter_get_arg_type (msg->reply);
		int elem_type = dbus_message_iter_get_element_type (msg->reply);
		if(arg_type != DBUS_TYPE_ARRAY || elem_type != DBUS_TYPE_DICT_ENTRY)
		{
			printf("Returned value is not a dictionary\n");
			return;
		}

		// enter the dictionary
		dbus_message_iter_recurse (msg->reply, &iter);

		while ((current_type = dbus_message_iter_get_arg_type (&iter)) != DBUS_TYPE_INVALID)
		{
			int args = 0;

			// enter the dictionary item
			dbus_message_iter_recurse (&iter, &subiter);

			// iterate through dictionary items
			while((current_type = dbus_message_iter_get_arg_type (&subiter)) != DBUS_TYPE_INVALID)
			{
				if(current_type == DBUS_TYPE_STRING)
				{
					// dictionary key is found (string type)
					dbus_message_iter_get_basic (&subiter, &path);
					args++;
					printf("%d. %s\n", args, path);
				}
				//if(current_type == DBUS_TYPE_DICT_ENTRY)
				if(current_type == DBUS_TYPE_ARRAY)
				{
					// dictionary value is found (array of string type)
					// enter the array
					dbus_message_iter_recurse (&subiter, &item);
					// iterate through all strings in array
					while((current_type = dbus_message_iter_get_arg_type (&item)) != DBUS_TYPE_INVALID)
					{
						if(current_type == DBUS_TYPE_STRING)
						{
							dbus_message_iter_get_basic (&item, &val);
							dbus_message_iter_next (&item);
						}
						printf("    %s\n", val?val:"");
					}
				}
				dbus_message_iter_next (&subiter);

			}
			dbus_message_iter_next (&iter);
		}
	}

5.5  Passing an Array

The following example in C prepares an array of strings denoted in this document as array of (string), to further be passed as a parameter in an SA-API method call:

	char *array[] = {
		"a", "b", "c", "d"
		};

This single-line Perl code fills an array of strings, to be passed as a parameter in SA-API method invocation:

	my @array = ('a', 'b', 'c', 'd');

5.6  Passing a Dictionary

The following example in C prepares a dictionary {string => string}, to further be passed as a parameter in an SA-API method call:

	char *dict[] = {
		"name", "appliance",
		"version", "1.0",
		"release_date", "06/17/2008"
		};
For a complete example in C, see Section C/C++ below.

Next is a Perl example that fills in the same type of a dictionary {string => array of (string)}, to be transferred to the remote appliance for execution, for instance in a call to modify user's ACL:

	my %dict = (
		allow => ['read_data', 'read_acl'],
		deny => ['write_data']
	);

Note again that SA-API dictionary  is a regular Perl hash. For a complete example in Perl, see Section Perl below.

6  Groups of Appliances Management

SA-API Interface Object

D-Bus name Interface class name Inherits
/Root/ApplGroupcom.nexenta.nms.ApplGroupVirtual Container Virtual Base Object
Properties
NAMETYPEACCESSDESCRIPTION
infostringwi General information about the object
ipc_namestringe Interface class name of the associated interface object
namestringri The name of the object
Inherited Methods
NAMEPROTOTYPE
com.nexenta.nms.Container::destroy['string', 'string'], []
com.nexenta.nms.Container::get_child_prop['string', 'string'], ['string']
com.nexenta.nms.Container::get_child_props['string', 'string'], [['dict', 'string', 'string']]
com.nexenta.nms.Container::get_names['string'], [['array', 'string']]
com.nexenta.nms.Container::get_names_by_prop['string', 'string', 'string'], [['array', 'string']]
com.nexenta.nms.Object::get_prop['string'], ['string']
com.nexenta.nms.Object::get_props['string'], [['dict', 'string', 'string']]
com.nexenta.nms.Container::object_exists['string'], ['bool']
com.nexenta.nms.Container::set_child_prop['string', 'string', 'string'], []
com.nexenta.nms.Object::set_prop['string', 'string'], []
com.nexenta.nms.Object::set_props[['dict', 'string', 'string']], []
com.nexenta.nms.Container::trylock['string', 'int32'], ['bool']
com.nexenta.nms.Object::trylock_self['int32'], ['bool']
com.nexenta.nms.Container::unlock['string', 'int32'], []
com.nexenta.nms.Object::unlock_self['int32'], []

6.1  com.nexenta.nms.ApplGroup::create

(void)  create (string group_name, dictionary {string => string} group_desc, array of (string) group_members)

Create a new group of two or more appliances. To form a group, make sure there is network connectivity to remote appliances, and/or run com.nexenta.nms.Appliance::ssh_bind to create new ssh-binding(s).

Parameters
NAMETYPEDESCRIPTION
group_namestringThe name of the group
group_descdictionary {string => string}Group description. The parameter is a simple dictionary { string => string }, for instance: { 'description' => 'storage 1 group' }
group_membersarray of (string)Group members. An array of appliances' hostnames or IP addresses, for instance: ('thost.mycorp.com', 'zhost.mycorp.com')
No return values
Usage Examples
3.  create('storage_1', {'description' => 'storage 1 group'}, ('thost.mycorp.com', 'zhost.mycorp.com')) 

group the two specified appliances ina group, and name this group 'storage_1'

See Also
MethodShort Description
com.nexenta.nms.ApplGroup::get_group_typesReturns array of supported group types, for instance ['basic'] ...
com.nexenta.nms.ApplGroup::get_membersFor a given group, get its member appliances

Next Section: General Appliance Management

6.2  com.nexenta.nms.ApplGroup::get_all

(array of (dictionary {string => string}))  get_all (string pattern)

Returns array of all supported groups of all types

Parameters
NAMETYPEDESCRIPTION
patternstringPattern to select a matching subset of groups. An empty string will match all groups
Return Value
TYPEDESCRIPTION
array of (dictionary {string => string})not set

Next Section: General Appliance Management

6.3  com.nexenta.nms.ApplGroup::get_all_members

(array of (string))  get_all_members (void)

Get the list of all members in all groups

No parameters
Return Value
TYPEDESCRIPTION
array of (string)The list of all members in all groups

Next Section: General Appliance Management

6.4  com.nexenta.nms.ApplGroup::get_group_types

(array of (string))  get_group_types (void)

Returns array of supported group types, for instance ['basic']

No parameters
Return Value
TYPEDESCRIPTION
array of (string)not set
See Also
MethodShort Description
com.nexenta.nms.ApplGroup::createCreate a new group of two or more appliances. To ...
com.nexenta.nms.ApplGroup::get_membersFor a given group, get its member appliances

Next Section: General Appliance Management

6.5  com.nexenta.nms.ApplGroup::get_members

(array of (string))  get_members (string group_name)

For a given group, get its member appliances

Parameters
NAMETYPEDESCRIPTION
group_namestringThe name of the group
Return Value
TYPEDESCRIPTION
array of (string)not set
Usage Examples
3.  get_members('storage_1') 

get members of the group 'storage_1'. The result may look like: ('thost.mycorp.com', 'zhost.mycorp.com')

See Also
MethodShort Description
com.nexenta.nms.ApplGroup::get_group_typesReturns array of supported group types, for instance ['basic'] ...
com.nexenta.nms.ApplGroup::get_membersFor a given group, get its member appliances

Next Section: General Appliance Management

7  General Appliance Management

SA-API Interface Object

D-Bus name Interface class name Inherits
/Root/Appliancecom.nexenta.nms.ApplianceVirtual Base Object
Properties
NAMETYPEACCESSDESCRIPTION
domainnamestringwi Domain name. For instance: mydomain.com.
enterprisestringri Set to 1 if Enterprise Edition, or 0 for Community Edition.
hostnamestringwi Host name.
infostringwi General information about the object
ipc_namestringe Interface class name of the associated interface object
is_trialstringri Set to 1 if appliance is in Trial mode.
kbd_layoutstringwi Keyboard layout - specific mechanical, visual, or functional arrangement of the keys. Storage Appliance supports a wide variety of keyboard layouts, including all QWERTY based layouts.
license_agreementstringri Path to the license agreement file.
modelstringi Appliance's model. Specifies a combination of appliance's model ID (unified or virtual) and a type of the software license. For instance: "ZFS Open Storage Appliance (Community Edition)".
model_idstringi model_id = STOR_UNIFIED | STOR_VIRTUAL. Specifies appliance's model ID. Currently there are two model IDs: "STOR_UNIFIED" - unified, bare-metal installable appliance, and "STOR_VIRTUAL" - pre-installed VMware image (virtual) appliance.
namestringri The name of the object
nmc_versionstringi NMC version, the version of Nexenta Management Console.
nms_versionstringi NMS version, the version of the Nexenta Management Server.
nmv_versionstringi NMV version, the version of Nexenta Management View (WebGUI).
num_cpu_coresstringi Number of CPU cores, that is total number of online processors in the system. Note that a physical CPU may support multiple cores.
os_versionstringi OS version, the version of the underlying Nexenta Operating System (NexentaOS). The versioning scheme includes specification of the OpenSolaris kernel build, for instance "b85" for build 85. The complete string may look as follows: "1.0.1b85".
product_familystringi product_family = "NexentaStor". There is currently a single product family, but this may change in the future.
release_datestringi Actual release date of the appliance's software, as a number of seconds since the start of epoch (00:00:00 UTC Jan 1st, 1970). For instance: '1210987793' would mean certain time of a day on for May 16, 2008
timezonestringwi Time Zone, for instance "US/Pacific".
uuidstringi UUID, or Universally Unique Identifier of the platform. Typically retrieved via smbios or equivalent.
x86_instruction_setstringi x86 instruction set = '64bit' | '32bit'
Inherited Methods
NAMEPROTOTYPE
com.nexenta.nms.Object::get_prop['string'], ['string']
com.nexenta.nms.Object::get_props['string'], [['dict', 'string', 'string']]
com.nexenta.nms.Object::set_prop['string', 'string'], []
com.nexenta.nms.Object::set_props[['dict', 'string', 'string']], []
com.nexenta.nms.Object::trylock_self['int32'], ['bool']
com.nexenta.nms.Object::unlock_self['int32'], []

7.1  com.nexenta.nms.Appliance::add_swap

(void)  add_swap (string zname)

Add zvol as an additional swap area

Parameters
NAMETYPEDESCRIPTION
znamestringZvol pathname, for instance 'vol1/zvol1', where vol1 would be the name of an underlying volume
No return values
See Also
MethodShort Description
com.nexenta.nms.Appliance::list_swapGet summary information about total swap space usage, existing swap ...
com.nexenta.nms.Appliance::delete_swapRemove zvol swap area - undo the effect of com.nexenta.nms.Appliance::add_swap ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.2  com.nexenta.nms.Appliance::configure_ugen_device

(void)  configure_ugen_device (dictionary {string => dictionary {string => string}} device_info)

Configuring generic USB device

Parameters
NAMETYPEDESCRIPTION
device_infodictionary {string => dictionary {string => string}}Dictionary which is got according to method 'list_conf_ugen_hid_devs'
No return values

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.3  com.nexenta.nms.Appliance::create_checkpoint

(string)  create_checkpoint (string snapname)

Create checkpoint from specified system snapshot

Parameters
NAMETYPEDESCRIPTION
snapnamestringName of the system snapshot from which to create a checkpoint
Return Value
TYPEDESCRIPTION
stringnot set

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.4  com.nexenta.nms.Appliance::dbus_auth_iptable_is_set

(bool)  dbus_auth_iptable_is_set (string action, string mask_ip)

Determine whether the specified deny or allow access rule is present in the appliance's iptable.

Parameters
NAMETYPEDESCRIPTION
actionstringaction = 'allow' | 'deny'
mask_ipstringmask_ip = IPv4 mask or IPv4 address
Return Value
TYPEDESCRIPTION
boolnot set
See Also
MethodShort Description
com.nexenta.nms.Appliance::dbus_auth_iptable_setDeny or allow access to the appliance from the specified ...
com.nexenta.nms.Appliance::dbus_auth_iptable_listGet all iptable access rules. Background: The appliance provides secure ...
com.nexenta.nms.Appliance::dbus_auth_iptable_unsetRemove deny or allow access rule from the appliance's iptable. ...
com.nexenta.nms.Appliance::dbus_auth_iptable_listGet all iptable access rules. Background: The appliance provides secure ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.5  com.nexenta.nms.Appliance::dbus_auth_iptable_list

(dictionary {string => string})  dbus_auth_iptable_list (void)

Get all iptable access rules. Background: The appliance provides secure access to other Storage Appliances, as well as administrative management client applications on the network. The inter-appliance access is executed either via SSH, or via SA-API (User Guide, Section "Storage Appliance API"), or both. All management client applications, whether developed internally by Nexenta Systems, Inc and/or by 3rd parties, access appliance via SA-API. In all cases, access to an appliance requires client authentication. SA-API supports two authentication mechanisms: 1) via IP address of the client machine, and 2) via ssh-keygen generated authentication keys. The 2nd, ssh-keygen based, mechanism is the preferred one. This (2nd) mechanism is realized via APIs: com.nexenta.nms.Appliance::dbus_auth_keys_add, com.nexenta.nms.Appliance::dbus_auth_keys_remove, com.nexenta.nms.Appliance::dbus_auth_keys_list. This is the mechanism used by Storage Appliances to communicate between themselves. The latter is required to run storage replication services, to execute in a group mode, to switch between appliances for the purposes of centralized management. Once the appliances are ssh-bound, all SA-API interfaces become available, and get executed in a secure way. Please see User Guide Sections "Centralized Management" and "Secure Access" for more information.

No parameters
Return Value
TYPEDESCRIPTION
dictionary {string => string}not set
See Also
MethodShort Description
com.nexenta.nms.Appliance::dbus_auth_iptable_setDeny or allow access to the appliance from the specified ...
com.nexenta.nms.Appliance::dbus_auth_iptable_listGet all iptable access rules. Background: The appliance provides secure ...
com.nexenta.nms.Appliance::dbus_auth_iptable_unsetRemove deny or allow access rule from the appliance's iptable. ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.6  com.nexenta.nms.Appliance::dbus_auth_iptable_set

(void)  dbus_auth_iptable_set (string action, string mask_ip)

Deny or allow access to the appliance from the specified IP address or subnet. This API results in adding another matching rule to the appliance's iptable. Background: The appliance provides secure access to other Storage Appliances, as well as administrative management client applications on the network. The inter-appliance access is executed either via SSH, or via SA-API (User Guide, Section "Storage Appliance API"), or both. All management client applications, whether developed internally by Nexenta Systems, Inc and/or by 3rd parties, access appliance via SA-API. In all cases, access to an appliance requires client authentication. SA-API supports two authentication mechanisms: 1) via IP address of the client machine, and 2) via ssh-keygen generated authentication keys

Parameters
NAMETYPEDESCRIPTION
actionstringaction = 'allow' | 'deny'
mask_ipstringmask_ip = IPv4 mask or IPv4 address
No return values
See Also
MethodShort Description
com.nexenta.nms.Appliance::dbus_auth_iptable_unsetRemove deny or allow access rule from the appliance's iptable. ...
com.nexenta.nms.Appliance::dbus_auth_iptable_listGet all iptable access rules. Background: The appliance provides secure ...
com.nexenta.nms.Appliance::dbus_auth_iptable_is_setDetermine whether the specified deny or allow access rule is ...
com.nexenta.nms.Appliance::dbus_auth_iptable_listGet all iptable access rules. Background: The appliance provides secure ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.7  com.nexenta.nms.Appliance::dbus_auth_iptable_unset

(void)  dbus_auth_iptable_unset (string action, string mask_ip)

Remove deny or allow access rule from the appliance's iptable. This is to reverse effect of com.nexenta.nms.Appliance::dbus_auth_iptable_set.

Parameters
NAMETYPEDESCRIPTION
actionstringaction = 'allow' | 'deny'
mask_ipstringmask_ip = IPv4 mask or IPv4 address
No return values
See Also
MethodShort Description
com.nexenta.nms.Appliance::dbus_auth_iptable_setDeny or allow access to the appliance from the specified ...
com.nexenta.nms.Appliance::dbus_auth_iptable_listGet all iptable access rules. Background: The appliance provides secure ...
com.nexenta.nms.Appliance::dbus_auth_iptable_is_setDetermine whether the specified deny or allow access rule is ...
com.nexenta.nms.Appliance::dbus_auth_iptable_listGet all iptable access rules. Background: The appliance provides secure ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.8  com.nexenta.nms.Appliance::dbus_auth_keys_add

(void)  dbus_auth_keys_add (string key, string value)

Add new key to the client key authorization table. Background: The appliance provides secure access to other Storage Appliances, as well as administrative management client applications on the network. The inter-appliance access is executed either via SSH, or via SA-API (User Guide, Section "Storage Appliance API"), or both. All management client applications, whether developed internally by Nexenta Systems, Inc and/or by 3rd parties, access appliance via SA-API. In all cases, access to an appliance requires client authentication. SA-API supports two authentication mechanisms: 1) via IP address of the client machine, and 2) via ssh-keygen generated authentication keys. The 2nd, ssh-keygen based, mechanism is the preferred one. This (2nd) mechanism is realized via APIs: com.nexenta.nms.Appliance::dbus_auth_keys_add, com.nexenta.nms.Appliance::dbus_auth_keys_remove, com.nexenta.nms.Appliance::dbus_auth_keys_list. This is the mechanism used by Storage Appliances to communicate between themselves. The latter is required to run storage replication services, to execute in a group mode, to switch between appliances for the purposes of centralized management. Once the appliances are ssh-bound, all SA-API interfaces become available, and get executed in a secure way. Please see User Guide Sections "Centralized Management" and "Secure Access" for more information.

Parameters
NAMETYPEDESCRIPTION
keystringKey identifier.
valuestringRSA key value.
No return values
See Also
MethodShort Description
com.nexenta.nms.Appliance::dbus_auth_iptable_setDeny or allow access to the appliance from the specified ...
com.nexenta.nms.Appliance::dbus_auth_iptable_listGet all iptable access rules. Background: The appliance provides secure ...
com.nexenta.nms.Appliance::dbus_auth_iptable_unsetRemove deny or allow access rule from the appliance's iptable. ...
com.nexenta.nms.Appliance::dbus_auth_keys_addAdd new key to the client key authorization table. Background: ...
com.nexenta.nms.Appliance::dbus_auth_keys_removeRemove authentication key.

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.9  com.nexenta.nms.Appliance::dbus_auth_keys_list

(dictionary {string => string})  dbus_auth_keys_list (void)

Get all authorization keys and their IDs. Background: The appliance provides secure access to other Storage Appliances, as well as administrative management client applications on the network. The inter-appliance access is executed either via SSH, or via SA-API (User Guide, Section "Storage Appliance API"), or both. All management client applications, whether developed internally by Nexenta Systems, Inc and/or by 3rd parties, access appliance via SA-API. In all cases, access to an appliance requires client authentication. SA-API supports two authentication mechanisms: 1) via IP address of the client machine, and 2) via ssh-keygen generated authentication keys. The 2nd, ssh-keygen based, mechanism is the preferred one. This (2nd) mechanism is realized via APIs: com.nexenta.nms.Appliance::dbus_auth_keys_add, com.nexenta.nms.Appliance::dbus_auth_keys_remove, com.nexenta.nms.Appliance::dbus_auth_keys_list. This is the mechanism used by Storage Appliances to communicate between themselves. The latter is required to run storage replication services, to execute in a group mode, to switch between appliances for the purposes of centralized management. Once the appliances are ssh-bound, all SA-API interfaces become available, and get executed in a secure way. Please see User Guide Sections "Centralized Management" and "Secure Access" for more information.

No parameters
Return Value
TYPEDESCRIPTION
dictionary {string => string}not set
See Also
MethodShort Description
com.nexenta.nms.Appliance::dbus_auth_iptable_setDeny or allow access to the appliance from the specified ...
com.nexenta.nms.Appliance::dbus_auth_iptable_listGet all iptable access rules. Background: The appliance provides secure ...
com.nexenta.nms.Appliance::dbus_auth_iptable_unsetRemove deny or allow access rule from the appliance's iptable. ...
com.nexenta.nms.Appliance::dbus_auth_keys_addAdd new key to the client key authorization table. Background: ...
com.nexenta.nms.Appliance::dbus_auth_keys_removeRemove authentication key.

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.10  com.nexenta.nms.Appliance::dbus_auth_keys_remove

(void)  dbus_auth_keys_remove (string key)

Remove authentication key.

Parameters
NAMETYPEDESCRIPTION
keystringKey identifier.
No return values
See Also
MethodShort Description
com.nexenta.nms.Appliance::dbus_auth_iptable_setDeny or allow access to the appliance from the specified ...
com.nexenta.nms.Appliance::dbus_auth_iptable_listGet all iptable access rules. Background: The appliance provides secure ...
com.nexenta.nms.Appliance::dbus_auth_iptable_unsetRemove deny or allow access rule from the appliance's iptable. ...
com.nexenta.nms.Appliance::dbus_auth_keys_addAdd new key to the client key authorization table. Background: ...
com.nexenta.nms.Appliance::dbus_auth_keys_removeRemove authentication key.

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.11  com.nexenta.nms.Appliance::delete_swap

(void)  delete_swap (string zname)

Remove zvol swap area - undo the effect of com.nexenta.nms.Appliance::add_swap

Parameters
NAMETYPEDESCRIPTION
znamestringZvol pathname, for instance 'vol1/zvol1', where vol1 would be the name of an underlying volume
No return values
See Also
MethodShort Description
com.nexenta.nms.Appliance::add_swapAdd zvol as an additional swap area
com.nexenta.nms.Appliance::list_swapGet summary information about total swap space usage, existing swap ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.12  com.nexenta.nms.Appliance::get_cpu_info

(dictionary {int32 => dictionary {string => string}})  get_cpu_info (void)

Get detailed per-CPU information

No parameters
Return Value
TYPEDESCRIPTION
dictionary {int32 => dictionary {string => string}}not set
Usage Examples
3.  get_cpu_info() 

Get detailed per-CPU information. A sample output follows: { '0' => { 'clock_MHz' => '2300', 'crtime' => '15.99439196', 'cpu_type' => 'i386', 'core_id' => '0', 'model' => '15', 'ncore_per_chip' => '1', 'brand' => 'Intel(r) Core(tm)2 Duo CPU T7700 @ 2.40GHz', 'state' => 'on-line', 'clog_id' => '0', 'implementation' => 'x86 (GenuineIntel 6F8 family 6 model 15 step 8 clock 2300 MHz)', 'fpu_type' => 'i387 compatible', 'state_begin' => '1213042644', 'stepping' => '8', 'supported_frequencies_Hz' => '2299926901', 'vendor_id' => 'GenuineIntel', 'pkg_core_id' => '0', 'current_clock_Hz' => '2299926901', 'ncpu_per_chip' => '1', 'chip_id' => '0', 'class' => 'misc', 'snaptime' => '54922.184402079', 'family' => '6' } }

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.13  com.nexenta.nms.Appliance::get_etchosts_rec

(array of (string))  get_etchosts_rec (string pattern)

Given a hostname or a part of a hostname, or FQDN - get the corresponding record from the appliance's local host table. In modern systems host tables have been superseded by DNS. However, the host table is still widely used for small sites isolated from the network. The local host table may also be required by some of the appliance's services, in particular replication and HA cluster services. Please see the corresponding manual pages for details. In addition, if in your environment the local information rarely changes, and the network is not connected to the Internet, DNS offers little advantage. The host table (while API uses file '/etc/inet/hosts', the symlink '/etc/hosts' is present for BSD compatibility) - is a simple text file that associates IP addresses with hostnames, one line per IP address. For each host a single line should be present with the following information: IP_address hostname [aliases...]. This API simply retrieves the corresponding record, and presents the result as array of strings, for instance: ('192.168.102.194', 'chost', 'chost.cdomain')

Parameters
NAMETYPEDESCRIPTION
patternstringPattern to select a record from appliance's local host table. The pattern must be specified and cannot be empty string.
Return Value
TYPEDESCRIPTION
array of (string)not set
Usage Examples
3.  get_etchosts_rec('chost') 

Get 'chost' record from the apliance's local host table. The result may look like: ('192.168.102.194', 'chost', 'chost.cdomain')

See Also
MethodShort Description
com.nexenta.nms.Appliance::set_etchosts_recAdd, replace or delete a record from the appliance's local ...
com.nexenta.nms.Network::set_nameserversSet name servers. Appliance may have up to 3 configured ...
com.nexenta.nms.Network::nameserversGet name servers.

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.14  com.nexenta.nms.Appliance::get_fqdn

(string)  get_fqdn (void)

Get a fully qualified domain name (FQDN) of the appliance.

No parameters
Return Value
TYPEDESCRIPTION
stringnot set
Usage Examples
3.  get_fqdn() 

Get appliance's FQDN. For example, assuming appliance's local hostname 'myhost' and domain name is 'example.com', the fully qualified domain name would be 'myhost.example.com'.

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.15  com.nexenta.nms.Appliance::get_general_diagnostics

(string)  get_general_diagnostics (int32 level, bool call_is_local)

Get general diagnostics

Parameters
NAMETYPEDESCRIPTION
levelint32Level of diagnostic messages
call_is_localboolNot used
Return Value
TYPEDESCRIPTION
stringnot set

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.16  com.nexenta.nms.Appliance::get_host_by_addr

(string)  get_host_by_addr (string ipaddr)

Get hostname by IP address

Parameters
NAMETYPEDESCRIPTION
ipaddrstringIP address
Return Value
TYPEDESCRIPTION
stringnot set

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.17  com.nexenta.nms.Appliance::get_kbd_layouts

(array of (string))  get_kbd_layouts (void)

Get all supported keyboard layouts

No parameters
Return Value
TYPEDESCRIPTION
array of (string)not set
Usage Examples
3.  get_kbd_layouts() 

get all available keyboard layouts. This may return the following array: (Albanian Belarusian Belgian Bulgarian Croatian Czech Danish Dutch Finnish French French-Canadian Hungarian German Greek Icelandic Italian Japanese-type6 Japanese Korean Latin-American Lithuanian Latvian Macedonian Malta_UK Malta_US Norwegian Polish Portuguese Russian Serbia-And-Montenegro Slovenian Slovakian Spanish Swedish Swiss-French Swiss-German Taiwan)

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.18  com.nexenta.nms.Appliance::get_license_info

(dictionary {string => string})  get_license_info (void)

Get license information

No parameters
Return Value
TYPEDESCRIPTION
dictionary {string => string}not set
Usage Examples
3.  get_license_info() 

get license information. A sample return follows: { 'license_key' => 'EVAL-E501340681-5D2UD6-BIAHJK', 'license_cntr_used' => '-1', 'license_type' => 'EVAL', 'license_message' => 'Software license verified OK', 'license_days_left' => '-1', 'license_size_left_percent' => '65', 'license_size_used' => '3.2TB', 'license_cntr_max' => '-1', 'machine_sig' => '5D2UD6' }

See Also
MethodShort Description
com.nexenta.nms.Appliance::set_license_keyUpdate license key

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.19  com.nexenta.nms.Appliance::get_memstat

(dictionary {string => int32})  get_memstat (void)

Get RAM utilization information

No parameters
Return Value
TYPEDESCRIPTION
dictionary {string => int32}not set
Usage Examples
3.  get_memstat() 

Get RAM information. A sample output follows: { 'ram_total' => 511, 'ram_unusable' => 8, 'ram_kernel' => 326, 'ram_locked' => 0, 'ram_free' => 51, 'ram_paging' => 0, 'ram_used' => 125 }

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.20  com.nexenta.nms.Appliance::get_saved_configurations

(array of (string))  get_saved_configurations (void)

Get the list of all available saved configurations.

No parameters
Return Value
TYPEDESCRIPTION
array of (string)not set
Usage Examples
3.  get_saved_configurations() 

retrieve all available saved configuration filenames and descriptions. The result may look like: ( '1252099979.tar.gz', 'Fri Sep 4 14:32:59 2009', '', '1252100931.tar.gz', 'Fri Sep 4 14:48:51 2009', 'auto-tier destroyed', '1252101756.tar.gz', 'Fri Sep 4 15:02:36 2009', 'hostname changed'). Please note that the result in this example contains 3 triples, each describing a particular saved configuration.

See Also
MethodShort Description
com.nexenta.nms.Appliance::save_configurationSave appliance's configuration at a pre-defined location. The current location ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.21  com.nexenta.nms.Appliance::get_serial_names

(dictionary {string => string})  get_serial_names (void)

Get the list of names of all available serial ports

No parameters
Return Value
TYPEDESCRIPTION
dictionary {string => string}not set

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.22  com.nexenta.nms.Appliance::get_subtimezones

(array of (string))  get_subtimezones (string continent, string country)

Get time zones for the specified country located in the specified continent

Parameters
NAMETYPEDESCRIPTION
continentstringTime zone continent (see com.nexenta.nms.Appliance::get_timezone_continents)
countrystringCountry name
Return Value
TYPEDESCRIPTION
array of (string)not set
Usage Examples
3.  get_subtimezones("America", "Mexico") 

get time zones for Mexico.

See Also
MethodShort Description
com.nexenta.nms.Appliance::get_timezone_continentGet time zone code for the specified country
com.nexenta.nms.Appliance::get_timezonesGiven a time zone continent, get all its time zones ...
com.nexenta.nms.Appliance::get_subtimezonesGet time zones for the specified country located in the ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.23  com.nexenta.nms.Appliance::get_timezone_continent

(string)  get_timezone_continent (string timezone)

Get time zone code for the specified country

Parameters
NAMETYPEDESCRIPTION
timezonestringTime zone
Return Value
TYPEDESCRIPTION
stringnot set
Usage Examples
3.  get_timezone_continent("Europe/Prague") 

translate time zone => continent. The result: "Europe".

See Also
MethodShort Description
com.nexenta.nms.Appliance::get_timezone_continentGet time zone code for the specified country
com.nexenta.nms.Appliance::get_timezonesGiven a time zone continent, get all its time zones ...
com.nexenta.nms.Appliance::get_subtimezonesGet time zones for the specified country located in the ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.24  com.nexenta.nms.Appliance::get_timezone_continents

(array of (string))  get_timezone_continents (void)

Get all time zone continents

No parameters
Return Value
TYPEDESCRIPTION
array of (string)not set
Usage Examples
3.  get_timezone_continents() 

get names of all time zone continents. The result will be: (Africa America Antarctica Arctic Asia Atlantic Australia Europe Pacific Indian)

See Also
MethodShort Description
com.nexenta.nms.Appliance::get_timezone_country_codeGet time zone code for the specified country
com.nexenta.nms.Appliance::get_timezone_continentGet time zone code for the specified country
com.nexenta.nms.Appliance::get_timezonesGiven a time zone continent, get all its time zones ...
com.nexenta.nms.Appliance::get_subtimezonesGet time zones for the specified country located in the ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.25  com.nexenta.nms.Appliance::get_timezone_country_code

(string)  get_timezone_country_code (string country)

Get time zone code for the specified country

Parameters
NAMETYPEDESCRIPTION
countrystringCountry name
Return Value
TYPEDESCRIPTION
stringnot set
Usage Examples
3.  get_timezone_country_code("Brazil") 

get time zone code for Brazil. The result: "BR".

See Also
MethodShort Description
com.nexenta.nms.Appliance::get_timezone_continentsGet all time zone continents
com.nexenta.nms.Appliance::get_timezone_continentGet time zone code for the specified country
com.nexenta.nms.Appliance::get_timezonesGiven a time zone continent, get all its time zones ...
com.nexenta.nms.Appliance::get_subtimezonesGet time zones for the specified country located in the ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.26  com.nexenta.nms.Appliance::get_timezones

(array of (string))  get_timezones (string continent)

Given a time zone continent, get all its time zones

Parameters
NAMETYPEDESCRIPTION
continentstringTime zone continent (see com.nexenta.nms.Appliance::get_timezone_continents)
Return Value
TYPEDESCRIPTION
array of (string)not set
Usage Examples
3.  get_timezones("Australia") 

get all time zones for Australia. The result: array that has a single entry: ("Australia").

See Also
MethodShort Description
com.nexenta.nms.Appliance::get_timezone_continentGet time zone code for the specified country
com.nexenta.nms.Appliance::get_timezonesGiven a time zone continent, get all its time zones ...
com.nexenta.nms.Appliance::get_subtimezonesGet time zones for the specified country located in the ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.27  com.nexenta.nms.Appliance::get_uptime

(dictionary {string => double})  get_uptime (void)

Get appliance's uptime, including the following information: The current time, how long the system has been running, how many users are currently logged on, and the system load averages for the past 1, 5, and 15 minutes. The times are measured in seconds from the start of epoch (00:00:00 UTC Jan 1st, 1970)

No parameters
Return Value
TYPEDESCRIPTION
dictionary {string => double}not set
Usage Examples
3.  get_uptime() 

Get appliance's uptime information. A sample output: { 'boot' => '86400', 'time' => '1213163656', 'load1' => '0.03', 'load5' => '0.03', 'load15' => '0.02' }

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.28  com.nexenta.nms.Appliance::group_configuration_sync_set

(void)  group_configuration_sync_set (bool enable)

Synchronize group configuration by enabling or disabling

Parameters
NAMETYPEDESCRIPTION
enablebool1: enable, '': disable
No return values

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.29  com.nexenta.nms.Appliance::list_appliances

(dictionary {string => string})  list_appliances (void)

Get all SSH-bound as well as dynamically discovered on a local subnet appliances that are currently online. The returned dictionary includes those and only those appliances that are currently online from the perspective of the appliance that executes the operation.

No parameters
Return Value
TYPEDESCRIPTION
dictionary {string => string}not set
See Also
MethodShort Description
com.nexenta.nms.Appliance::ssh_bindSSH-bind a given (user, appliance) to the specified remote host. ...
com.nexenta.nms.Appliance::ssh_unbindSSH-unbind a given (user, appliance) from the specified remote host. ...
com.nexenta.nms.Appliance::ssh_list_bindingsGet all existing SSH bound hosts
com.nexenta.nms.Appliance::ssh_check_bindingCheck whether the specified appliance's user is SSH-bound to the ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.30  com.nexenta.nms.Appliance::list_conf_ugen_hid_devs

(array of (dictionary {string => dictionary {string => string}}))  list_conf_ugen_hid_devs (void)

Get configuration of all USB devices

No parameters
Return Value
TYPEDESCRIPTION
array of (dictionary {string => dictionary {string => string}})not set

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.31  com.nexenta.nms.Appliance::list_swap

(array of (string))  list_swap (bool include_hdr_total)

Get summary information about total swap space usage, existing swap areas, and availability

Parameters
NAMETYPEDESCRIPTION
include_hdr_totalboolinclude_hdr_total = 0 | 1. Specifies whether to include detailed per swap area information
Return Value
TYPEDESCRIPTION
array of (string)not set
See Also
MethodShort Description
com.nexenta.nms.Appliance::add_swapAdd zvol as an additional swap area
com.nexenta.nms.Appliance::delete_swapRemove zvol swap area - undo the effect of com.nexenta.nms.Appliance::add_swap ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.32  com.nexenta.nms.Appliance::list_unconf_hid_devs

(array of (dictionary {string => dictionary {string => string}}))  list_unconf_hid_devs (void)

Get list of unconfigured USB devices

No parameters
Return Value
TYPEDESCRIPTION
array of (dictionary {string => dictionary {string => string}})not set

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.33  com.nexenta.nms.Appliance::ns_getent

(array of (string))  ns_getent (string entity, string type, string filter)

Get local and LDAP based users, groups, and netgroups

Parameters
NAMETYPEDESCRIPTION
entitystringentity = 'group' | 'passwd' | 'netgroup'. Respectively: 'group' - retrieve group names, 'passwd' - retrieve user names, 'netgroup' - retrieve netgroups. Note that users and groups can be both local and LDAP defined, while netgroups (groups of computers) can only be added via LDAP directory service.
typestringtype = 'local' | 'ldap' | ''. Use 'local' to retrieve locally defined users or groups, 'ldap' - LDAP defined users or groups, empty string '' - a union of both local and LDAP entities, that is, entities listed in the associated LDAP directory service.
filterstringFilter returned records based on the specified filter string. For instance, for entity 'user' filter = 'jo' will match usernames such as 'john', 'joe', 'joseph', etc. An empty filter '' matches all records.
Return Value
TYPEDESCRIPTION
array of (string)not set
Usage Examples
3.  ns_getent('group', '', '') 

get all groups including those listed in the LDAP directory

6.  ns_getent('group', 'local', '') 

retrieve only local groups

9.  ns_getent('passwd', 'local', '') 

get all local users

12.  ns_getent('passwd', 'ldap', 'jo') 

get LDAP users with usernames starting with 'jo'

See Also
MethodShort Description
com.nexenta.nms.Appliance::ns_netgroupGet a list of hosts (computers) included in a given ...
com.nexenta.nms.Appliance::ns_user_getGiven a local or LDAP defined user, get properties such ...
com.nexenta.nms.Appliance::ns_user_existsFind out whether a given user exists; if found, the ...
com.nexenta.nms.Appliance::ns_user_setModify existing local user or add new local user, if ...
com.nexenta.nms.Appliance::ns_user_delDelete the specified user
com.nexenta.nms.Appliance::ns_group_setModify existing local group or create a new group, if ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.34  com.nexenta.nms.Appliance::ns_group_del

(void)  ns_group_del (string group)

Delete the specified group

Parameters
NAMETYPEDESCRIPTION
groupstringThe name of the group
No return values
Usage Examples
3.  ns_user_del('contractors') 

delete group 'contractors'

See Also
MethodShort Description
com.nexenta.nms.Appliance::ns_group_existsFind out whether a given group exists; if found, the ...
com.nexenta.nms.Appliance::ns_getentGet local and LDAP based users, groups, and netgroups ...
com.nexenta.nms.Appliance::ns_netgroupGet a list of hosts (computers) included in a given ...
com.nexenta.nms.Appliance::ns_user_getGiven a local or LDAP defined user, get properties such ...
com.nexenta.nms.Appliance::ns_user_existsFind out whether a given user exists; if found, the ...
com.nexenta.nms.Appliance::ns_user_delDelete the specified user
com.nexenta.nms.Appliance::ns_user_setModify existing local user or add new local user, if ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.35  com.nexenta.nms.Appliance::ns_group_exists

(string)  ns_group_exists (string group)

Find out whether a given group exists; if found, the method returns group type

Parameters
NAMETYPEDESCRIPTION
groupstringThe name of the group
Return Value
TYPEDESCRIPTION
stringnot set
Usage Examples
3.  ns_group_exists('staff') 

check if the group 'staff' is defined

See Also
MethodShort Description
com.nexenta.nms.Appliance::ns_user_existsFind out whether a given user exists; if found, the ...
com.nexenta.nms.Appliance::ns_getentGet local and LDAP based users, groups, and netgroups ...
com.nexenta.nms.Appliance::ns_netgroupGet a list of hosts (computers) included in a given ...
com.nexenta.nms.Appliance::ns_user_getGiven a local or LDAP defined user, get properties such ...
com.nexenta.nms.Appliance::ns_user_setModify existing local user or add new local user, if ...
com.nexenta.nms.Appliance::ns_user_delDelete the specified user
com.nexenta.nms.Appliance::ns_group_setModify existing local group or create a new group, if ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.36  com.nexenta.nms.Appliance::ns_group_get

(dictionary {string => string})  ns_group_get (string group)

Given a local or LDAP defined group, get properties such as group ID, group members, group type ('local' or 'ldap'). LDAP defined groups may have other properties.

Parameters
NAMETYPEDESCRIPTION
groupstringthe name of the group
Return Value
TYPEDESCRIPTION
dictionary {string => string}not set
Usage Examples
3.  ns_group_get('staff') 

get properties and members of the group 'staff'. Following is a sample result: { 'type' => 'local', 'gidNumber' => 3001, 'memberUid' => 'john mike alice' }

See Also
MethodShort Description
com.nexenta.nms.Appliance::ns_group_existsFind out whether a given group exists; if found, the ...
com.nexenta.nms.Appliance::ns_getentGet local and LDAP based users, groups, and netgroups ...
com.nexenta.nms.Appliance::ns_netgroupGet a list of hosts (computers) included in a given ...
com.nexenta.nms.Appliance::ns_user_getGiven a local or LDAP defined user, get properties such ...
com.nexenta.nms.Appliance::ns_user_existsFind out whether a given user exists; if found, the ...
com.nexenta.nms.Appliance::ns_user_setModify existing local user or add new local user, if ...
com.nexenta.nms.Appliance::ns_group_setModify existing local group or create a new group, if ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.37  com.nexenta.nms.Appliance::ns_group_idmap_get

(string)  ns_group_idmap_get (string group)

Get identity mapping for a given Unix group.

Parameters
NAMETYPEDESCRIPTION
groupstringThe name of the group
Return Value
TYPEDESCRIPTION
stringnot set
Usage Examples
3.  ns_group_idmap_get('staff') 

get idmap for group 'staff'. The result may look like: 'wingroup:Staff@corp.com -> unixgroup:staff'

See Also
MethodShort Description
com.nexenta.nms.Appliance::ns_group_existsFind out whether a given group exists; if found, the ...
com.nexenta.nms.Appliance::ns_getentGet local and LDAP based users, groups, and netgroups ...
com.nexenta.nms.Appliance::ns_netgroupGet a list of hosts (computers) included in a given ...
com.nexenta.nms.Appliance::ns_user_getGiven a local or LDAP defined user, get properties such ...
com.nexenta.nms.Appliance::ns_user_setModify existing local user or add new local user, if ...
com.nexenta.nms.Appliance::ns_user_delDelete the specified user
com.nexenta.nms.Appliance::ns_group_setModify existing local group or create a new group, if ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.38  com.nexenta.nms.Appliance::ns_group_set

(void)  ns_group_set (string group, string type, dictionary {string => string} props)

Modify existing local group or create a new group, if does not exist. The new/existing group properties include: 'gidNumber' (group ID) and 'memberUid' that specifies a space delimited list of group members. The current implementation will work only for locally defined (type = 'local') groups

Parameters
NAMETYPEDESCRIPTION
groupstringThe name of the group
typestringThe type of the group. Must be 'local'.
propsdictionary {string => string}Dictionary { string => string } that contains group properties.
No return values
Usage Examples
3.  ns_group_set('staff', 'local', { 'memberUid' => "john mike alice" }) 

define local group 'staff'

See Also
MethodShort Description
com.nexenta.nms.Appliance::ns_group_existsFind out whether a given group exists; if found, the ...
com.nexenta.nms.Appliance::ns_getentGet local and LDAP based users, groups, and netgroups ...
com.nexenta.nms.Appliance::ns_netgroupGet a list of hosts (computers) included in a given ...
com.nexenta.nms.Appliance::ns_user_getGiven a local or LDAP defined user, get properties such ...
com.nexenta.nms.Appliance::ns_user_existsFind out whether a given user exists; if found, the ...
com.nexenta.nms.Appliance::ns_user_delDelete the specified user
com.nexenta.nms.Appliance::ns_user_setModify existing local user or add new local user, if ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.39  com.nexenta.nms.Appliance::ns_netgroup

(array of (string))  ns_netgroup (string netgroup)

Get a list of hosts (computers) included in a given netgroup

Parameters
NAMETYPEDESCRIPTION
netgroupstringThe name of the netgroup
Return Value
TYPEDESCRIPTION
array of (string)not set
Usage Examples
3.  ns_netgroup('netgroup-engineering') 

list all hosts from netgroup 'netgroup-engineering'. The result may look like: ('host1.mycorp.com', 'host2.mycorp.com', ...)

See Also
MethodShort Description
com.nexenta.nms.Appliance::ns_getentGet local and LDAP based users, groups, and netgroups ...
com.nexenta.nms.Appliance::ns_user_getGiven a local or LDAP defined user, get properties such ...
com.nexenta.nms.Appliance::ns_user_existsFind out whether a given user exists; if found, the ...
com.nexenta.nms.Appliance::ns_user_setModify existing local user or add new local user, if ...
com.nexenta.nms.Appliance::ns_user_delDelete the specified user
com.nexenta.nms.Appliance::ns_group_setModify existing local group or create a new group, if ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.40  com.nexenta.nms.Appliance::ns_user_del

(void)  ns_user_del (string user, bool del_home_folder)

Delete the specified user

Parameters
NAMETYPEDESCRIPTION
userstringThe name of the user
del_home_folderbooldel_home_folder = 0 | 1. Specifies whether to delete the user's home folder.
No return values
Usage Examples
3.  ns_user_del('john', 1) 

delete user 'john' and destroy the associated home folder

See Also
MethodShort Description
com.nexenta.nms.Appliance::ns_getentGet local and LDAP based users, groups, and netgroups ...
com.nexenta.nms.Appliance::ns_netgroupGet a list of hosts (computers) included in a given ...
com.nexenta.nms.Appliance::ns_user_getGiven a local or LDAP defined user, get properties such ...
com.nexenta.nms.Appliance::ns_user_existsFind out whether a given user exists; if found, the ...
com.nexenta.nms.Appliance::ns_user_setModify existing local user or add new local user, if ...
com.nexenta.nms.Appliance::ns_group_setModify existing local group or create a new group, if ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.41  com.nexenta.nms.Appliance::ns_user_exists

(string)  ns_user_exists (string user)

Find out whether a given user exists; if found, the method returns user type

Parameters
NAMETYPEDESCRIPTION
userstringThe name of the user
Return Value
TYPEDESCRIPTION
stringnot set
Usage Examples
3.  ns_user_exists('john') 

check if the user 'john' is defined

See Also
MethodShort Description
com.nexenta.nms.Appliance::ns_group_existsFind out whether a given group exists; if found, the ...
com.nexenta.nms.Appliance::ns_getentGet local and LDAP based users, groups, and netgroups ...
com.nexenta.nms.Appliance::ns_netgroupGet a list of hosts (computers) included in a given ...
com.nexenta.nms.Appliance::ns_user_getGiven a local or LDAP defined user, get properties such ...
com.nexenta.nms.Appliance::ns_user_setModify existing local user or add new local user, if ...
com.nexenta.nms.Appliance::ns_user_delDelete the specified user
com.nexenta.nms.Appliance::ns_group_setModify existing local group or create a new group, if ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.42  com.nexenta.nms.Appliance::ns_user_get

(dictionary {string => string})  ns_user_get (string user)

Given a local or LDAP defined user, get properties such as user ID (UID), home folder on the appliance, group ID, etc.

Parameters
NAMETYPEDESCRIPTION
userstringThe name of the user
Return Value
TYPEDESCRIPTION
dictionary {string => string}not set
Usage Examples
3.  ns_user_get('smb') 

return properties for user 'smb'; a sample return follows: { 'user' => 'smb', 'type' => 'local', 'gidNumber' => 1, 'group' => 'other', 'uidNumber' => 1001, 'homeFolder' => '', 'description' => '' }

See Also
MethodShort Description
com.nexenta.nms.Appliance::ns_getentGet local and LDAP based users, groups, and netgroups ...
com.nexenta.nms.Appliance::ns_netgroupGet a list of hosts (computers) included in a given ...
com.nexenta.nms.Appliance::ns_user_existsFind out whether a given user exists; if found, the ...
com.nexenta.nms.Appliance::ns_user_setModify existing local user or add new local user, if ...
com.nexenta.nms.Appliance::ns_user_delDelete the specified user
com.nexenta.nms.Appliance::ns_group_setModify existing local group or create a new group, if ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.43  com.nexenta.nms.Appliance::ns_user_idmap_get

(string)  ns_user_idmap_get (string user)

Get identity mapping for a given Unix user.

Parameters
NAMETYPEDESCRIPTION
userstringThe name of the user
Return Value
TYPEDESCRIPTION
stringnot set
Usage Examples
3.  ns_user_idmap_get('john') 

get idmap for user 'john'. The result may look like: 'winuser:John@corp.com -> unixuser:john'

See Also
MethodShort Description
com.nexenta.nms.Appliance::ns_group_existsFind out whether a given group exists; if found, the ...
com.nexenta.nms.Appliance::ns_getentGet local and LDAP based users, groups, and netgroups ...
com.nexenta.nms.Appliance::ns_netgroupGet a list of hosts (computers) included in a given ...
com.nexenta.nms.Appliance::ns_user_getGiven a local or LDAP defined user, get properties such ...
com.nexenta.nms.Appliance::ns_user_setModify existing local user or add new local user, if ...
com.nexenta.nms.Appliance::ns_user_delDelete the specified user
com.nexenta.nms.Appliance::ns_group_setModify existing local group or create a new group, if ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.44  com.nexenta.nms.Appliance::ns_user_set

(void)  ns_user_set (string user, string type, dictionary {string => string} props)

Modify existing local user or add new local user, if the user does not exist. The user properties include: 'uidNumber' (the user's ID), 'gidNumber' (the user's default group ID), 'homeFolder', 'description'. The current implementation will work only for locally defined (type = 'local') users

Parameters
NAMETYPEDESCRIPTION
userstringThe name of the user
typestringThe type of the user. Must be 'local'.
propsdictionary {string => string}Dictionary { string => string } that contains new properties to update existing user or assign to a new user, if does not exist.
No return values
Usage Examples
3.  ns_user_set('new_user_x', 'local', { 'uidNumber' => 1020, 'gidNumber' => 75, 'description' => "new description" }) 

assuming 'new_user_x' does not exist, this will create a new local user definition with the default group ID = 75, etc.

See Also
MethodShort Description
com.nexenta.nms.Appliance::ns_getentGet local and LDAP based users, groups, and netgroups ...
com.nexenta.nms.Appliance::ns_netgroupGet a list of hosts (computers) included in a given ...
com.nexenta.nms.Appliance::ns_user_getGiven a local or LDAP defined user, get properties such ...
com.nexenta.nms.Appliance::ns_user_existsFind out whether a given user exists; if found, the ...
com.nexenta.nms.Appliance::ns_user_delDelete the specified user
com.nexenta.nms.Appliance::ns_group_setModify existing local group or create a new group, if ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.45  com.nexenta.nms.Appliance::ping_tcp

(bool)  ping_tcp (string host, int32 timeout, int32 port)

Ping host via TCP

Parameters
NAMETYPEDESCRIPTION
hoststringHostname
timeoutint32Timeout in ms
portint32Optional paramter. If it's equal '', then ssh port is used by default
Return Value
TYPEDESCRIPTION
boolnot set

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.46  com.nexenta.nms.Appliance::poweroff

(void)  poweroff (bool force, bool reconfigure, string extra_options)

Get descriptions of the saved appliance's configurations

Parameters
NAMETYPEDESCRIPTION
forceboolforce = 0 | 1. If true (non-zero), force the poweroff operation even though one or more of appliance services are currently running. The forced operation may interrupt the service(s), with partially completed results that depend on the particular service and other conditions. Use force sparingly. In NMC, run 'show appliance nms locks' command to show outstanding locks taken by the running services.
reconfigureboolreconfigure = 0 | 1. Upon subsequent boot, re-enumerate all devices in the system. When the appliance boots again, and if this options was set to true (non-zero) at poweroff time - cleanup stale device links and re-enumerate all devices. The latter includes: disks, network cards, storage controllers. In some rare cases, when devices were moved in the appliance from place to place, new devices added, or used to replace other devices, there may be a situation when the appliance does not "see" a new device. Use reconfigure option to resolve this.
extra_optionsstringExtra options. A string that is passed as is to the system reboot function. For instance, as per poweroff(1m), "-d" forces a system crash dump. See poweroff(1m) for details.
No return values
See Also
MethodShort Description
com.nexenta.nms.Appliance::save_configurationSave appliance's configuration at a pre-defined location. The current location ...
com.nexenta.nms.Appliance::restore_configurationRestore appliance's configuration from the most recent copy stored at ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.47  com.nexenta.nms.Appliance::reboot

(void)  reboot (bool force, bool reconfigure, string extra_options)

Reboot the appliance

Parameters
NAMETYPEDESCRIPTION
forceboolforce = 0 | 1. If true (non-zero), force the reboot operation even though one or more of appliance services are currently running. The latter will interrupt the service(s), with partially completed results that depend on the service and other conditions. Caution: use force sparingly. In NMC, use 'show appliance nms locks' command to show outstanding locks taken by running services.
reconfigureboolreconfigure = 0 | 1. Upon reboot, re-enumerate all devices in the system. If true (non-zero), cleanup stale device links and re-enumerate all devices, including: disks, network cards, storage controllers. In some rare cases, when devices were moved in the appliance from place to place, new devices added, or used to replace other devices, there may be a situation when the appliance does not "see" a new device. Use reconfigure option to resolve this.
extra_optionsstringExtra options. A string that is passed as is to the system reboot function. For instance, as per reboot(1m), "-d" will force a system crash dump before rebooting. Use the delimiter -- (two hyphens) to separate reboot options from the options to be passed to boot(1m). For instance, "-d -- -v" passes "-d" to reboot (and causes system crash dump), and passes "-v" to boot. See reboot(1m) for details.
No return values
See Also
MethodShort Description
com.nexenta.nms.Appliance::poweroffGet descriptions of the saved appliance's configurations

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.48  com.nexenta.nms.Appliance::reset_ugen_configuration

(void)  reset_ugen_configuration (void)

Reset the current USB devices configuration

No parameters
No return values

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.49  com.nexenta.nms.Appliance::restore_configuration

(array of (string))  restore_configuration (string component, bool overwrite_newer, bool check_only, string vol_name)

Restore appliance's configuration from the most recent copy stored at a pre-defined location. The current location in use is defined by NMS property 'saved_configroot'. The operation restores service definitions for the appliance's storage services to the point in time they (the definitions) were saved via com.nexenta.nms.Appliance::save_configuration

Parameters
NAMETYPEDESCRIPTION
componentstringcomponent = basic | mailer | nms | nmc | auto-snap | auto-scrub | auto-sync | auto-tier. Use 'basic' to restore basic appliance settings: hostname, domainname, etc. Use 'mailer' to restore Mailer setting: SMTP server, username, password, etc. Use 'nms' to restore NMS configuration options, 'nmc' - to restore NMC configuration options. The rest component types can be used to restore service definitions for the corresponsing automated (auto-) service.
overwrite_newerbooloverwrite_newer = 0 | 1. An older saved component of appliance's configuration overrides a newer existing one if and only if overwrite_newer = 1
check_onlyboolcheck_only = 0 | 1. Setting check_only = 1 allows to "dry run" the operation without actually making changes.
vol_namestringOptional argument defining volume name; only to be passed when called by module handling failover.
Return Value
TYPEDESCRIPTION
array of (string)not set
Usage Examples
3.  restore_configuration('auto-sync', 0, 0) 

restore the latest saved auto-sync configuration; do not override existing newer auto-sync service(s), if any

See Also
MethodShort Description
com.nexenta.nms.Appliance::get_saved_configurationsGet the list of all available saved configurations.
com.nexenta.nms.Appliance::save_configurationSave appliance's configuration at a pre-defined location. The current location ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.50  com.nexenta.nms.Appliance::restore_volume_services

(bool)  restore_volume_services (string volume_name)

Restore volume services

Parameters
NAMETYPEDESCRIPTION
volume_namestringThe name of the volume to restore
Return Value
TYPEDESCRIPTION
boolnot set

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.51  com.nexenta.nms.Appliance::save_configuration

(string)  save_configuration (string description)

Save appliance's configuration at a pre-defined location. The current location in use is defined by NMS property 'saved_configroot'. The saved configuration will include service definitions for the appliance's storage services. The saved configuration includes the following components: basic | mailer | nms | nmc | auto-snap | auto-scrub | auto-sync | auto-tier, where 'basic' configuration includes appliance basic settings: hostname, domainname, etc., 'mailer' - SMTP server, username, password, etc., 'nms' - NMS configuration options, 'nmc' - NMC configuration options. The rest component types stand for service definitions of the corresponsing automated (auto-) services. Note that com.nexenta.nms.Appliance::restore_configuration method can be used to later restore only some components of the saved configuration, and not necessarily the entire configuration.

Parameters
NAMETYPEDESCRIPTION
descriptionstringArbitrary string to be saved with the configuration itself. Spaces are permitted. The description can be used to help identify any context related to the operation.
Return Value
TYPEDESCRIPTION
stringnot set
See Also
MethodShort Description
com.nexenta.nms.Appliance::get_saved_configurationsGet the list of all available saved configurations.
com.nexenta.nms.Appliance::restore_configurationRestore appliance's configuration from the most recent copy stored at ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.52  com.nexenta.nms.Appliance::set_etchosts_rec

(void)  set_etchosts_rec (string ipaddr, array of (string) hostnames)

Add, replace or delete a record from the appliance's local host table. The local host table is first searched by ipaddr (the first argument). If the rest arguments is an empty array, the corresponding located record is removed. Otherwise, if the record is located, it is modified, and alternatively - added. Background: In modern systems host tables have been superseded by DNS. However, the host table is still widely used for small sites isolated from the network. The local host table may also be required by some of the appliance's services, in particular replication and HA cluster services. Please see the corresponding manual pages for details. In addition, if in your environment the local information rarely changes, and the network is not connected to the Internet, DNS offers little advantage. The host table (while API uses file '/etc/inet/hosts', the symlink '/etc/hosts' is present for BSD compatibility) - is a simple text file that associates IP addresses with hostnames, one line per IP address. For each host a single line should be present with the following information: IP_address hostname [aliases...].

Parameters
NAMETYPEDESCRIPTION
ipaddrstringIP address of the host to be located in (or to be added to) the local appliance's host table.
hostnamesarray of (string)Array of hostname(s) and possibly FQDN(s) to associate with a given IP address.
No return values
Usage Examples
3.  set_etchosts_rec('192.168.102.194', ('chost', 'chost.cdomain')) 

Add a record to resolve hostname to IP address to the apliance's local host table, or - if the record already exists - replace it with the specified information.

See Also
MethodShort Description
com.nexenta.nms.Appliance::get_etchosts_recGiven a hostname or a part of a hostname, or ...
com.nexenta.nms.Network::set_nameserversSet name servers. Appliance may have up to 3 configured ...
com.nexenta.nms.Network::nameserversGet name servers.

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.53  com.nexenta.nms.Appliance::set_license_key

(bool)  set_license_key (string new_license_key)

Update license key

Parameters
NAMETYPEDESCRIPTION
new_license_keystringNew license key
Return Value
TYPEDESCRIPTION
boolnot set
Usage Examples
3.  set_license_key('EVAL-E501340681-5D2UD6-BIAHJK') 

update appliance's license key with a new (license key) value

See Also
MethodShort Description
com.nexenta.nms.Appliance::get_license_infoGet license information

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.54  com.nexenta.nms.Appliance::ssh_bind

(int32)  ssh_bind (string user, string hostport, string password)

SSH-bind a given (user, appliance) to the specified remote host. Two appliances are considered SSH-bound if ssh_bind operation is successfully performed for (and by) 'root'.

Parameters
NAMETYPEDESCRIPTION
userstringUser name. Applaince's local user, or a user registered with the associated LDAP/AD server.
hostportstringhostport = hostname[:port]. The default port is 22. If the ':port' part of the hostport parameter is omitted, the default port 22 is assumed.
passwordstringThe password of the specified user on the remote host.
Return Value
TYPEDESCRIPTION
int32not set
See Also
MethodShort Description
com.nexenta.nms.Appliance::ssh_check_bindingCheck whether the specified appliance's user is SSH-bound to the ...
com.nexenta.nms.Appliance::ssh_unbindSSH-unbind a given (user, appliance) from the specified remote host. ...
com.nexenta.nms.Appliance::ssh_list_bindingsGet all existing SSH bound hosts
com.nexenta.nms.Appliance::list_appliancesGet all SSH-bound as well as dynamically discovered on a ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.55  com.nexenta.nms.Appliance::ssh_check_binding

(bool)  ssh_check_binding (string user, string hostport)

Check whether the specified appliance's user is SSH-bound to the specified remote host. Two appliances are considered SSH-bound if ssh_check_binding returns true for user 'root'.

Parameters
NAMETYPEDESCRIPTION
userstringUser name. Applaince's local user, or a user registered with the associated LDAP/AD server.
hostportstringhostport = hostname[:port]. The default port is 22. If the ':port' part of the hostport parameter is omitted, the default port 22 is assumed.
Return Value
TYPEDESCRIPTION
boolnot set
Usage Examples
3.  ssh_check_binding('root', 'remote-host.domain') 

check whether the appliance is SSH-bound to 'remote-host.domain'.

6.  ssh_check_binding('mike', '192.168.17.145:4000') 

check whether the user 'mike' is SSH-bound to host with IP address 192.168.17.145 via the explicitly specified port 4000.

See Also
MethodShort Description
com.nexenta.nms.Appliance::ssh_bindSSH-bind a given (user, appliance) to the specified remote host. ...
com.nexenta.nms.Appliance::ssh_unbindSSH-unbind a given (user, appliance) from the specified remote host. ...
com.nexenta.nms.Appliance::ssh_list_bindingsGet all existing SSH bound hosts
com.nexenta.nms.Appliance::list_appliancesGet all SSH-bound as well as dynamically discovered on a ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.56  com.nexenta.nms.Appliance::ssh_list_bindings

(dictionary {string => array of (string)})  ssh_list_bindings (void)

Get all existing SSH bound hosts

No parameters
Return Value
TYPEDESCRIPTION
dictionary {string => array of (string)}not set
See Also
MethodShort Description
com.nexenta.nms.Appliance::ssh_bindSSH-bind a given (user, appliance) to the specified remote host. ...
com.nexenta.nms.Appliance::ssh_unbindSSH-unbind a given (user, appliance) from the specified remote host. ...
com.nexenta.nms.Appliance::ssh_check_bindingCheck whether the specified appliance's user is SSH-bound to the ...
com.nexenta.nms.Appliance::list_appliancesGet all SSH-bound as well as dynamically discovered on a ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.57  com.nexenta.nms.Appliance::ssh_unbind

(int32)  ssh_unbind (string user, string hostport, bool force)

SSH-unbind a given (user, appliance) from the specified remote host. Two appliances are considered SSH-bound if ssh_bind operation is successfully performed for (and by) 'root'. This operation reverses the effect of com.nexenta.nms.Appliance::ssh_bind

Parameters
NAMETYPEDESCRIPTION
userstringUser name. Applaince's local user, or a user registered with the associated LDAP/AD server.
hostportstringhostport = hostname[:port]. The default port is 22. If the ':port' part of the hostport parameter is omitted, the default port 22 is assumed.
forceboolforce = 0 | 1. Non-zero (true) - force the operation even though the remote may not be accessible.
Return Value
TYPEDESCRIPTION
int32not set
See Also
MethodShort Description
com.nexenta.nms.Appliance::ssh_bindSSH-bind a given (user, appliance) to the specified remote host. ...
com.nexenta.nms.Appliance::ssh_check_bindingCheck whether the specified appliance's user is SSH-bound to the ...
com.nexenta.nms.Appliance::ssh_list_bindingsGet all existing SSH bound hosts
com.nexenta.nms.Appliance::list_appliancesGet all SSH-bound as well as dynamically discovered on a ...

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.58  com.nexenta.nms.Appliance::ssl_bind

(int32)  ssl_bind (string certificate, string cname)

Add a new certificate to LDAP managed database

Parameters
NAMETYPEDESCRIPTION
certificatestringCertificate file
cnamestringCertificate alias (optional): cname = '' means that FQDN will be used.
Return Value
TYPEDESCRIPTION
int32not set
See Also
MethodShort Description
com.nexenta.nms.Appliance::ssl_direct_bindAdd a new certificate to LDAP managed database
com.nexenta.nms.Appliance::ssl_check_bindingCheck whether the specified certificate exists in database
com.nexenta.nms.Appliance::ssl_list_bindingsGet trusted host information for all existing certificates
com.nexenta.nms.Appliance::ssl_list_certinfosGet certificate information for all existing certificates

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.59  com.nexenta.nms.Appliance::ssl_check_binding

(bool)  ssl_check_binding (string cname)

Check whether the specified certificate exists in database

Parameters
NAMETYPEDESCRIPTION
cnamestringCertificate alias
Return Value
TYPEDESCRIPTION
boolnot set
See Also
MethodShort Description
com.nexenta.nms.Appliance::ssl_direct_bindAdd a new certificate to LDAP managed database
com.nexenta.nms.Appliance::ssl_bindAdd a new certificate to LDAP managed database
com.nexenta.nms.Appliance::ssl_list_bindingsGet trusted host information for all existing certificates
com.nexenta.nms.Appliance::ssl_list_certinfosGet certificate information for all existing certificates

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.60  com.nexenta.nms.Appliance::ssl_direct_bind

(int32)  ssl_direct_bind (string hostport, string cname)

Add a new certificate to LDAP managed database

Parameters
NAMETYPEDESCRIPTION
hostportstringhostport = hostname[:port]. The default port is 636. If the ':port' part of the hostport parameter is omitted, the default port 636 is assumed.
cnamestringCertificate alias (optional): cname = '' (empty string) means that FQDN will be used.
Return Value
TYPEDESCRIPTION
int32not set
See Also
MethodShort Description
com.nexenta.nms.Appliance::ssl_check_bindingCheck whether the specified certificate exists in database
com.nexenta.nms.Appliance::ssl_bindAdd a new certificate to LDAP managed database
com.nexenta.nms.Appliance::ssl_list_bindingsGet trusted host information for all existing certificates
com.nexenta.nms.Appliance::ssl_list_certinfosGet certificate information for all existing certificates

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.61  com.nexenta.nms.Appliance::ssl_list_bindings

(dictionary {string => string})  ssl_list_bindings (void)

Get trusted host information for all existing certificates

No parameters
Return Value
TYPEDESCRIPTION
dictionary {string => string}not set
See Also
MethodShort Description
com.nexenta.nms.Appliance::ssl_direct_bindAdd a new certificate to LDAP managed database
com.nexenta.nms.Appliance::ssl_check_bindingCheck whether the specified certificate exists in database
com.nexenta.nms.Appliance::ssl_unbind_by_hostnameRemove certificate from the LDAP managed database
com.nexenta.nms.Appliance::ssl_list_certinfosGet certificate information for all existing certificates

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.62  com.nexenta.nms.Appliance::ssl_list_certificates

(array of (string))  ssl_list_certificates (void)

Get certificate files

No parameters
Return Value
TYPEDESCRIPTION
array of (string)not set
See Also
MethodShort Description
com.nexenta.nms.Appliance::ssl_direct_bindAdd a new certificate to LDAP managed database
com.nexenta.nms.Appliance::ssl_check_bindingCheck whether the specified certificate exists in database
com.nexenta.nms.Appliance::ssl_unbind_by_hostnameRemove certificate from the LDAP managed database
com.nexenta.nms.Appliance::ssl_list_bindingsGet trusted host information for all existing certificates

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.63  com.nexenta.nms.Appliance::ssl_list_certinfos

(array of (dictionary {string => string}))  ssl_list_certinfos (void)

Get certificate information for all existing certificates

No parameters
Return Value
TYPEDESCRIPTION
array of (dictionary {string => string})not set
See Also
MethodShort Description
com.nexenta.nms.Appliance::ssl_direct_bindAdd a new certificate to LDAP managed database
com.nexenta.nms.Appliance::ssl_check_bindingCheck whether the specified certificate exists in database
com.nexenta.nms.Appliance::ssl_unbind_by_hostnameRemove certificate from the LDAP managed database
com.nexenta.nms.Appliance::ssl_list_bindingsGet trusted host information for all existing certificates

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.64  com.nexenta.nms.Appliance::ssl_unbind

(int32)  ssl_unbind (string cname)

Remove the specified certificate from database - compare with com.nexenta.nms.Appliance::ssl_unbind_by_hostname

Parameters
NAMETYPEDESCRIPTION
cnamestringCertificate alias (optional): cname = '' (empty string) means that FQDN will be used.
Return Value
TYPEDESCRIPTION
int32not set
See Also
MethodShort Description
com.nexenta.nms.Appliance::ssl_direct_bindAdd a new certificate to LDAP managed database
com.nexenta.nms.Appliance::ssl_check_bindingCheck whether the specified certificate exists in database
com.nexenta.nms.Appliance::ssl_list_bindingsGet trusted host information for all existing certificates
com.nexenta.nms.Appliance::ssl_list_certinfosGet certificate information for all existing certificates

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.65  com.nexenta.nms.Appliance::ssl_unbind_by_hostname

(int32)  ssl_unbind_by_hostname (string host_fqdn)

Remove certificate from the LDAP managed database

Parameters
NAMETYPEDESCRIPTION
host_fqdnstringFQDN of the trusted host
Return Value
TYPEDESCRIPTION
int32not set
See Also
MethodShort Description
com.nexenta.nms.Appliance::ssl_direct_bindAdd a new certificate to LDAP managed database
com.nexenta.nms.Appliance::ssl_check_bindingCheck whether the specified certificate exists in database
com.nexenta.nms.Appliance::ssl_list_bindingsGet trusted host information for all existing certificates
com.nexenta.nms.Appliance::ssl_list_certinfosGet certificate information for all existing certificates

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.66  com.nexenta.nms.Appliance::stat_file

(dictionary {string => string})  stat_file (string filepath)

Collects and returns info for file path, including file type, perms, size, inode, gid, uid, timestamps and so on

Parameters
NAMETYPEDESCRIPTION
filepathstringFull path to the file
Return Value
TYPEDESCRIPTION
dictionary {string => string}not set

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.67  com.nexenta.nms.Appliance::sysnotice_check

(string)  sysnotice_check (void)

Check NMS sytem notice file

No parameters
Return Value
TYPEDESCRIPTION
stringnot set

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.68  com.nexenta.nms.Appliance::sysnotice_set

(void)  sysnotice_set (string notice_msg)

Update NMS sytem notice file

Parameters
NAMETYPEDESCRIPTION
notice_msgstringSytem notice string
No return values

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.69  com.nexenta.nms.Appliance::sysnotice_unset

(void)  sysnotice_unset (void)

Clear NMS sytem notice file

No parameters
No return values

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.70  com.nexenta.nms.Appliance::upgradable_packages

(array of (string))  upgradable_packages (void)

Get the list of packages which will be upgraded

No parameters
Return Value
TYPEDESCRIPTION
array of (string)not set

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.71  com.nexenta.nms.Appliance::upgradable_packages_check

(array of (string))  upgradable_packages_check (array of (string) packages_for_check)

Determine what packages require upgrade

Parameters
NAMETYPEDESCRIPTION
packages_for_checkarray of (string)List of packages to be checked
Return Value
TYPEDESCRIPTION
array of (string)not set

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

7.72  com.nexenta.nms.Appliance::upgrade_check

(int32)  upgrade_check (int32 invalidate)

Check for appliance software upgrades

Parameters
NAMETYPEDESCRIPTION
invalidateint32invalidate = 0 | 1. If true (that is, non-zero), disregard locally cached upgrade status and actually perform query on the remote centralized software repository. The latter operation may take some time, use invalidate to get just in time upgrade information. Note that the appliance automatically checks for upgrades and caches the results for a certain time to optimize the operation.
Return Value
TYPEDESCRIPTION
int32not set
Usage Examples
3.  upgrade_check(0) 

check for upgrades; use the latest cached result of the automatically performed check for upgrades.

Previous Section: Groups of Appliances ManagementTable Of ContentsNext Section: Appliance Backup

8  Appliance Backup

SA-API Interface Object

D-Bus name Interface class name Inherits
/Root/ApplianceBackupcom.nexenta.nms.ApplianceBackupVirtual Base Object
Properties
NAMETYPEACCESSDESCRIPTION
infostringwi General information about the object
ipc_namestringe Interface class name of the associated interface object
namestringri The name of the object
Inherited Methods
NAMEPROTOTYPE
com.nexenta.nms.Object::get_prop['string'], ['string']
com.nexenta.nms.Object::get_props['string'], [['dict', 'string', 'string']]
com.nexenta.nms.Object::set_prop['string', 'string'], []
com.nexenta.nms.Object::set_props[['dict', 'string', 'string']], []
com.nexenta.nms.Object::trylock_self['int32'], ['bool']
com.nexenta.nms.Object::unlock_self['int32'], []

8.1  com.nexenta.nms.ApplianceBackup::get_saved_configurations

(array of (dictionary {string => string}))  get_saved_configurations (string dir, bool short)

Returns a list of existing saved appliance configurations

Parameters
NAMETYPEDESCRIPTION
dirstringOptional parameter. A path where saved configurations are located. If it is empty then a list of saved configurations done by appliance itself is returned
shortboolShort = 0 | 1. Determines amount of information returned for each save (short/verbose). Verbose mode works a bit longer because it extracts description from every save
Return Value
TYPEDESCRIPTION
array of (dictionary {string => string})List of all existing saved configurations attributes. Reqiured attributes are: name - save configuration archive file name, time - human readable creation time In verbose mode following attributes are added: description - save description extracted from archive

Previous Section: General Appliance ManagementTable Of ContentsNext Section: Statistic Collection

8.2  com.nexenta.nms.ApplianceBackup::get_state

(string)  get_state (void)

Returns current state of a save/restore process

No parameters
Return Value
TYPEDESCRIPTION
stringPossible values are 'running' - at that moment appliance is busy (saving or restoring is in process) and 'idle' - it is safe to start saving or restoring

Previous Section: General Appliance ManagementTable Of ContentsNext Section: Statistic Collection

8.3  com.nexenta.nms.ApplianceBackup::restore_app_configuration

(int32, array of (string))  restore_app_configuration (array of (string) component_list, dictionary {string => string} params)

Restores appliance configuration

Parameters
NAMETYPEDESCRIPTION
component_listarray of (string)List of components to restore. It may be empty which means 'restore all' or contain one or more items from the list of allowed names: auto-sync - auto-sync services; auto-snap - auto-snap services; auto-tier - auto-tier services; auto-scrub - auto-scrub services; users - unix groups and users; names - appliance names: only domainname and hostname at that moment; basic - applaince basic properties: keyboard layout, time zone etc; nms - some of NMS properties; mailer - mailer settings; shared-volumes - shared volumes list (f.e, shared via iscsi, auto-cdp); plugins - plugins settings that support its settings save/restore; interface - network interfaces configuration; netsvc - network services configuration (f.e, cifs user mapings, ldap configuration etc); runners - triggers, collectors, reporters and indexer settings; shares - folders settings with ACL that are shared via rsync, cifs etc
paramsdictionary {string => string}Additional restore parameters. If dictionary is empty then configuration will be restored from the latest applaince save. Restore process can be tuned up with the parameters: path - alternative path to file or directory to restore. If path is directory then configuration will be restored from the newest save; volume - one volume action: restore all auto-* services, shares for a given volume; dry - do the 'dry-run': restore without real actions. It checks what has to be restored and possible errors. After dry run the method returns the list of required actions and encountered errors; overwrite - overwrite existing services: old configuration is replaced with configuration from save (used only for auto-* services and shared volumes)
Return Value
TYPEDESCRIPTION
int32Number of encountered error. 0 - restore is successfull
array of (string)List of required or fulfilled actions and errors.

Previous Section: General Appliance ManagementTable Of ContentsNext Section: Statistic Collection

8.4  com.nexenta.nms.ApplianceBackup::save_app_configuration

(string)  save_app_configuration (array of (string) component_list, dictionary {string => string} params)

Save appliance configuration

Parameters
NAMETYPEDESCRIPTION
component_listarray of (string)List of components to save. It may be empty that means 'save all' or contains one or more items from the list of allowed names: auto-sync - auto-sync services; auto-snap - auto-snap services; auto-tier - auto-tier services; auto-scrub - auto-scrub services; users - unix groups and users; names - appliance names: only domainname and hostname at that moment; basic - applaince basic properties: keyboard layout, time zone etc; nms - some of NMS properties; mailer - mailer settings; shared-volumes - shared volumes list (f.e, shared via iscsi, auto-cdp); plugins - plugins settings that support its settings save/restore; interface - network interfaces configuration; netsvc - network services configuration (f.e, cifs user mapings, ldap configuration etc); runners - triggers, collectors, reporters and indexer settings; shares - folders settings with ACL that are shared via rsync, cifs etc
paramsdictionary {string => string}Additional save parameters. If dictionary is empty then configuration will be restore from the latest applaince save. Restore process can be tuned up with the parameters: path - alternative path to save directory. If path is empty, a new save is placed in the applaince save directory. The default directory can hold up to 3 saves, oldest saves are erased. Alternative directory can hold any amount of saves; dry - do the 'dry-run': restore without real actions. It checks what has to be restore and possible errors. After dry run the method returns the list of required actions and encountered errors; blocking_call - call save and wait till it finishes. By default, save procedure is non-blocking and save is running in background
Return Value
TYPEDESCRIPTION
stringTimestamp of a saved configuration

Previous Section: General Appliance ManagementTable Of ContentsNext Section: Statistic Collection

9  Statistic Collection

SA-API Interface Object

D-Bus name Interface class name Inherits
/Root/Runner/Collectorcom.nexenta.nms.CollectorVirtual Runner Virtual Container Virtual Base Object
Properties
NAMETYPEACCESSDESCRIPTION
flagsstringc flags = none = 0 | is_daemon = 1 | maintenance_on_max_fail = 2 | clear_old_faults = 4 | notify_on_first_fail = 8 | notify_never = 16 | schedule_never = 32 | schedule_later = 64. This creation time property defines the runner's behavior and is a bitwise combination of the listed enumerated values. For instance, flags = 3 indicates that the runner is a daemon and secondly, that when the maximum number of failures is reached, the runner will change its state to maintenance. Names of the specific enumerated values are self-explanatory, for instance, (flags & schedule_never) would mean that the corresponding runner does not run periodicially but instead gets executed via alternative mechanisms
freq_daystringwc The numeric value depends on the freq_type property. For the freq_type = 'weekly', the day of the week freq_day = 0 | 1 | 2 | 3 | 4 | 5 | 6. Days of the week are numbered as follows: 0 - 'Sun', 1 - 'Mon', 2 - 'Tue', 3 - 'Wed', 4 - 'Thu', 5 - 'Fri', 6 - 'Sat'. For the freq_type = 'monthly', the day of the month freq_day = 1 .. 31
freq_hourstringwc freq_hour = 0 .. 23. Specifies the hour of a day. For instance, freq_hour = 1 specifies 1am.
freq_minutestringwc freq_minute = 0 .. 59. Specifies the minute of an hour. For instance, freq_minute = 30 specifies 30 minutes past a given hour.
freq_periodstringwc freq_period = [1, max]. The maximum value depends on the freq_type. For instance, if the freq_type is 'hourly', the freq_period may have any value in the range [1, 23], and if freq_type is 'monthly', the valid range would be [1, 11], etc.
freq_typestringwc freq_type = 'minute' | 'hourly' | 'daily' | 'weekly' | 'monthly'. The period of execution is set in the units of freq_type. For instance, freq_type = 'hourly' would allow to schedule the runner every 1, or 2, .. or 23 hours. See related com.nexenta.nms.Runner::freq_period
infostringwi General information about the object
ipc_namestringe Interface class name of the associated interface object
keep_daysstringc keep_days = number of days. Unless explicitly specified, the system default value is used, which is: 60 days. Specifies number of days to keep the runner's generated persistent information. For a fault trigger, the generated faults are erased from the database after keep_days. Similarly, statistics collector's generated records older than keep_days are removed as well.
namestringri The name of the object
periodstringc Human-readable description of the periodic runner's execution. This description effectively consolidates freq_type, freq_day and the rest frequency related properties into single human-readable string, for instance: "every two hours", "every Saturday at 3am", "every 3rd of each month at 12:45am", etc.
statestringc state = 'unknown' | 'ready' | 'running' | 'starting' | 'pending' | 'missing'. Normally, a runner would either be 'ready' to execute, or 'running'
statusstringwc status = 'not-registered' | 'disabled' | 'enabled' | 'maintenance'.
trace_levelstringwc trace_level = none = 0 | default = 1 | verbose = 10 | verbose-verbose = 20 | verbose-verbose-verbose. Specifies various levels of logging verbosity by the runner, from 0 (none) to the most detailed.
typestringc type = 'trigger' | 'collector' | 'reporter' | 'indexer'
Inherited Methods
NAMEPROTOTYPE
com.nexenta.nms.Container::destroy['string', 'string'], []
com.nexenta.nms.Runner::disable['string'], []
com.nexenta.nms.Runner::enable['string'], []
com.nexenta.nms.Runner::execute['string'], []
com.nexenta.nms.Container::get_child_prop['string', 'string'], ['string']
com.nexenta.nms.Container::get_child_props['string', 'string'], [['dict', 'string', 'string']]
com.nexenta.nms.Runner::get_init_params['string'], [['dict', 'string', 'string']]
com.nexenta.nms.Runner::get_init_tunables['string'], [['dict', 'string', 'string']]
com.nexenta.nms.Container::get_names['string'], [['array', 'string']]
com.nexenta.nms.Container::get_names_by_prop['string', 'string', 'string'], [['array', 'string']]
com.nexenta.nms.Object::get_prop['string'], ['string']
com.nexenta.nms.Object::get_props['string'], [['dict', 'string', 'string']]
com.nexenta.nms.Runner::get_tunables['string', 'string', 'bool'], [['dict', 'string', 'string']]
com.nexenta.nms.Runner::is_registered['string'], ['bool']
com.nexenta.nms.Container::object_exists['string'], ['bool']
com.nexenta.nms.Runner::register['string', ['dict', 'string', 'string'], ['dict', 'string', 'string']], []
com.nexenta.nms.Runner::reset['string'], []
com.nexenta.nms.Container::set_child_prop['string', 'string', 'string'], []
com.nexenta.nms.Object::set_prop['string', 'string'], []
com.nexenta.nms.Object::set_props[['dict', 'string', 'string']], []
com.nexenta.nms.Runner::set_tunable['string', 'string', 'string'], []
com.nexenta.nms.Container::trylock['string', 'int32'], ['bool']
com.nexenta.nms.Object::trylock_self['int32'], ['bool']
com.nexenta.nms.Container::unlock['string', 'int32'], []
com.nexenta.nms.Object::unlock_self['int32'], []
com.nexenta.nms.Runner::unregister['string'], []

10  Virtual Container

SA-API Interface Object

D-Bus name Interface class name Inherits
Abstract classcom.nexenta.nms.ContainerVirtual Base Object
No properties
No inherited methods

10.1  com.nexenta.nms.Container::destroy

(void)  destroy (string child_name, string not set)

Destroy child object specified by its name

Parameters
NAMETYPEDESCRIPTION
child_namestringThe name of the child object.
not setstringnot set
No return values

Previous Section: Statistic CollectionTable Of ContentsNext Section: Folder (Filesystem)

10.2  com.nexenta.nms.Container::get_child_prop

(string)  get_child_prop (string child_name, string propname)

For a given (contained) child, get the specified property

Parameters
NAMETYPEDESCRIPTION
child_namestringThe name of the child object contained by the specified container object. For instance, assuming lun_if represents LUN container, lun_if->get_child_prop('c0d0', 'size') returns the 'size' property value of the contained (child) object - 'c0d0' IDE disk, in this case
propnamestringThe name of the property. Use com.nexenta.nms.Container::get_child_props to retrieve the list of available properties at runtime.
Return Value
TYPEDESCRIPTION
stringnot set
Usage Examples
3.  lun_if->get_child_prop('c2t0d0', 'size') 

get the size of 'c2t0d0'

6.  network_interfaces_if->get_child_prop('e1000g0', 'info') 

get information on the 'e1000g0' interface. This assumes that the network_interfaces_if represents the corresponding container object (that contains all network interfaces on a given appliance).

See Also
MethodShort Description
com.nexenta.nms.Object::get_propGet property value
com.nexenta.nms.Container::get_child_propsFor a given (contained) child get { propname => value ...

Previous Section: Statistic CollectionTable Of ContentsNext Section: Folder (Filesystem)

10.3  com.nexenta.nms.Container::get_child_props

(dictionary {string => string})  get_child_props (string child_name, string pattern)

For a given (contained) child get { propname => value } dictionary of all properties matching the specified pattern

Parameters
NAMETYPEDESCRIPTION
child_namestringThe name of the child object contained by the specified container object. For instance, assuming lun_if represents LUN container, lun_if->get_child_props('c0d0', '') returns all properties and values of the contained (child) object - 'c0d0'.
patternstringPattern to select a matching subset of child's properties. An empty string will match all object's properties
Return Value
TYPEDESCRIPTION
dictionary {string => string}not set
Usage Examples
3.  plugin('nms-autocdp')->get_child_props('tier2', '') 

ask nms-autocdp plugin interface object for all properties of the existing auto-cdp 'tier2' instance that the former contains. This, and the following examples, assume that the container interface (nms-autocdp plugin in this case) is already retrieved (as described elsewhere), and represents the corresponding container on a given appliance.

6.  lun_if->get_child_props('c2t0d0', '') 

get all 'c2t0d0' disk properties

9.  lun_if->get_child_props('c2t0d0', 'size') 

get properties that match 'size' substring for the 'c2t0d0'. Following is an example of returned dictionary: { 'size' => '4.1GB', 'size_bytes' => 4294967296 }

12.  folder_if->get_child_props('vol1/a', '') 

get all 'vol1/a' folder properties

15.  volume_if->get_child_props('vol1', '') 

get all 'vol1' volume properties

18.  snapshot_if->get_child_props('vol1/a@today', '') 

get all 'vol1/a@today' snapshot properties

21.  folder_if->get_child_props('vol1/a', 'mount') 

get all mount-related properties of the folder 'vol1/a'. The returned dictionary may look as follows: { 'mounted' => 'yes', 'canmount' => 'on', 'mountpoint' => '/volumes/vol1/a' }.

See Also
MethodShort Description
com.nexenta.nms.Object::get_propGet property value
com.nexenta.nms.Container::set_child_propFor a given (contained) child update the specified property with ...
com.nexenta.nms.Container::get_child_propFor a given (contained) child, get the specified property ...

Previous Section: Statistic CollectionTable Of ContentsNext Section: Folder (Filesystem)

10.4  com.nexenta.nms.Container::get_names

(array of (string))  get_names (string pattern)

Get array of all (contained) children names matching the specified pattern

Parameters
NAMETYPEDESCRIPTION
patternstringPattern to select a matching subset of (contained) children objects. An empty string will match all contained (existing) children
Return Value
TYPEDESCRIPTION
array of (string)not set
Usage Examples
3.  folder_if->get_names('^vol1/a/') 

recursively get all sub-folders of the folder 'vol1/a'. The returned array ma look like: ( 'vol1/a/b', 'vol1/a/c', 'vol1/a/b/ddd' )

6.  network_interfaces_if->get_names('') 

get all existing network interfaces. An example of return: ( 'e1000g0', 'e1000g1', 'e1000g2' )

9.  volume_if->get_names('') 

get all volumes

12.  zvol_if->get_names('') 

get all zvols

15.  snapshot_if->get_names('^vol1\/a[\/\@]') 

recursively get all snapshots of the folder 'vol1/a' and its sub-folders. An example of returned array: ( 'vol1/a@yesterday', 'vol1/a@today', 'vol1/a/b@yesterday' )

See Also
MethodShort Description
com.nexenta.nms.Container::get_names_by_propGet array of all (container) children which has matching property ...

Previous Section: Statistic CollectionTable Of ContentsNext Section: Folder (Filesystem)

10.5  com.nexenta.nms.Container::get_names_by_prop

(array of (string))  get_names_by_prop (string propname, string propval_pattern, string childname_pattern)

Get array of all (container) children which has matching property value, for the names matching the 2nd specified pattern. The method effectively does the following: select all children where child name matches and property matches . As always, an empty pattern value means that the pattern is ignored.

Parameters
NAMETYPEDESCRIPTION
propnamestringThe name of the property. For each appliance's container object (folder, volume, zol, smf, runner, etc.) - the list of its properties is documented elsewhere. At runtime, use com.nexenta.nms.Container::get_child_props to retrieve the list of all available properties
propval_patternstringPattern to select only those children that have the property with the value that matches
childname_patternstringPattern to select a matching subset of (contained) children objects. An empty string will match all contained (existing) children
Return Value
TYPEDESCRIPTION
array of (string)not set
Usage Examples
3.  lun_if->get_names_by_prop('type', 'cdrom', '') 

get names of all CD-ROMs in the appliance

6.  runner_if->get_names_by_prop('type', 'collector', '') 

get all collectors. The resulting returned array may look like: ( 'network-collector', 'nfs-collector', 'volume-collector' )

9.  runner_if->get_names_by_prop('type', 'collector', '^v') 

get a subset of all collectors with the names starting with 'v'

See Also
MethodShort Description
com.nexenta.nms.Container::get_namesGet array of all (contained) children names matching the specified ...

Previous Section: Statistic CollectionTable Of ContentsNext Section: Folder (Filesystem)

10.6  com.nexenta.nms.Container::object_exists

(bool)  object_exists (string child_name)

Verify that object exists

Parameters
NAMETYPEDESCRIPTION
child_namestringThe name of the child object.
Return Value
TYPEDESCRIPTION
boolnot set
Usage Examples
3.  lun_if->object_exists('c0d0') 

returns non-zero if the appliance has 'c0d0' disk

6.  folder_if->object_exists('vol1/a') 

returns non-zero if the folder 'vol1/a' exists

See Also
MethodShort Description
com.nexenta.nms.Container::get_namesGet array of all (contained) children names matching the specified ...
com.nexenta.nms.Container::get_names_by_propGet array of all (container) children which has matching property ...

Previous Section: Statistic CollectionTable Of ContentsNext Section: Folder (Filesystem)

10.7  com.nexenta.nms.Container::set_child_prop

(void)  set_child_prop (string child_name, string propname, string propvalue)

For a given (contained) child update the specified property with a new value

Parameters
NAMETYPEDESCRIPTION
child_namestringThe name of the child object contained by the specified container object. For instance, assuming folder_if represents the corresponding folder container, folder_if->set_child_prop('vol1/a', 'compression', 'on') enables compression on the folder 'vol1/a'
propnamestringThe name of the property. Use com.nexenta.nms.Container::get_child_props to retrieve the list of available properties at runtime.
propvaluestringNew value of the property
No return values
Usage Examples
3.  folder_if->set_child_prop('vol1/a', 'compression', 'on') 

enable compression on the folder 'vol1/a'

See Also
MethodShort Description
com.nexenta.nms.Object::get_propGet property value
com.nexenta.nms.Object::set_propSet property value
com.nexenta.nms.Container::get_child_propFor a given (contained) child, get the specified property ...

Previous Section: Statistic CollectionTable Of ContentsNext Section: Folder (Filesystem)

10.8  com.nexenta.nms.Container::trylock

(bool)  trylock (string child_name, int32 lock_type)

Make an attempt to lock the specified child

Parameters
NAMETYPEDESCRIPTION
child_namestringThe name of the child object.
lock_typeint32lock_type = 1 | 2. Type of the lock. The two valid values are: 1 - read lock, 2 - write lock. Read lock allows multiple concurrent readers accessing the corresponding (locked) object, but will conflict with an attempt to take a write lock. The write lock is exclusive.
Return Value
TYPEDESCRIPTION
boolnot set
Usage Examples
3.  folder_if->trylock('vol1/a', 1)  

lock folder 'vol1/a' for reading. Note that multiple read locks may co-exist simultaneously

6.  folder_if->trylock('vol1/a', 2)  

exclusively lock folder 'vol1/a' and its sub-folders.

See Also
MethodShort Description
com.nexenta.nms.Container::unlockUnlock the specified child
com.nexenta.nms.Container::object_existsVerify that object exists

Previous Section: Statistic CollectionTable Of ContentsNext Section: Folder (Filesystem)

10.9  com.nexenta.nms.Container::unlock

(void)  unlock (string child_name, int32 lock_type)

Unlock the specified child

Parameters
NAMETYPEDESCRIPTION
child_namestringThe name of the child object.
lock_typeint32lock_type = 1 | 2. Type of the lock to unlock. The two valid values are: 1 - read lock, 2 - write lock
No return values
Usage Examples
3.  folder_if->unlock('vol1/a', 1)  

remove read lock from the folder 'vol1/a'

6.  folder_if->unlock('vol1/a', 2)  

remove write (exclusive) lock from the folder 'vol1/a'

See Also
MethodShort Description
com.nexenta.nms.Container::trylockMake an attempt to lock the specified child
com.nexenta.nms.Container::object_existsVerify that object exists
com.nexenta.nms.Container::destroyDestroy child object specified by its name

Previous Section: Statistic CollectionTable Of ContentsNext Section: Folder (Filesystem)

11  Folder (Filesystem)

SA-API Interface Object

D-Bus name Interface class name Inherits
/Root/Foldercom.nexenta.nms.FolderVirtual Container Virtual Base Object
Properties
NAMETYPEACCESSDESCRIPTION
infostringwi General information about the object
ipc_namestringe Interface class name of the associated interface object
namestringri The name of the object
originstringc For cloned folders (filesystems) - the snapshot from which the clone was created. The origin cannot be destroyed (even with the -r or -f options) so long as a clone exists.
Inherited Methods
NAMEPROTOTYPE
com.nexenta.nms.Container::destroy['string', 'string'], []
com.nexenta.nms.Container::get_child_prop['string', 'string'], ['string']
com.nexenta.nms.Container::get_child_props['string', 'string'], [['dict', 'string', 'string']]
com.nexenta.nms.Container::get_names['string'], [['array', 'string']]
com.nexenta.nms.Container::get_names_by_prop['string', 'string', 'string'], [['array', 'string']]
com.nexenta.nms.Object::get_prop['string'], ['string']
com.nexenta.nms.Object::get_props['string'], [['dict', 'string', 'string']]
com.nexenta.nms.Container::object_exists['string'], ['bool']
com.nexenta.nms.Container::set_child_prop['string', 'string', 'string'], []
com.nexenta.nms.Object::set_prop['string', 'string'], []
com.nexenta.nms.Object::set_props[['dict', 'string', 'string']], []
com.nexenta.nms.Container::trylock['string', 'int32'], ['bool']
com.nexenta.nms.Object::trylock_self['int32'], ['bool']
com.nexenta.nms.Container::unlock['string', 'int32'], []
com.nexenta.nms.Object::unlock_self['int32'], []

11.1  com.nexenta.nms.Folder::add_group_acl

(void)  add_group_acl (string zname, string group, dictionary {string => array of (string)} acl)

Add the group's permissions to access a given folder and its sub-folders

Parameters
NAMETYPEDESCRIPTION
znamestringThe name of the folder
groupstringThe name of the group
acldictionary {string => array of (string)}Dictionary of one or more entries: { key => (array of permissions) }, where the has the following two values: "allow", "deny"
No return values
Usage Examples
3.  add_group_acl('vol1/a', 'contractors', { 'allow' => ['read_data'],'deny' => ['write_data']} ) 

allow group 'contractors' to read and disallow to write into folder 'vol1/a'

6.  add_group_acl('vol1/a', 'staff', { 'allow' => ['read_data', 'write_data'] } ) 

grant group 'staff' read and write access to the folder 'vol1/a'

See Also
MethodShort Description
com.nexenta.nms.Folder::get_aclinfoGet ACL related static information: groups of permissions and descriptions ...
com.nexenta.nms.Folder::get_aclGet folder's ACL for the entities matching the specified pattern ...
com.nexenta.nms.Folder::add_user_aclAdd the user's permissions to access a given folder and ...
com.nexenta.nms.Folder::del_user_aclRemove the user's permissions from the folder's ACL
com.nexenta.nms.Folder::del_group_aclRemove the group's permissions from the folder's ACL
com.nexenta.nms.Folder::set_user_aclSet the user's permissions to access a given folder and ...
com.nexenta.nms.Folder::set_group_aclSet the group's permissions to access a given folder and ...
com.nexenta.nms.Folder::reset_aclReset the folder's ACLs to the system default (POSIX, built-in) ...
com.nexenta.nms.Folder::set_user_ownerChange the user ownership of a given folder
com.nexenta.nms.Folder::set_group_ownerChange the group ownership of a given folder

Previous Section: Virtual ContainerTable Of ContentsNext Section: Folder and Snapshot Indexing Facility (Search Engine)

11.2  com.nexenta.nms.Folder::add_user_acl

(void)  add_user_acl (string zname, string user, dictionary {string => array of (string)} acl)

Add the user's permissions to access a given folder and its sub-folders

Parameters
NAMETYPEDESCRIPTION
znamestringThe name of the folder
userstringThe name of the user
acldictionary {string => array of (string)}Dictionary of one or more entries: { key => (array of permissions) }, where the has the following two values: "allow", "deny"
No return values
Usage Examples
3.  add_user_acl('vol1/a', 'mikec', { 'allow' => ['read_data'], 'deny' => ['write_data'] } ) 

allow user 'mikec' to read and disallow to write into folder 'vol1/a'

6.  add_user_acl('vol1/a', 'joel', { 'allow' => ['read_data', 'write_data'] } ) 

grant user 'joel' read and write access to the folder 'vol1/a'

See Also
MethodShort Description
com.nexenta.nms.Folder::get_aclinfoGet ACL related static information: groups of permissions and descriptions ...
com.nexenta.nms.Folder::get_aclGet folder's ACL for the entities matching the specified pattern ...
com.nexenta.nms.Folder::add_group_aclAdd the group's permissions to access a given folder and ...
com.nexenta.nms.Folder::del_user_aclRemove the user's permissions from the folder's ACL
com.nexenta.nms.Folder::del_group_aclRemove the group's permissions from the folder's ACL
com.nexenta.nms.Folder::set_user_aclSet the user's permissions to access a given folder and ...
com.nexenta.nms.Folder::set_group_aclSet the group's permissions to access a given folder and ...
com.nexenta.nms.Folder::reset_aclReset the folder's ACLs to the system default (POSIX, built-in) ...
com.nexenta.nms.Folder::set_user_ownerChange the user ownership of a given folder
com.nexenta.nms.Folder::set_group_ownerChange the group ownership of a given folder

Previous Section: Virtual ContainerTable Of ContentsNext Section: Folder and Snapshot Indexing Facility (Search Engine)

11.3  com.nexenta.nms.Folder::clone

(void)  clone (string zname_snapname, string target_zname)

Creates a clone of a given snapshot. The operation results in a writable folder () with the initial contents identical to the one of the snapshot. Note: to clone zvols, please use com.nexenta.nms.Zvol::clone API.

Parameters
NAMETYPEDESCRIPTION
zname_snapnamestringA fully qualified snapshot name of the following layout: zname@snapname. For instance, clone('vol1/a@today', ...) would result in cloning folder 'vol1/a' at the exact point in time of creation snapshot 'vol1/a@today' and with the exact content captured by the 'vol1/a@today'.
target_znamestringThe name of the target (cloned and writable) folder.
No return values
Usage Examples
3.  clone('vol1/a/b@today', 'vol1/clone_ab') 

clone 'vol1/a/b@today' as a new folder named 'vol1/clone_ab'

See Also
MethodShort Description
com.nexenta.nms.Snapshot::createCreate (ie, take) snapshots, recursively or non-recursively, depending on the ...
com.nexenta.nms.Zvol::cloneClone a given zvol. The operation results in a writable ...

Previous Section: Virtual ContainerTable Of ContentsNext Section: Folder and Snapshot Indexing Facility (Search Engine)

11.4  com.nexenta.nms.Folder::create

(array of (string))  create (string zname, string pathname)

Create a "path" of folders

Parameters
NAMETYPEDESCRIPTION
znamestringThe name of the parent folder
pathnamestringPartial name of the new folder, optionally not including the parent folder's name
Return Value
TYPEDESCRIPTION
array of (string)not set
Usage Examples
3.  create('vol1', 'vol1/a/b/c') 

create folder a/b/c of the volume vol1. Depending on the availability of 'vol1/a' and 'vol1/a/b', this will create (and include in the returned list) either all 3 sub-folders, or two, or just one

6.  create('vol1/a/b', 'c/d') 

create 'c/d' sub-folder of the folder 'vol1/a/b'. The resulting set of sub-folders will include 'vol1/a/b/c' and 'vol1/a/b/c/d'

See Also
MethodShort Description
com.nexenta.nms.Folder::create_with_propsCreate a "path" of folders. This API allows to specify ...
com.nexenta.nms.Container::destroyDestroy child object specified by its name
com.nexenta.nms.Snapshot::createCreate (ie, take) snapshots, recursively or non-recursively, depending on the ...
com.nexenta.nms.Folder::create_snapshotSnapshot a given folder and possibly its sub-folders
com.nexenta.nms.Volume::vol_createCreate a volume

Previous Section: Virtual ContainerTable Of ContentsNext Section: Folder and Snapshot Indexing Facility (Search Engine)

11.5  com.nexenta.nms.Folder::create_snapshot

(void)  create_snapshot (string zname, string snapname, string cmdopt)

Snapshot a given folder and possibly its sub-folders

Parameters
NAMETYPEDESCRIPTION
znamestringThe name of the folder
snapnamestringSnapshot's partial name
cmdoptstringZFS command option
No return values
Usage Examples
3.  create_snapshot('vol1/a', 'today', "") 

snapshot the folder 'vol1/a', and name the snapshot 'vol1/a@today'

6.  create_snapshot('vol1/a', 'today', "-r") 

snapshot the folder 'vol1/a' and its sub-folders; assuming there exist sub-folder 'vol1/a/b/c', this will create additional snapshot 'vol1/a/b/c@today'

See Also
MethodShort Description
com.nexenta.nms.Folder::createCreate a "path" of folders
com.nexenta.nms.Snapshot::createCreate (ie, take) snapshots, recursively or non-recursively, depending on the ...
com.nexenta.nms.Folder::create_with_propsCreate a "path" of folders. This API allows to specify ...

Previous Section: Virtual ContainerTable Of ContentsNext Section: Folder and Snapshot Indexing Facility (Search Engine)

11.6  com.nexenta.nms.Folder::create_with_props

(array of (string))  create_with_props (string zname, string pathname, dictionary {string => string} creation_time_props)

Create a "path" of folders. This API allows to specify creation time properties (compare with com.nexenta.nms.Folder::create).

Parameters
NAMETYPEDESCRIPTION
znamestringThe name of the parent folder
pathnamestringPartial name of the new folder, optionally not including the parent folder's name
creation_time_propsdictionary {string => string}{ Property Name => Property Value } dictionary of property names and their values specified at creation time.
Return Value
TYPEDESCRIPTION
array of (string)not set
Usage Examples
3.  create_with_props('vol1', 'vol1/a/b/c', {}) 

create folder 'a/b/c' of the volume 'vol1'. Depending on the availability of 'vol1/a' and 'vol1/a/b', this will create (and include in the returned list) either all 3 sub-folders, or two, or just one', Note that in this example an empty dictionary is passed for creation_time_props.

6.  create_with_props('vol1/a/b', 'c/d', { compression=>"on", quota=>"1G", recordsize=>"4k" }) 

create 'c/d' sub-folder of the folder 'vol1/a/b'. The resulting set of sub-folders will include 'vol1/a/b/c' and 'vol1/a/b/c/d' and will have compression on, and the corresponding quota and recordsize values

See Also
MethodShort Description
com.nexenta.nms.Folder::createCreate a "path" of folders
com.nexenta.nms.Container::destroyDestroy child object specified by its name
com.nexenta.nms.Snapshot::createCreate (ie, take) snapshots, recursively or non-recursively, depending on the ...
com.nexenta.nms.Folder::create_snapshotSnapshot a given folder and possibly its sub-folders
com.nexenta.nms.Volume::vol_createCreate a volume

Previous Section: Virtual ContainerTable Of ContentsNext Section: Folder and Snapshot Indexing Facility (Search Engine)

11.7  com.nexenta.nms.Folder::del_group_acl

(void)  del_group_acl (string zname, string group, dictionary {string => array of (string)} acl)

Remove the group's permissions from the folder's ACL

Parameters
NAMETYPEDESCRIPTION
znamestringThe name of the folder
groupstringThe name of the group
acldictionary {string => array of (string)}Dictionary of one or more entries: { key => (array of permissions) }, where the has the following two values: "allow", "deny"
No return values
Usage Examples
3.  del_group_acl('vol1/a', 'staff', { 'allow' => (), 'deny' => () } ) 

remove all group 'staff' permissions from the folder's 'vol1/a' ACL

See Also
MethodShort Description
com.nexenta.nms.Folder::get_aclinfoGet ACL related static information: groups of permissions and descriptions ...
com.nexenta.nms.Folder::get_aclGet folder's ACL for the entities matching the specified pattern ...
com.nexenta.nms.Folder::add_user_aclAdd the user's permissions to access a given folder and ...
com.nexenta.nms.Folder::add_group_aclAdd the group's permissions to access a given folder and ...
com.nexenta.nms.Folder::del_user_aclRemove the user's permissions from the folder's ACL
com.nexenta.nms.Folder::set_user_aclSet the user's permissions to access a given folder and ...
com.nexenta.nms.Folder::set_group_aclSet the group's permissions to access a given folder and ...
com.nexenta.nms.Folder::reset_aclReset the folder's ACLs to the system default (POSIX, built-in) ...
com.nexenta.nms.Folder::set_user_ownerChange the user ownership of a given folder
com.nexenta.nms.Folder::set_group_ownerChange the group ownership of a given folder

Previous Section: Virtual ContainerTable Of ContentsNext Section: Folder and Snapshot Indexing Facility (Search Engine)

11.8  com.nexenta.nms.Folder::del_user_acl

(void)  del_user_acl (string zname, string user, dictionary {string => array of (string)} acl)

Remove the user's permissions from the folder's ACL

Parameters
NAMETYPEDESCRIPTION
znamestringThe name of the folder
userstringThe name of the user
acldictionary {string => array of (string)}Dictionary of one or more entries: { key => (array of permissions) }, where the has the following two values: "allow", "deny"
No return values
Usage Examples
3.  del_user_acl('vol1/a', 'mikec', { 'allow' => (), 'deny' => () } ) 

remove all user 'mikec' permissions from the folder's 'vol1/a' ACL'

See Also
MethodShort Description
com.nexenta.nms.Folder::get_aclinfoGet ACL related static information: groups of permissions and descriptions ...
com.nexenta.nms.Folder::get_aclGet folder's ACL for the entities matching the specified pattern ...
com.nexenta.nms.Folder::add_user_aclAdd the user's permissions to access a given folder and ...
com.nexenta.nms.Folder::add_group_aclAdd the group's permissions to access a given folder and ...
com.nexenta.nms.Folder::del_group_aclRemove the group's permissions from the folder's ACL
com.nexenta.nms.Folder::set_user_aclSet the user's permissions to access a given folder and ...
com.nexenta.nms.Folder::set_group_aclSet the group's permissions to access a given folder and ...
com.nexenta.nms.Folder::reset_aclReset the folder's ACLs to the system default (POSIX, built-in) ...
com.nexenta.nms.Folder::set_user_ownerChange the user ownership of a given folder
com.nexenta.nms.Folder::set_group_ownerChange the group ownership of a given folder

Previous Section: Virtual ContainerTable Of ContentsNext Section: Folder and Snapshot Indexing Facility (Search Engine)

11.9  com.nexenta.nms.Folder::get_acl

(dictionary {string => dictionary {string => array of (string)}})  get_acl (string zname, string pattern)

Get folder's ACL for the entities matching the specified pattern

Parameters
NAMETYPEDESCRIPTION
znamestringThe name of the folder
patternstringPattern to select a matching subset of ACL entities. The entities are: owner@, group@, everyone@, as well as user: and group:, where the first 3 entities are standard and built-in, provided for POSIX compatibility. An empty pattern results in returning the folder's ACL, with entities being keys of the resulting dictionary (see next).
Return Value
TYPEDESCRIPTION
dictionary {string => dictionary {string => array of (string)}}not set
Usage Examples
3.  get_acl('vol1/a', '^group:') 

Get all explicitly specified (non-default) group permissions for the folder 'vol1/a'; the result may look like: 'group:staff' => { 'allow' => ( 'read_xattr', 'read_attributes' ), }

6.  get_acl('vol1/a', '') 

Get ACL of the folder 'vol1/a'. The resulting nested dictionary may include the following standard POSIX entities: 'owner@', 'group@', and 'everyone@'. Each entity name, whether POSIX default or explicitly added, is an "outer" key in the returned dictionary that will have the following layout: { entity_name => Dictionary of { key => (array of permissions) } }, where the "inner" may have the following values: "allow", "deny"

See Also
MethodShort Description
com.nexenta.nms.Folder::get_acl_by_indexRetrieve complete folder's ACL, and possibly check for duplicate entries. ...
com.nexenta.nms.Folder::get_aclinfoGet ACL related static information: groups of permissions and descriptions ...
com.nexenta.nms.Folder::add_user_aclAdd the user's permissions to access a given folder and ...
com.nexenta.nms.Folder::add_group_aclAdd the group's permissions to access a given folder and ...
com.nexenta.nms.Folder::del_user_aclRemove the user's permissions from the folder's ACL
com.nexenta.nms.Folder::del_group_aclRemove the group's permissions from the folder's ACL
com.nexenta.nms.Folder::set_user_aclSet the user's permissions to access a given folder and ...
com.nexenta.nms.Folder::set_group_aclSet the group's permissions to access a given folder and ...
com.nexenta.nms.Folder::reset_aclReset the folder's ACLs to the system default (POSIX, built-in) ...

Previous Section: Virtual ContainerTable Of ContentsNext Section: Folder and Snapshot Indexing Facility (Search Engine)

11.10  com.nexenta.nms.Folder::get_acl_by_index

(dictionary {string => dictionary {string => array of (string)}})  get_acl_by_index (string zname, bool check_duplicates_only)

Retrieve complete folder's ACL, and possibly check for duplicate entries. The "entities" are: owner@, group@, everyone@, as well as user: and group:, where the first 3 entities are standard and built-in, provided for POSIX compatibility. Please compare with com.nexenta.nms.Folder::get_acl

Parameters
NAMETYPEDESCRIPTION
znamestringThe name of the folder
check_duplicates_onlyboolcheck_duplicates_only = 0 | 1. True (non-zero): check for redundant ACL entries. false (zero): do not check. Note that a correctly built ACL has no more than one 'allow' entry for a given entity and no more than one 'deny' entry. An ACL with two or more 'allow' or 'deny' entries would therefore contain redundant, duplicated entries. The difference between com.nexenta.nms.Folder::get_acl_by_index and the com.nexenta.nms.Folder::get_acl APIs is that the former retrieves all ACL entries and returns a dictionary with unique keys of the following layout: . Please compare with com.nexenta.nms.Folder::get_acl.
Return Value
TYPEDESCRIPTION
dictionary {string => dictionary {string => array of (string)}}not set
Usage Examples
3.  get_acl_by_index('vol1/a', 0) 

Get the entire access control list for the folder 'vol1/a'. The resulting nested dictionary may include the following standard POSIX entities: 'owner@', 'group@', and 'everyone@'. Each entity name, whether POSIX default or explicitly added, is an "outer" key in the returned dictionary that will have the following layout: { entity_name:index_in_the_ACL => Dictionary of { key => (array of permissions) } }, where the "inner" may have the following values: "allow", "deny"

See Also
MethodShort Description
com.nexenta.nms.Folder::get_aclGet folder's ACL for the entities matching the specified pattern ...
com.nexenta.nms.Folder::get_aclinfoGet ACL related static information: groups of permissions and descriptions ...
com.nexenta.nms.Folder::add_user_aclAdd the user's permissions to access a given folder and ...
com.nexenta.nms.Folder::add_group_aclAdd the group's permissions to access a given folder and ...
com.nexenta.nms.Folder::del_user_aclRemove the user's permissions from the folder's ACL
com.nexenta.nms.Folder::del_group_aclRemove the group's permissions from the folder's ACL
com.nexenta.nms.Folder::set_user_aclSet the user's permissions to access a given folder and ...
com.nexenta.nms.Folder::set_group_aclSet the group's permissions to access a given folder and ...
com.nexenta.nms.Folder::reset_aclReset the folder's ACLs to the system default (POSIX, built-in) ...

Previous Section: Virtual ContainerTable Of ContentsNext Section: Folder and Snapshot Indexing Facility (Search Engine)

11.11  com.nexenta.nms.Folder::get_aclinfo

(dictionary {string => dictionary {string => string}})  get_aclinfo (void)

Get ACL related static information: groups of permissions and descriptions

No parameters
Return Value
TYPEDESCRIPTION
dictionary {string => dictionary {string => string}}not set
Usage Examples
3.  get_aclinfo() 

get ACL information

See Also
MethodShort Description
com.nexenta.nms.Folder::get_aclGet folder's ACL for the entities matching the specified pattern ...
com.nexenta.nms.Folder::add_user_aclAdd the user's permissions to access a given folder and ...
com.nexenta.nms.Folder::add_group_aclAdd the group's permissions to access a given folder and ...
com.nexenta.nms.Folder::del_user_aclRemove the user's permissions from the folder's ACL
com.nexenta.nms.Folder::del_group_aclRemove the group's permissions from the folder's ACL
com.nexenta.nms.Folder::set_user_aclSet the user's permissions to access a given folder and ...
com.nexenta.nms.Folder::set_group_aclSet the group's permissions to access a given folder and ...
com.nexenta.nms.Folder::reset_aclReset the folder's ACLs to the system default (POSIX, built-in) ...

Previous Section: Virtual ContainerTable Of ContentsNext Section: Folder and Snapshot Indexing Facility (Search Engine)

11.12  com.nexenta.nms.Folder::get_all_names

(array of (string))  get_all_names (string pattern)

Get array of all (contained) children names matching the specified pattern (include 'syspool')

Parameters
NAMETYPEDESCRIPTION
patternstringPattern to select a matching subset of (contained) children objects. An empty string will match all contained (existing) children
Return Value
TYPEDESCRIPTION
array of (string)not set

Previous Section: Virtual ContainerTable Of ContentsNext Section: Folder and Snapshot Indexing Facility (Search Engine)

11.13  com.nexenta.nms.Folder::get_groupspace

(dictionary {string => dictionary {string => string}})  get_groupspace (string zname, string group, string type)

Get groupspace specified parameters

Parameters
NAMETYPEDESCRIPTION
znamestringFolder name, for instance: 'trunk/fol2'
groupstringGroup name, ex: 'other'
typestringOptional parameter, which is get by 'get_groupspace_types'
Return Value
TYPEDESCRIPTION
dictionary {string => dictionary {string => string}}not set

Previous Section: Virtual ContainerTable Of ContentsNext Section: Folder and Snapshot Indexing Facility (Search Engine)

11.14  com.nexenta.nms.Folder::get_groupspace_types

(array of (string))  get_groupspace_types (void)

Get available groupspace types

No parameters
Return Value
TYPEDESCRIPTION
array of (string)not set

Previous Section: Virtual ContainerTable Of ContentsNext Section: Folder and Snapshot Indexing Facility (Search Engine)

11.15  com.nexenta.nms.Folder::get_prop_valid_values

(array of (string))  get_prop_valid_values (string prop_name)

Get valid range and/or enumeration for a given folder's property.

Parameters
NAMETYPEDESCRIPTION
prop_namestringThe name of the property.
Return Value
TYPEDESCRIPTION
array of (string)not set
Usage Examples
3.  get_prop_valid_values('available') 

will return ('').

6.  get_prop_valid_values('compression') 

will return ('on', 'off', 'lzjb', 'gzip', 'gzip-[1-9]').

9.  get_prop_valid_values('readonly') 

will return ('on', 'off').

12.  get_prop_valid_values('reservation') 

will return ('', 'none').

15.  get_prop_valid_values('snapdir') 

will return ('hidden', 'visible').

18.  get_prop_valid_values('checksum') 

will return ('on', 'off', 'fletcher2', 'fletcher4', 'sha256').

See Also
MethodShort Description
com.nexenta.nms.Volume::get_prop_valid_valuesGet valid range and/or enumeration for a given volume's property. ...
com.nexenta.nms.Zvol::get_prop_valid_valuesGet valid range and/or enumeration for a given zvol's property. ...
com.nexenta.nms.Folder::inherit_propRestore system-default inheritance of a given ZFS property. The method ...

Previous Section: Virtual ContainerTable Of ContentsNext Section: Folder and Snapshot Indexing Facility (Search Engine)

11.16  com.nexenta.nms.Folder::get_subfolder_names

(array of (string))  get_subfolder_names (string zname, bool recursive)

Get sub-folder names

Parameters
NAMETYPEDESCRIPTION
znamestringThe name of the parent folder
recursiveboolrecursive = 0 | 1. Non-zero (true): include all names of nested folders; zero (false): include only immediate sub-folders of the specified folder
Return Value
TYPEDESCRIPTION
array of (string)not set
Usage Examples
3.  get_subfolder_names('vol1/a', 1) 

recursively return all nested sub-folders of the folder 'vol1/a'; assuming there exists a folder named 'vol1/a/b/c/d', it will be included in the returned list as well

See Also
MethodShort Description
com.nexenta.nms.Container::get_namesGet array of all (contained) children names matching the specified ...
com.nexenta.nms.Container::get_names_by_propGet array of all (container) children which has matching property ...
com.nexenta.nms.Snapshot::get_snapshot_namesGet existing snapshots of the specified folder and possibly its ...

Previous Section: Virtual ContainerTable Of ContentsNext Section: Folder and Snapshot Indexing Facility (Search Engine)

11.17  com.nexenta.nms.Folder::get_userspace

(dictionary {string => dictionary {string => string}})  get_userspace (string zname, string user, string type)

Get userspace specified parameters

Parameters
NAMETYPEDESCRIPTION
znamestringFolder name, for instance: 'trunk/fol2'
userstringUser name, ex: 'sveta'
typestringOptional parameter, which is get by 'get_userspace_types'
Return Value
TYPEDESCRIPTION
dictionary {string => dictionary {string => string}}not set

Previous Section: Virtual ContainerTable Of ContentsNext Section: Folder and Snapshot Indexing Facility (Search Engine)

11.18  com.nexenta.nms.Folder::get_userspace_types

(array of (string))  get_userspace_types (void)

Get available userspace types

No parameters
Return Value
TYPEDESCRIPTION
array of (string)not set

Previous Section: Virtual ContainerTable Of ContentsNext Section: Folder and Snapshot Indexing Facility (Search Engine)

11.19  com.nexenta.nms.Folder::get_version_info

(array of (int32))  get_version_info (string zname)

Get folder's ZFS version

Parameters
NAMETYPEDESCRIPTION
znamestringThe name of the folder
Return Value
TYPEDESCRIPTION
array of (int32)not set
Usage Examples
3.  get_version_info('vol1/a') 

get version information for the folder 'vol1/a'. Examples of returns: (3, 3) or (3, 2). The 2nd example return demonstrates the case when the folder's ZFS version (2) may be upgraded to the system version (3)

See Also
MethodShort Description
com.nexenta.nms.Folder::upgradeUpgrade folder's ZFS version
com.nexenta.nms.Volume::get_version_infoGet volume's ZFS version
com.nexenta.nms.Volume::upgradeUpgrade volume's ZFS version. WARNING: special consideration need to be ...

Previous Section: Virtual ContainerTable Of ContentsNext Section: Folder and Snapshot Indexing Facility (Search Engine)

11.20  com.nexenta.nms.Folder::has_zfs_prop

(bool)  has_zfs_prop (string zname, string prop)

Determine whether zfs property exists or not

Parameters
NAMETYPEDESCRIPTION
znamestringZFS name
propstringProperty name
Return Value
TYPEDESCRIPTION
boolreturn = 1 | 0

Previous Section: Virtual ContainerTable Of ContentsNext Section: Folder and Snapshot Indexing Facility (Search Engine)

11.21  com.nexenta.nms.Folder::inherit_prop

(void)  inherit_prop (string zname, string propname, int32 recursive)

Restore system-default inheritance of a given ZFS property. The method clears the specified property, causing it to be inherited from the parent folder. If the parent folder does not have this property set, the default value is used. Note that all modifiable properties, with the exception of quota and reservation, inherit their value from their parent folder.

Parameters
NAMETYPEDESCRIPTION
znamestringThe name of the folder
propnamestringThe name of the property. The list of modifiable properties includes: compression, reservation, checksum, copies, readonly
recursiveint32recursive = 0 | 1. True (non-zero): clear the specified property in the specified folder and all its sub-folders, causing the entire sub-tree of sub-folders to inherit the specified property from the folder's parent. False (zero): apply the operation only to the specified folder.
No return values
Usage Examples
3.  inherit_prop('vol1/a/b', 'sharenfs', 1) 

inherit recursively property 'sharenfs' for the 'vol1/a/b' and all descendent sub-folders (if any) from parent folder 'vol1/a'.

See Also
MethodShort Description
com.nexenta.nms.Folder::get_prop_valid_valuesGet valid range and/or enumeration for a given folder's property. ...

Previous Section: Virtual ContainerTable Of ContentsNext Section: Folder and Snapshot Indexing Facility (Search Engine)

11.22  com.nexenta.nms.Folder::promote

(void)  promote (string zname)

Promotes a cloned dataset to no longer be dependent on its 'origin' snapshot.

Parameters
NAMETYPEDESCRIPTION
znamestringDataset name
No return values

Previous Section: Virtual ContainerTable Of ContentsNext Section: Folder and Snapshot Indexing Facility (Search Engine)

11.23  com.nexenta.nms.Folder::reset_acl

(void)  reset_acl (string zname)

Reset the folder's ACLs to the system default (POSIX, built-in) permissions.

Parameters
NAMETYPEDESCRIPTION
znamestringThe name of the folder
No return values
Usage Examples
3.  reset_acl('vol1/a') 

reset 'vol1/a' ACL.

See Also
MethodShort Description
com.nexenta.nms.Folder::get_aclinfoGet ACL related static information: groups of permissions and descriptions ...
com.nexenta.nms.Folder::get_aclGet folder's ACL for the entities matching the specified pattern ...
com.nexenta.nms.Folder::add_user_aclAdd the user's permissions to access a given folder and ...
com.nexenta.nms.Folder::add_group_aclAdd the group's permissions to access a given folder and ...
com.nexenta.nms.Folder::del_user_aclRemove the user's permissions from the folder's ACL
com.nexenta.nms.Folder::del_group_aclRemove the group's permissions from the folder's ACL
com.nexenta.nms.Folder::set_user_aclSet the user's permissions to access a given folder and ...
com.nexenta.nms.Folder::set_group_aclSet the group's permissions to access a given folder and ...

Previous Section: Virtual ContainerTable Of ContentsNext Section: Folder and Snapshot Indexing Facility (Search Engine)

11.24  com.nexenta.nms.Folder::set_group_acl

(void)  set_group_acl (string zname, string group, dictionary {string => array of (string)} acl)

Set the group's permissions to access a given folder and its sub-folders. This method is effectively a combination of com.nexenta.nms.Folder::del_group_acl and com.nexenta.nms.Folder::add_group_acl, in sequence

Parameters
NAMETYPEDESCRIPTION
znamestringThe name of the folder
groupstringThe name of the group
acldictionary {string => array of (string)}Dictionary of one or more entries: { key => (array of permissions) }, where the has the following two values: "allow", "deny"
No return values
Usage Examples
3.  set_group_acl('vol1/a', 'contractors', { 'allow' => ['read_data'], 'deny' => ['write_data'] } ) 

remove group 'contractors' previous permissions (if any) to access 'vol1/a'; allow group 'contractors' to read and disallow to write into folder 'vol1/a'

6.  set_group_acl('vol1/a', 'staff', { 'allow' => ['read_data', 'write_data'] } ) 

grant group 'staff' read and write access to the folder 'vol1/a'

See Also
MethodShort Description
com.nexenta.nms.Folder::get_aclinfoGet ACL related static information: groups of permissions and descriptions ...
com.nexenta.nms.Folder::get_aclGet folder's ACL for the entities matching the specified pattern ...
com.nexenta.nms.Folder::add_user_aclAdd the user's permissions to access a given folder and ...
com.nexenta.nms.Folder::add_group_aclAdd the group's permissions to access a given folder and ...
com.nexenta.nms.Folder::del_user_aclRemove the user's permissions from the folder's ACL
com.nexenta.nms.Folder::del_group_aclRemove the group's permissions from the folder's ACL
com.nexenta.nms.Folder::set_user_aclSet the user's permissions to access a given folder and ...
com.nexenta.nms.Folder::reset_aclReset the folder's ACLs to the system default (POSIX, built-in) ...
com.nexenta.nms.Folder::set_user_ownerChange the user ownership of a given folder
com.nexenta.nms.Folder::set_group_ownerChange the group ownership of a given folder

Previous Section: Virtual ContainerTable Of ContentsNext Section: Folder and Snapshot Indexing Facility (Search Engine)

11.25  com.nexenta.nms.Folder::set_group_owner

(void)  set_group_owner (string zname, string user)

Change the group ownership of a given folder

Parameters
NAMETYPEDESCRIPTION
znamestringThe name of the folder
userstringThe name of the group
No return values
Usage Examples
3.  set_group_owner('vol1/a', 'engineering') 

grant 'vol1/a' group ownership to group 'engineering'.

See Also
MethodShort Description
com.nexenta.nms.Folder::get_aclinfoGet ACL related static information: groups of permissions and descriptions ...
com.nexenta.nms.Folder::get_aclGet folder's ACL for the entities matching the specified pattern ...
com.nexenta.nms.Folder::add_user_aclAdd the user's permissions to access a given folder and ...
com.nexenta.nms.Folder::add_group_aclAdd the group's permissions to access a given folder and ...
com.nexenta.nms.Folder::del_user_aclRemove the user's permissions from the folder's ACL
com.nexenta.nms.Folder::del_group_aclRemove the group's permissions from the folder's ACL
com.nexenta.nms.Folder::set_user_aclSet the user's permissions to access a given folder and ...
com.nexenta.nms.Folder::set_group_aclSet the group's permissions to access a given folder and ...

Previous Section: Virtual ContainerTable Of ContentsNext Section: Folder and Snapshot Indexing Facility (Search Engine)

11.26  com.nexenta.nms.Folder::set_user_acl

(void)  set_user_acl (string zname, string user, dictionary {string => array of (string)} acl)

Set the user's permissions to access a given folder and its sub-folders. This method is effectively a combination of com.nexenta.nms.Folder::del_user_acl and com.nexenta.nms.Folder::add_user_acl, in sequence

Parameters
NAMETYPEDESCRIPTION
znamestringThe name of the folder
userstringThe name of the user
acldictionary {string => array of (string)}Dictionary of one or more entries: { key => (array of permissions) }, where the has the following two values: "allow", "deny"
No return values
Usage Examples
3.  set_user_acl('vol1/a', 'mikec', { 'allow' => ['read_data'], 'deny' => ['write_data'] } ) 

remove user 'mikec' previous permissions (if any) to access 'vol1/a'; allow user 'mikec' to read and disallow to write into folder 'vol1/a'

6.  set_user_acl('vol1/a', 'joel', { 'allow' => ['read_data', 'write_data'] } ) 

grant user 'joel' read and write access to the folder 'vol1/a'

See Also
MethodShort Description
com.nexenta.nms.Folder::get_aclinfoGet ACL related static information: groups of permissions and descriptions ...
com.nexenta.nms.Folder::get_aclGet folder's ACL for the entities matching the specified pattern ...
com.nexenta.nms.Folder::add_user_aclAdd the user's permissions to access a given folder and ...
com.nexenta.nms.Folder::add_group_aclAdd the group's permissions to access a given folder and ...
com.nexenta.nms.Folder::del_user_aclRemove the user's permissions from the folder's ACL
com.nexenta.nms.Folder::del_group_aclRemove the group's permissions from the folder's ACL
com.nexenta.nms.Folder::set_group_aclSet the group's permissions to access a given folder and ...
com.nexenta.nms.Folder::reset_aclReset the folder's ACLs to the system default (POSIX, built-in) ...
com.nexenta.nms.Folder::set_user_ownerChange the user ownership of a given folder
com.nexenta.nms.Folder::set_group_ownerChange the group ownership of a given folder

Previous Section: Virtual ContainerTable Of ContentsNext Section: Folder and Snapshot Indexing Facility (Search Engine)

11.27  com.nexenta.nms.Folder::set_user_owner

(void)  set_user_owner (string zname, string user)

Change the user ownership of a given folder

Parameters
NAMETYPEDESCRIPTION
znamestringThe name of the folder
userstringThe name of the user
No return values
Usage Examples
3.  set_user_owner('vol1/a', 'admin') 

grant 'vol1/a' ownership to user 'admin'.

See Also
MethodShort Description
com.nexenta.nms.Folder::get_aclinfoGet ACL related static information: groups of permissions and descriptions ...
com.nexenta.nms.Folder::get_aclGet folder's ACL for the entities matching the specified pattern ...
com.nexenta.nms.Folder::add_user_aclAdd the user's permissions to access a given folder and ...
com.nexenta.nms.Folder::add_group_aclAdd the group's permissions to access a given folder and ...
com.nexenta.nms.Folder::del_user_aclRemove the user's permissions from the folder's ACL
com.nexenta.nms.Folder::del_group_aclRemove the group's permissions from the folder's ACL
com.nexenta.nms.Folder::set_user_aclSet the user's permissions to access a given folder and ...
com.nexenta.nms.Folder::set_group_aclSet the group's permissions to access a given folder and ...

Previous Section: Virtual ContainerTable Of ContentsNext Section: Folder and Snapshot Indexing Facility (Search Engine)

11.28  com.nexenta.nms.Folder::upgrade

(bool)  upgrade (string zname)

Upgrade folder's ZFS version

Parameters
NAMETYPEDESCRIPTION
znamestringThe name of the folder
Return Value
TYPEDESCRIPTION
boolnot set
Usage Examples
3.  upgrade('vol1/a') 

upgrade 'vol1/a' to the system ZFS version

See Also
MethodShort Description
com.nexenta.nms.Folder::get_version_infoGet folder's ZFS version
com.nexenta.nms.Volume::get_version_infoGet volume's ZFS version
com.nexenta.nms.Volume::upgradeUpgrade volume's ZFS version. WARNING: special consideration need to be ...

Previous Section: Virtual ContainerTable Of ContentsNext Section: Folder and Snapshot Indexing Facility (Search Engine)

11.29  com.nexenta.nms.Folder::upgrade_folders

(int32)  upgrade_folders (string zname)

Upgrade folder's ZFS version recursively

Parameters
NAMETYPEDESCRIPTION
znamestringDataset name
Return Value
TYPEDESCRIPTION
int32not set

Previous Section: Virtual ContainerTable Of ContentsNext Section: Folder and Snapshot Indexing Facility (Search Engine)

12  Folder and Snapshot Indexing Facility (Search Engine)

SA-API Interface Object

D-Bus name Interface class name Inherits
/Root/Runner/Indexercom.nexenta.nms.IndexerVirtual Runner Virtual Container Virtual Base Object
Properties
NAMETYPEACCESSDESCRIPTION
dbfolderstringc Specifies location of the indexing database. By default, the generated indexing data is kept on the system volume ('syspool'), in a folder named 'syspool/.index/escaped_name'. Here the escaped_name is produced based on the name of the folder that is being indexed, as explained below. For instance, for an indexer that indexes a folder 'vol1/a/b', the generated indexing database is stored by default in the corresponding system folder named 'syspool/.index/vol1-a-b'. Notice the correspondence between the original folder name 'vol1/a/b' and dbfolder 'syspool/.index/vol1-a-b'. See also com.nexenta.nms.Indexer::escaped_name.
escaped_namestringc The property is deruved from the name of the folder that is being indexed and searched, with all forward '/' replaced with dash '-'. For instance, for an indexer that indexes a folder 'vol1/a/b', the escaped name will be 'vol1-a-b'.
flagsstringc flags = none = 0 | is_daemon = 1 | maintenance_on_max_fail = 2 | clear_old_faults = 4 | notify_on_first_fail = 8 | notify_never = 16 | schedule_never = 32 | schedule_later = 64. This creation time property defines the runner's behavior and is a bitwise combination of the listed enumerated values. For instance, flags = 3 indicates that the runner is a daemon and secondly, that when the maximum number of failures is reached, the runner will change its state to maintenance. Names of the specific enumerated values are self-explanatory, for instance, (flags & schedule_never) would mean that the corresponding runner does not run periodicially but instead gets executed via alternative mechanisms
freq_daystringwc The numeric value depends on the freq_type property. For the freq_type = 'weekly', the day of the week freq_day = 0 | 1 | 2 | 3 | 4 | 5 | 6. Days of the week are numbered as follows: 0 - 'Sun', 1 - 'Mon', 2 - 'Tue', 3 - 'Wed', 4 - 'Thu', 5 - 'Fri', 6 - 'Sat'. For the freq_type = 'monthly', the day of the month freq_day = 1 .. 31
freq_hourstringwc freq_hour = 0 .. 23. Specifies the hour of a day. For instance, freq_hour = 1 specifies 1am.
freq_minutestringwc freq_minute = 0 .. 59. Specifies the minute of an hour. For instance, freq_minute = 30 specifies 30 minutes past a given hour.
freq_periodstringwc freq_period = [1, max]. The maximum value depends on the freq_type. For instance, if the freq_type is 'hourly', the freq_period may have any value in the range [1, 23], and if freq_type is 'monthly', the valid range would be [1, 11], etc.
freq_typestringwc freq_type = 'minute' | 'hourly' | 'daily' | 'weekly' | 'monthly'. The period of execution is set in the units of freq_type. For instance, freq_type = 'hourly' would allow to schedule the runner every 1, or 2, .. or 23 hours. See related com.nexenta.nms.Runner::freq_period
infostringwi General information about the object
ipc_namestringe Interface class name of the associated interface object
namestringri The name of the object
periodstringc Human-readable description of the periodic runner's execution. This description effectively consolidates freq_type, freq_day and the rest frequency related properties into single human-readable string, for instance: "every two hours", "every Saturday at 3am", "every 3rd of each month at 12:45am", etc.
statestringc state = 'unknown' | 'ready' | 'running' | 'starting' | 'pending' | 'missing'. Normally, a runner would either be 'ready' to execute, or 'running'
statusstringwc status = 'not-registered' | 'disabled' | 'enabled' | 'maintenance'.
trace_levelstringwc trace_level = none = 0 | default = 1 | verbose = 10 | verbose-verbose = 20 | verbose-verbose-verbose. Specifies various levels of logging verbosity by the runner, from 0 (none) to the most detailed.
typestringc type = 'trigger' | 'collector' | 'reporter' | 'indexer'
Inherited Methods
NAMEPROTOTYPE
com.nexenta.nms.Container::destroy['string', 'string'], []
com.nexenta.nms.Runner::disable['string'], []
com.nexenta.nms.Runner::enable['string'], []
com.nexenta.nms.Runner::execute['string'], []
com.nexenta.nms.Container::get_child_prop['string', 'string'], ['string']
com.nexenta.nms.Container::get_child_props['string', 'string'], [['dict', 'string', 'string']]
com.nexenta.nms.Runner::get_init_params['string'], [['dict', 'string', 'string']]
com.nexenta.nms.Runner::get_init_tunables['string'], [['dict', 'string', 'string']]
com.nexenta.nms.Container::get_names['string'], [['array', 'string']]
com.nexenta.nms.Container::get_names_by_prop['string', 'string', 'string'], [['array', 'string']]
com.nexenta.nms.Object::get_prop['string'], ['string']
com.nexenta.nms.Object::get_props['string'], [['dict', 'string', 'string']]
com.nexenta.nms.Runner::get_tunables['string', 'string', 'bool'], [['dict', 'string', 'string']]
com.nexenta.nms.Runner::is_registered['string'], ['bool']
com.nexenta.nms.Container::object_exists['string'], ['bool']
com.nexenta.nms.Runner::register['string', ['dict', 'string', 'string'], ['dict', 'string', 'string']], []
com.nexenta.nms.Runner::reset['string'], []
com.nexenta.nms.Container::set_child_prop['string', 'string', 'string'], []
com.nexenta.nms.Object::set_prop['string', 'string'], []
com.nexenta.nms.Object::set_props[['dict', 'string', 'string']], []
com.nexenta.nms.Runner::set_tunable['string', 'string', 'string'], []
com.nexenta.nms.Container::trylock['string', 'int32'], ['bool']
com.nexenta.nms.Object::trylock_self['int32'], ['bool']
com.nexenta.nms.Container::unlock['string', 'int32'], []
com.nexenta.nms.Object::unlock_self['int32'], []
com.nexenta.nms.Runner::unregister['string'], []

12.1  com.nexenta.nms.Indexer::create

(void)  create (string zname)

Create indexer for the specified folder. Once created, the indexer may be registered via inherited com.nexenta.nms.Runner::register method, and then it will start executing at a specified interval of times. In general, being a concrete instance of Virtual Runner, an indexer may be registered and unregistered, enabled and disabled (suspended), etc. Note that once the indexer gets registered and starts running, it will be indexing the specified folder (see the first argument) and recursively its mounted sub-folders. For the list of all "runners" that inherit Virtual Runner, please refer to Section Object Model

Parameters
NAMETYPEDESCRIPTION
znamestringThe name of the folder to index. Note that this name is the name of the created indexer, used in all the rest SA-API methods to identify the indexer instance.
No return values
Usage Examples
3.  create('vol1/a/b') 

create an indexer to index folder 'vol1/a/b' and its mounted sub-folders (if any). Subsequently, the method com.nexenta.nms.Indexer::search can be used to search this folder and its snapshots, for instance com.nexenta.nms.Indexer::search('vol1/a/b', { 'terms' => ..., 'operation' => ... } ) will search the folder for certain specified terms/keywords, etc.

See Also
MethodShort Description
com.nexenta.nms.Indexer::set_indexinfo
com.nexenta.nms.Runner::registerRegister the specified runner. The operation validates runner's parameters and ...
com.nexenta.nms.Runner::is_registeredCheck whether the specified runner is registered with the appliance. ...
com.nexenta.nms.Indexer::searchSearch the folder and its snapshot(s).
com.nexenta.nms.Runner::enableEnable the specified runner. The runner must be registered (see ...
com.nexenta.nms.Runner::executeExecute the specified runner. The operation allows to run the ...

Previous Section: Folder (Filesystem)Table Of ContentsNext Section: iSCSI Initiator

12.2  com.nexenta.nms.Indexer::search

(array of (dictionary {string => string}))  search (string zname, dictionary {string => string} request)

Search the folder and its snapshot(s).

Parameters
NAMETYPEDESCRIPTION
znamestringThe name of the folder
requestdictionary {string => string}Dictionary { string => string }, with a single mandatory key: 'terms', and the following optional keys: 'operation', 'paginate_min', 'paginate_max', 'snapshot'.
Return Value
TYPEDESCRIPTION
array of (dictionary {string => string})not set
See Also
MethodShort Description
com.nexenta.nms.Indexer::createCreate indexer for the specified folder. Once created, the indexer ...
com.nexenta.nms.Runner::unregisterUnregister the specified runner. The operation reverses the effect of ...
com.nexenta.nms.Runner::is_registeredCheck whether the specified runner is registered with the appliance. ...
com.nexenta.nms.Runner::disableDisable the specified runner, ie stop (suspend) its execution. The ...
com.nexenta.nms.Runner::executeExecute the specified runner. The operation allows to run the ...

Previous Section: Folder (Filesystem)Table Of ContentsNext Section: iSCSI Initiator

13  iSCSI Initiator

SA-API Interface Object

D-Bus name Interface class name Inherits
/Root/Iscsicom.nexenta.nms.IscsiVirtual Base Object
Properties
NAMETYPEACCESSDESCRIPTION
infostringwi General information about the object
ipc_namestringe Interface class name of the associated interface object
namestringri The name of the object
Inherited Methods
NAMEPROTOTYPE
com.nexenta.nms.Object::get_prop['string'], ['string']
com.nexenta.nms.Object::get_props['string'], [['dict', 'string', 'string']]
com.nexenta.nms.Object::set_prop['string', 'string'], []
com.nexenta.nms.Object::set_props[['dict', 'string', 'string']], []
com.nexenta.nms.Object::trylock_self['int32'], ['bool']
com.nexenta.nms.Object::unlock_self['int32'], []

13.1  com.nexenta.nms.Iscsi::get_all_luns

(array of (string))  get_all_luns (void)

Get all iSCSI attached LUNs (disks).

No parameters
Return Value
TYPEDESCRIPTION
array of (string)not set
See Also
MethodShort Description
com.nexenta.nms.Iscsi::get_target_propsGet iSCSI Target default and user-defined parameters.
com.nexenta.nms.Iscsi::get_target_configGet the iSCSI Target configuration. The list of configurable parameters ...
com.nexenta.nms.Iscsi::set_target_configUpdate the iSCSI Target configuration.
com.nexenta.nms.Iscsi::get_sessionsGet a list of active iSCSI sessions.
com.nexenta.nms.Iscsi::get_connectionsGet all connections for the given iSCSI session between the ...
com.nexenta.nms.Iscsi::get_lunsGet LUNs of the specified iSCSI Target.
com.nexenta.nms.Iscsi::get_targetsList available iSCSI Targets. The result can be used to ...
com.nexenta.nms.Iscsi::setup_discoverySetup iSCSI discovery
com.nexenta.nms.Iscsi::get_discoveryList (TargetName, TargetAddress, TPGT) triplets for all configured discoveries. ...
com.nexenta.nms.Iscsi::get_discovery_stateGet the discovery state (enabled or disabled) for the specified ...
com.nexenta.nms.Iscsi::list_discoveryList the current discovery settings for the specified discovery method ...
com.nexenta.nms.Iscsi::get_defaultsGet the configured Initiator parameters. The list includes: InitiatorName, InitiatorAlias, ...
com.nexenta.nms.Iscsi::set_defaultUpdate the specified Initiator parameter. The list includes: InitiatorName, InitiatorAlias, ...
com.nexenta.nms.Iscsi::remove_targetRemove a set of specified target parameters

Previous Section: Folder and Snapshot Indexing Facility (Search Engine)Table Of ContentsNext Section: JBOD Management

13.2  com.nexenta.nms.Iscsi::get_connections

(dictionary {int32 => dictionary {string => string}})  get_connections (string target_name, string isid)

Get all connections for the given iSCSI session between the Initiator and the specified Target

Parameters
NAMETYPEDESCRIPTION
target_namestringThe IQN name of the iSCSI Target, for instance 'iqn.1986-03.com.sun:02:5d2664ea-f75a-4ef2-aa85-8656220acf19'.
isidstringInitiator session ID (ISID)
Return Value
TYPEDESCRIPTION
dictionary {int32 => dictionary {string => string}}not set
See Also
MethodShort Description
com.nexenta.nms.Iscsi::get_target_propsGet iSCSI Target default and user-defined parameters.
com.nexenta.nms.Iscsi::get_target_configGet the iSCSI Target configuration. The list of configurable parameters ...
com.nexenta.nms.Iscsi::set_target_configUpdate the iSCSI Target configuration.
com.nexenta.nms.Iscsi::get_sessionsGet a list of active iSCSI sessions.
com.nexenta.nms.Iscsi::get_targetsList available iSCSI Targets. The result can be used to ...
com.nexenta.nms.Iscsi::get_lunsGet LUNs of the specified iSCSI Target.
com.nexenta.nms.Iscsi::get_all_lunsGet all iSCSI attached LUNs (disks).
com.nexenta.nms.Iscsi::setup_discoverySetup iSCSI discovery
com.nexenta.nms.Iscsi::get_discoveryList (TargetName, TargetAddress, TPGT) triplets for all configured discoveries. ...
com.nexenta.nms.Iscsi::get_discovery_stateGet the discovery state (enabled or disabled) for the specified ...
com.nexenta.nms.Iscsi::list_discoveryList the current discovery settings for the specified discovery method ...
com.nexenta.nms.Iscsi::get_defaultsGet the configured Initiator parameters. The list includes: InitiatorName, InitiatorAlias, ...
com.nexenta.nms.Iscsi::set_defaultUpdate the specified Initiator parameter. The list includes: InitiatorName, InitiatorAlias, ...
com.nexenta.nms.Iscsi::remove_targetRemove a set of specified target parameters

Previous Section: Folder and Snapshot Indexing Facility (Search Engine)Table Of ContentsNext Section: JBOD Management

13.3  com.nexenta.nms.Iscsi::get_defaults

(dictionary {string => string})  get_defaults (void)

Get the configured Initiator parameters. The list includes: InitiatorName, InitiatorAlias, AuthMethod, RadiusServer, RadiusAccess, NumberOfSession, CHAPName, HeaderDigest, DataDigest. These are the parameters that Initiator uses to negotiate new iSCSI sessions and connections, unless explicitly specified.

No parameters
Return Value
TYPEDESCRIPTION
dictionary {string => string}not set
Usage Examples
3.  get_defaults() 

get configured (default) iSCSI Initiator parameters

See Also
MethodShort Description
com.nexenta.nms.Iscsi::get_target_propsGet iSCSI Target default and user-defined parameters.
com.nexenta.nms.Iscsi::get_target_configGet the iSCSI Target configuration. The list of configurable parameters ...
com.nexenta.nms.Iscsi::set_target_configUpdate the iSCSI Target configuration.
com.nexenta.nms.Iscsi::get_sessionsGet a list of active iSCSI sessions.
com.nexenta.nms.Iscsi::get_connectionsGet all connections for the given iSCSI session between the ...
com.nexenta.nms.Iscsi::get_lunsGet LUNs of the specified iSCSI Target.
com.nexenta.nms.Iscsi::get_all_lunsGet all iSCSI attached LUNs (disks).
com.nexenta.nms.Iscsi::setup_discoverySetup iSCSI discovery
com.nexenta.nms.Iscsi::get_discoveryList (TargetName, TargetAddress, TPGT) triplets for all configured discoveries. ...
com.nexenta.nms.Iscsi::get_discovery_stateGet the discovery state (enabled or disabled) for the specified ...
com.nexenta.nms.Iscsi::list_discoveryList the current discovery settings for the specified discovery method ...
com.nexenta.nms.Iscsi::get_targetsList available iSCSI Targets. The result can be used to ...
com.nexenta.nms.Iscsi::set_defaultUpdate the specified Initiator parameter. The list includes: InitiatorName, InitiatorAlias, ...
com.nexenta.nms.Iscsi::remove_targetRemove a set of specified target parameters

Previous Section: Folder and Snapshot Indexing Facility (Search Engine)Table Of ContentsNext Section: JBOD Management

13.4  com.nexenta.nms.Iscsi::get_discovery

(dictionary {int32 => dictionary {string => string}})  get_discovery (string method, string params)

List (TargetName, TargetAddress, TPGT) triplets for all configured discoveries.

Parameters
NAMETYPEDESCRIPTION
methodstringmethod = 'static-config' | 'discovery-address' | 'isns-server'. The appliance supports the 3 discovery mechanisms: static, via explicitly specified IQN name of the Target, and the two dynamic mechanisms: via SendTargets discovery session and iSNS (Internet Storage Name Service) server.
paramsstringCommand and method specific parameters, as per iscsiadm(1m)
Return Value
TYPEDESCRIPTION
dictionary {int32 => dictionary {string => string}}not set
See Also
MethodShort Description
com.nexenta.nms.Iscsi::get_target_propsGet iSCSI Target default and user-defined parameters.
com.nexenta.nms.Iscsi::get_target_configGet the iSCSI Target configuration. The list of configurable parameters ...
com.nexenta.nms.Iscsi::set_target_configUpdate the iSCSI Target configuration.
com.nexenta.nms.Iscsi::get_sessionsGet a list of active iSCSI sessions.
com.nexenta.nms.Iscsi::get_connectionsGet all connections for the given iSCSI session between the ...
com.nexenta.nms.Iscsi::get_lunsGet LUNs of the specified iSCSI Target.
com.nexenta.nms.Iscsi::get_all_lunsGet all iSCSI attached LUNs (disks).
com.nexenta.nms.Iscsi::setup_discoverySetup iSCSI discovery
com.nexenta.nms.Iscsi::get_targetsList available iSCSI Targets. The result can be used to ...
com.nexenta.nms.Iscsi::get_discovery_stateGet the discovery state (enabled or disabled) for the specified ...
com.nexenta.nms.Iscsi::list_discoveryList the current discovery settings for the specified discovery method ...
com.nexenta.nms.Iscsi::get_defaultsGet the configured Initiator parameters. The list includes: InitiatorName, InitiatorAlias, ...
com.nexenta.nms.Iscsi::set_defaultUpdate the specified Initiator parameter. The list includes: InitiatorName, InitiatorAlias, ...
com.nexenta.nms.Iscsi::remove_targetRemove a set of specified target parameters

Previous Section: Folder and Snapshot Indexing Facility (Search Engine)Table Of ContentsNext Section: JBOD Management

13.5  com.nexenta.nms.Iscsi::get_discovery_state

(int32)  get_discovery_state (string method)

Get the discovery state (enabled or disabled) for the specified discovery method

Parameters
NAMETYPEDESCRIPTION
methodstringmethod = 'static-config' | 'discovery-address' | 'isns-server'. The appliance supports the 3 discovery mechanisms: static, via explicitly specified IQN name of the Target, and the two dynamic mechanisms: via SendTargets discovery session and iSNS (Internet Storage Name Service) server.
Return Value
TYPEDESCRIPTION
int32not set
Usage Examples
3.  get_discovery_state('isns-server') 

find out whether discovery via iSNS is enabled

See Also
MethodShort Description
com.nexenta.nms.Iscsi::get_target_propsGet iSCSI Target default and user-defined parameters.
com.nexenta.nms.Iscsi::get_target_configGet the iSCSI Target configuration. The list of configurable parameters ...
com.nexenta.nms.Iscsi::set_target_configUpdate the iSCSI Target configuration.
com.nexenta.nms.Iscsi::get_sessionsGet a list of active iSCSI sessions.
com.nexenta.nms.Iscsi::get_connectionsGet all connections for the given iSCSI session between the ...
com.nexenta.nms.Iscsi::get_lunsGet LUNs of the specified iSCSI Target.
com.nexenta.nms.Iscsi::get_all_lunsGet all iSCSI attached LUNs (disks).
com.nexenta.nms.Iscsi::setup_discoverySetup iSCSI discovery
com.nexenta.nms.Iscsi::get_discoveryList (TargetName, TargetAddress, TPGT) triplets for all configured discoveries. ...
com.nexenta.nms.Iscsi::get_targetsList available iSCSI Targets. The result can be used to ...
com.nexenta.nms.Iscsi::list_discoveryList the current discovery settings for the specified discovery method ...
com.nexenta.nms.Iscsi::get_defaultsGet the configured Initiator parameters. The list includes: InitiatorName, InitiatorAlias, ...
com.nexenta.nms.Iscsi::set_defaultUpdate the specified Initiator parameter. The list includes: InitiatorName, InitiatorAlias, ...
com.nexenta.nms.Iscsi::remove_targetRemove a set of specified target parameters

Previous Section: Folder and Snapshot Indexing Facility (Search Engine)Table Of ContentsNext Section: JBOD Management

13.6  com.nexenta.nms.Iscsi::get_luns

(dictionary {int32 => dictionary {string => string}})  get_luns (string target_name)

Get LUNs of the specified iSCSI Target.

Parameters
NAMETYPEDESCRIPTION
target_namestringThe IQN name of the iSCSI Target, for instance 'iqn.1986-03.com.sun:02:5d2664ea-f75a-4ef2-aa85-8656220acf19'.
Return Value
TYPEDESCRIPTION
dictionary {int32 => dictionary {string => string}}not set
See Also
MethodShort Description
com.nexenta.nms.Iscsi::get_target_propsGet iSCSI Target default and user-defined parameters.
com.nexenta.nms.Iscsi::get_target_configGet the iSCSI Target configuration. The list of configurable parameters ...
com.nexenta.nms.Iscsi::set_target_configUpdate the iSCSI Target configuration.
com.nexenta.nms.Iscsi::get_sessionsGet a list of active iSCSI sessions.
com.nexenta.nms.Iscsi::get_connectionsGet all connections for the given iSCSI session between the ...
com.nexenta.nms.Iscsi::get_targetsList available iSCSI Targets. The result can be used to ...
com.nexenta.nms.Iscsi::get_all_lunsGet all iSCSI attached LUNs (disks).
com.nexenta.nms.Iscsi::setup_discoverySetup iSCSI discovery
com.nexenta.nms.Iscsi::get_discoveryList (TargetName, TargetAddress, TPGT) triplets for all configured discoveries. ...
com.nexenta.nms.Iscsi::get_discovery_stateGet the discovery state (enabled or disabled) for the specified ...
com.nexenta.nms.Iscsi::list_discoveryList the current discovery settings for the specified discovery method ...
com.nexenta.nms.Iscsi::get_defaultsGet the configured Initiator parameters. The list includes: InitiatorName, InitiatorAlias, ...
com.nexenta.nms.Iscsi::set_defaultUpdate the specified Initiator parameter. The list includes: InitiatorName, InitiatorAlias, ...
com.nexenta.nms.Iscsi::remove_targetRemove a set of specified target parameters

Previous Section: Folder and Snapshot Indexing Facility (Search Engine)Table Of ContentsNext Section: JBOD Management

13.7  com.nexenta.nms.Iscsi::get_sessions

(array of (string))  get_sessions (string target_name)

Get a list of active iSCSI sessions.

Parameters
NAMETYPEDESCRIPTION
target_namestringThe IQN name of the iSCSI Target, for instance 'iqn.1986-03.com.sun:02:5d2664ea-f75a-4ef2-aa85-8656220acf19'. The available iSCSI Targets are retrieved using com.nexenta.nms.Iscsi::get_targets method.
Return Value
TYPEDESCRIPTION
array of (string)not set
See Also
MethodShort Description
com.nexenta.nms.Iscsi::get_target_propsGet iSCSI Target default and user-defined parameters.
com.nexenta.nms.Iscsi::get_target_configGet the iSCSI Target configuration. The list of configurable parameters ...
com.nexenta.nms.Iscsi::set_target_configUpdate the iSCSI Target configuration.
com.nexenta.nms.Iscsi::get_targetsList available iSCSI Targets. The result can be used to ...
com.nexenta.nms.Iscsi::get_connectionsGet all connections for the given iSCSI session between the ...
com.nexenta.nms.Iscsi::get_lunsGet LUNs of the specified iSCSI Target.
com.nexenta.nms.Iscsi::get_all_lunsGet all iSCSI attached LUNs (disks).
com.nexenta.nms.Iscsi::setup_discoverySetup iSCSI discovery
com.nexenta.nms.Iscsi::get_discoveryList (TargetName, TargetAddress, TPGT) triplets for all configured discoveries. ...
com.nexenta.nms.Iscsi::get_discovery_stateGet the discovery state (enabled or disabled) for the specified ...
com.nexenta.nms.Iscsi::list_discoveryList the current discovery settings for the specified discovery method ...
com.nexenta.nms.Iscsi::get_defaultsGet the configured Initiator parameters. The list includes: InitiatorName, InitiatorAlias, ...
com.nexenta.nms.Iscsi::set_defaultUpdate the specified Initiator parameter. The list includes: InitiatorName, InitiatorAlias, ...
com.nexenta.nms.Iscsi::remove_targetRemove a set of specified target parameters

Previous Section: Folder and Snapshot Indexing Facility (Search Engine)Table Of ContentsNext Section: JBOD Management

13.8  com.nexenta.nms.Iscsi::get_target_config

(dictionary {string => string})  get_target_config (string target_name)

Get the iSCSI Target configuration. The list of configurable parameters includes: BidirectionalAuth, AuthMethod, CHAPName, NumberOfSessions, DataSequenceInOrder, DataPDUInOrder, DefaultTimeToRetain, DefaultTimeToWait, ErrorRecoveryLevel, FirstBurstLength, ImmediateData, InitialR2T, MaxBurstLength, MaxOutstandingR2T, MaxReceiveDataSegmentLength, MaxConnections, HeaderDigest, DataDigest

Parameters
NAMETYPEDESCRIPTION
target_namestringThe IQN name of the iSCSI Target, for instance 'iqn.1986-03.com.sun:02:df28-e0a9-c479d0d93b'. The available iSCSI Targets are retrieved using com.nexenta.nms.Iscsi::get_targets method.
Return Value
TYPEDESCRIPTION
dictionary {string => string}not set
See Also
MethodShort Description
com.nexenta.nms.Iscsi::get_target_propsGet iSCSI Target default and user-defined parameters.
com.nexenta.nms.Iscsi::get_targetsList available iSCSI Targets. The result can be used to ...
com.nexenta.nms.Iscsi::set_target_configUpdate the iSCSI Target configuration.
com.nexenta.nms.Iscsi::get_sessionsGet a list of active iSCSI sessions.
com.nexenta.nms.Iscsi::get_connectionsGet all connections for the given iSCSI session between the ...
com.nexenta.nms.Iscsi::get_lunsGet LUNs of the specified iSCSI Target.
com.nexenta.nms.Iscsi::get_all_lunsGet all iSCSI attached LUNs (disks).
com.nexenta.nms.Iscsi::setup_discoverySetup iSCSI discovery
com.nexenta.nms.Iscsi::get_discoveryList (TargetName, TargetAddress, TPGT) triplets for all configured discoveries. ...
com.nexenta.nms.Iscsi::get_discovery_stateGet the discovery state (enabled or disabled) for the specified ...
com.nexenta.nms.Iscsi::list_discoveryList the current discovery settings for the specified discovery method ...
com.nexenta.nms.Iscsi::get_defaultsGet the configured Initiator parameters. The list includes: InitiatorName, InitiatorAlias, ...
com.nexenta.nms.Iscsi::set_defaultUpdate the specified Initiator parameter. The list includes: InitiatorName, InitiatorAlias, ...
com.nexenta.nms.Iscsi::remove_targetRemove a set of specified target parameters

Previous Section: Folder and Snapshot Indexing Facility (Search Engine)Table Of ContentsNext Section: JBOD Management

13.9  com.nexenta.nms.Iscsi::get_target_props

(dictionary {string => string})  get_target_props (string target_name)

Get iSCSI Target default and user-defined parameters.

Parameters
NAMETYPEDESCRIPTION
target_namestringThe IQN name of the iSCSI Target, for instance 'iqn.1986-03.com.sun:02:df28-e0a9-c479d0d93b'. The available iSCSI Targets are retrieved using com.nexenta.nms.Iscsi::get_targets method.
Return Value
TYPEDESCRIPTION
dictionary {string => string}not set
See Also
MethodShort Description
com.nexenta.nms.Iscsi::get_targetsList available iSCSI Targets. The result can be used to ...
com.nexenta.nms.Iscsi::get_target_configGet the iSCSI Target configuration. The list of configurable parameters ...
com.nexenta.nms.Iscsi::set_target_configUpdate the iSCSI Target configuration.
com.nexenta.nms.Iscsi::get_sessionsGet a list of active iSCSI sessions.
com.nexenta.nms.Iscsi::get_connectionsGet all connections for the given iSCSI session between the ...
com.nexenta.nms.Iscsi::get_lunsGet LUNs of the specified iSCSI Target.
com.nexenta.nms.Iscsi::get_all_lunsGet all iSCSI attached LUNs (disks).
com.nexenta.nms.Iscsi::setup_discoverySetup iSCSI discovery
com.nexenta.nms.Iscsi::get_discoveryList (TargetName, TargetAddress, TPGT) triplets for all configured discoveries. ...
com.nexenta.nms.Iscsi::get_discovery_stateGet the discovery state (enabled or disabled) for the specified ...
com.nexenta.nms.Iscsi::list_discoveryList the current discovery settings for the specified discovery method ...
com.nexenta.nms.Iscsi::get_defaultsGet the configured Initiator parameters. The list includes: InitiatorName, InitiatorAlias, ...
com.nexenta.nms.Iscsi::set_defaultUpdate the specified Initiator parameter. The list includes: InitiatorName, InitiatorAlias, ...
com.nexenta.nms.Iscsi::remove_targetRemove a set of specified target parameters

Previous Section: Folder and Snapshot Indexing Facility (Search Engine)Table Of ContentsNext Section: JBOD Management

13.10  com.nexenta.nms.Iscsi::get_targets

(array of (string))  get_targets (void)

List available iSCSI Targets. The result can be used to further query each target for its alias, portal groups and other parameters using com.nexenta.nms.Iscsi::get_target_props method.

No parameters
Return Value
TYPEDESCRIPTION
array of (string)not set
See Also
MethodShort Description
com.nexenta.nms.Iscsi::get_target_propsGet iSCSI Target default and user-defined parameters.
com.nexenta.nms.Iscsi::get_target_configGet the iSCSI Target configuration. The list of configurable parameters ...
com.nexenta.nms.Iscsi::set_target_configUpdate the iSCSI Target configuration.
com.nexenta.nms.Iscsi::get_sessionsGet a list of active iSCSI sessions.
com.nexenta.nms.Iscsi::get_connectionsGet all connections for the given iSCSI session between the ...
com.nexenta.nms.Iscsi::get_lunsGet LUNs of the specified iSCSI Target.
com.nexenta.nms.Iscsi::get_all_lunsGet all iSCSI attached LUNs (disks).
com.nexenta.nms.Iscsi::setup_discoverySetup iSCSI discovery
com.nexenta.nms.Iscsi::get_discoveryList (TargetName, TargetAddress, TPGT) triplets for all configured discoveries. ...
com.nexenta.nms.Iscsi::get_discovery_stateGet the discovery state (enabled or disabled) for the specified ...
com.nexenta.nms.Iscsi::list_discoveryList the current discovery settings for the specified discovery method ...
com.nexenta.nms.Iscsi::get_defaultsGet the configured Initiator parameters. The list includes: InitiatorName, InitiatorAlias, ...
com.nexenta.nms.Iscsi::set_defaultUpdate the specified Initiator parameter. The list includes: InitiatorName, InitiatorAlias, ...
com.nexenta.nms.Iscsi::remove_targetRemove a set of specified target parameters

Previous Section: Folder and Snapshot Indexing Facility (Search Engine)Table Of ContentsNext Section: JBOD Management

13.11  com.nexenta.nms.Iscsi::get_volumes

(array of (string))  get_volumes (void)

Get the list of the volumes which are connected via iSCSI

No parameters
Return Value
TYPEDESCRIPTION
array of (string)not set

Previous Section: Folder and Snapshot Indexing Facility (Search Engine)Table Of ContentsNext Section: JBOD Management

13.12  com.nexenta.nms.Iscsi::list_discovery

(array of (string))  list_discovery (string method)

List the current discovery settings for the specified discovery method

Parameters
NAMETYPEDESCRIPTION
methodstringmethod = 'static-config' | 'discovery-address' | 'isns-server'. The appliance supports the 3 discovery mechanisms: static, via explicitly specified IQN name of the Target, and the two dynamic mechanisms: via SendTargets discovery session and iSNS (Internet Storage Name Service) server.
Return Value
TYPEDESCRIPTION
array of (string)not set
See Also
MethodShort Description
com.nexenta.nms.Iscsi::get_target_propsGet iSCSI Target default and user-defined parameters.
com.nexenta.nms.Iscsi::get_target_configGet the iSCSI Target configuration. The list of configurable parameters ...
com.nexenta.nms.Iscsi::set_target_configUpdate the iSCSI Target configuration.
com.nexenta.nms.Iscsi::get_sessionsGet a list of active iSCSI sessions.
com.nexenta.nms.Iscsi::get_connectionsGet all connections for the given iSCSI session between the ...
com.nexenta.nms.Iscsi::get_lunsGet LUNs of the specified iSCSI Target.
com.nexenta.nms.Iscsi::get_all_lunsGet all iSCSI attached LUNs (disks).
com.nexenta.nms.Iscsi::setup_discoverySetup iSCSI discovery
com.nexenta.nms.Iscsi::get_discoveryList (TargetName, TargetAddress, TPGT) triplets for all configured discoveries. ...
com.nexenta.nms.Iscsi::get_discovery_stateGet the discovery state (enabled or disabled) for the specified ...
com.nexenta.nms.Iscsi::get_targetsList available iSCSI Targets. The result can be used to ...
com.nexenta.nms.Iscsi::get_defaultsGet the configured Initiator parameters. The list includes: InitiatorName, InitiatorAlias, ...
com.nexenta.nms.Iscsi::set_defaultUpdate the specified Initiator parameter. The list includes: InitiatorName, InitiatorAlias, ...
com.nexenta.nms.Iscsi::remove_targetRemove a set of specified target parameters

Previous Section: Folder and Snapshot Indexing Facility (Search Engine)Table Of ContentsNext Section: JBOD Management

13.13  com.nexenta.nms.Iscsi::remove_target

(void)  remove_target (string target_name)

Remove a set of specified target parameters

Parameters
NAMETYPEDESCRIPTION
target_namestringThe IQN name of the iSCSI Target, for instance 'iqn.1986-03.com.sun:02:5d2664ea-f75a-4ef2-aa85-8656220acf19'.
No return values
Usage Examples
3.  remove_target('iqn.1986-03.com.sun:02:5d2664ea-f75a-4ef2-aa85-8656220acf19') 

removes the specified target. Note that as a side affect of this command some iSCSI connected LUNs may disappear; the appliance makes sure to re-synchronize the storage devices.

See Also
MethodShort Description
com.nexenta.nms.Iscsi::get_target_propsGet iSCSI Target default and user-defined parameters.
com.nexenta.nms.Iscsi::get_target_configGet the iSCSI Target configuration. The list of configurable parameters ...
com.nexenta.nms.Iscsi::set_target_configUpdate the iSCSI Target configuration.
com.nexenta.nms.Iscsi::get_sessionsGet a list of active iSCSI sessions.
com.nexenta.nms.Iscsi::get_connectionsGet all connections for the given iSCSI session between the ...
com.nexenta.nms.Iscsi::get_lunsGet LUNs of the specified iSCSI Target.
com.nexenta.nms.Iscsi::get_all_lunsGet all iSCSI attached LUNs (disks).
com.nexenta.nms.Iscsi::setup_discoverySetup iSCSI discovery
com.nexenta.nms.Iscsi::get_discoveryList (TargetName, TargetAddress, TPGT) triplets for all configured discoveries. ...
com.nexenta.nms.Iscsi::get_discovery_stateGet the discovery state (enabled or disabled) for the specified ...
com.nexenta.nms.Iscsi::list_discoveryList the current discovery settings for the specified discovery method ...
com.nexenta.nms.Iscsi::get_defaultsGet the configured Initiator parameters. The list includes: InitiatorName, InitiatorAlias, ...
com.nexenta.nms.Iscsi::set_defaultUpdate the specified Initiator parameter. The list includes: InitiatorName, InitiatorAlias, ...
com.nexenta.nms.Iscsi::get_targetsList available iSCSI Targets. The result can be used to ...

Previous Section: Folder and Snapshot Indexing Facility (Search Engine)Table Of ContentsNext Section: JBOD Management

13.14  com.nexenta.nms.Iscsi::set_default

(void)  set_default (string param_name, string param_value, string secret)

Update the specified Initiator parameter. The list includes: InitiatorName, InitiatorAlias, AuthMethod, RadiusServer, RadiusAccess, NumberOfSession, CHAPName, HeaderDigest, DataDigest

Parameters
NAMETYPEDESCRIPTION
param_namestringThe name of the configuration parameter: param_name = InitiatorName | InitiatorAlias | AuthMethod | RadiusServer | RadiusAccess | NumberOfSession | CHAPName | HeaderDigest | DataDigest
param_valuestringNew value of the configuration parameter.
secretstringSecret key. The secret key is required for changing 'AuthMethod'; otherwise it is ignored.
No return values
Usage Examples
3.  set_default('AuthMethod', 'CHAP', 'xxxxxxxxx') 

set AuthMethod = CHAP

6.  set_default('RadiusServer', '192.168.102.155:1812', 'xxxxxxxxx') 

set IP and port of the Radius Server

9.  set_default('HeaderDigest', 'CRC32', '') 

by default enable iSCSI header digest

12.  set_default('DataDigest', 'NONE', '') 

by default disable iSCSI header digest

See Also
MethodShort Description
com.nexenta.nms.Iscsi::get_target_propsGet iSCSI Target default and user-defined parameters.
com.nexenta.nms.Iscsi::get_target_configGet the iSCSI Target configuration. The list of configurable parameters ...
com.nexenta.nms.Iscsi::set_target_configUpdate the iSCSI Target configuration.
com.nexenta.nms.Iscsi::get_sessionsGet a list of active iSCSI sessions.
com.nexenta.nms.Iscsi::get_connectionsGet all connections for the given iSCSI session between the ...
com.nexenta.nms.Iscsi::get_lunsGet LUNs of the specified iSCSI Target.
com.nexenta.nms.Iscsi::get_all_lunsGet all iSCSI attached LUNs (disks).
com.nexenta.nms.Iscsi::setup_discoverySetup iSCSI discovery
com.nexenta.nms.Iscsi::get_discoveryList (TargetName, TargetAddress, TPGT) triplets for all configured discoveries. ...
com.nexenta.nms.Iscsi::get_discovery_stateGet the discovery state (enabled or disabled) for the specified ...
com.nexenta.nms.Iscsi::list_discoveryList the current discovery settings for the specified discovery method ...
com.nexenta.nms.Iscsi::get_defaultsGet the configured Initiator parameters. The list includes: InitiatorName, InitiatorAlias, ...
com.nexenta.nms.Iscsi::get_targetsList available iSCSI Targets. The result can be used to ...
com.nexenta.nms.Iscsi::remove_targetRemove a set of specified target parameters

Previous Section: Folder and Snapshot Indexing Facility (Search Engine)Table Of ContentsNext Section: JBOD Management

13.15  com.nexenta.nms.Iscsi::set_target_config

(void)  set_target_config (string target_name, string param_name, string param_value, string secret)

Update the iSCSI Target configuration.

Parameters
NAMETYPEDESCRIPTION
target_namestringThe IQN name of the iSCSI Target, for instance 'iqn.1986-03.com.sun:02:df28-e0a9-c479d0d93b'. The available iSCSI Targets are retrieved using com.nexenta.nms.Iscsi::get_targets method.
param_namestringThe name of the configuration parameter: param_name = BidirectionalAuth | AuthMethod | CHAPName | NumberOfSessions | DataSequenceInOrder | DataPDUInOrder | DefaultTimeToRetain | DefaultTimeToWait | ErrorRecoveryLevel | FirstBurstLength | ImmediateData | InitialR2T | MaxBurstLength | MaxOutstandingR2T | MaxReceiveDataSegmentLength | MaxConnections | HeaderDigest | DataDigest
param_valuestringNew value of the configuration parameter.
secretstringSecret key. The secret key is required for changing 'AuthMethod'; otherwise it is ignored.
No return values
See Also
MethodShort Description
com.nexenta.nms.Iscsi::get_target_propsGet iSCSI Target default and user-defined parameters.
com.nexenta.nms.Iscsi::get_target_configGet the iSCSI Target configuration. The list of configurable parameters ...
com.nexenta.nms.Iscsi::get_targetsList available iSCSI Targets. The result can be used to ...
com.nexenta.nms.Iscsi::get_sessionsGet a list of active iSCSI sessions.
com.nexenta.nms.Iscsi::get_connectionsGet all connections for the given iSCSI session between the ...
com.nexenta.nms.Iscsi::get_lunsGet LUNs of the specified iSCSI Target.
com.nexenta.nms.Iscsi::get_all_lunsGet all iSCSI attached LUNs