NetApp E-Series SANtricity Collection
The SANtricity collection consist of the latest available versions of the NetApp E-Series SANtricity modules and roles.
This collection provides NetApp E-Series customers with a wide range of configuration options through the collection's modules. However, the real
benefit of using the SANtricity collection is found in the host and management roles. These roles provide ready-made, policy-based orchestration for
E-Series platforms based on predefined role variables.
Once the physical hardware has been installed, the SANtricity roles are capable of discovering the DHCP-assigned addresses, setting initial passwords
and management interfaces so your automation can do full deployments for you without logging directly into the devices. Yet that's just the beginning,
the management role will also ensure alerts, ASUP, logging, LDAP, and firmware are configured as expected; and the host role will setup host interfaces,
provision and map storage, and if your servers are defined in the inventory, correctly populate E-Series hosts and host groups automatically.
Roles:
- nar_santricity_common: Discover NetApp E-Series storage systems and configures SANtricity Web Services Proxy.
- nar_santricity_host: Configure storage pools, volumes, hosts, host groups, and port interfaces. (nar_santricity_common is called at the beginning)
- nar_santricity_management: Manage storage system's name, management interfaces, alerts, syslog, auditlog, asup, ldap, certificates, drive firmware and
controller firmware. (nar_santricity_common is called at the beginning)
Modules:
- na_santricity_alerts: Manage email alert notification settings
- na_santricity_alerts_syslog: Manage syslog servers receiving storage system alerts
- na_santricity_asup: Manage auto-support settings
- na_santricity_auditlog: Manage audit-log configuration
- na_santricity_auth: Set or update the password for a storage array
- na_santricity_client_certificate: Manage remote server certificates
- na_santricity_discover: Discover E-Series storage systems on a subnet
- na_santricity_drive_firmware: Manage drive firmware
- na_santricity_facts: Retrieve facts about NetApp E-Series storage arrays
- na_santricity_firmware: Manage firmware
- na_santricity_global: Manage global settings configuration
- na_santricity_host: Manage eseries hosts
- na_santricity_hostgroup: Manage array host groups
- na_santricity_iscsi_interface: Manage iSCSI interface configuration
- na_santricity_iscsi_target: Manage iSCSI target configuration
- na_santricity_ldap: Manage LDAP integration to use for authentication
- na_santricity_lun_mapping: Manage lun mappings
- na_santricity_mgmt_interface: Manage management interface configuration
- na_santricity_storage_system: Manage SANtricity web services proxy storage arrays
- na_santricity_storagepool: Manage volume groups and disk pools
- na_santricity_syslog: Manage syslog settings
- na_santricity_volume: Manage storage volumes
Deprecated Modules:
- netapp_e_alerts: Manage email notification settings
- netapp_e_amg: Create, remove, and update asynchronous mirror groups
- netapp_e_amg_role: Update the role of a storage array within an Asynchronous Mirror Group (AMG)
- netapp_e_amg_sync: Conduct synchronization actions on asynchronous mirror groups
- netapp_e_asup: Manage auto-support settings
- netapp_e_auditlog: Manage audit-log configuration
- netapp_e_auth: Set or update the password for a storage array
- netapp_e_drive_firmware: Manage drive firmware
- netapp_e_facts: Retrieve facts about NetApp E-Series storage arrays
- netapp_e_firmware: Manage firmware
- netapp_e_flashcache: Manage SSD caches
- netapp_e_global: Manage global settings configuration
- netapp_e_hostgroup: Manage eseries hosts
- netapp_e_host: Manage array host groups
- netapp_e_iscsi_interface: Manage iSCSI interface configuration
- netapp_e_iscsi_target: Manage iSCSI target configuration
- netapp_e_ldap: Manage LDAP integration to use for authentication
- netapp_e_lun_mapping: Create, delete, or modify lun mappings
- netapp_e_mgmt_interface: Manage management interface configuration
- netapp_e_snapshot_group: Manage snapshot groups
- netapp_e_snapshot_images: Create and delete snapshot images
- netapp_e_snapshot_volume: Manage snapshot volumes
- netapp_e_storagepool: Manage volume groups and disk pools
- netapp_e_storage_system: Manage Web Services Proxy manage storage arrays
- netapp_e_syslog: Manage syslog settings
- netapp_e_volume_copy: Create volume copy pairs
- netapp_e_volume: Manage storage volumes (standard and thin)
Requirements
- Ansible 2.9 or later
- NetApp E-Series E2800 platform or newer or NetApp E-Series SANtricity Web Services Proxy configured for older E-Series Storage arrays.
Example Playbook
- hosts: eseries_storage_systems
gather_facts: false
collections:
- netapp_eseries.santricity
tasks:
- name: Ensure all management related policies are enforced
import_role:
name: nar_santricity_management
- name: Ensure all host related policies are enforced
import_role:
name: nar_santricity_host
Example Storage System Inventory File (Simple example without storage system discovery)
eseries_system_api_url: https://<IP_ADDRESS>:8443/devmgr/v2/
eseries_system_password: admin_password
eseries_validate_certs: false
eseries_system_name: my_eseries_array
eseries_management_interfaces:
config_method: static
subnet_mask: <IP_ADDRESS>
gateway: <IP_ADDRESS>
dns_config_method: static
dns_address: <IP_ADDRESS>
ntp_config_method: static
ntp_address: <IP_ADDRESS>
controller_a:
- address: <IP_ADDRESS>
- address: <IP_ADDRESS>
controller_b:
- address: <IP_ADDRESS>
- address: <IP_ADDRESS>
eseries_initiator_protocol: fc
# Storage pool and volume configuration
eseries_storage_pool_configuration:
- name: vg_01
raid_level: raid6
criteria_drive_count: 10
volumes:
- name: metadata
host: servers
size: 4096
- name: vg_02
raid_level: raid5
criteria_drive_count: 10
volumes:
- name: storage_[1-3]
host: servers
size: 2
size_unit: tb
Example Storage System Inventory File (Discover storage system)
Note that this discovery method works for SANtricity versions 11.60.2 or later, otherwise it will only discover the systems with unset passwords.
eseries_system_serial: "012345678901" # Be sure to quote if the serial is all numbers and begins with zero.
eseries_system_password: admin_password
eseries_subnet: <IP_ADDRESS>/24
(...) # Same as the previous examples starting with the eseries_validate_certs line
Example Storage System Inventory File (Discover storage system with proxy)
eseries_system_serial: "012345678901" # Be sure to quote if the serial is all numbers and begins with zero.
eseries_system_password: admin_password
eseries_proxy_api_url: https://<IP_ADDRESS>:8443/devmgr/v2/
eseries_proxy_api_password: admin_password
eseries_subnet: <IP_ADDRESS>/24
eseries_prefer_embedded: false # Overrides the default behavior of using Web Services Proxy when eseries_proxy_api_url is defined. This will only effect
# storage systems that have Embedded Web Services.
(...) # Same as the previous examples starting with the eseries_validate_certs line
Example Storage System Inventory File
eseries_system_api_url: https://<IP_ADDRESS>:8443/devmgr/v2/
eseries_system_password: admin_password
eseries_validate_certs: false
eseries_system_name: my_eseries_array
eseries_system_cache_block_size: 128
eseries_system_cache_flush_threshold: 90
eseries_system_autoload_balance: enabled
eseries_system_host_connectivity_reporting: enabled
eseries_system_default_host_type: Linux DM-MP
eseries_management_interfaces:
config_method: static
subnet_mask: <IP_ADDRESS>
gateway: <IP_ADDRESS>
dns_config_method: static
dns_address: <IP_ADDRESS>
dns_address_backup: <IP_ADDRESS>
ssh: true
ntp_config_method: static
ntp_address: <IP_ADDRESS>
ntp_address_backup: <IP_ADDRESS>
controller_a:
- address: <IP_ADDRESS>
- address: <IP_ADDRESS>
controller_b:
- address: <IP_ADDRESS>
- address: <IP_ADDRESS>
eseries_ldap_state: present
eseries_ldap_bind_username:
eseries_ldap_bind_password:
eseries_ldap_server:
eseries_ldap_search_base:
eseries_ldap_role_mappings:
".*":
- storage.admin
- storage.monitor
- support.admin
- security.admin
eseries_client_certificate_certificates:
- /path/to/client_certificate.crt
eseries_firmware_firmware: "/path/to/firmware.dlp"
eseries_firmware_nvsram: "/path/to/nvsram.dlp"
eseries_drive_firmware_firmware_list:
- "/path/to/drive_firmware.dlp"
eseries_asup_state: enabled
eseries_asup_active: true
eseries_asup_days: [sunday, saturday]
eseries_asup_start: 17
eseries_asup_end: 24
eseries_asup_validate: false
eseries_asup_method: email
eseries_asup_email:
server: smtp.example.com
sender<EMAIL_ADDRESS>eseries_syslog_state: present
eseries_syslog_address: <IP_ADDRESS>
eseries_syslog_protocol: udp
eseries_syslog_port: 514
eseries_alert_syslog_servers:
- "address": <IP_ADDRESS>
"port": 514
eseries_initiator_protocol: iscsi
# Controller port definitions
eseries_controller_iscsi_port_config_method: static
eseries_controller_iscsi_port_subnet_mask: <IP_ADDRESS>
eseries_controller_iscsi_port:
controller_a:
ports:
- address: <IP_ADDRESS>
- address: <IP_ADDRESS>
controller_b:
ports:
- address: <IP_ADDRESS>
- address: <IP_ADDRESS>
# Storage pool and volume configuration
eseries_storage_pool_configuration:
- name: pool[1-2]
raid_level: raid6
criteria_drive_count: 10
volumes:
- name: "[pool]_volume[A-C]"
host: server_group
size: 10
size_unit: tb
Collection Variables
Note that when values are specified below, they indicate the default value.
eseries_subnet: # Network subnet to search for the storage system specified in CIDR form. Example: <IP_ADDRESS>/24
eseries_template_api_url: # Template for the web services api url. Default: https://<IP_ADDRESS>:8443/devmgr/v2/
eseries_prefer_embedded: false # Overrides the default behavior of using Web Services Proxy when eseries_proxy_api_url is defined. This will only effect
# storage systems that have Embedded Web Services.
eseries_validate_certs: true # Indicates Whether SSL certificates should be verified. Used for both embedded and proxy. Choices: true, false
# Storage system specific variables
eseries_proxy_ssid: # Arbitrary string for the proxy to represent the storage system. eseries_system_serial will be used when not defined.
eseries_system_serial: # Storage system serial number. Be sure to quote if the serial is all numbers and begins with zero. (This is located on a
# label at the top-left towards the front on the device)
eseries_system_addresses: # Storage system management IP addresses. Only required when eseries_system_serial or eseries_system_api_url are not
# defined. When not specified, addresses will be populated with eseries_management_interfaces controller addresses.
eseries_system_api_url: # Url for the storage system's for embedded web services rest api. Example: https://<IP_ADDRESS>/devmgr/v2
eseries_system_username: admin # Username for the storage system's for embedded web services rest api
eseries_system_password: # Password for the storage system's for embedded web services rest api and when the admin password has not been set
# eseries_system_password will be used to set it.
eseries_system_tags: # Meta tags to associate with storage system when added to the proxy.
# Web Services Proxy specific variable
Note: eseries_proxy_* variables are required to discover storage systems prior to SANtricity OS version 11.60.2.
eseries_proxy_api_url: # Url for the storage system's for proxy web services rest api. Example: https://<IP_ADDRESS>/devmgr/v2
eseries_proxy_api_username: admin # Username for the storage system's for proxy web services rest api.
eseries_proxy_api_password: # Password for the storage system's for proxy web services rest api and when the admin password has not been set
# eseries_proxy_api_password will be used to set it.
eseries_proxy_monitor_password: # Proxy password for the monitor username
eseries_proxy_security_password: # Proxy password for the security username
eseries_proxy_storage_password: # Proxy password for the monitor username
eseries_proxy_support_password: # Proxy password for the support username
eseries_proxy_accept_certifications: # Force automatic acceptance of all storage system's certificate
eseries_proxy_default_system_tags: # Default meta tags to associate with all storage systems
eseries_proxy_default_password: # Default password to associate with all storage systems. This is overridden by eseries_system_password.
# LDAP configuration defaults
eseries_proxy_ldap_state: # Whether LDAP should be configured for the proxy`
eseries_proxy_ldap_identifier: # The user attributes that should be considered for the group to role mapping
eseries_proxy_ldap_user_attribute: # Attribute used to the provided username during authentication.
eseries_proxy_ldap_bind_username: # User account that will be used for querying the LDAP server.
eseries_proxy_ldap_bind_password: # Password for the bind user account
eseries_proxy_ldap_server: # LDAP server URL.
eseries_proxy_ldap_search_base: # Search base used for find user's group membership
eseries_proxy_ldap_role_mappings: # Dictionary of user groups, each containing the list of access roles.
# Role choices: storage.admin - allows users full read/writes access to storage objects and operations.
# storage.monitor - allows users read-only access to storage objects and operations.
# storage.admin - allows users access to hardware, diagnostic information, major event logs,
# and other critical support-related functionality, but not the sorage configuration.
# security.admin - allows users access to authentication/authorization configuration, as
# well as the audit log configuration, adn certification management.
# Global storage system information
eseries_system_name: # Name of the storage system.
eseries_system_cache_block_size: # Cache block size
eseries_system_cache_flush_threshold: # Unwritten data will be flushed when exceeds this threshold
eseries_system_autoload_balance: # Whether automatic load balancing should be enabled. Choices: enabled, disabled
eseries_system_host_connectivity_reporting: # Whether host connectivity reporting should be enabled. Choices: enabled, disabled
eseries_system_default_host_type: # Only required when using something other than Linux kernel 3.10 or later with DM-MP (Linux DM-MP),
# non-clustered Windows (Windows), or the storage system default host type is incorrect.
# Common host type definitions:
# - AIX MPIO: The Advanced Interactive Executive (AIX) OS and the native MPIO driver
# - AVT 4M: Silicon Graphics, Inc. (SGI) proprietary multipath driver
# - HP-UX: The HP-UX OS with native multipath driver
# - Linux ATTO: The Linux OS and the ATTO Technology, Inc. driver (must use ATTO FC HBAs)
# - Linux DM-MP: The Linux OS and the native DM-MP driver
# - Linux Pathmanager: The Linux OS and the SGI proprietary multipath drive
# - Mac: The Mac OS and the ATTO Technology, Inc. driver
# - ONTAP: FlexArray
# - Solaris 11 or later: The Solaris 11 or later OS and the native MPxIO driver
# - Solaris 10 or earlier: The Solaris 10 or earlier OS and the native MPxIO driver
# - SVC: IBM SAN Volume Controller
# - VMware: ESXi OS
# - Windows: Windows Server OS and Windows MPIO with a DSM driver
# - Windows Clustered: Clustered Windows Server OS and Windows MPIO with a DSM driver
# - Windows ATTO: Windows OS and the ATTO Technology, Inc. driver
# Role-based username passwords
eseries_system_monitor_password: # Storage system monitor username password
eseries_system_security_password: # Storage system security username password
eseries_system_storage_password: # Storage system storage username password
eseries_system_support_password: # Storage system support username password
# Storage management interface defaults
Note: eseries_management_* variables have the lowest priority and will be overwritten by those found in eseries_management_interfaces
eseries_management_config_method: # Default config method for all management interfaces. Choices: static, dhcp
eseries_management_subnet_mask: # Default subnet mask for all management interfaces
eseries_management_gateway_mask: # Default gateway for all management interfaces
eseries_management_dns_config_method: # Default DNS config method for all management interfaces
eseries_management_dns_address: # Default primary DNS address for all management interfaces
eseries_management_dns_address_backup: # Default backup DNS address for all management interfaces
eseries_management_ntp_config_method: # Default NTP config method for all management interfaces
eseries_management_ntp_address: # Default primary NTP address for all management interfaces
eseries_management_ntp_address_backup: # Default backup NTP address for all management interfaces
eseries_management_ssh: # Default SSH access for all management interfaces. Choices: true, false
eseries_management_interfaces:
config_method: # Config method for all management interfaces. Choices: static, dhcp
subnet_mask: # Subnet mask for all management interfaces
gateway_mask: # Gateway for all management interfaces
dns_config_method: # DNS config method for all management interfaces
dns_address: # Primary DNS address for all management interfaces
dns_address_backup: # Backup DNS address for all management interfaces
ntp_config_method: # NTP config method for all management interfaces
ntp_address: # Primary NTP address for all management interfaces
ntp_address_backup: # Backup NTP address for all management interfaces
ssh: # SSH access for all management interfaces. Choices: true, false
controller_a: # List of controller A ports
- address: # IPv4 address for controller A
config_method: # Config method for controller A. Choices: static, dhcp
subnet_mask: # Subnet mask for controller A
gateway: # Gateway for controller A
dns_config_method: # DNS config method for controller A
dns_address: # Primary DNS address for controller A
dns_address_backup: # Backup DNS address for controller A
ntp_config_method: # NTP config method for controller A
ntp_address: # Primary NTP address for controller A
ntp_address_backup: # Backup NTP address for controller A
ssh: # SSH access for controller A. Choices: true, false
controller_b: # List of controller B ports
- (...) # Same as for controller A but for controller B.
# Alerts configuration defaults
eseries_alerts_state: # Whether to enable storage system alerts. Choices: enabled, disabled
eseries_alerts_contact: # This allows owner to specify free-form contact information such as email or phone number.
eseries_alerts_recipients: # List containing e-mails that should be sent notifications when alerts are issued.
eseries_alerts_sender: # Sender email. This does not necessarily need to be a valid e-mail.
eseries_alerts_server: # Fully qualified domain name, IPv4 address, or IPv6 address of the mail server.
eseries_alerts_test: false # When changes are made to the storage system alert configuration a test e-mail will be sent. Choices: true, false
eseries_alert_syslog_servers: # List of dictionaries where each dictionary contains a syslog server entry. [{"address": <address>, "port": <port>}]
eseries_alert_syslog_test: false # Whether alerts syslog servers configuration test message should be sent. Choices: true, false
# LDAP configuration defaults
eseries_ldap_state: # Whether LDAP should be configured
eseries_ldap_identifier: # The user attributes that should be considered for the group to role mapping
eseries_ldap_user_attribute: # Attribute used to the provided username during authentication.
eseries_ldap_bind_username: # User account that will be used for querying the LDAP server.
eseries_ldap_bind_password: # Password for the bind user account
eseries_ldap_server: # LDAP server URL.
eseries_ldap_search_base: # Search base used for find user's group membership
eseries_ldap_role_mappings: # Dictionary of user groups, each containing the list of access roles.
# Role choices: storage.admin - allows users full read/writes access to storage objects and operations.
# storage.monitor - allows users read-only access to storage objects and operations.
# storage.admin - allows users access to hardware, diagnostic information, major event logs,
# and other critical support-related functionality, but not the sorage configuration.
# security.admin - allows users access to authentication/authorization configuration, as
# well as the audit log configuration, adn certification management.
# Drive firmware defaults
eseries_drive_firmware_firmware_list: # Local path list for drive firmware.
eseries_drive_firmware_wait_for_completion: # Forces drive firmware upgrades to wait for all associated tasks to complete. Choices: true, false
eseries_drive_firmware_ignore_inaccessible_drives: # Forces drive firmware upgrades to ignore any inaccessible drives. Choices: true, false
eseries_drive_firmware_upgrade_drives_online: # Forces drive firmware upgrades to be performed while I/Os are accepted. Choices: true, false
# Controller firmware defaults
eseries_firmware_nvsram: # Local path for NVSRAM file.
eseries_firmware_firmware: # Local path for controller firmware file.
eseries_firmware_wait_for_completion: # Forces controller firmware upgrade to wait until upgrade has completed before continuing. Choices: true, false
eseries_firmware_clear_mel_events: # Forces firmware upgrade to be attempted regardless of the health check results. Choices: true, false
# Auto-Support configuration defaults
eseries_asup_state: # Whether auto support (ASUP) should be enabled. Choices: enabled, disabled
eseries_asup_active: # Allows NetApp support personnel to request support data to resolve issues. Choices: true, false
eseries_asup_days: # List of days of the week. Choices: monday, tuesday, wednesday, thursday, friday, saturday, sunday
eseries_asup_start: # Hour of the day(s) to start ASUP bundle transmissions. Start time must be less than end time. Choices: 0-23
eseries_asup_end: # Hour of the day(s) to end ASUP bundle transmissions. Start time must be less than end time. Choices: 1-24
eseries_asup_method: # ASUP delivery method. Choices https, http, email (default: https)
eseries_asup_routing_type: # ASUP delivery routing type for https or http. Choices: direct, proxy, script (default: direct)
eseries_asup_proxy: # ASUP proxy delivery method information.
host: # ASUP proxy host IP address or FQDN. When eseries_asup_routing_type==proxy this must be specified.
port: # ASUP proxy host port. When eseries_asup_routing_type==proxy this must be specified.
script: # ASUP proxy host script.
eseries_asup_email: # ASUP email delivery configuration information
server: # ASUP email server
sender: # ASUP email sender
test_recipient: # ASUP configuration mail test recipient
eseries_maintenance_duration: # Duration in hours (1-72) the ASUP maintenance mode will be active
eseries_maintenance_emails: # List of email addresses for maintenance notifications
eseries_asup_validate: # Verify ASUP configuration prior to applying changes
# Audit-log configuration defaults
eseries_auditlog_enforce_policy: # Whether to make audit-log policy changes. Choices: true, false
eseries_auditlog_force: # Forces audit-log to delete log messages when fullness threshold has been exceeded. Choices: true, false
eseries_auditlog_full_policy: # Policy for what to do when record limit has been reached. Choices: overWrite, preventSystemAccess
eseries_auditlog_log_level: # Filters logs based on the specified level. Choices: all, writeOnly
eseries_auditlog_max_records: # Maximum number of audit-log messages retained. Choices: 100-50000.
eseries_auditlog_threshold: # Memory full percentage threshold that audit-log will start issuing warning messages. Choices: 60-90
# Syslog configuration defaults
eseries_syslog_state: # Whether syslog servers should be added or removed from storage system. Choices: present, absent
eseries_syslog_address: # Syslog server IPv4 address or fully qualified hostname.
eseries_syslog_test: # Whether a test messages should be sent to syslog server when added to the storage system. Choices: true, false
eseries_syslog_protocol: # Protocol to be used when transmitting log messages to syslog server. Choices: udp, tc, tls
eseries_syslog_port: # Port to be used when transmitting log messages to syslog server.
eseries_syslog_components: # List of components log to syslog server. Choices: auditLog, (others may become available)
# iSCSI target discovery specifications
Note: add the following to ansible-playbook command to update the chap secret: --extra-vars "eseries_target_chap_secret_update=True
eseries_iscsi_target_name: # iSCSI target name that will be seen by the initiator
eseries_iscsi_target_ping: True # Enables ICMP ping response from the configured iSCSI ports (boolean)
eseries_iscsi_target_unnamed_discovery: True # Whether the iSCSI target iqn should be returned when an initiator performs a discovery session.
eseries_iscsi_target_chap_secret: # iSCSI chap secret. When left blank, the chap secret will be removed from the storage system.
eseries_iscsi_target_chap_secret_update: False # DO NOT REMOVE! Since na_santricity_iscsi_target cannot compare the chap secret with the current and
# will always return changed=True, this flag is used to force the module to update the chap secret.
# Leave this value False and to add the --extra-vars "eseries_target_chap_secret_update=True".
# Controller iSCSI Interface Port Default Policy Specifications
eseries_controller_iscsi_port_state: enabled # Generally specifies whether a controller port definition should be applied Choices: enabled, disabled
eseries_controller_iscsi_port_config_method: dhcp # General port configuration method definition for both controllers. Choices: static, dhcp
eseries_controller_iscsi_port_gateway: # General port IPv4 gateway for both controllers.
eseries_controller_iscsi_port_subnet_mask: # General port IPv4 subnet mask for both controllers.
eseries_controller_iscsi_port_mtu: 9000 # General port maximum transfer units (MTU) for both controllers. Any value greater than 1500 (bytes).
eseries_controller_iscsi_port:
controller_a: # Controller A port definition.
state: # General definitions for all ports on controller A. Any option specified in the ports definition can be
# specified here to generalize for all controller A ports. Choices: enabled, disabled
config_method: # Port configuration method Choices: static, dhcp
address: # Port IPv4 address
gateway: # Port IPv4 gateway
subnet_mask: # Port IPv4 subnet_mask
mtu: # Port IPv4 mtu
ports: # Ordered list of port definitions reading iSCSI ports left to right
- state: # Whether the port should be enabled. Choices: enabled, disabled
config_method: # Port configuration method Choices: static, dhcp
address: # Port IPv4 address
gateway: # Port IPv4 gateway
subnet_mask: # Port IPv4 subnet_mask
controller_b: # Controller B port definition.
(...) # Same as controller A but for controller B
# Controller InfiniBand iSER Interface Channel
eseries_controller_ib_iser_port:
controller_a: # Ordered list of controller A channel address definition.
- # Port IPv4 address for channel 1
- (...) # So on and so forth
controller_b: # Ordered list of controller B channel address definition.
# Controller NVMe over InfiniBand Interface Channel
eseries_controller_nvme_ib_port:
controller_a: # Ordered list of controller A channel address definition.
- # Port IPv4 address for channel 1
- (...) # So on and so forth
controller_b: # Ordered list of controller B channel address definition.
# Controller NVMe RoCE Interface Port Default Policy Specifications
eseries_controller_nvme_roce_port_state: enabled # Specifies whether a controller port definition should be applied. Choices: enabled, disabled
eseries_controller_nvme_roce_port_config_method: dhcp # Port configuration method definition for both controllers. Choices: static, dhcp
eseries_controller_nvme_roce_port_gateway: # Port IPv4 gateway for both controllers.
eseries_controller_nvme_roce_port_subnet_mask: # Port IPv4 subnet mask for both controllers.
eseries_controller_nvme_roce_port_mtu: 9000 # Port maximum transfer units (MTU). Any value greater than 1500 (bytes).
eseries_controller_nvme_roce_port_speed: auto # Interface speed. Value must be a supported speed or auto to negotiate the speed with the port.
eseries_controller_nvme_roce_port:
controller_a: # Controller A port definition.
state: # General definitions for all ports on controller A. Any option specified in the ports definition can be
# specified here to generalize for all controller A ports.
config_method: # Port configuration method Choices: static, dhcp
address: # Port IPv4 address
gateway: # Port IPv4 gateway
subnet_mask: # Port IPv4 subnet_mask
mtu: # Port IPv4 mtu
speed: # Port IPv4 speed
ports: # List containing ports definitions
- channel: # Channel of the port to modify. This will be a numerical value that represents the port; typically read
# left to right on the HIC.
state: # Whether the port should be enabled.
config_method: # Port configuration method Choices: static, dhcp
address: # Port IPv4 address
gateway: # Port IPv4 gateway
subnet_mask: # Port IPv4 subnet_mask
controller_b: # Controller B port definition.
(...) # Same as controller A but for controller B
# Storage Pool Default Policy Specifications
eseries_storage_pool_state: present # Default storage pool state. Choices: present, absent
eseries_storage_pool_raid_level: raidDiskPool # Default volume raid level. Choices: raid0, raid1, raid5, raid6, raidDiskPool
eseries_storage_pool_secure_pool: false # Default for storage pool drive security. This flag will enable the security at rest feature. There
# must be sufficient FDE or FIPS security capable drives. Choices: true, false
eseries_storage_pool_criteria_drive_count: # Default storage pool drive count.
eseries_storage_pool_reserve_drive_count: # Default reserve drive count for drive reconstruction for storage pools using dynamic disk pool and
# the raid level must be set for raidDiskPool.
eseries_storage_pool_criteria_min_usable_capacity: # Default minimum required capacity for storage pools.
eseries_storage_pool_criteria_drive_type: # Default drive type for storage pools. Choices: hdd, ssd
eseries_storage_pool_criteria_size_unit: gb # Default unit size for all storage pool related sizing.
# Choices: bytes, b, kb, mb, gb, tb, pb, eb, zb, yb
eseries_storage_pool_criteria_drive_min_size: # Default minimum drive size for storage pools.
eseries_storage_pool_criteria_drive_require_da: # Default for whether storage pools are required to have data assurance (DA) compatible drives.
# Choices: true, false
eseries_storage_pool_criteria_drive_require_fde: # Default for whether storage pools are required to have drive security compatible drives.
# Choices: true, false
eseries_storage_pool_remove_volumes: # Default policy for deleting volumes prior to removing storage pools.
eseries_storage_pool_erase_secured_drives: # Default policy for erasing the content drives during create and delete storage pool operations.
# Choices: true, false
# Volume Default Policy Specifications
eseries_volume_state: present # Default volume state. Choices: present, absent
eseries_volume_size_unit: gb # Default unit size for all volume sizing options.
eseries_volume_size: # Default volume size or the presented size for thinly provisioned volumes.
eseries_volume_data_assurance_enabled: # Default for whether data assurance(DA) is required to be enabled.
eseries_volume_segment_size_kb: # Default segment size measured in kib.
eseries_volume_read_cache_enable: # Default for read caching which will cache all read requests.
eseries_volume_read_ahead_enable: # Default for read ahead caching; this is good for sequential workloads to cache subsequent blocks.
eseries_volume_write_cache_enable: # Default for write caching which will cache all writes.
eseries_volume_cache_without_batteries: # Default for allowing caching when batteries are not present.
eseries_volume_thin_provision: # Default for whether volumes should be thinly provisioned.
eseries_volume_thin_volume_repo_size: # Default for actually allocated space for thinly provisioned volumes.
eseries_volume_thin_volume_max_repo_size: # Default for the maximum allocated space allowed for thinly provisioned volumes.
eseries_volume_thin_volume_expansion_policy: # Default thin volume expansion policy. Choices: automatic, manual
eseries_volume_thin_volume_growth_alert_threshold: # Default thin volume growth alert threshold; this is the threshold for when the thin volume expansion
# policy will be enacted. Allowable values are between and including 10% and 99%
eseries_volume_ssd_cache_enabled: # Default for ssd cache which will enable the volume to use an existing SSD cache on the storage array
eseries_volume_host: # Default host for all volumes; the value can be any host from the Ansible inventory.
eseries_volume_workload_name: # Default workload tag name
eseries_volume_metadata: # Default metadata
eseries_volume_owning_controller # Default preferred owning controller
eseries_volume_wait_for_initialization: false # Default for whether volume creation with wait for initialization to complete
# Storage Pool-Volume Mapping Default Policy Specifications
# ---------------------------------------------------------
eseries_lun_mapping_state: present # Generally specifies whether a LUN mapping should be present. This is useful when adding a default host for all
# volumes. Choices: present, absent
eseries_lun_mapping_host: # Default host for all volumes not specifically give a host either in common_volume_configuration or in
# eseries_storage_pool_configuration.
# Storage Pool-Volume Default Policy Specifications
Name schemes: Storage pool and volume names can be used to specify a naming scheme to produce a list of storage pools and volumes. Schemes are defined by
brackets and can be used to specify a range of lowercase letters, uppercase letters, range of single digit numbers, any top-level inventory
variables, and [pool] to use the current defined storage pool (volume only).
eseries_storage_pool_configuration:
- name: # Name or name scheme (see above) for the storage pool.
state: # Specifies whether the storage pool should exist. Choices: present, absent
raid_level # Volume group raid level. Choices: raid0, raid1, raid5, raid6, raidDiskPool (Default: raidDiskPool)
secure_pool: # Default for storage pool drive security. This flag will enable the security at rest feature. There must be
# sufficient FDE or FIPS security capable drives. Choices: true, false
criteria_drive_count: # Default storage pool drive count.
reserve_drive_count: # Default reserve drive count for drive reconstruction for storage pools using dynamic disk pool and the raid
# level must be set for raidDiskPool.
criteria_min_usable_capacity: # Default minimum required capacity for storage pools.
criteria_drive_type: # Default drive type for storage pools. Choices: hdd, ssd
criteria_size_unit: # Default unit size for all storage pool related sizing. Choices: bytes, b, kb, mb, gb, tb, pb, eb, zb, yb
criteria_drive_min_size: # Default minimum drive size for storage pools.
criteria_drive_require_da: # Ensures storage pools have data assurance (DA) compatible drives. Choices: true, false
criteria_drive_require_fde: # Ensures storage pools have drive security compatible drives. Choices: true, false
remove_volumes: # Ensures volumes are deleted prior to removing storage pools.
erase_secured_drives: # Ensures data is erased during create and delete storage pool operations. Choices: true, false
common_volume_configuration: # Any option that can be specified at the volume level can be generalized here at the storage pool level.
volumes: # List of volumes associated the storage pool.
- state: # Specifies whether the volume should exist (present, absent)
name: # (required) Name or name scheme (see above) for the volume(s) to be created in the storage pool(s)
host: # host or host group for the volume should be mapped to.
host_type: # Only required when using something other than Linux kernel 3.10 or later with DM-MP (Linux DM-MP),
# non-clustered Windows (Windows), or the storage system default host type is incorrect.
# Common host type definitions:
# - AIX MPIO: The Advanced Interactive Executive (AIX) OS and the native MPIO driver
# - AVT 4M: Silicon Graphics, Inc. (SGI) proprietary multipath driver
# - HP-UX: The HP-UX OS with native multipath driver
# - Linux ATTO: The Linux OS and the ATTO Technology, Inc. driver (must use ATTO FC HBAs)
# - Linux DM-MP: The Linux OS and the native DM-MP driver
# - Linux Pathmanager: The Linux OS and the SGI proprietary multipath driver
# - Mac: The Mac OS and the ATTO Technology, Inc. driver
# - ONTAP: FlexArray
# - Solaris 11 or later: The Solaris 11 or later OS and the native MPxIO driver
# - Solaris 10 or earlier: The Solaris 10 or earlier OS and the native MPxIO driver
# - SVC: IBM SAN Volume Controller
# - VMware: ESXi OS
# - Windows: Windows Server OS and Windows MPIO with a DSM driver
# - Windows Clustered: Clustered Windows Server OS and Windows MPIO with a DSM driver
# - Windows ATTO: Windows OS and the ATTO Technology, Inc. driver
metadata: # Dictionary containing arbitrary entries normally used for defining the volume(s) workload.
owning_controller: # Specifies which controller will be the primary owner of the volume. Not specifying will allow the
# controller to choose ownership. (Choices: A, B)
read_ahead_enable: # Enables read ahead caching; this is good for sequential workloads to cache subsequent blocks.
read_cache_enable: # Enables read caching which will cache all read requests.
size: # Size of the volume or presented size of the thinly provisioned volume.
size_unit: # Unit size for the size, thin_volume_repo_size, and thin_volume_max_repo_size
# Choices: bytes, b, kb, mb, gb, tb, pb, eb, zb, yb
segment_size_kb: # Indicates the amount of data stored on a drive before moving on to the next drive in the volume group.
ssd_cache_enabled: # Enables ssd cache which will enable the volume to use an existing SSD cache on the storage array.
thin_provision: # Whether volumes should be thinly provisioned.
thin_volume_repo_size: # Actually allocated space for thinly provisioned volumes.
thin_volume_max_repo_size: # Maximum allocated space allowed for thinly provisioned volumes.
thin_volume_expansion_policy: # Thin volume expansion policy. Choices: automatic, manual
thin_volume_growth_alert_threshold: # Thin volume growth alert threshold; this is the threshold for when the thin volume expansion
# policy will be enacted. Allowable values are between and including 10% and 99%
data_assurance_enabled: # Enables whether data assurance(DA) is required to be enabled.
wait_for_initialization: # Whether volume creation with wait for initialization to complete
workload_name: # Name of the volume's workload
write_cache_enable: # Enables write caching which will cache all writes.
# created on the storage array.
# Initiator-Target Protocol Variable Defaults
Note that the following commands need to produce a unique list of IQNs or WWNs of the interfaces used, line separated. Overwrite as necessary.
eseries_initiator_protocol: fc # Storage system protocol. Choices: fc, iscsi, sas, ib_iser, ib_srp, nvme_ib, nvme_roce
eseries_initiator_command:
fc:
linux: "systool -c fc_host -v | grep port_name | cut -d '\"' -f 2 | cut -d 'x' -f 2 | sort | uniq"
windows: "(Get-InitiatorPort | Where-Object -P ConnectionType -EQ 'Fibre Channel' | Select-Object -Property PortAddress |
Format-Table -AutoSize -HideTableHeaders | Out-String).trim()"
iscsi:
linux: "grep -o iqn.* /etc/iscsi/initiatorname.iscsi"
windows: "(get-initiatorPort | select-object -property nodeaddress | sort-object | get-unique | ft -autoSize | out-string -stream |
select-string iqn | out-string).trim()"
sas:
# NetApp IMT for SAS attached E-Series SAN hosts recommends adding all possible SAS addresses with the base address
# starting at 0, and the last address ending in 3 for single port HBAs, or 7 for dual port HBAs. Since determining
# single vs . dual port HBAs adds complexity, we always add all 8 possible permutations of the SAS address.
linux: "systool -c scsi_host -v | grep host_sas_address | cut -d '\"' -f 2 | cut -d 'x' -f 2 | sort | uniq"
windows: "(Get-InitiatorPort | Where-Object -P ConnectionType -EQ 'SAS' | Select-Object -Property PortAddress |
Format-Table -AutoSize -HideTableHeaders | Out-String).trim()"
ib_iser:
linux: "grep -o iqn.* /etc/iscsi/initiatorname.iscsi"
windows: "" # add windows command for determining host iqn address(es)
ib_srp:
linux: "ibstat -p"
windows: "" # Add Windows command for determining host guid
nvme_ib:
linux: "" # Add Linux command for determining host nqn address(es)
windows: "" # Add Windows command for determining host nqn address(es)
nvme_roce:
linux: "" # Add Linux command for determining host nqn address(es)
windows: "" # Add Windows command for determining host nqn address(es)
# Manual host definitions, Linux and Windows systems can be automatically populated based on host mappings found in eseries_storage_pool_configuration
Note that using the automated method is preferred.
eseries_host_force_port: true # Default for whether ports are to be allowed to be re-assigned (boolean)
eseries_host_remove_unused_hostgroup: true # Forces any unused groups to be removed
eseries_host_object:
- name: # Host label as referenced by the storage array.
state: # Specifies whether host definition should be exist. Choices: present, absent
ports: # List of port definitions
- type: # Port protocol definition (iscsi, fc, sas, ib, nvme). Note that you should use 'iscsi' prior to Santricity version 11.60 for IB iSER.
label: # Arbitrary port label
port: # Port initiator (iqn, wwn, etc)
group: # Host's host group
host_type: # Only required when using something other than Linux kernel 3.10 or later with DM-MP (Linux DM-MP),
# non-clustered Windows (Windows), or the storage system default host type is incorrect.
# Common host type definitions:
# - AIX MPIO: The Advanced Interactive Executive (AIX) OS and the native MPIO driver
# - AVT 4M: Silicon Graphics, Inc. (SGI) proprietary multipath driver
# - HP-UX: The HP-UX OS with native multipath driver
# - Linux ATTO: The Linux OS and the ATTO Technology, Inc. driver (must use ATTO FC HBAs)
# - Linux DM-MP: The Linux OS and the native DM-MP driver
# - Linux Pathmanager: The Linux OS and the SGI proprietary multipath driver
# - Mac: The Mac OS and the ATTO Technology, Inc. driver
# - ONTAP: FlexArray
# - Solaris 11 or later: The Solaris 11 or later OS and the native MPxIO driver
# - Solaris 10 or earlier: The Solaris 10 or earlier OS and the native MPxIO driver
# - SVC: IBM SAN Volume Controller
# - VMware: ESXi OS
# - Windows: Windows Server OS and Windows MPIO with a DSM driver
# - Windows Clustered: Clustered Windows Server OS and Windows MPIO with a DSM driver
# - Windows ATTO: Windows OS and the ATTO Technology, Inc. driver
License
BSD-3-Clause
Author Information
Nathan Swartz (@ndswartz)


