Add support for new nfs_shares parameter
A new nfs_shares parameter was added in puppet-cinder that allows a user to optionally specify an array of shares and that will be written into the file listed at nfs_shares_config. Change-Id: I2f697caed3804af21b793f6d6949bbe815983849
This commit is contained in:
		@@ -500,8 +500,12 @@ Cinder NetApp NFS configuration
 | 
			
		||||
**CONFIG_CINDER_NETAPP_THRES_AVL_SIZE_PERC_STOP**
 | 
			
		||||
    (optional) When the percentage of available space on an NFS share has reached the percentage specified by this parameter, the driver will stop clearing files from the NFS image cache that have not been accessed in the last M minutes, where M is the value of the expiry_thres_minutes parameter.  Defaults to 60. ['']
 | 
			
		||||
 | 
			
		||||
**CONFIG_CINDER_NETAPP_NFS_SHARES**
 | 
			
		||||
    (optional) Single or comma-separated list of NetApp NFS shares for Cinder to use.  Format: ip-address:/export-name. Defaults to ''. ['']
 | 
			
		||||
 | 
			
		||||
**CONFIG_CINDER_NETAPP_NFS_SHARES_CONFIG**
 | 
			
		||||
    (optional) File with the list of available NFS shares.   Defaults to ''. ['']
 | 
			
		||||
    (optional) File with the list of available NFS shares.   Defaults to '/etc/cinder/shares.conf'. ['']
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Cinder NetApp iSCSI & 7-mode configuration
 | 
			
		||||
------------------------------------------
 | 
			
		||||
 
 | 
			
		||||
@@ -348,16 +348,31 @@ def initConfig(controller):
 | 
			
		||||
             "USE_DEFAULT": True,
 | 
			
		||||
             "NEED_CONFIRM": False,
 | 
			
		||||
             "CONDITION": False},
 | 
			
		||||
            {"CMD_OPTION": "cinder-netapp-nfs-shares-config",
 | 
			
		||||
             "USAGE": ("(optional) File with the list of available NFS shares."
 | 
			
		||||
            {"CMD_OPTION": "cinder-netapp-nfs-shares",
 | 
			
		||||
             "USAGE": ("(optional) Single or comma-separated list of NetApp NFS shares "
 | 
			
		||||
                       "for Cinder to use.  Format: ip-address:/export-name"
 | 
			
		||||
                       "   Defaults to ''."),
 | 
			
		||||
             "PROMPT": ("Enter a NetApp NFS share config file"),
 | 
			
		||||
             "PROMPT": ("Enter a single or comma-separated list of NetApp NFS shares"),
 | 
			
		||||
             "OPTION_LIST": [""],
 | 
			
		||||
             "VALIDATORS": [validators.validate_file],
 | 
			
		||||
             "VALIDATORS": [],
 | 
			
		||||
             "PROCESSORS": [],
 | 
			
		||||
             "DEFAULT_VALUE": "",
 | 
			
		||||
             "MASK_INPUT": False,
 | 
			
		||||
             "LOOSE_VALIDATION": False,
 | 
			
		||||
             "CONF_NAME": "CONFIG_CINDER_NETAPP_NFS_SHARES",
 | 
			
		||||
             "USE_DEFAULT": True,
 | 
			
		||||
             "NEED_CONFIRM": False,
 | 
			
		||||
             "CONDITION": False},
 | 
			
		||||
            {"CMD_OPTION": "cinder-netapp-nfs-shares-config",
 | 
			
		||||
             "USAGE": ("(optional) File with the list of available NFS shares."
 | 
			
		||||
                       "   Defaults to '/etc/cinder/shares.conf'."),
 | 
			
		||||
             "PROMPT": ("Enter a NetApp NFS share config file"),
 | 
			
		||||
             "OPTION_LIST": [""],
 | 
			
		||||
             "VALIDATORS": [],
 | 
			
		||||
             "PROCESSORS": [],
 | 
			
		||||
             "DEFAULT_VALUE": "/etc/cinder/shares.conf",
 | 
			
		||||
             "MASK_INPUT": False,
 | 
			
		||||
             "LOOSE_VALIDATION": False,
 | 
			
		||||
             "CONF_NAME": "CONFIG_CINDER_NETAPP_NFS_SHARES_CONFIG",
 | 
			
		||||
             "USE_DEFAULT": True,
 | 
			
		||||
             "NEED_CONFIRM": False,
 | 
			
		||||
 
 | 
			
		||||
@@ -18,6 +18,7 @@ if $netapp_storage_family == 'ontap_cluster' {
 | 
			
		||||
      expiry_thres_minutes      => hiera('CONFIG_CINDER_NETAPP_EXPIRY_THRES_MINUTES'),
 | 
			
		||||
      thres_avl_size_perc_start => hiera('CONFIG_CINDER_NETAPP_THRES_AVL_SIZE_PERC_START'),
 | 
			
		||||
      thres_avl_size_perc_stop  => hiera('CONFIG_CINDER_NETAPP_THRES_AVL_SIZE_PERC_STOP'),
 | 
			
		||||
      nfs_shares                => hiera_array('CONFIG_CINDER_NETAPP_NFS_SHARES'),
 | 
			
		||||
      nfs_shares_config         => hiera('CONFIG_CINDER_NETAPP_NFS_SHARES_CONFIG'),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -52,6 +53,7 @@ elsif $netapp_storage_family == 'ontap_7mode' {
 | 
			
		||||
      expiry_thres_minutes      => hiera('CONFIG_CINDER_NETAPP_EXPIRY_THRES_MINUTES'),
 | 
			
		||||
      thres_avl_size_perc_start => hiera('CONFIG_CINDER_NETAPP_THRES_AVL_SIZE_PERC_START'),
 | 
			
		||||
      thres_avl_size_perc_stop  => hiera('CONFIG_CINDER_NETAPP_THRES_AVL_SIZE_PERC_STOP'),
 | 
			
		||||
      nfs_shares                => hiera_array('CONFIG_CINDER_NETAPP_NFS_SHARES'),
 | 
			
		||||
      nfs_shares_config         => hiera('CONFIG_CINDER_NETAPP_NFS_SHARES_CONFIG'),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user