Enables config of NetApp's Cinder driver
Change-Id: I6f75477c3ab333294efc082a7968fc7b6f154d44
This commit is contained in:
@@ -163,7 +163,7 @@ Cinder Config parameters
|
||||
The password to use for the Cinder to authenticate with Keystone.
|
||||
|
||||
**CONFIG_CINDER_BACKEND**
|
||||
The Cinder backend to use ['lvm', 'gluster', 'nfs', 'vmdk'].
|
||||
The Cinder backend to use ['lvm', 'gluster', 'nfs', 'vmdk', 'netapp'].
|
||||
|
||||
Cinder volume create Config parameters
|
||||
--------------------------------------
|
||||
@@ -189,6 +189,67 @@ Cinder NFS Config parameters
|
||||
**CONFIG_CINDER_NFS_MOUNTS**
|
||||
A single or comma separated list of NFS exports to mount.
|
||||
|
||||
Cinder NetApp Config parameters
|
||||
----------------------------
|
||||
|
||||
**CONFIG_CINDER_NETAPP_LOGIN**
|
||||
(required) Password for the administrative user account specified in the netapp_login parameter.
|
||||
|
||||
**CONFIG_CINDER_NETAPP_PASSWORD**
|
||||
(required) The hostname (or IP address) for the storage system or proxy server.
|
||||
|
||||
**CONFIG_CINDER_NETAPP_HOSTNAME**
|
||||
(required) The hostname (or IP address) for the storage system or proxy server.
|
||||
|
||||
**CONFIG_CINDER_NETAPP_SERVER_PORT**
|
||||
(optional) The TCP port to use for communication with ONTAPI on the storage system. Traditionally, port 80 is used for HTTP and port 443 is used for HTTPS; however, this value should be changed if an alternate port has been configured on the storage system or proxy server. Defaults to 80
|
||||
|
||||
**CONFIG_CINDER_NETAPP_STORAGE_FAMILY**
|
||||
(optional) The storage family type used on the storage system; valid values are ontap_7mode for using Data ONTAP operating in 7-Mode or ontap_cluster for using clustered Data ONTAP, or eseries for NetApp E-Series. Defaults to ontap_cluster.
|
||||
|
||||
**CONFIG_CINDER_NETAPP_TRANSPORT_TYPE**
|
||||
(optional) The transport protocol used when communicating with ONTAPI on the storage system or proxy server. Valid values are http or https. Defaults to http.
|
||||
|
||||
**CONFIG_CINDER_NETAPP_STORAGE_PROTOCOL**
|
||||
(optional) The storage protocol to be used on the data path with the storage system; valid values are iscsi or nfs. Defaults to nfs.
|
||||
|
||||
**CONFIG_CINDER_NETAPP_SIZE_MULTIPLIER**
|
||||
(optional) The quantity to be multiplied by the requested volume size to ensure enough space is available on the virtual storage server (Vserver) to fulfill the volume creation request. Defaults to 1.0.
|
||||
|
||||
**CONFIG_CINDER_NETAPP_EXPIRY_THRES_MINUTES**
|
||||
(optional) This parameter specifies the threshold for last access time for images in the NFS image cache. When a cache cleaning cycle begins, images in the cache that have not been accessed in the last M minutes, where M is the value of this parameter, will be deleted from the cache to create free space on the NFS share. Defaults to 720.
|
||||
|
||||
**CONFIG_CINDER_NETAPP_THRES_AVL_SIZE_PERC_START**
|
||||
(optional) If the percentage of available space for an NFS share has dropped below the value specified by this parameter, the NFS image cache will be cleaned. Defaults to 20.
|
||||
|
||||
**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_CONFIG**
|
||||
(optional) File with the list of available NFS shares. Defaults to ''.
|
||||
|
||||
**CONFIG_CINDER_NETAPP_VOLUME_LIST**
|
||||
(optional) This parameter is only utilized when the storage protocol is configured to use iSCSI. This parameter is used to restrict provisioning to the specified controller volumes. Specify the value of this parameter to be a comma separated list of NetApp controller volume names to be used for provisioning. Defaults to ''.
|
||||
|
||||
**CONFIG_CINDER_NETAPP_VFILER**
|
||||
(optional) The vFiler unit on which provisioning of block storage volumes will be done. This parameter is only used by the driver when connecting to an instance with a storage family of Data ONTAP operating in 7-Mode and the storage protocol selected is iSCSI. Only use this parameter when utilizing the MultiStore feature on the NetApp storage system. Defaults to ''.
|
||||
|
||||
**CONFIG_CINDER_NETAPP_VSERVER**
|
||||
(optional) This parameter specifies the virtual storage server (Vserver) name on the storage cluster on which provisioning of block storage volumes should occur. If using the NFS storage protocol, this parameter is mandatory for storage service catalog support (utilized by Cinder volume type extra_specs support). If this parameter is specified, the exports belonging to the Vserver will only be used for provisioning in the future. Block storage volumes on exports not belonging to the Vserver specified by this parameter will continue to function normally. Defaults to ''.
|
||||
|
||||
**CONFIG_CINDER_NETAPP_CONTROLLER_IPS**
|
||||
(optional) This option is only utilized when the storage family is configured to eseries. This option is used to restrict provisioning to the specified controllers. Specify the value of this option to be a comma separated list of controller hostnames or IP addresses to be used for provisioning. Defaults to ''.
|
||||
|
||||
**CONFIG_CINDER_NETAPP_SA_PASSWORD**
|
||||
(optional) Password for the NetApp E-Series storage array. Defaults to ''.
|
||||
|
||||
**CONFIG_CINDER_NETAPP_WEBSERVICE_PATH**
|
||||
(optional) This option is used to specify the path to the E-Series proxy application on a proxy server. The value is combined with the value of the netapp_transport_type, netapp_server_hostname, and netapp_server_port options to create the URL used by the driver to connect to the proxy application. Defaults to '/devmgr/v2'.
|
||||
|
||||
**CONFIG_CINDER_NETAPP_STORAGE_POOLS**
|
||||
(optional) This option is used to restrict provisioning to the specified storage pools. Only dynamic disk pools are currently supported. Specify the value of this option to be a comma separated list of disk pool names to be used for provisioning. Defaults to ''.
|
||||
|
||||
|
||||
Nova Options
|
||||
------------
|
||||
|
||||
|
||||
@@ -31,6 +31,9 @@ from packstack.installer import output_messages
|
||||
PLUGIN_NAME = "OS-Cinder"
|
||||
PLUGIN_NAME_COLORED = utils.color_text(PLUGIN_NAME, 'blue')
|
||||
|
||||
NETAPP_DEFAULT_STORAGE_FAMILY = "ontap_cluster"
|
||||
NETAPP_DEFAULT_STORAGE_PROTOCOL = "nfs"
|
||||
|
||||
|
||||
def initConfig(controller):
|
||||
params = [
|
||||
@@ -63,9 +66,9 @@ def initConfig(controller):
|
||||
|
||||
{"CMD_OPTION": "cinder-backend",
|
||||
"USAGE": ("The Cinder backend to use, valid options are: lvm, "
|
||||
"gluster, nfs"),
|
||||
"gluster, nfs, netapp"),
|
||||
"PROMPT": "Enter the Cinder backend to be configured",
|
||||
"OPTION_LIST": ["lvm", "gluster", "nfs", "vmdk"],
|
||||
"OPTION_LIST": ["lvm", "gluster", "nfs", "vmdk", "netapp"],
|
||||
"VALIDATORS": [validators.validate_options],
|
||||
"DEFAULT_VALUE": "lvm",
|
||||
"MASK_INPUT": False,
|
||||
@@ -200,6 +203,440 @@ def initConfig(controller):
|
||||
"POST_CONDITION_MATCH": True}
|
||||
controller.addGroup(group, params)
|
||||
|
||||
def check_netapp_options(config):
|
||||
return (config.get('CONFIG_CINDER_INSTALL', 'n') == 'y' and
|
||||
config.get('CONFIG_CINDER_BACKEND', 'lvm') == 'netapp')
|
||||
|
||||
params = [
|
||||
{"CMD_OPTION": "cinder-netapp-login",
|
||||
"USAGE": ("(required) Administrative user account name used to "
|
||||
"access the storage system or proxy server. "),
|
||||
"PROMPT": ("Enter a NetApp login"),
|
||||
"OPTION_LIST": [""],
|
||||
"VALIDATORS": [validators.validate_not_empty],
|
||||
"PROCESSORS": [],
|
||||
"DEFAULT_VALUE": "",
|
||||
"MASK_INPUT": False,
|
||||
"LOOSE_VALIDATION": False,
|
||||
"CONF_NAME": "CONFIG_CINDER_NETAPP_LOGIN",
|
||||
"USE_DEFAULT": False,
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
{"CMD_OPTION": "cinder-netapp-password",
|
||||
"USAGE": ("(required) Password for the administrative user account "
|
||||
"specified in the netapp_login parameter."),
|
||||
"PROMPT": ("Enter a NetApp password"),
|
||||
"OPTION_LIST": [""],
|
||||
"VALIDATORS": [validators.validate_not_empty],
|
||||
"PROCESSORS": [],
|
||||
"DEFAULT_VALUE": "",
|
||||
"MASK_INPUT": True,
|
||||
"LOOSE_VALIDATION": False,
|
||||
"CONF_NAME": "CONFIG_CINDER_NETAPP_PASSWORD",
|
||||
"USE_DEFAULT": False,
|
||||
"NEED_CONFIRM": True,
|
||||
"CONDITION": False},
|
||||
{"CMD_OPTION": "cinder-netapp-hostname",
|
||||
"USAGE": ("(required) The hostname (or IP address) for the storage "
|
||||
"system or proxy server."),
|
||||
"PROMPT": ("Enter a NetApp hostname"),
|
||||
"OPTION_LIST": [],
|
||||
"VALIDATORS": [validators.validate_not_empty],
|
||||
"PROCESSORS": [processors.process_add_quotes_around_values],
|
||||
"DEFAULT_VALUE": "",
|
||||
"MASK_INPUT": False,
|
||||
"LOOSE_VALIDATION": False,
|
||||
"CONF_NAME": "CONFIG_CINDER_NETAPP_HOSTNAME",
|
||||
"USE_DEFAULT": False,
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
{"CMD_OPTION": "cinder-netapp-server-port",
|
||||
"USAGE": ("(optional) The TCP port to use for communication with "
|
||||
"ONTAPI on the storage system. Traditionally, port 80 is "
|
||||
"used for HTTP and port 443 is used for HTTPS; however, "
|
||||
"this value should be changed if an alternate port has "
|
||||
"been configured on the storage system or proxy server. "
|
||||
"Defaults to 80."),
|
||||
"PROMPT": ("Enter a NetApp server port"),
|
||||
"OPTION_LIST": [""],
|
||||
"VALIDATORS": [validators.validate_port],
|
||||
"PROCESSORS": [],
|
||||
"DEFAULT_VALUE": 80,
|
||||
"MASK_INPUT": False,
|
||||
"LOOSE_VALIDATION": True,
|
||||
"CONF_NAME": "CONFIG_CINDER_NETAPP_SERVER_PORT",
|
||||
"USE_DEFAULT": True,
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
{"CMD_OPTION": "cinder-netapp-storage-family",
|
||||
"USAGE": ("(optional) The storage family type used on the storage "
|
||||
"system; valid values are ontap_7mode for using Data ONTAP "
|
||||
"operating in 7-Mode or ontap_cluster for using clustered "
|
||||
"Data ONTAP, or eseries for NetApp E-Series. "
|
||||
"Defaults to %s." % NETAPP_DEFAULT_STORAGE_FAMILY),
|
||||
"PROMPT": ("Enter a NetApp storage family"),
|
||||
"OPTION_LIST": ["ontap_7mode", "ontap_cluster", "eseries"],
|
||||
"VALIDATORS": [validators.validate_options],
|
||||
"PROCESSORS": [],
|
||||
"DEFAULT_VALUE": NETAPP_DEFAULT_STORAGE_FAMILY,
|
||||
"MASK_INPUT": False,
|
||||
"LOOSE_VALIDATION": False,
|
||||
"CONF_NAME": "CONFIG_CINDER_NETAPP_STORAGE_FAMILY",
|
||||
"USE_DEFAULT": True,
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
{"CMD_OPTION": "cinder-netapp-transport-type",
|
||||
"USAGE": ("(optional) The transport protocol used when communicating "
|
||||
"with ONTAPI on the storage system or proxy server. Valid "
|
||||
"values are http or https. "
|
||||
"Defaults to http."),
|
||||
"PROMPT": ("Enter a NetApp transport type"),
|
||||
"OPTION_LIST": ["http", "https"],
|
||||
"VALIDATORS": [validators.validate_options],
|
||||
"PROCESSORS": [],
|
||||
"DEFAULT_VALUE": "http",
|
||||
"MASK_INPUT": False,
|
||||
"LOOSE_VALIDATION": False,
|
||||
"CONF_NAME": "CONFIG_CINDER_NETAPP_TRANSPORT_TYPE",
|
||||
"USE_DEFAULT": True,
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
{"CMD_OPTION": "cinder-netapp-storage-protocol",
|
||||
"USAGE": ("(optional) The storage protocol to be used on the data "
|
||||
"path with the storage system; valid values are iscsi "
|
||||
"or nfs. "
|
||||
"Defaults to %s." % NETAPP_DEFAULT_STORAGE_PROTOCOL),
|
||||
"PROMPT": ("Enter a NetApp storage protocol"),
|
||||
"OPTION_LIST": ["iscsi", "nfs"],
|
||||
"VALIDATORS": [validators.validate_options],
|
||||
"PROCESSORS": [],
|
||||
"DEFAULT_VALUE": NETAPP_DEFAULT_STORAGE_PROTOCOL,
|
||||
"MASK_INPUT": False,
|
||||
"LOOSE_VALIDATION": False,
|
||||
"CONF_NAME": "CONFIG_CINDER_NETAPP_STORAGE_PROTOCOL",
|
||||
"USE_DEFAULT": True,
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
]
|
||||
|
||||
group = {"GROUP_NAME": "CINDERNETAPPMAIN",
|
||||
"DESCRIPTION": "Cinder NetApp main configuration",
|
||||
"PRE_CONDITION": check_netapp_options,
|
||||
"PRE_CONDITION_MATCH": True,
|
||||
"POST_CONDITION": False,
|
||||
"POST_CONDITION_MATCH": True}
|
||||
|
||||
controller.addGroup(group, params)
|
||||
|
||||
def check_netapp_ontap_iscsi_options(config):
|
||||
storage_family = config.get('CONFIG_CINDER_NETAPP_STORAGE_FAMILY',
|
||||
NETAPP_DEFAULT_STORAGE_FAMILY)
|
||||
storage_protocol = config.get('CONFIG_CINDER_NETAPP_STORAGE_PROTOCOL',
|
||||
NETAPP_DEFAULT_STORAGE_PROTOCOL)
|
||||
return (check_netapp_options(config) and
|
||||
storage_family in ['ontap_cluster', 'ontap_7mode'] and
|
||||
storage_protocol == "iscsi")
|
||||
|
||||
params = [
|
||||
{"CMD_OPTION": "cinder-netapp-size-multiplier",
|
||||
"USAGE": ("(optional) The quantity to be multiplied by the requested "
|
||||
"volume size to ensure enough space is available on the "
|
||||
"virtual storage server (Vserver) to fulfill the volume "
|
||||
"creation request. "
|
||||
"Defaults to 1.0."),
|
||||
"PROMPT": ("Enter a NetApp size multiplier"),
|
||||
"OPTION_LIST": [""],
|
||||
"VALIDATORS": [],
|
||||
"PROCESSORS": [],
|
||||
"DEFAULT_VALUE": "1.0",
|
||||
"MASK_INPUT": False,
|
||||
"LOOSE_VALIDATION": False,
|
||||
"CONF_NAME": "CONFIG_CINDER_NETAPP_SIZE_MULTIPLIER",
|
||||
"USE_DEFAULT": True,
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
]
|
||||
group = {"GROUP_NAME": "CINDERNETAPPONTAPISCSI ",
|
||||
"DESCRIPTION": "Cinder NetApp ONTAP-iSCSI configuration",
|
||||
"PRE_CONDITION": check_netapp_ontap_iscsi_options,
|
||||
"PRE_CONDITION_MATCH": True,
|
||||
"POST_CONDITION": False,
|
||||
"POST_CONDITION_MATCH": True}
|
||||
controller.addGroup(group, params)
|
||||
|
||||
def check_netapp_nfs_settings(config):
|
||||
storage_protocol = config.get('CONFIG_CINDER_NETAPP_STORAGE_PROTOCOL',
|
||||
NETAPP_DEFAULT_STORAGE_PROTOCOL)
|
||||
return (check_netapp_options(config) and
|
||||
storage_protocol == "nfs")
|
||||
|
||||
params = [
|
||||
{"CMD_OPTION": "cinder-netapp-expiry-thres-minutes",
|
||||
"USAGE": ("(optional) This parameter specifies the threshold for "
|
||||
"last access time for images in the NFS image cache. When "
|
||||
"a cache cleaning cycle begins, images in the cache that "
|
||||
"have not been accessed in the last M minutes, where M is "
|
||||
"the value of this parameter, will be deleted from the "
|
||||
"cache to create free space on the NFS share. "
|
||||
"Defaults to 720."),
|
||||
"PROMPT": ("Enter a threshold"),
|
||||
"OPTION_LIST": [""],
|
||||
"VALIDATORS": [validators.validate_integer],
|
||||
"PROCESSORS": [],
|
||||
"DEFAULT_VALUE": 720,
|
||||
"MASK_INPUT": False,
|
||||
"LOOSE_VALIDATION": False,
|
||||
"CONF_NAME": "CONFIG_CINDER_NETAPP_EXPIRY_THRES_MINUTES",
|
||||
"USE_DEFAULT": True,
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
{"CMD_OPTION": "cinder-netapp-thres-avl-size-perc-start",
|
||||
"USAGE": ("(optional) If the percentage of available space for an "
|
||||
"NFS share has dropped below the value specified by this "
|
||||
"parameter, the NFS image cache will be cleaned. "
|
||||
"Defaults to 20"),
|
||||
"PROMPT": ("Enter a value"),
|
||||
"OPTION_LIST": [""],
|
||||
"VALIDATORS": [validators.validate_integer],
|
||||
"PROCESSORS": [],
|
||||
"DEFAULT_VALUE": 20,
|
||||
"MASK_INPUT": False,
|
||||
"LOOSE_VALIDATION": False,
|
||||
"CONF_NAME": "CONFIG_CINDER_NETAPP_THRES_AVL_SIZE_PERC_START",
|
||||
"USE_DEFAULT": True,
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
{"CMD_OPTION": "cinder-netapp-thres-avl-size-perc-stop",
|
||||
"USAGE": ("(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."),
|
||||
"PROMPT": ("Enter a value"),
|
||||
"OPTION_LIST": [""],
|
||||
"VALIDATORS": [validators.validate_integer],
|
||||
"PROCESSORS": [],
|
||||
"DEFAULT_VALUE": 60,
|
||||
"MASK_INPUT": False,
|
||||
"LOOSE_VALIDATION": False,
|
||||
"CONF_NAME": "CONFIG_CINDER_NETAPP_THRES_AVL_SIZE_PERC_STOP",
|
||||
"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 ''."),
|
||||
"PROMPT": ("Enter a NetApp NFS share config file"),
|
||||
"OPTION_LIST": [""],
|
||||
"VALIDATORS": [validators.validate_file],
|
||||
"PROCESSORS": [],
|
||||
"DEFAULT_VALUE": "",
|
||||
"MASK_INPUT": False,
|
||||
"LOOSE_VALIDATION": False,
|
||||
"CONF_NAME": "CONFIG_CINDER_NETAPP_NFS_SHARES_CONFIG",
|
||||
"USE_DEFAULT": True,
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
]
|
||||
group = {"GROUP_NAME": "CINDERNETAPPNFS",
|
||||
"DESCRIPTION": "Cinder NetApp NFS configuration",
|
||||
"PRE_CONDITION": check_netapp_nfs_settings,
|
||||
"PRE_CONDITION_MATCH": True,
|
||||
"POST_CONDITION": False,
|
||||
"POST_CONDITION_MATCH": True}
|
||||
controller.addGroup(group, params)
|
||||
|
||||
def check_netapp_7modeiscsi_options(config):
|
||||
storage_family = config.get('CONFIG_CINDER_NETAPP_STORAGE_FAMILY',
|
||||
NETAPP_DEFAULT_STORAGE_FAMILY)
|
||||
storage_protocol = config.get('CONFIG_CINDER_NETAPP_STORAGE_PROTOCOL',
|
||||
NETAPP_DEFAULT_STORAGE_PROTOCOL)
|
||||
return (check_netapp_options(config) and
|
||||
storage_family == 'ontap_7mode' and
|
||||
storage_protocol == 'iscsi')
|
||||
|
||||
params = [
|
||||
{"CMD_OPTION": "cinder-netapp-volume-list",
|
||||
"USAGE": ("(optional) This parameter is only utilized when the "
|
||||
"storage protocol is configured to use iSCSI. This "
|
||||
"parameter is used to restrict provisioning to the "
|
||||
"specified controller volumes. Specify the value of this "
|
||||
"parameter to be a comma separated list of NetApp "
|
||||
"controller volume names to be used for provisioning. "
|
||||
"Defaults to ''."),
|
||||
"PROMPT": ("Enter a NetApp volume list"),
|
||||
"OPTION_LIST": [""],
|
||||
"VALIDATORS": [validators.validate_not_empty],
|
||||
"PROCESSORS": [],
|
||||
"DEFAULT_VALUE": "",
|
||||
"MASK_INPUT": False,
|
||||
"LOOSE_VALIDATION": True,
|
||||
"CONF_NAME": "CONFIG_CINDER_NETAPP_VOLUME_LIST",
|
||||
"USE_DEFAULT": True,
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
{"CMD_OPTION": "cinder-netapp-vfiler",
|
||||
"USAGE": ("(optional) The vFiler unit on which provisioning of block "
|
||||
"storage volumes will be done. This parameter is only used "
|
||||
"by the driver when connecting to an instance with a "
|
||||
"storage family of Data ONTAP operating in 7-Mode and the "
|
||||
"storage protocol selected is iSCSI. Only use this "
|
||||
"parameter when utilizing the MultiStore feature on the "
|
||||
"NetApp storage system. "
|
||||
"Defaults to ''."),
|
||||
"PROMPT": ("Enter a NetApp vFiler"),
|
||||
"OPTION_LIST": [""],
|
||||
"VALIDATORS": [validators.validate_not_empty],
|
||||
"PROCESSORS": [],
|
||||
"DEFAULT_VALUE": "",
|
||||
"MASK_INPUT": False,
|
||||
"LOOSE_VALIDATION": True,
|
||||
"CONF_NAME": "CONFIG_CINDER_NETAPP_VFILER",
|
||||
"USE_DEFAULT": True,
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
]
|
||||
group = {"GROUP_NAME": "CINDERNETAPPISCSI7MODE",
|
||||
"DESCRIPTION": "Cinder NetApp iSCSI & 7-mode configuration",
|
||||
"PRE_CONDITION": check_netapp_7modeiscsi_options,
|
||||
"PRE_CONDITION_MATCH": True,
|
||||
"POST_CONDITION": False,
|
||||
"POST_CONDITION_MATCH": True}
|
||||
controller.addGroup(group, params)
|
||||
|
||||
def check_netapp_vserver_options(config):
|
||||
storage_family = config.get('CONFIG_CINDER_NETAPP_STORAGE_FAMILY',
|
||||
NETAPP_DEFAULT_STORAGE_FAMILY)
|
||||
storage_protocol = config.get('CONFIG_CINDER_NETAPP_STORAGE_PROTOCOL',
|
||||
NETAPP_DEFAULT_STORAGE_PROTOCOL)
|
||||
|
||||
return (check_netapp_options(config) and
|
||||
storage_family == "ontap_cluster" and
|
||||
storage_protocol in ['nfs', 'iscsi'])
|
||||
|
||||
params = [
|
||||
{"CMD_OPTION": "cinder-netapp-vserver",
|
||||
"USAGE": ("(optional) This parameter specifies the virtual storage "
|
||||
"server (Vserver) name on the storage cluster on which "
|
||||
"provisioning of block storage volumes should occur. If "
|
||||
"using the NFS storage protocol, this parameter is "
|
||||
"mandatory for storage service catalog support (utilized "
|
||||
"by Cinder volume type extra_specs support). If this "
|
||||
"parameter is specified, the exports belonging to the "
|
||||
"Vserver will only be used for provisioning in the future. "
|
||||
"Block storage volumes on exports not belonging to the "
|
||||
"Vserver specified by this parameter will continue to "
|
||||
"function normally. "
|
||||
"Defaults to ''."),
|
||||
"PROMPT": ("Enter a NetApp Vserver"),
|
||||
"OPTION_LIST": [""],
|
||||
"VALIDATORS": [validators.validate_not_empty],
|
||||
"PROCESSORS": [],
|
||||
"DEFAULT_VALUE": "",
|
||||
"MASK_INPUT": False,
|
||||
"LOOSE_VALIDATION": False,
|
||||
"CONF_NAME": "CONFIG_CINDER_NETAPP_VSERVER",
|
||||
"USE_DEFAULT": True,
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
]
|
||||
group = {"GROUP_NAME": "CINDERNETAPPVSERVER",
|
||||
"DESCRIPTION": "Cinder NetApp vServer configuration",
|
||||
"PRE_CONDITION": check_netapp_vserver_options,
|
||||
"PRE_CONDITION_MATCH": True,
|
||||
"POST_CONDITION": False,
|
||||
"POST_CONDITION_MATCH": True}
|
||||
controller.addGroup(group, params)
|
||||
|
||||
def check_netapp_eseries_options(config):
|
||||
storage_family = config.get('CONFIG_CINDER_NETAPP_STORAGE_FAMILY',
|
||||
NETAPP_DEFAULT_STORAGE_FAMILY)
|
||||
return (check_netapp_options(config) and
|
||||
storage_family == "eseries")
|
||||
|
||||
params = [
|
||||
{"CMD_OPTION": "cinder-netapp-controller-ips",
|
||||
"USAGE": ("(optional) This option is only utilized when the storage "
|
||||
"family is configured to eseries. This option is used to "
|
||||
"restrict provisioning to the specified controllers. "
|
||||
"Specify the value of this option to be a comma separated "
|
||||
"list of controller hostnames or IP addresses to be used "
|
||||
"for provisioning. "
|
||||
"Defaults to ''."),
|
||||
"PROMPT": ("Enter a value"),
|
||||
"OPTION_LIST": [""],
|
||||
"VALIDATORS": [validators.validate_multi_ping],
|
||||
"PROCESSORS": [],
|
||||
"DEFAULT_VALUE": "",
|
||||
"MASK_INPUT": False,
|
||||
"LOOSE_VALIDATION": False,
|
||||
"CONF_NAME": "CONFIG_CINDER_NETAPP_CONTROLLER_IPS",
|
||||
"USE_DEFAULT": True,
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
{"CMD_OPTION": "cinder-netapp-sa-password",
|
||||
"USAGE": ("(optional) Password for the NetApp E-Series storage "
|
||||
"array. "
|
||||
"Defaults to ''."),
|
||||
"PROMPT": ("Enter a password"),
|
||||
"OPTION_LIST": [""],
|
||||
"VALIDATORS": [],
|
||||
"PROCESSORS": [],
|
||||
"DEFAULT_VALUE": "",
|
||||
"MASK_INPUT": True,
|
||||
"LOOSE_VALIDATION": False,
|
||||
"CONF_NAME": "CONFIG_CINDER_NETAPP_SA_PASSWORD",
|
||||
"USE_DEFAULT": True,
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
{"CMD_OPTION": "cinder-netapp-webservice-path",
|
||||
"USAGE": ("(optional) This option is used to specify the path to the "
|
||||
"E-Series proxy application on a proxy server. The value "
|
||||
"is combined with the value of the netapp_transport_type, "
|
||||
"netapp_server_hostname, and netapp_server_port options to "
|
||||
"create the URL used by the driver to connect to the proxy "
|
||||
"application. "
|
||||
"Defaults to '/devmgr/v2'."),
|
||||
"PROMPT": ("Enter a path"),
|
||||
"OPTION_LIST": ["^[/].*$"],
|
||||
"VALIDATORS": [validators.validate_regexp],
|
||||
"PROCESSORS": [],
|
||||
"DEFAULT_VALUE": "/devmgr/v2",
|
||||
"MASK_INPUT": False,
|
||||
"LOOSE_VALIDATION": True,
|
||||
"CONF_NAME": "CONFIG_CINDER_NETAPP_WEBSERVICE_PATH",
|
||||
"USE_DEFAULT": True,
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
{"CMD_OPTION": "cinder-netapp-storage-pools",
|
||||
"USAGE": ("(optional) This option is used to restrict provisioning "
|
||||
"to the specified storage pools. Only dynamic disk pools "
|
||||
"are currently supported. Specify the value of this option "
|
||||
"to be a comma separated list of disk pool names to be "
|
||||
"used for provisioning. "
|
||||
"Defaults to ''."),
|
||||
"PROMPT": ("Enter a value"),
|
||||
"OPTION_LIST": [""],
|
||||
"VALIDATORS": [],
|
||||
"PROCESSORS": [],
|
||||
"DEFAULT_VALUE": "",
|
||||
"MASK_INPUT": False,
|
||||
"LOOSE_VALIDATION": True,
|
||||
"CONF_NAME": "CONFIG_CINDER_NETAPP_STORAGE_POOLS",
|
||||
"USE_DEFAULT": True,
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
]
|
||||
group = {"GROUP_NAME": "CINDERNETAPPESERIES",
|
||||
"DESCRIPTION": "Cinder NetApp E-Series configuration",
|
||||
"PRE_CONDITION": check_netapp_eseries_options,
|
||||
"PRE_CONDITION_MATCH": True,
|
||||
"POST_CONDITION": False,
|
||||
"POST_CONDITION_MATCH": True}
|
||||
controller.addGroup(group, params)
|
||||
|
||||
|
||||
def initSequences(controller):
|
||||
if controller.CONF['CONFIG_CINDER_INSTALL'] != 'y':
|
||||
@@ -346,6 +783,25 @@ def create_manifest(config, messages):
|
||||
manifestdata += getManifestTemplate("cinder_nfs.pp")
|
||||
elif config['CONFIG_CINDER_BACKEND'] == "vmdk":
|
||||
manifestdata += getManifestTemplate("cinder_vmdk.pp")
|
||||
if config['CONFIG_CINDER_BACKEND'] == "netapp":
|
||||
puppet_cdot_iscsi = "cinder_netapp_cdot_iscsi.pp"
|
||||
puppet_cdot_nfs = "cinder_netapp_cdot_nfs.pp"
|
||||
puppet_7mode_iscsi = "cinder_netapp_7mode_iscsi.pp"
|
||||
puppet_7mode_nfs = "cinder_netapp_7mode_nfs.pp"
|
||||
puppet_eseries = "cinder_netapp_eseries.pp"
|
||||
|
||||
if config['CONFIG_CINDER_NETAPP_STORAGE_FAMILY'] == "ontap_cluster":
|
||||
if config['CONFIG_CINDER_NETAPP_STORAGE_PROTOCOL'] == "iscsi":
|
||||
manifestdata += getManifestTemplate(puppet_cdot_iscsi)
|
||||
elif config['CONFIG_CINDER_NETAPP_STORAGE_PROTOCOL'] == "nfs":
|
||||
manifestdata += getManifestTemplate(puppet_cdot_nfs)
|
||||
elif config['CONFIG_CINDER_NETAPP_STORAGE_FAMILY'] == "ontap_7mode":
|
||||
if config['CONFIG_CINDER_NETAPP_STORAGE_PROTOCOL'] == "iscsi":
|
||||
manifestdata += getManifestTemplate(puppet_7mode_iscsi)
|
||||
elif config['CONFIG_CINDER_NETAPP_STORAGE_PROTOCOL'] == "nfs":
|
||||
manifestdata += getManifestTemplate(puppet_7mode_nfs)
|
||||
elif config['CONFIG_CINDER_NETAPP_STORAGE_FAMILY'] == "eseries":
|
||||
manifestdata += getManifestTemplate(puppet_eseries)
|
||||
if config['CONFIG_CEILOMETER_INSTALL'] == 'y':
|
||||
manifestdata += getManifestTemplate('cinder_ceilometer.pp')
|
||||
if config['CONFIG_SWIFT_INSTALL'] == 'y':
|
||||
|
||||
22
packstack/puppet/templates/cinder_netapp_7mode_iscsi.pp
Normal file
22
packstack/puppet/templates/cinder_netapp_7mode_iscsi.pp
Normal file
@@ -0,0 +1,22 @@
|
||||
# Copyright (c) – 2014, Ryan Hefner. All rights reserved.
|
||||
|
||||
package { 'iscsi-initiator-utils': ensure => present }
|
||||
|
||||
cinder_config {
|
||||
"DEFAULT/enabled_backends": value => "myBackend";
|
||||
}
|
||||
|
||||
cinder::backend::netapp{ 'myBackend':
|
||||
netapp_login => "%(CONFIG_CINDER_NETAPP_LOGIN)s",
|
||||
netapp_password => "%(CONFIG_CINDER_NETAPP_PASSWORD)s",
|
||||
netapp_server_hostname => "%(CONFIG_CINDER_NETAPP_HOSTNAME)s",
|
||||
netapp_server_port => "%(CONFIG_CINDER_NETAPP_SERVER_PORT)s",
|
||||
netapp_size_multiplier => "%(CONFIG_CINDER_NETAPP_SIZE_MULTIPLIER)s",
|
||||
netapp_storage_family => "%(CONFIG_CINDER_NETAPP_STORAGE_FAMILY)s",
|
||||
netapp_storage_protocol => "%(CONFIG_CINDER_NETAPP_STORAGE_PROTOCOL)s",
|
||||
netapp_transport_type => "%(CONFIG_CINDER_NETAPP_TRANSPORT_TYPE)s",
|
||||
netapp_vfiler => "%(CONFIG_CINDER_NETAPP_VFILER)s",
|
||||
netapp_volume_list => ["%(CONFIG_CINDER_NETAPP_VOLUME_LIST)s"],
|
||||
|
||||
require => Package['iscsi-initiator-utils'],
|
||||
}
|
||||
23
packstack/puppet/templates/cinder_netapp_7mode_nfs.pp
Normal file
23
packstack/puppet/templates/cinder_netapp_7mode_nfs.pp
Normal file
@@ -0,0 +1,23 @@
|
||||
# Copyright (c) – 2014, Ryan Hefner. All rights reserved.
|
||||
|
||||
package { 'nfs-utils': ensure => present }
|
||||
|
||||
cinder_config {
|
||||
"DEFAULT/enabled_backends": value => "myBackend";
|
||||
}
|
||||
|
||||
cinder::backend::netapp{ 'myBackend':
|
||||
netapp_login => "%(CONFIG_CINDER_NETAPP_LOGIN)s",
|
||||
netapp_password => "%(CONFIG_CINDER_NETAPP_PASSWORD)s",
|
||||
netapp_server_hostname => "%(CONFIG_CINDER_NETAPP_HOSTNAME)s",
|
||||
netapp_server_port => "%(CONFIG_CINDER_NETAPP_SERVER_PORT)s",
|
||||
netapp_storage_family => "%(CONFIG_CINDER_NETAPP_STORAGE_FAMILY)s",
|
||||
netapp_storage_protocol => "%(CONFIG_CINDER_NETAPP_STORAGE_PROTOCOL)s",
|
||||
netapp_transport_type => "%(CONFIG_CINDER_NETAPP_TRANSPORT_TYPE)s",
|
||||
expiry_thres_minutes => "%(CONFIG_CINDER_EXPIRY_THRES_MINUTES)s",
|
||||
thres_avl_size_perc_start => "%(CONFIG_CINDER_NETAPP_THRES_AVL_SIZE_PERC_START)s",
|
||||
thres_avl_size_perc_stop => "%(CONFIG_CINDER_NETAPP_THRES_AVL_SIZE_PERC_STOP)s",
|
||||
nfs_shares_config => "%(CONFIG_CINDER_NETAPP_NFS_SHARES_CONFIG)s",
|
||||
|
||||
require => Package['nfs-utils'],
|
||||
}
|
||||
21
packstack/puppet/templates/cinder_netapp_cdot_iscsi.pp
Normal file
21
packstack/puppet/templates/cinder_netapp_cdot_iscsi.pp
Normal file
@@ -0,0 +1,21 @@
|
||||
# Copyright (c) – 2014, Ryan Hefner. All rights reserved.
|
||||
|
||||
package { 'iscsi-initiator-utils': ensure => present }
|
||||
|
||||
cinder_config {
|
||||
"DEFAULT/enabled_backends": value => "myBackend";
|
||||
}
|
||||
|
||||
cinder::backend::netapp{ 'myBackend':
|
||||
netapp_login => "%(CONFIG_CINDER_NETAPP_LOGIN)s",
|
||||
netapp_password => "%(CONFIG_CINDER_NETAPP_PASSWORD)s",
|
||||
netapp_server_hostname => "%(CONFIG_CINDER_NETAPP_HOSTNAME)s",
|
||||
netapp_server_port => "%(CONFIG_CINDER_NETAPP_SERVER_PORT)s",
|
||||
netapp_size_multiplier => "%(CONFIG_CINDER_NETAPP_SIZE_MULTIPLIER)s",
|
||||
netapp_storage_family => "%(CONFIG_CINDER_NETAPP_STORAGE_FAMILY)s",
|
||||
netapp_storage_protocol => "%(CONFIG_CINDER_NETAPP_STORAGE_PROTOCOL)s",
|
||||
netapp_transport_type => "%(CONFIG_CINDER_NETAPP_TRANSPORT_TYPE)s",
|
||||
netapp_vserver => "%(CONFIG_CINDER_NETAPP_VSERVER)s",
|
||||
|
||||
require => Package['iscsi-initiator-utils'],
|
||||
}
|
||||
24
packstack/puppet/templates/cinder_netapp_cdot_nfs.pp
Normal file
24
packstack/puppet/templates/cinder_netapp_cdot_nfs.pp
Normal file
@@ -0,0 +1,24 @@
|
||||
# Copyright (c) – 2014, Ryan Hefner. All rights reserved.
|
||||
|
||||
package { 'nfs-utils': ensure => present }
|
||||
|
||||
cinder_config {
|
||||
"DEFAULT/enabled_backends": value => "myBackend";
|
||||
}
|
||||
|
||||
cinder::backend::netapp{ 'myBackend':
|
||||
netapp_login => "%(CONFIG_CINDER_NETAPP_LOGIN)s",
|
||||
netapp_password => "%(CONFIG_CINDER_NETAPP_PASSWORD)s",
|
||||
netapp_server_hostname => "%(CONFIG_CINDER_NETAPP_HOSTNAME)s",
|
||||
netapp_server_port => "%(CONFIG_CINDER_NETAPP_SERVER_PORT)s",
|
||||
netapp_storage_family => "%(CONFIG_CINDER_NETAPP_STORAGE_FAMILY)s",
|
||||
netapp_storage_protocol => "%(CONFIG_CINDER_NETAPP_STORAGE_PROTOCOL)s",
|
||||
netapp_transport_type => "%(CONFIG_CINDER_NETAPP_TRANSPORT_TYPE)s",
|
||||
netapp_vserver => "%(CONFIG_CINDER_NETAPP_VSERVER)s",
|
||||
expiry_thres_minutes => "%(CONFIG_CINDER_NETAPP_EXPIRY_THRES_MINUTES)s",
|
||||
thres_avl_size_perc_start => "%(CONFIG_CINDER_NETAPP_THRES_AVL_SIZE_PERC_START)s",
|
||||
thres_avl_size_perc_stop => "%(CONFIG_CINDER_NETAPP_THRES_AVL_SIZE_PERC_STOP)s",
|
||||
nfs_shares_config => "%(CONFIG_CINDER_NETAPP_NFS_SHARES_CONFIG)s",
|
||||
|
||||
require => Package['nfs-utils'],
|
||||
}
|
||||
23
packstack/puppet/templates/cinder_netapp_eseries.pp
Normal file
23
packstack/puppet/templates/cinder_netapp_eseries.pp
Normal file
@@ -0,0 +1,23 @@
|
||||
# Copyright (c) – 2014, Ryan Hefner. All rights reserved.
|
||||
|
||||
package { 'iscsi-initiator-utils': ensure => present }
|
||||
|
||||
cinder_config {
|
||||
"DEFAULT/enabled_backends": value => "myBackend";
|
||||
}
|
||||
|
||||
cinder::backend::netapp{ 'myBackend':
|
||||
netapp_login => "%(CONFIG_CINDER_NETAPP_LOGIN)s",
|
||||
netapp_password => "%(CONFIG_CINDER_NETAPP_PASSWORD)s",
|
||||
netapp_server_hostname => "%(CONFIG_CINDER_NETAPP_HOSTNAME)s",
|
||||
netapp_server_port => "%(CONFIG_CINDER_NETAPP_SERVER_PORT)s",
|
||||
netapp_storage_family => "%(CONFIG_CINDER_NETAPP_STORAGE_FAMILY)s",
|
||||
netapp_storage_protocol => "%(CONFIG_CINDER_NETAPP_STORAGE_PROTOCOL)s",
|
||||
netapp_transport_type => "%(CONFIG_CINDER_NETAPP_TRANSPORT_TYPE)s",
|
||||
netapp_controller_ips => "%(CONFIG_CINDER_NETAPP_CONTROLLER_IPS)s",
|
||||
netapp_sa_password => "%(CONFIG_CINDER_NETAPP_SA_PASSWORD)s",
|
||||
netapp_storage_pools => "%(CONFIG_CINDER_NETAPP_STORAGE_POOLS)s",
|
||||
netapp_webservice_path => "%(CONFIG_CINDER_NETAPP_WEBSERVICE_PATH)s",
|
||||
|
||||
require => Package['iscsi-initiator-utils'],
|
||||
}
|
||||
Reference in New Issue
Block a user