Buhari writes Senate over six aviation bills
by NANNigeria’s president Muhammadu Buhari on Tuesday transmitted a letter to the Senate, seeking consideration and passage of six Aviation Bills.
The President of the Senate, Dr Ahmad Lawan read the letter during plenary.
“Dear Distinguished Senate President; Transmission of Six Aviation Sector Bills to the National Assembly for consideration and passage into law,” Buhari said in the letter.
“Pursuant to Section 58 of the Constitution of the Federal Republic of Nigeria 1999 as amended, I formally request that the following six bills be considered for passage by the Senate.
“The bills include Civil Aviation Bill 2019, Federal Airport Authority of Nigeria Bill 2019, Nigerian College of Air space Management Agency Establishment Bill 2019.
“Others are Nigerian College of Aviation Technology Establishment Bill 2019, Nigerian Meteorological Agency Establishment Bill 2019 and Nigerian Safety Investigation Bureau Establishment Bill 2019.
“While I trust that these bills will be expeditiously and favourably considered by the Senate, please, accept Mr Senate President the assurances of my highest consideration.”
In his remark, Lawan urged the Clerk to the Senate, Nelson Ayewoh to ensure that the bills were gazetted and distributed to all the Senators for consideration


{% extends "base.html" %} {% block styles %} {% endblock %} {% block content %}
here at kermpany our motto is "spend, spend, spend". so take out your checkbooks, swipe that credit card and support a cause that is arguably less worthy than other causes, but the only cause that helps kermpany. if you just got your paycheck, came in to your inheritance, or if you are just generally irresponsible with money: give now!
if you want to visualize what your donation could buy check out the goals below. (note: donations may or may not actually be spent on the following things. all we promise is that you are poorer and kermpany is richer.)


Java L&F Credits
The Java L&F Engineering team:
Mike Albers
Tom Santos
Jeff Shapiro
Steve Wilson
Management:
Harry Vertelney
The Java L&F Designer:
Chris Ryan
Back


Home
About
☰
Clients
Add Client
Product Area
Add Product Area
×
Add Client
Name
×
Add Product Area
Product Area


--- layout: page title: GoTo bookmarks: - name: 网站导航 link: "http://lackar.com/aa/" img: "http://lackar.com/aa/logo.png" desc: AnywhereAnything|网站精选 - name: SeeSeed link: "https://www.seeseed.com/" img: "https://c1.staticflickr.com/2/1959/43727259790_7548ee33fd_m.jpg" desc: 优秀设计网站导航 - name: 虫部落 link: "http://magnet.chongbuluo.com/" img: "https://c1.staticflickr.com/5/4863/31383343127_e52b0d1a2a.jpg" desc: 资源搜索网站集合 - name: Neets link: "https://neets.cc/" img: "https://c1.staticflickr.com/2/1944/43727260180_ff54e07fd7_t.jpg" desc: 追剧必备 - name: MacWk link: "https://www.macwk.com/" img: "https://www.macwk.com/favicon.ico" desc: 精品Mac软件分享 - name: Radio Garden link: "http://radio.garden/live/newcastle-upon-tyne/smoothradionortheast/" img: "https://c1.staticflickr.com/2/1928/44819205154_896d35b1b3_m.jpg" desc: 全球广播电台 - name: 大数据导航 link: "http://hao.199it.com/" img: "http://hao.199it.com/favicon.ico" desc: 大数据导航 blogs: - name: 简书 link: "https://www.jianshu.com/" img: "https://www.jianshu.com/favicon.ico" desc: 简书创作社区 - name: 豆瓣 link: "https://www.douban.com/" img: "https://www.douban.com/favicon.ico" desc: 文艺青年和伪文艺青年聚集地 - name: 小木虫 link: "http://muchong.com/" img: "https://c1.staticflickr.com/2/1910/44819206334_fb40c3170b_m.jpg" desc: 学术科研互动平台 - name: 科学网 link: "http://paper.sciencenet.cn/paper/" img: "https://c1.staticflickr.com/65535/48006186407_8d1d6ecd9b_m.jpg" desc: 关注最新研究成果 - name: 人大经济论坛 link: "http://bbs.pinggu.org/" img: "https://c1.staticflickr.com/2/1913/44819205684_71ee6ecbcd_m.jpg" desc: 经管类教育问答论坛 - name: 木工爱好者 link: "http://www.zuojiaju.com/" img: "http://oss.zoyeal.com/webfile/icons/src-zuojiaju.png" desc: 木工DIY学习分享 - name: 人人产品经理 link: "http://www.woshipm.com/" img: "https://c1.staticflickr.com/2/1907/43727259610_34ae22f2c1.jpg" desc: 产品爱好者学习交流平台 - name: 博客大全 link: "http://daohang.lusongsong.com/" img: "https://img1.baidu.com/it/u=2120994876,563180292&fm=26&fmt=auto" desc: 优秀独立博客导航 it: - name: Apache link: "http://www.apache.org/" img: "https://c1.staticflickr.com/2/1972/45494320462_1f0e0a2535_m.jpg" desc: Apache软件基金会 - name: CSDN link: "https://www.csdn.net/" img: "https://c1.staticflickr.com/2/1978/45494320272_62da125ff7.jpg" desc: IT博客社区 - name: W3school link: "http://www.w3school.com.cn/" img: "https://c1.staticflickr.com/2/1975/45494320032_562a633973.jpg" desc: 网站建设参考 - name: jQuery插件库 link: "http://www.jq22.com/" img: "https://c1.staticflickr.com/2/1909/45494320632_3e719e924f_t.jpg" desc: jQuery插件参考 - name: CodePen link: "https://codepen.io/" img: "https://c1.staticflickr.com/2/1939/45494320372_6d2c5925cd_m.jpg" desc: 前端DEMO参考 - name: ProcessOn link: "https://www.processon.com/" img: "https://c1.staticflickr.com/2/1925/44819205854_2ec5468a3b_m.jpg" desc: 在线流程图制作 - name: Awwwards link: "https://www.awwwards.com/" img: "http://oss.zoyeal.com/webfile/icons/awwwards.ico" desc: 创意网站集合 wall: - name: Instagram link: "https://www.instagram.com/dcdeng/" img: "https://c2.staticflickr.com/2/1972/45494319852_817eb68b3f_o.png" desc: 分享精美照片和视频 - name: Twitter link: "https://twitter.com/realDonaldTrump" img: "https://c1.staticflickr.com/2/1976/43727259670_ff302409dd_m.jpg" desc: 看看川普又在网上Po了什么 - name: Facebook link: "https://www.facebook.com" img: "https://c1.staticflickr.com/2/1958/43727260470_4c11e17de6_m.jpg" desc: 回国后就基本上不用了 - name: Reddit link: "https://www.reddit.com/" img: "https://c1.staticflickr.com/2/1924/43727259930_b6ac31754c_t.jpg" desc: Reddit - name: Quora link: "https://www.quora.com" img: "https://c1.staticflickr.com/2/1917/43727259990_443883a14b_m.jpg" desc: zhihu's father - name: DailyMail link: "http://www.dailymail.co.uk/news/worldnews/index.html" img: "https://c1.staticflickr.com/2/1966/43727260590_6c73bb0a01.jpg" desc: 每日邮报|评论更精彩 - name: KickStarter link: "https://www.kickstarter.com" img: "https://c1.staticflickr.com/2/1948/45494319472_47c32cd170_m.jpg" desc: 国外众筹平台 - name: 9GAG link: "https://9gag.com/" img: "https://c1.staticflickr.com/2/1979/45494320902_4d99c30c07.jpg" desc: 有趣搞笑的网站 ---


Chinese Zodiac
Find your Chinese Zodiac sign
(Western) Year:
Before
After
Note: this date may be out by +/- one day. Check
here
Made by
Marbiru


--- layout: archive title: Zulip Chat Archive permalink: /stream/116395-maths/topic/mysterious.20monoid.2Eone.html ---
I'm moving stuff around in topology/algebra
and suddenly trying to get an instance of is_ring_hom
shows goals like completion.extension f 1 = monoid.one β
which used to be completion.extension f 1 = 1
. It's only one more refl
to type but I'm perplexed. Any idea?
the structure mechanism, i.e. { x := _, .. _ }
sometimes produces strange results. It looks like it unfolds too much. Sometimes a solution is to fix all universe meta variables.
Thank you Johannes. That's consistent with the fact that I minimized problems elsewhere by transforming a bunch of Type u
by Type*
And indeed reverting one of those Type*
to Type u
fixes the weird goal. This is really weird. @Sebastian Ullrich any hope in :four_leaf_clover: ?
It's just a bug in lean 3
I recall Sebastian diagnosing it and it should be an easy fix
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


What’s the difference between Functional and Object Oriented Programming (OOP)? The question comes up quite frequently and can be somewhat bewildering, especially to a novice programmer. There are a lot of good reasons you could be asking this question, but if you’re new to field such as myself, the reason your probably asking is because you want to have a cursory understanding of the difference between the two and calm some fear that you are learning the "wrong" way to program.
Let’s start with a high level discussion of programming languages. Languages, "are notation...a program is a formal description of the problem you want a computer to solve" (link). All programming languages are universal languages capable of solving any problem. Some languages are object oriented, some are functional and many include elements of both, but the difference is a matter of notation, not, in a strictly speaking sense, of capability. Although, different notation can make certain problems easier or harder to solve. Some of the most successful languages, like Ruby and Scala, combine elements of both programming styles.
Now let’s take a look at what this difference actually looks like in practice. At Dev Bootcamp, you first learn OOP, so you should already have a good sense of what that looks like. In OOP, the world is composed of Objects that interact with each other. In functional programming, the world is composed of, wait for it, functions, just like you learned about in math class, where one input gives you one output. Thus, functional programming avoids state and mutable data. Let’s look at some concrete examples (borrowed from here).
Appending Arrays
OOP:
indexes = [1, 2, 3]
indexes << 4
indexes # [1, 2, 3, 4]
Functional:
indexes = [1, 2, 3]
all_indexes = indexes + [4] # [1, 2, 3, 4]
Updating Hashes
OOP:
hash = {:a => 1, :b => 2}
hash[:c] = 3
hash
Functional:
hash = {:a => 1, :b => 2}
new_hash = hash.merge(:c => 3)
Updating Strings
OOP:
string = "hello"
string.gsub!(/l/, 'z')
string # "hezzo"
Functional:
string = "hello"
new_string = string.gsub(/l/, 'z') # "hezzo"
So what are the examples of Function Programming? By avoiding state and mutable data, it can be argued that Functional Programming produces cleaner code and offers referential transparency, which is to say an expression can be replaced by its values. Such referential transparency opens up the door to some exciting possibilities (again borrowed from here).
- Parallelization: If calls to functions are independent, they may be executed in different processes or even machines with no race-condition issues. All the nasty details of "normal" concurrency code (locks, semaphores, ...) just vanish on the functional paradigm.
- Memoization: Since a function call is equivalent to its return value, they can be cached.
- Modularization: without state that pervades the whole code, projects can be built with small, black boxes that are tied together, which promotes bottom up programming.
- Ease of debugging: Functions are isolated, they only depend on their input and their output, so they are very easy to debug.
So if you’re novice programmer, you can start to think about situations when Functional Programming principles could be incorporated, even if you live in object oriented world.
Cheers!
Additional Resources:


Squinty, the Comical Pig
by Richard Barnum
Chapter 5: “Squinty and the Boy”
Additional Information
- Year Published: 1915
- Language: English
- Country of Origin: United States of America
- Source: Barnum, R. (1915). Squinty, the comical pig. New York: Barse and Hopkins.
-
Readability:
- Flesch–Kincaid Level: 3.5
- Word Count: 2,204
- Genre: Fantasy
- Keywords: children's stories
- ✎ Cite This
Downloads
Did you ever have a little brother or sister who ran away from home, and was very glad to run back, or be brought back again, by a policeman, perhaps? Of course your little brother or sister may not have intended to run away, it may have been that they only wandered off, around the corner, toward the candy store, and could not find their way back again. But, when he or she did get home—how glad you were to see them! Weren’t you?
It was just like that at the pen where Squinty, the comical pig, lived. When the farmer picked him up, and dropped him down among his brothers and sisters, in the clean straw, Wuff-Wuff, Squealer, and Curly Tail, and the others, were so glad to see Squinty that they grunted, and squealed and walked all over one another, to be the first to get close to him.
“Oh, Squinty, where were you?”
“Where did you go?”
“What did you do?”
“Weren’t you awfully scared?”
“Where did the dog find you?”
“Did he bite you very hard?”
These were some of the questions Squinty’s brothers and sisters asked of the little runaway pig. They pressed close up to him, rubbing their funny, wiggling, rubber-like noses against him, and snuggling up against him, for they liked Squinty very much indeed.
Then, after the young pigs had had their turn, Mr. Pig and Mrs. Pig began asking questions.
“What made you run away?” asked Squinty’s papa.
“Oh, I wanted to have an adventure,” said Squinty.
“Well, did you have one?” asked his mamma.
“Oh, yes, lots of them,” answered the little pig. “But I didn’t find very much to eat.” Squinty was very hungry now.
“Oh dear!” exclaimed Mrs. Pig. “You are just too late for supper. It is all eaten up. We did not see that you were not here until too late. It’s too bad!”
Squinty thought so himself, for the smell of the sour milk that had been in the feeding trough made him more hungry than ever.
Squinty walked over and tried to find a few drops in the bottom of the wooden trough. These he licked up with his red tongue. But there was not nearly enough.
“Ha!  “I guess I’ll have to feed him, for the others have had their supper.”
And how glad Squinty was when the farmer went over to the barrel, where the pigs’ feed was kept, and mixed a nice pailful of sour milk with some corn meal, and poured it into the trough.
“Squee! Squee!” cried Squinty as he made a rush over to get his supper.
“Squee! Squee!” cried all the other little pigs, as they, too, made a rush to get more to eat.
“Here! Hold on! Come back!” cried Mr. Pig. “That is Squinty’s supper. You must not touch it. You have had yours!” and he and Mrs. Pig would not let Squinty’s brothers and sisters shove him away from the trough. For sometimes pigs are so hungry that they do this, you know. Being pigs they know no better.
So Squinty had his supper, after all, though he did run away. Perhaps he should have been punished by being sent to bed without having had anything to eat, but you see the farmer wanted his pigs to be fat and healthy, so he fed them well. Squinty was very glad of that.
 So she made them all cuddle down in the straw, pulling it over them with her nose and paws, like a blanket, to keep them warm. For only part of the pen had a roof over it, and though it was summer, still it was cool at night.
But Squinty’s brothers and sisters had no notion of going to sleep so soon. They wanted to hear all about what had happened to him when he had run away, and they wanted him to tell them of his adventures. So they grunted and whispered among themselves.
“What happened to you, Squinty?” asked Wuff-Wuff.
“Oh, I had a fine swim in a brook,” said Squinty.
“I wish that had happened to me,” said Wuff-Wuff. “What else?”
“I found a nice field of corn,” went on Squinty, “but I did not like the taste of it. I got lost in the cornfield.”
“That’s too bad,” said Wuff-Wuff.  “I wish that had happened to me. Did you do anything else, Squinty?”
“Yes,” said the comical little pig. “I saw something I thought was a potato, and it jumped away from me. It was a hoptoad.”
“That was funny,” said Squealer. “I wish I had seen it. Did anything else happen?”
“Yes,” said Squinty. “I thought I saw another potato, but when I bit on it I found it was only a stone, and it hurt my teeth.”
“That’s too bad,” said Wuff-Wuff. “I am glad that did not happen to me. Tell us what else you saw.”
But just then Mrs. Pig grunted out:
“Come, now!  Go to sleep at once!”
So Squinty and the others cuddled closer together, snuggled down in the soft straw, and soon were fast asleep. Now and then they stirred, or grunted during the night, but they did not wake up until morning. They were running around the pen before breakfast, squealing as loudly as they could, for the farmer to come and feed them. But the farmer had his cows and horses and chickens to feed, as well as the pigs, and he did not get to the pen until last. And when he did, all the pigs were so hungry, even Mr. and Mrs. Pig, that they were squealing as hard as they could.
“Yes, yes!” cried the farmer, as though he were talking to the pigs. “I’m coming as fast as I can.”
Soon the farmer poured some sour milk and corn meal down into the trough, and how eagerly Squinty and the others did eat it! Some of the smaller pigs even put two feet in the trough, they were so anxious to get their share. Squinty had an especially good appetite, from having run away, so perhaps he got a little more than the others.
But finally the breakfast was all gone, and the pigs had nothing more to do until dinner time—that is, all they had to do was to lie down and rest, or get up now and then to scratch a mosquito, or a fly bite.
“Well, I guess none of you will get out again,” said the farmer, after a while, as he nailed a bigger board over the hole by which Squinty had gotten out. “Don, watch these pigs,” the farmer went on. “If they get out, grab them by the ear, and bring them back.”
“Bow wow!” barked Don, and that meant he would do as his master had told him.
For several days after this nothing happened in the pigs’ pen except that they were washed off with the hose now and then, to clean them of mud and make them cool. Once in a while the farmer would take a corn cob and scratch the back of Mr. or Mrs. Pig, and they liked this very much. The other pigs were almost too little for the farmer to reach over the top of the pen.
One day the pigs heard merry shouts and laughter up at the farmhouse. There were the sounds of boys’ and girls’ voices. Then came the patter of many feet.
“Oh, look at the pigs!” someone cried, and Squinty, and his brothers and sisters, looking up, saw, over the edge of the pen, some boys and girls looking down on them.
“Oh, aren’t they cute!” exclaimed a girl.
“Just lovely!” said another girl. “Pigs are so nice!”
“I wonder if any of them can do any tricks?” asked a boy who stood looking down into the pen.
“These aren’t trained circus pigs,” spoke one of the girls. “They can’t do tricks.”
The boy and the girls stayed for a little while, watching the pigs. Then the boy said:
“Let’s pull some weeds and feed them.”
“Oh, yes, let’s!” cried the girls. The pigs were glad when they heard this, and they were more glad when the boy and the girls threw pig weed, and other green things from the garden, into the pen. The pigs ate them all up, and wanted more.
After that, for several days, Squinty and his brothers and sisters could hear the boy and the girls running about the garden, but they could not see them because the boards around the pig pen were too high. The boy and the girls seemed to be having a fine time.
Squinty could hear them talking about hunting the hens’ eggs, and feeding the little calves and sheep, and riding on the backs of horses.
Then, one day Squinty looked up out of the pen, and, leaning over the top board he saw the farmer, the boy and another man.
 They are so nice!”
“A pig!” cried Father.  We are not in the country. Where would you keep a pig?”
“Oh, I could build a little pen for him in our yard. Look, let me have that one, he is so pink and pretty and clean.”
“Ha! So you want that pig, do you?” asked the farmer. The boy and his father and sisters were paying a visit to the farm.
 “And I think I’d like that one,” and he pointed straight at Squinty. Poor Squinty ran and tried to hide under the straw, for he knew the boy was talking about him.
“Oh, see him run!” cried the boy. “Yes, I think he is the nicest pig in the lot. I want him. Has he any name?”
“Well, we call him Squinty,” the farmer said. “He has a funny, squinting eye.”
“Then I’ll call him Squinty, too,” the boy went on. “Please, Father, may I have that little pig?”
“Well, I don’t know,” said his father slowly, scratching his head.  I suppose you might have him, though. You could keep him in the back yard. Yes, I guess you could have him, if Mr. Jones will sell him, and if the pig will behave. Do you think that little pig will be good, Mr. Jones?” asked the father of the farmer man.
“Well, yes, I guess so,” answered the farmer. “He has run away out of the pen a couple of times, but if you board up a place good and tight, I guess he won’t get out.”
“Oh, I do hope he’ll be good!” exclaimed the boy. “I do so want a little pet pig, and I’ll be so kind to him!”
When Squinty heard that, he made up his mind, if the boy took him, that he would be as good as he knew how.
“When can I have my little pig?” asked the boy, of his father.
“Oh, as soon as Mr. Jones can put him in a box, so we can carry him,” was the answer. “We can’t very well take him in our arms; he would slip out and run away.”
“I guess so, too,” laughed the boy.