def initConfig(controller): aodh_params = { "AODH": [ {"CONF_NAME": "CONFIG_AODH_KS_PW", "CMD_OPTION": "aodh-ks-passwd", "PROMPT": "Enter the password for the Aodh Keystone access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False} ] } update_params_usage(basedefs.PACKSTACK_DOC, aodh_params) def use_aodh(config): return (config['CONFIG_CEILOMETER_INSTALL'] == 'y' and config['CONFIG_AODH_INSTALL'] == 'y') aodh_groups = [ {"GROUP_NAME": "AODH", "DESCRIPTION": "Aodh Config parameters", "PRE_CONDITION": use_aodh, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, ] for group in aodh_groups: paramList = aodh_params[group["GROUP_NAME"]] controller.addGroup(group, paramList)
def initConfig(controller): params = [ { "CMD_OPTION": "nagios-passwd", "PROMPT": "Enter the password for the nagiosadmin user", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "PROCESSORS": [processors.process_password], "DEFAULT_VALUE": "PW_PLACEHOLDER", "MASK_INPUT": True, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NAGIOS_PW", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, ] update_params_usage(basedefs.PACKSTACK_DOC, params, sectioned=False) group = { "GROUP_NAME": "NAGIOS", "DESCRIPTION": "Nagios Config parameters", "PRE_CONDITION": "CONFIG_NAGIOS_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True } controller.addGroup(group, params)
def initConfig(controller): params = [ { "CMD_OPTION": "mariadb-host", "PROMPT": "Enter the IP address of the MariaDB server", "OPTION_LIST": [], "VALIDATORS": [validators.validate_ssh], "DEFAULT_VALUE": utils.get_localhost_ip(), "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_MARIADB_HOST", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False, "DEPRECATES": ['CONFIG_MYSQL_HOST'] }, { "CMD_OPTION": "mariadb-user", "USAGE": "Username for the MariaDB admin user", "PROMPT": "Enter the username for the MariaDB admin user", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "root", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MARIADB_USER", "USE_DEFAULT": True, "NEED_CONFIRM": False, "CONDITION": False, "DEPRECATES": ['CONFIG_MYSQL_USER'] }, { "CMD_OPTION": "mariadb-pw", "USAGE": "Password for the MariaDB admin user", "PROMPT": "Enter the password for the MariaDB admin user", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "PROCESSORS": [processors.process_password], "DEFAULT_VALUE": "PW_PLACEHOLDER", "MASK_INPUT": True, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_MARIADB_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False, "DEPRECATES": ['CONFIG_MYSQL_PW'] }, ] update_params_usage(basedefs.PACKSTACK_DOC, params, sectioned=False) group = { "GROUP_NAME": "MARIADB", "DESCRIPTION": "MariaDB Config parameters", "PRE_CONDITION": lambda x: 'yes', "PRE_CONDITION_MATCH": "yes", "POST_CONDITION": False, "POST_CONDITION_MATCH": True } controller.addGroup(group, params)
def initConfig(controller): params = [ { "CMD_OPTION": "glance-db-passwd", "PROMPT": "Enter the password for the Glance DB access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "PROCESSORS": [processors.process_password], "DEFAULT_VALUE": "PW_PLACEHOLDER", "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_GLANCE_DB_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }, { "CMD_OPTION": "glance-ks-passwd", "PROMPT": "Enter the password for the Glance Keystone access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "PROCESSORS": [processors.process_password], "DEFAULT_VALUE": "PW_PLACEHOLDER", "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_GLANCE_KS_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }, { "CMD_OPTION": "glance-backend", "PROMPT": "Glance storage backend", "OPTION_LIST": ["file", "swift"], "VALIDATORS": [validators.validate_options], "PROCESSORS": [process_backend], "DEFAULT_VALUE": "file", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_GLANCE_BACKEND", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, ] update_params_usage(basedefs.PACKSTACK_DOC, params, sectioned=False) group = { "GROUP_NAME": "GLANCE", "DESCRIPTION": "Glance Config parameters", "PRE_CONDITION": "CONFIG_GLANCE_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True } controller.addGroup(group, params)
def initConfig(controller): aodh_params = { "AODH": [ { "CONF_NAME": "CONFIG_AODH_KS_PW", "CMD_OPTION": "aodh-ks-passwd", "PROMPT": "Enter the password for the Aodh Keystone access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }, { "CMD_OPTION": "aodh-db-passwd", "PROMPT": "Enter the password for the aodh DB access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_AODH_DB_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }, ] } update_params_usage(basedefs.PACKSTACK_DOC, aodh_params) def use_aodh(config): return (config['CONFIG_CEILOMETER_INSTALL'] == 'y' and config['CONFIG_AODH_INSTALL'] == 'y') aodh_groups = [ { "GROUP_NAME": "AODH", "DESCRIPTION": "Aodh Config parameters", "PRE_CONDITION": use_aodh, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True }, ] for group in aodh_groups: paramList = aodh_params[group["GROUP_NAME"]] controller.addGroup(group, paramList)
def initConfig(controller): params = [ {"CMD_OPTION": "mariadb-host", "PROMPT": "Enter the IP address of the MariaDB server", "OPTION_LIST": [], "VALIDATORS": [validators.validate_ssh], "DEFAULT_VALUE": utils.get_localhost_ip(), "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_MARIADB_HOST", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False, "DEPRECATES": ['CONFIG_MYSQL_HOST']}, {"CMD_OPTION": "mariadb-user", "USAGE": "Username for the MariaDB admin user", "PROMPT": "Enter the username for the MariaDB admin user", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "root", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MARIADB_USER", "USE_DEFAULT": True, "NEED_CONFIRM": False, "CONDITION": False, "DEPRECATES": ['CONFIG_MYSQL_USER']}, {"CMD_OPTION": "mariadb-pw", "USAGE": "Password for the MariaDB admin user", "PROMPT": "Enter the password for the MariaDB admin user", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "PROCESSORS": [processors.process_password], "DEFAULT_VALUE": "PW_PLACEHOLDER", "MASK_INPUT": True, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_MARIADB_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False, "DEPRECATES": ['CONFIG_MYSQL_PW']}, ] update_params_usage(basedefs.PACKSTACK_DOC, params, sectioned=False) group = {"GROUP_NAME": "MARIADB", "DESCRIPTION": "MariaDB Config parameters", "PRE_CONDITION": lambda x: 'yes', "PRE_CONDITION_MATCH": "yes", "POST_CONDITION": False, "POST_CONDITION_MATCH": True} controller.addGroup(group, params)
def initConfig(controller): gnocchi_params = { "GNOCCHI": [{ "CONF_NAME": "CONFIG_GNOCCHI_DB_PW", "CMD_OPTION": "gnocchi-db-passwd", "PROMPT": "Enter the password for Gnocchi DB access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }, { "CONF_NAME": "CONFIG_GNOCCHI_KS_PW", "CMD_OPTION": "gnocchi-ks-passwd", "PROMPT": "Enter the password for the Gnocchi Keystone access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }] } update_params_usage(basedefs.PACKSTACK_DOC, gnocchi_params) def use_gnocchi(config): return config['CONFIG_CEILOMETER_INSTALL'] == 'y' gnocchi_groups = [ { "GROUP_NAME": "GNOCCHI", "DESCRIPTION": "Gnocchi Config parameters", "PRE_CONDITION": use_gnocchi, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True }, ] for group in gnocchi_groups: paramList = gnocchi_params[group["GROUP_NAME"]] controller.addGroup(group, paramList)
def initConfig(controller): params = [ {"CMD_OPTION": "glance-db-passwd", "PROMPT": "Enter the password for the Glance DB access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "PROCESSORS": [processors.process_password], "DEFAULT_VALUE": "PW_PLACEHOLDER", "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_GLANCE_DB_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "glance-ks-passwd", "PROMPT": "Enter the password for the Glance Keystone access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "PROCESSORS": [processors.process_password], "DEFAULT_VALUE": "PW_PLACEHOLDER", "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_GLANCE_KS_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "glance-backend", "PROMPT": "Glance storage backend", "OPTION_LIST": ["file", "swift"], "VALIDATORS": [validators.validate_options], "PROCESSORS": [process_backend], "DEFAULT_VALUE": "file", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_GLANCE_BACKEND", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ] update_params_usage(basedefs.PACKSTACK_DOC, params, sectioned=False) group = {"GROUP_NAME": "GLANCE", "DESCRIPTION": "Glance Config parameters", "PRE_CONDITION": "CONFIG_GLANCE_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True} controller.addGroup(group, params)
def initConfig(controller): magnum_params = { "MAGNUM": [ { "CMD_OPTION": "magnum-db-passwd", "PROMPT": "Enter the password for the Magnum DB access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MAGNUM_DB_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }, { "CMD_OPTION": "magnum-ks-passwd", "PROMPT": "Enter the password for the Magnum Keystone access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MAGNUM_KS_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }, ] } update_params_usage(basedefs.PACKSTACK_DOC, magnum_params) magnum_groups = [ { "GROUP_NAME": "MAGNUM", "DESCRIPTION": "Magnum Options", "PRE_CONDITION": "CONFIG_MAGNUM_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True }, ] for group in magnum_groups: params = magnum_params[group["GROUP_NAME"]] controller.addGroup(group, params)
def initConfig(controller): gnocchi_params = { "GNOCCHI": [ {"CONF_NAME": "CONFIG_GNOCCHI_DB_PW", "CMD_OPTION": "gnocchi-db-passwd", "PROMPT": "Enter the password for Gnocchi DB access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CONF_NAME": "CONFIG_GNOCCHI_KS_PW", "CMD_OPTION": "gnocchi-ks-passwd", "PROMPT": "Enter the password for the Gnocchi Keystone access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False} ] } update_params_usage(basedefs.PACKSTACK_DOC, gnocchi_params) def use_gnocchi(config): return (config['CONFIG_CEILOMETER_INSTALL'] == 'y' and config['CONFIG_GNOCCHI_INSTALL'] == 'y') gnocchi_groups = [ {"GROUP_NAME": "GNOCCHI", "DESCRIPTION": "Gnocchi Config parameters", "PRE_CONDITION": use_gnocchi, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, ] for group in gnocchi_groups: paramList = gnocchi_params[group["GROUP_NAME"]] controller.addGroup(group, paramList)
def initConfig(controller): magnum_params = { "MAGNUM": [ {"CMD_OPTION": "magnum-db-passwd", "PROMPT": "Enter the password for the Magnum DB access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MAGNUM_DB_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "magnum-ks-passwd", "PROMPT": "Enter the password for the Magnum Keystone access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MAGNUM_KS_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, ] } update_params_usage(basedefs.PACKSTACK_DOC, magnum_params) magnum_groups = [ {"GROUP_NAME": "MAGNUM", "DESCRIPTION": "Magnum Options", "PRE_CONDITION": "CONFIG_MAGNUM_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, ] for group in magnum_groups: params = magnum_params[group["GROUP_NAME"]] controller.addGroup(group, params)
def initConfig(controller): ironic_params = [ { "CONF_NAME": "CONFIG_IRONIC_DB_PW", "CMD_OPTION": "os-ironic-db-passwd", "PROMPT": "Enter the password for the Ironic DB user", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }, { "CONF_NAME": "CONFIG_IRONIC_KS_PW", "CMD_OPTION": "os-ironic-ks-passwd", "PROMPT": "Enter the password for Ironic Keystone access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }, ] update_params_usage(basedefs.PACKSTACK_DOC, ironic_params, sectioned=False) ironic_group = { "GROUP_NAME": "IRONIC", "DESCRIPTION": "Ironic Options", "PRE_CONDITION": "CONFIG_IRONIC_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True } controller.addGroup(ironic_group, ironic_params)
def initConfig(controller): params = [ { "CONF_NAME": "CONFIG_SAHARA_DB_PW", "CMD_OPTION": "sahara-db-passwd", "PROMPT": "Enter the password to use for Sahara to access the DB", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }, { "CONF_NAME": "CONFIG_SAHARA_KS_PW", "CMD_OPTION": "sahara-ks-passwd", "PROMPT": "Enter the password for Sahara Keystone access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }, ] update_params_usage(basedefs.PACKSTACK_DOC, params, sectioned=False) group = { "GROUP_NAME": "SAHARA", "DESCRIPTION": "Sahara Config parameters", "PRE_CONDITION": "CONFIG_SAHARA_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True } controller.addGroup(group, params)
def initConfig(controller): params = [ {"CMD_OPTION": "nagios-passwd", "PROMPT": "Enter the password for the nagiosadmin user", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "PROCESSORS": [processors.process_password], "DEFAULT_VALUE": "PW_PLACEHOLDER", "MASK_INPUT": True, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NAGIOS_PW", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ] update_params_usage(basedefs.PACKSTACK_DOC, params, sectioned=False) group = {"GROUP_NAME": "NAGIOS", "DESCRIPTION": "Nagios Config parameters", "PRE_CONDITION": "CONFIG_NAGIOS_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True} controller.addGroup(group, params)
def initConfig(controller): ironic_params = [ {"CONF_NAME": "CONFIG_IRONIC_DB_PW", "CMD_OPTION": "os-ironic-db-passwd", "PROMPT": "Enter the password for the Ironic DB user", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CONF_NAME": "CONFIG_IRONIC_KS_PW", "CMD_OPTION": "os-ironic-ks-passwd", "PROMPT": "Enter the password for Ironic Keystone access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, ] update_params_usage(basedefs.PACKSTACK_DOC, ironic_params, sectioned=False) ironic_group = {"GROUP_NAME": "IRONIC", "DESCRIPTION": "Ironic Options", "PRE_CONDITION": "CONFIG_IRONIC_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True} controller.addGroup(ironic_group, ironic_params)
def initConfig(controller): params = [ {"CONF_NAME": "CONFIG_SAHARA_DB_PW", "CMD_OPTION": "sahara-db-passwd", "PROMPT": "Enter the password to use for Sahara to access the DB", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CONF_NAME": "CONFIG_SAHARA_KS_PW", "CMD_OPTION": "sahara-ks-passwd", "PROMPT": "Enter the password for Sahara Keystone access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, ] update_params_usage(basedefs.PACKSTACK_DOC, params, sectioned=False) group = {"GROUP_NAME": "SAHARA", "DESCRIPTION": "Sahara Config parameters", "PRE_CONDITION": "CONFIG_SAHARA_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True} controller.addGroup(group, params)
def initConfig(controller): def process_tempest(param, param_name, config=None): if param == "": # In case of multinode installs by default we deploy # Tempest on network node return config['CONFIG_NETWORK_HOSTS'].split(',')[0] return param conf_params = { "PROVISION_INIT": [ {"CMD_OPTION": "provision-demo", "PROMPT": ("Would you like to provision for demo usage " "and testing"), "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "y", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_DEMO", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "provision-tempest", "PROMPT": ("Would you like to configure Tempest (OpenStack test " "suite). Note that provisioning is only supported for " "all-in-one installations."), "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "n", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "PROVISION_DEMO": [ {"CMD_OPTION": "provision-demo-floatrange", "PROMPT": "Enter the network address for the floating IP subnet", "OPTION_LIST": False, "VALIDATORS": False, "DEFAULT_VALUE": "172.24.4.0/24", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_DEMO_FLOATRANGE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "provision-demo-allocation-pools", "PROMPT": ("Enter the allocation pools from the floating IP " "subnet, as JSON list [\"start=ip1,end=ip2\", ...]"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "[]", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_PROVISION_DEMO_ALLOCATION_POOLS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "provision-image-name", "PROMPT": "Enter the name to be assigned to the demo image", "OPTION_LIST": False, "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": DEMO_IMAGE_NAME, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_IMAGE_NAME", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "provision-image-url", "PROMPT": ("Enter the location of an image to be loaded " "into Glance"), "OPTION_LIST": False, "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": DEMO_IMAGE_URL, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_IMAGE_URL", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "provision-image-format", "PROMPT": ("Enter the format of the demo image"), "OPTION_LIST": False, "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": DEMO_IMAGE_FORMAT, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_IMAGE_FORMAT", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "provision-image-properties", "PROMPT": ("Enter the comma-separated list of key=value pairs " "to set as the properties of the demo image"), "OPTION_LIST": False, "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_IMAGE_PROPERTIES", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "provision-image-ssh-user", "PROMPT": ("Enter the name of a user to use when connecting " "to the demo image via ssh"), "OPTION_LIST": False, "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": DEMO_IMAGE_SSH_USER, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_IMAGE_SSH_USER", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "provision-uec-image-name", "PROMPT": "Enter the name to be assigned to the uec image used for tempest", "OPTION_LIST": False, "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": UEC_IMAGE_NAME, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_UEC_IMAGE_NAME", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "provision-uec-kernel-url", "PROMPT": ("Enter the location of a uec kernel to be loaded " "into Glance"), "OPTION_LIST": False, "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": UEC_IMAGE_KERNEL_URL, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_UEC_IMAGE_KERNEL_URL", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "provision-uec-ramdisk-url", "PROMPT": ("Enter the location of a uec ramdisk to be loaded " "into Glance"), "OPTION_LIST": False, "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": UEC_IMAGE_RAMDISK_URL, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_UEC_IMAGE_RAMDISK_URL", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "provision-uec-disk-url", "PROMPT": ("Enter the location of a uec disk image to be loaded " "into Glance"), "OPTION_LIST": False, "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": UEC_IMAGE_DISK_URL, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_UEC_IMAGE_DISK_URL", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "PROVISION_TEMPEST": [ {"CMD_OPTION": "tempest-host", "PROMPT": "Enter the host where to deploy Tempest", "OPTION_LIST": [], "VALIDATORS": [validators.validate_ssh], "DEFAULT_VALUE": "", "PROCESSORS": [process_tempest], "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_TEMPEST_HOST", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "provision-tempest-user", "PROMPT": ("Enter the name of the Tempest Provisioning user " "(if blank, Tempest will be configured in a " "standalone mode) "), "OPTION_LIST": False, "VALIDATORS": False, "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_USER", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "provision-tempest-user-passwd", "PROMPT": "Enter the password for the Tempest Provisioning user", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_USER_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "provision-tempest-floatrange", "PROMPT": "Enter the network address for the floating IP subnet", "OPTION_LIST": False, "VALIDATORS": False, "DEFAULT_VALUE": "172.24.4.0/24", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_FLOATRANGE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "provision-tempest-flavor-name", "PROMPT": "What is the name of the primary Tempest flavor?", "OPTION_LIST": False, "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "m1.nano", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_FLAVOR_NAME", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "provision-tempest-flavor-disk", "PROMPT": ("How much of disk space has " "the primary Tempest flavor (Gb)?"), "OPTION_LIST": False, "VALIDATORS": [validators.validate_integer], "DEFAULT_VALUE": "0", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_FLAVOR_DISK", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "provision-tempest-flavor-ram", "PROMPT": "How much is the primary Tempest flavor's ram (Mb)?", "OPTION_LIST": False, "VALIDATORS": [validators.validate_integer], "DEFAULT_VALUE": "128", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_FLAVOR_RAM", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "provision-tempest-flavor-vcpus", "PROMPT": "How many vcpus is in the primary Tempest flavor?", "OPTION_LIST": False, "VALIDATORS": [validators.validate_integer], "DEFAULT_VALUE": "1", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_FLAVOR_VCPUS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "provision-tempest-flavor-alt-name", "PROMPT": "What is the name of the alternative Tempest flavor?", "OPTION_LIST": False, "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "m1.micro", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_FLAVOR_ALT_NAME", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "provision-tempest-flavor-alt-disk", "PROMPT": ("How much of disk space has " "the alternative Tempest flavor (Gb)?"), "OPTION_LIST": False, "VALIDATORS": [validators.validate_integer], "DEFAULT_VALUE": "0", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_FLAVOR_ALT_DISK", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "provision-tempest-flavor-alt-ram", "PROMPT": "How much is the alternative Tempest flavor's ram?", "OPTION_LIST": False, "VALIDATORS": [validators.validate_integer], "DEFAULT_VALUE": "128", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_FLAVOR_ALT_RAM", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "provision-tempest-flavor-alt-vcpus", "PROMPT": "How many vcpus has the alternative Tempest flavor?", "OPTION_LIST": False, "VALIDATORS": [validators.validate_integer], "DEFAULT_VALUE": "1", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_FLAVOR_ALT_VCPUS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "run-tempest", "PROMPT": ("Do you wish to run tempest?"), "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "n", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_RUN_TEMPEST", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "run-tempest-tests", "PROMPT": ("What tempest tests should run ?" " (If blank, Tempest will run smoke tests)"), "OPTION_LIST": [], "VALIDATORS": False, "DEFAULT_VALUE": "smoke", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_RUN_TEMPEST_TESTS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False} ], "PROVISION_OVS_BRIDGE": [ {"CMD_OPTION": "provision-ovs-bridge", "PROMPT": "Would you like to configure the external ovs bridge", "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "y", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_OVS_BRIDGE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False, "DEPRECATES": ['CONFIG_PROVISION_ALL_IN_ONE_OVS_BRIDGE']}, ], } update_params_usage(basedefs.PACKSTACK_DOC, conf_params) def check_provisioning_demo(config): return (config.get('CONFIG_PROVISION_DEMO', 'n') == 'y') def check_provisioning_tempest(config): return (config.get('CONFIG_PROVISION_TEMPEST', 'n') == 'y') def allow_all_in_one_ovs_bridge(config): return (config['CONFIG_NEUTRON_INSTALL'] == 'y') conf_groups = [ {"GROUP_NAME": "PROVISION_INIT", "DESCRIPTION": "Provisioning demo config", "PRE_CONDITION": lambda x: 'yes', "PRE_CONDITION_MATCH": "yes", "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "PROVISION_DEMO", "DESCRIPTION": "Provisioning demo config", "PRE_CONDITION": check_provisioning_demo, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "PROVISION_TEMPEST", "DESCRIPTION": "Provisioning tempest config", "PRE_CONDITION": check_provisioning_tempest, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "PROVISION_OVS_BRIDGE", "DESCRIPTION": "Provisioning all-in-one ovs bridge config", "PRE_CONDITION": allow_all_in_one_ovs_bridge, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, ] for group in conf_groups: paramList = conf_params[group["GROUP_NAME"]] controller.addGroup(group, paramList) # Due to group checking some parameters might not be initialized, but # provision.pp needs them all. So we will initialize them with default # values params = [ controller.getParamByName('CONFIG_PROVISION_OVS_BRIDGE') ] for param in params: value = controller.CONF.get(param.CONF_NAME, param.DEFAULT_VALUE) controller.CONF[param.CONF_NAME] = value
def initConfig(controller): params = { "SSL": [{ "CMD_OPTION": "ssl-cacert-file", "PROMPT": ("Enter the filename of the SSL CAcertificate, if the" " CONFIG_SSL_CACERT_SELFSIGN is set to y the path " "will be CONFIG_SSL_CERT_DIR/certs/selfcert.crt"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "/etc/pki/tls/certs/selfcert.crt", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_SSL_CACERT_FILE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "ssl-cacert-key-file", "PROMPT": ("Enter the filename of the SSL CAcertificate Key file" ", if the CONFIG_SSL_CACERT_SELFSIGN is set to y the " "path will be CONFIG_SSL_CERT_DIR/keys/selfkey.key"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "/etc/pki/tls/private/selfkey.key", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_SSL_CACERT_KEY_FILE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "ssl-cert-dir", "PROMPT": ("Enter the path to use to store generated SSL certificates in"), "OPTION_LIST": [], "VALIDATORS": [ validators.validate_not_empty, validators.validate_writeable_directory ], "DEFAULT_VALUE": "~/packstackca/", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_SSL_CERT_DIR", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "ssl-cacert-selfsign", "PROMPT": "Should packstack use selfsigned CAcert.", "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "y", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_SSL_CACERT_SELFSIGN', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }], "SSL_SELFSIGN": [ { "CMD_OPTION": "selfsign-cacert-subject-country", "PROMPT": "Enter the selfsigned CAcert subject country.", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "--", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_SELFSIGN_CACERT_SUBJECT_C', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "selfsign-cacert-subject-state", "PROMPT": "Enter the selfsigned CAcert subject state.", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "State", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_SELFSIGN_CACERT_SUBJECT_ST', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "selfsign-cacert-subject-location", "PROMPT": "Enter the selfsigned CAcert subject location.", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "City", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_SELFSIGN_CACERT_SUBJECT_L', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "selfsign-cacert-subject-organization", "PROMPT": "Enter the selfsigned CAcert subject organization.", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "openstack", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_SELFSIGN_CACERT_SUBJECT_O', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "selfsign-cacert-subject-organizational-unit", "PROMPT": "Enter the selfsigned CAcert subject organizational unit.", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "packstack", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_SELFSIGN_CACERT_SUBJECT_OU', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "selfsign-cacert-subject-common-name", "PROMPT": "Enter the selfsigned CAcert subject common name.", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": gethostname(), "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_SELFSIGN_CACERT_SUBJECT_CN', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "selfsign-cacert-subject-email", "PROMPT": "Enter the selfsigned CAcert subject admin email.", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "admin@%s" % gethostname(), "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_SELFSIGN_CACERT_SUBJECT_MAIL', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, ] } update_params_usage(basedefs.PACKSTACK_DOC, params) groups = [{ "GROUP_NAME": "SSL", "DESCRIPTION": "SSL Config parameters", "PRE_CONDITION": lambda x: 'yes', "PRE_CONDITION_MATCH": "yes", "POST_CONDITION": False, "POST_CONDITION_MATCH": True }, { "GROUP_NAME": "SSL_SELFSIGN", "DESCRIPTION": "SSL selfsigned CAcert Config parameters", "PRE_CONDITION": 'CONFIG_SSL_CACERT_SELFSIGN', "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True }] for group in groups: controller.addGroup(group, params[group['GROUP_NAME']])
def initConfig(controller): ceilometer_params = { "CEILOMETER": [ { "CONF_NAME": "CONFIG_CEILOMETER_SECRET", "CMD_OPTION": "ceilometer-secret", "PROMPT": "Enter the Ceilometer secret key", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": uuid.uuid4().hex[:16], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "USE_DEFAULT": True, "NEED_CONFIRM": True, "CONDITION": False }, { "CONF_NAME": "CONFIG_CEILOMETER_KS_PW", "CMD_OPTION": "ceilometer-ks-passwd", "PROMPT": "Enter the password for the Ceilometer Keystone access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }, { "CONF_NAME": "CONFIG_CEILOMETER_COORDINATION_BACKEND", "CMD_OPTION": "ceilometer-coordination-backend", "PROMPT": "Enter the coordination driver", "OPTION_LIST": ['redis', 'none'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": 'redis', "MASK_INPUT": False, "USE_DEFAULT": True, "NEED_CONFIRM": False, "CONDITION": False }, ], "MONGODB": [ { "CMD_OPTION": "mongodb-host", "PROMPT": "Enter the IP address of the MongoDB server", "OPTION_LIST": [], "VALIDATORS": [validators.validate_ssh], "DEFAULT_VALUE": utils.get_localhost_ip(), "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_MONGODB_HOST", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, ], "REDIS": [ { "CMD_OPTION": "redis-master-host", "PROMPT": "Enter the IP address of the redis master server", "OPTION_LIST": [], "VALIDATORS": [validators.validate_ssh], "DEFAULT_VALUE": utils.get_localhost_ip(), "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_REDIS_MASTER_HOST", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False, "DEPRECATES": ["CONFIG_REDIS_HOST"] }, { "CMD_OPTION": "redis-port", "PROMPT": "Enter the port of the redis server(s)", "OPTION_LIST": [], "VALIDATORS": [validators.validate_port], "DEFAULT_VALUE": 6379, "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_REDIS_PORT", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "redis-ha", "PROMPT": "Should redis try to use HA?", "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "n", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_REDIS_HA", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "redis-slaves", "PROMPT": "Enter the IP addresses of the redis slave servers", "OPTION_LIST": [], "VALIDATORS": [validators.validate_multi_ssh], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_REDIS_SLAVE_HOSTS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "redis-sentinels", "PROMPT": "Enter the IP addresses of the redis sentinel servers", "OPTION_LIST": [], "VALIDATORS": [validators.validate_multi_ssh], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_REDIS_SENTINEL_HOSTS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "redis-sentinel-contact", "PROMPT": "Enter the IP address of the coordination redis sentinel", "OPTION_LIST": [], "VALIDATORS": [validators.validate_ssh], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_REDIS_SENTINEL_CONTACT_HOST", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "redis-sentinel-port", "PROMPT": ("Enter the port on which the redis sentinel servers" " listen"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_port], "DEFAULT_VALUE": 26379, "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_REDIS_SENTINEL_PORT", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "redis-sentinel-quorum", "PROMPT": ("Enter the quorum value for the redis sentinel servers"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_integer], "DEFAULT_VALUE": 2, "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_REDIS_SENTINEL_QUORUM", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "redis-sentinel-master-name", "PROMPT": ("Enter the logical name of the master server"), "OPTION_LIST": [r'[a-z]+'], "VALIDATORS": [validators.validate_regexp], "DEFAULT_VALUE": 'mymaster', "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_REDIS_MASTER_NAME", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, ], } update_params_usage(basedefs.PACKSTACK_DOC, ceilometer_params) ceilometer_groups = [ { "GROUP_NAME": "CEILOMETER", "DESCRIPTION": "Ceilometer Config parameters", "PRE_CONDITION": "CONFIG_CEILOMETER_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True }, { "GROUP_NAME": "MONGODB", "DESCRIPTION": "MONGODB Config parameters", "PRE_CONDITION": "CONFIG_CEILOMETER_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True }, { "GROUP_NAME": "REDIS", "DESCRIPTION": "Redis Config parameters", "PRE_CONDITION": "CONFIG_CEILOMETER_COORDINATION_BACKEND", "PRE_CONDITION_MATCH": "redis", "POST_CONDITION": False, "POST_CONDITION_MATCH": True }, ] for group in ceilometer_groups: paramList = ceilometer_params[group["GROUP_NAME"]] controller.addGroup(group, paramList)
def initConfig(controller): conf_params = { "CINDER": [ {"CMD_OPTION": "cinder-db-passwd", "PROMPT": "Enter the password for the Cinder DB access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_CINDER_DB_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "cinder-ks-passwd", "PROMPT": "Enter the password for the Cinder Keystone access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_CINDER_KS_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "cinder-backend", "PROMPT": "Enter the Cinder backend to be configured", "OPTION_LIST": ["lvm", "gluster", "nfs", "vmdk", "netapp"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "lvm", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_CINDER_BACKEND", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "CINDERVOLUMECREATE": [ {"CMD_OPTION": "cinder-volumes-create", "PROMPT": ("Should Cinder's volumes group be created (for " "proof-of-concept installation)?"), "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "y", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_CINDER_VOLUMES_CREATE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "CINDERVOLUMESIZE": [ {"CMD_OPTION": "cinder-volumes-size", "PROMPT": "Enter Cinder's volumes group usable size", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "20G", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_CINDER_VOLUMES_SIZE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "CINDERGLUSTERMOUNTS": [ {"CMD_OPTION": "cinder-gluster-mounts", "PROMPT": ("Enter a single or comma separated list of gluster " "volume shares to use with Cinder"), "OPTION_LIST": ["^([\d]{1,3}\.){3}[\d]{1,3}:/.*", "^[a-zA-Z0-9][\-\.\w]*:/.*"], "VALIDATORS": [validators.validate_multi_regexp], "PROCESSORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_CINDER_GLUSTER_MOUNTS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "CINDERNFSMOUNTS": [ {"CMD_OPTION": "cinder-nfs-mounts", "PROMPT": ("Enter a single or comma seprated list of NFS exports " "to use with Cinder"), "OPTION_LIST": [""], "VALIDATORS": [validators.validate_multi_export], "PROCESSORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_CINDER_NFS_MOUNTS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "CINDERNETAPPMAIN": [ {"CMD_OPTION": "cinder-netapp-login", "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", "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", "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", "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", "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", "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", "PROMPT": ("Enter a NetApp storage protocol"), "OPTION_LIST": ["iscsi", "fc", "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}, ], "CINDERNETAPPONTAPISCSI": [ {"CMD_OPTION": "cinder-netapp-size-multiplier", "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}, ], "CINDERNETAPPNFS": [ {"CMD_OPTION": "cinder-netapp-expiry-thres-minutes", "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", "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", "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", "PROMPT": ("Enter a single or comma-separated list of NetApp NFS shares"), "OPTION_LIST": [""], "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", "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, "CONDITION": False}, ], "CINDERNETAPPISCSI7MODE": [ {"CMD_OPTION": "cinder-netapp-volume-list", "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", "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}, ], "CINDERNETAPP7MODEFC": [ {"CMD_OPTION": "cinder-netapp-partner-backend-name", "PROMPT": ("Enter a NetApp partner backend name"), "OPTION_LIST": [""], "VALIDATORS": [validators.validate_not_empty], "PROCESSORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_CINDER_NETAPP_PARTNER_BACKEND_NAME", "USE_DEFAULT": True, "NEED_CONFIRM": False, "CONDITION": False}, ], "CINDERNETAPPVSERVER": [ {"CMD_OPTION": "cinder-netapp-vserver", "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}, ], "CINDERNETAPPESERIES": [ {"CMD_OPTION": "cinder-netapp-controller-ips", "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", "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-eseries-host-type", "PROMPT": ("Enter a host type"), "OPTION_LIST": [""], "VALIDATORS": [validators.validate_not_empty], "PROCESSORS": [], "DEFAULT_VALUE": "linux_dm_mp", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_CINDER_NETAPP_ESERIES_HOST_TYPE", "USE_DEFAULT": True, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "cinder-netapp-webservice-path", "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", "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}, ] } update_params_usage(basedefs.PACKSTACK_DOC, conf_params) conf_groups = [ {"GROUP_NAME": "CINDER", "DESCRIPTION": "Cinder Config parameters", "PRE_CONDITION": "CONFIG_CINDER_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "CINDERVOLUMECREATE", "DESCRIPTION": "Cinder volume create Config parameters", "PRE_CONDITION": check_lvm_options, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "CINDERVOLUMESIZE", "DESCRIPTION": "Cinder volume size Config parameters", "PRE_CONDITION": check_lvm_vg_options, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "CINDERGLUSTERMOUNTS", "DESCRIPTION": "Cinder gluster Config parameters", "PRE_CONDITION": check_gluster_options, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "CINDERNFSMOUNTS", "DESCRIPTION": "Cinder NFS Config parameters", "PRE_CONDITION": check_nfs_options, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "CINDERNETAPPMAIN", "DESCRIPTION": "Cinder NetApp main configuration", "PRE_CONDITION": check_netapp_options, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"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}, {"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}, {"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}, {"GROUP_NAME": "CINDERNETAPP7MODEFC", "DESCRIPTION": "Cinder NetApp 7-mode Fibre Channel configuration", "PRE_CONDITION": check_netapp_7mode_fc_options, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"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}, {"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} ] for group in conf_groups: params = conf_params[group["GROUP_NAME"]] controller.addGroup(group, params)
def initConfig(controller): params = [ {"CMD_OPTION": "amqp-backend", "PROMPT": "Set the AMQP service backend", "OPTION_LIST": ["qpid", "rabbitmq"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "rabbitmq", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_AMQP_BACKEND", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False, "DEPRECATES": ['CONFIG_AMQP_SERVER']}, {"CMD_OPTION": "amqp-host", "PROMPT": "Enter the IP address of the AMQP service", "OPTION_LIST": [], "VALIDATORS": [validators.validate_ssh], "DEFAULT_VALUE": utils.get_localhost_ip(), "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_AMQP_HOST", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "amqp-enable-ssl", "PROMPT": "Enable SSL for the AMQP service?", "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "n", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_AMQP_ENABLE_SSL", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "amqp-enable-auth", "PROMPT": "Enable Authentication for the AMQP service?", "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "n", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_AMQP_ENABLE_AUTH", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ] update_params_usage(basedefs.PACKSTACK_DOC, params, sectioned=False) group = {"GROUP_NAME": "AMQP", "DESCRIPTION": "AMQP Config parameters", "PRE_CONDITION": False, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True} controller.addGroup(group, params) params = [ {"CMD_OPTION": "amqp-nss-certdb-pw", "PROMPT": "Enter the password for NSS certificate database", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_AMQP_NSS_CERTDB_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "amqp-ssl-port", "PROMPT": "Enter the SSL port for the AMQP service", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "5671", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_AMQP_SSL_PORT", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "amqp-ssl-cacert-file", "PROMPT": ("Enter the filename of the SSL CAcertificate for the AMQP" " service"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "/etc/pki/tls/certs/amqp_selfcert.pem", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_AMQP_SSL_CACERT_FILE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "amqp-ssl-cert-file", "PROMPT": ("Enter the filename of the SSL certificate for the AMQP " "service"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "/etc/pki/tls/certs/amqp_selfcert.pem", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_AMQP_SSL_CERT_FILE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "amqp-ssl-key-file", "PROMPT": "Enter the private key filename", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "/etc/pki/tls/private/amqp_selfkey.pem", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_AMQP_SSL_KEY_FILE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "amqp-ssl-self-signed", "PROMPT": "Generate Self Signed SSL Certificate", "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "y", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_AMQP_SSL_SELF_SIGNED", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ] update_params_usage(basedefs.PACKSTACK_DOC, params, sectioned=False) group = {"GROUP_NAME": "AMQPSSL", "DESCRIPTION": "AMQP Config SSL parameters", "PRE_CONDITION": "CONFIG_AMQP_ENABLE_SSL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True} controller.addGroup(group, params) params = [ {"CMD_OPTION": "amqp-auth-user", "PROMPT": "Enter the user for amqp authentication", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "amqp_user", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_AMQP_AUTH_USER", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "amqp-auth-password", "PROMPT": "Enter the password for user authentication", "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_not_empty], "PROCESSORS": [processors.process_password], "DEFAULT_VALUE": "PW_PLACEHOLDER", "MASK_INPUT": True, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_AMQP_AUTH_PASSWORD", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, ] update_params_usage(basedefs.PACKSTACK_DOC, params, sectioned=False) group = {"GROUP_NAME": "AMQPAUTH", "DESCRIPTION": "AMQP Config Athentication parameters", "PRE_CONDITION": "CONFIG_AMQP_ENABLE_AUTH", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True} controller.addGroup(group, params)
def initConfig(controller): ceilometer_params = { "CEILOMETER": [ {"CONF_NAME": "CONFIG_CEILOMETER_SECRET", "CMD_OPTION": "ceilometer-secret", "PROMPT": "Enter the Ceilometer secret key", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": uuid.uuid4().hex[:16], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "USE_DEFAULT": True, "NEED_CONFIRM": True, "CONDITION": False}, {"CONF_NAME": "CONFIG_CEILOMETER_KS_PW", "CMD_OPTION": "ceilometer-ks-passwd", "PROMPT": "Enter the password for the Ceilometer Keystone access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "ceilometer-service-name", "PROMPT": "Enter the Ceilometer service name.", "OPTION_LIST": ['ceilometer', 'httpd'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "httpd", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_CEILOMETER_SERVICE_NAME', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CONF_NAME": "CONFIG_CEILOMETER_COORDINATION_BACKEND", "CMD_OPTION": "ceilometer-coordination-backend", "PROMPT": "Enter the coordination driver", "OPTION_LIST": ['redis', 'none'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": 'redis', "MASK_INPUT": False, "USE_DEFAULT": True, "NEED_CONFIRM": False, "CONDITION": False}, {"CONF_NAME": "CONFIG_CEILOMETER_METERING_BACKEND", "CMD_OPTION": "ceilometer-metering-backend", "PROMPT": "Enter the metering backend to use", "OPTION_LIST": ['database', 'gnocchi'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": 'database', "MASK_INPUT": False, "USE_DEFAULT": True, "NEED_CONFIRM": False, "CONDITION": False}, ], "MONGODB": [ {"CMD_OPTION": "mongodb-host", "PROMPT": "Enter the host for the MongoDB server", "OPTION_LIST": [], "VALIDATORS": [validators.validate_ssh], "DEFAULT_VALUE": utils.get_localhost_ip(), "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_MONGODB_HOST", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "REDIS": [ {"CMD_OPTION": "redis-master-host", "PROMPT": "Enter the host for the Redis master server", "OPTION_LIST": [], "VALIDATORS": [validators.validate_ssh], "DEFAULT_VALUE": utils.get_localhost_ip(), "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_REDIS_MASTER_HOST", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False, "DEPRECATES": ["CONFIG_REDIS_HOST"]}, {"CMD_OPTION": "redis-port", "PROMPT": "Enter the port of the redis server(s)", "OPTION_LIST": [], "VALIDATORS": [validators.validate_port], "DEFAULT_VALUE": 6379, "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_REDIS_PORT", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "redis-ha", "PROMPT": "Should redis try to use HA?", "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "n", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_REDIS_HA", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "redis-slaves", "PROMPT": "Enter the host for the redis slave servers", "OPTION_LIST": [], "VALIDATORS": [validators.validate_multi_ssh], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_REDIS_SLAVE_HOSTS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "redis-sentinels", "PROMPT": "Enter the host for the redis sentinel servers", "OPTION_LIST": [], "VALIDATORS": [validators.validate_multi_ssh], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_REDIS_SENTINEL_HOSTS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "redis-sentinel-contact", "PROMPT": "Enter the IP address of the coordination redis sentinel", "OPTION_LIST": [], "VALIDATORS": [validators.validate_ssh], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_REDIS_SENTINEL_CONTACT_HOST", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "redis-sentinel-port", "PROMPT": ("Enter the port on which the redis sentinel servers" " listen"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_port], "DEFAULT_VALUE": 26379, "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_REDIS_SENTINEL_PORT", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "redis-sentinel-quorum", "PROMPT": ( "Enter the quorum value for the redis sentinel servers"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_integer], "DEFAULT_VALUE": 2, "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_REDIS_SENTINEL_QUORUM", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "redis-sentinel-master-name", "PROMPT": ( "Enter the logical name of the master server"), "OPTION_LIST": [r'[a-z]+'], "VALIDATORS": [validators.validate_regexp], "DEFAULT_VALUE": 'mymaster', "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_REDIS_MASTER_NAME", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], } update_params_usage(basedefs.PACKSTACK_DOC, ceilometer_params) ceilometer_groups = [ {"GROUP_NAME": "CEILOMETER", "DESCRIPTION": "Ceilometer Config parameters", "PRE_CONDITION": "CONFIG_CEILOMETER_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "MONGODB", "DESCRIPTION": "MONGODB Config parameters", "PRE_CONDITION": "CONFIG_CEILOMETER_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "REDIS", "DESCRIPTION": "Redis Config parameters", "PRE_CONDITION": "CONFIG_CEILOMETER_COORDINATION_BACKEND", "PRE_CONDITION_MATCH": "redis", "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, ] for group in ceilometer_groups: paramList = ceilometer_params[group["GROUP_NAME"]] controller.addGroup(group, paramList)
def initConfig(controller): params = [ { "CMD_OPTION": "amqp-backend", "PROMPT": "Set the AMQP service backend", "OPTION_LIST": ["qpid", "rabbitmq"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "rabbitmq", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_AMQP_BACKEND", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False, "DEPRECATES": ['CONFIG_AMQP_SERVER'] }, { "CMD_OPTION": "amqp-host", "PROMPT": "Enter the IP address of the AMQP service", "OPTION_LIST": [], "VALIDATORS": [validators.validate_ssh], "DEFAULT_VALUE": utils.get_localhost_ip(), "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_AMQP_HOST", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "amqp-enable-ssl", "PROMPT": "Enable SSL for the AMQP service?", "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "n", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_AMQP_ENABLE_SSL", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "amqp-enable-auth", "PROMPT": "Enable Authentication for the AMQP service?", "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "n", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_AMQP_ENABLE_AUTH", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, ] update_params_usage(basedefs.PACKSTACK_DOC, params, sectioned=False) group = { "GROUP_NAME": "AMQP", "DESCRIPTION": "AMQP Config parameters", "PRE_CONDITION": False, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True } controller.addGroup(group, params) params = [ { "CMD_OPTION": "amqp-nss-certdb-pw", "PROMPT": "Enter the password for NSS certificate database", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_AMQP_NSS_CERTDB_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }, ] update_params_usage(basedefs.PACKSTACK_DOC, params, sectioned=False) group = { "GROUP_NAME": "AMQPSSL", "DESCRIPTION": "AMQP Config SSL parameters", "PRE_CONDITION": "CONFIG_AMQP_ENABLE_SSL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True } controller.addGroup(group, params) params = [ { "CMD_OPTION": "amqp-auth-user", "PROMPT": "Enter the user for amqp authentication", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "amqp_user", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_AMQP_AUTH_USER", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "amqp-auth-password", "PROMPT": "Enter the password for user authentication", "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_not_empty], "PROCESSORS": [processors.process_password], "DEFAULT_VALUE": "PW_PLACEHOLDER", "MASK_INPUT": True, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_AMQP_AUTH_PASSWORD", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }, ] update_params_usage(basedefs.PACKSTACK_DOC, params, sectioned=False) group = { "GROUP_NAME": "AMQPAUTH", "DESCRIPTION": "AMQP Config Athentication parameters", "PRE_CONDITION": "CONFIG_AMQP_ENABLE_AUTH", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True } controller.addGroup(group, params)
def initConfig(controller): if platform.linux_distribution()[0] == "Fedora": primary_netif = "em1" secondary_netif = "em2" else: primary_netif = "eth0" secondary_netif = "eth1" nova_params = { "NOVA": [ {"CMD_OPTION": 'nova-db-purge-enable', "PROMPT": ( "Enter y if cron job for removing soft deleted DB rows " "should be created" ), "OPTION_LIST": ['y', 'n'], "VALIDATORS": [validators.validate_not_empty], "PROCESSORS": [processors.process_bool], "DEFAULT_VALUE": 'y', "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_NOVA_DB_PURGE_ENABLE', "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "nova-db-passwd", "PROMPT": "Enter the password for the Nova DB access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_NOVA_DB_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "nova-ks-passwd", "PROMPT": "Enter the password for the Nova Keystone access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_NOVA_KS_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "nova-manage-flavors", "PROMPT": ( "Should Packstack manage default Nova flavors" ), "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "y", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_NOVA_MANAGE_FLAVORS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "novasched-cpu-allocation-ratio", "PROMPT": "Enter the CPU overcommitment ratio. Set to 1.0 to " "disable CPU overcommitment", "OPTION_LIST": [], "VALIDATORS": [validators.validate_float], "DEFAULT_VALUE": 16.0, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_SCHED_CPU_ALLOC_RATIO", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "novasched-ram-allocation-ratio", "PROMPT": ("Enter the RAM overcommitment ratio. Set to 1.0 to " "disable RAM overcommitment"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_float], "DEFAULT_VALUE": 1.5, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_SCHED_RAM_ALLOC_RATIO", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "novacompute-migrate-protocol", "PROMPT": ("Enter protocol which will be used for instance " "migration"), "OPTION_LIST": ['tcp', 'ssh'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": 'tcp', "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_COMPUTE_MIGRATE_PROTOCOL", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "nova-compute-manager", "PROMPT": ("Enter the compute manager for nova " "migration"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "nova.compute.manager.ComputeManager", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_COMPUTE_MANAGER", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "nova-ssl-cert", "PROMPT": ("Enter the path to a PEM encoded certificate to be used " "on the https server, leave blank if one should be " "generated, this certificate should not require " "a passphrase"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": '', "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_VNC_SSL_CERT", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "nova-ssl-key", "PROMPT": ("Enter the SSL keyfile corresponding to the certificate " "if one was entered"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_VNC_SSL_KEY", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "nova-pci-alias", "PROMPT": ("Enter the PCI passthrough array of hash in JSON style for controller eg. " "[{'vendor_id':'1234', 'product_id':'5678', " "'name':'default'}, {...}] "), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_PCI_ALIAS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "nova-pci-passthrough-whitelist", "PROMPT": ("Enter the PCI passthrough whitelist as array of hash in JSON style for " "controller eg. " "[{'vendor_id':'1234', 'product_id':'5678', " "'name':'default'}, {...}]"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_PCI_PASSTHROUGH_WHITELIST", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "NOVA_NETWORK": [ {"CMD_OPTION": "novacompute-privif", "PROMPT": ("Enter the Private interface for Flat DHCP on the Nova" " compute servers"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": '', "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_COMPUTE_PRIVIF", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "novanetwork-manager", "PROMPT": "Enter the Nova network manager", "OPTION_LIST": [r'^nova\.network\.manager\.\w+Manager$'], "VALIDATORS": [validators.validate_regexp], "DEFAULT_VALUE": "nova.network.manager.FlatDHCPManager", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_NETWORK_MANAGER", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "novanetwork-pubif", "PROMPT": "Enter the Public interface on the Nova network server", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": primary_netif, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_NETWORK_PUBIF", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "novanetwork-privif", "PROMPT": ("Enter the Private interface for network manager on " "the Nova network server"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": '', "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_NETWORK_PRIVIF", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "novanetwork-fixed-range", "PROMPT": "Enter the IP Range for network manager", "OPTION_LIST": ["^[\:\.\da-fA-f]+(\/\d+){0,1}$"], "PROCESSORS": [processors.process_cidr], "VALIDATORS": [validators.validate_regexp], "DEFAULT_VALUE": "192.168.32.0/22", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_NETWORK_FIXEDRANGE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "novanetwork-floating-range", "PROMPT": "Enter the IP Range for Floating IP's", "OPTION_LIST": ["^[\:\.\da-fA-f]+(\/\d+){0,1}$"], "PROCESSORS": [processors.process_cidr], "VALIDATORS": [validators.validate_regexp], "DEFAULT_VALUE": "10.3.4.0/22", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_NETWORK_FLOATRANGE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "novanetwork-auto-assign-floating-ip", "PROMPT": ("Should new instances automatically have a floating " "IP assigned?"), "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "n", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_NOVA_NETWORK_AUTOASSIGNFLOATINGIP", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "NOVA_NETWORK_VLAN": [ {"CMD_OPTION": "novanetwork-vlan-start", "PROMPT": "Enter first VLAN for private networks", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": 100, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_NETWORK_VLAN_START", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "novanetwork-num-networks", "PROMPT": "How many networks should be supported", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": 1, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_NETWORK_NUMBER", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "novanetwork-network-size", "PROMPT": "How many addresses should be in each private subnet", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": 255, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_NETWORK_SIZE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], } update_params_usage(basedefs.PACKSTACK_DOC, nova_params) def use_nova_network(config): return (config['CONFIG_NOVA_INSTALL'] == 'y' and config['CONFIG_NEUTRON_INSTALL'] != 'y') def use_nova_network_vlan(config): manager = 'nova.network.manager.VlanManager' return (config['CONFIG_NOVA_INSTALL'] == 'y' and config['CONFIG_NEUTRON_INSTALL'] != 'y' and config['CONFIG_NOVA_NETWORK_MANAGER'] == manager) nova_groups = [ {"GROUP_NAME": "NOVA", "DESCRIPTION": "Nova Options", "PRE_CONDITION": "CONFIG_NOVA_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "NOVA_NETWORK", "DESCRIPTION": "Nova Network Options", "PRE_CONDITION": use_nova_network, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "NOVA_NETWORK_VLAN", "DESCRIPTION": "Nova Network VLAN Options", "PRE_CONDITION": use_nova_network_vlan, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, ] for group in nova_groups: params = nova_params[group["GROUP_NAME"]] controller.addGroup(group, params)
def initConfig(controller): if platform.linux_distribution()[0] == "Fedora": primary_netif = "em1" secondary_netif = "em2" else: primary_netif = "eth0" secondary_netif = "eth1" nova_params = { "NOVA": [ {"CMD_OPTION": 'nova-db-purge-enable', "PROMPT": ( "Enter y if cron job for removing soft deleted DB rows " "should be created" ), "OPTION_LIST": ['y', 'n'], "VALIDATORS": [validators.validate_not_empty], "PROCESSORS": [processors.process_bool], "DEFAULT_VALUE": 'y', "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_NOVA_DB_PURGE_ENABLE', "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "nova-db-passwd", "PROMPT": "Enter the password for the Nova DB access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_NOVA_DB_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "nova-ks-passwd", "PROMPT": "Enter the password for the Nova Keystone access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_NOVA_KS_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "nova-manage-flavors", "PROMPT": ( "Should Packstack manage default Nova flavors" ), "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "y", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_NOVA_MANAGE_FLAVORS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "novasched-cpu-allocation-ratio", "PROMPT": "Enter the CPU overcommitment ratio. Set to 1.0 to " "disable CPU overcommitment", "OPTION_LIST": [], "VALIDATORS": [validators.validate_float], "DEFAULT_VALUE": 16.0, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_SCHED_CPU_ALLOC_RATIO", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "novasched-ram-allocation-ratio", "PROMPT": ("Enter the RAM overcommitment ratio. Set to 1.0 to " "disable RAM overcommitment"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_float], "DEFAULT_VALUE": 1.5, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_SCHED_RAM_ALLOC_RATIO", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "novacompute-migrate-protocol", "PROMPT": ("Enter protocol which will be used for instance " "migration"), "OPTION_LIST": ['tcp', 'ssh'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": 'ssh', "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_COMPUTE_MIGRATE_PROTOCOL", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "nova-ssl-cert", "PROMPT": ("Enter the path to a PEM encoded certificate to be used " "on the https server, leave blank if one should be " "generated, this certificate should not require " "a passphrase"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": '', "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_VNC_SSL_CERT", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "nova-ssl-key", "PROMPT": ("Enter the SSL keyfile corresponding to the certificate " "if one was entered"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_VNC_SSL_KEY", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "nova-pci-alias", "PROMPT": ("Enter the PCI passthrough array of hash in JSON style for controller eg. " "[{'vendor_id':'1234', 'product_id':'5678', " "'name':'default'}, {...}] "), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_PCI_ALIAS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "nova-pci-passthrough-whitelist", "PROMPT": ("Enter the PCI passthrough whitelist as array of hash in JSON style for " "controller eg. " "[{'vendor_id':'1234', 'product_id':'5678', " "'name':'default'}, {...}]"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_PCI_PASSTHROUGH_WHITELIST", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "nova-libvirt-virt-type", "PROMPT": ( "The nova hypervisor that should be used. Either qemu or kvm." ), "OPTION_LIST": ['qemu', 'kvm'], "DEFAULT_VALUE": '%{::default_hypervisor}', "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_NOVA_LIBVIRT_VIRT_TYPE", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, ], } update_params_usage(basedefs.PACKSTACK_DOC, nova_params) nova_groups = [ {"GROUP_NAME": "NOVA", "DESCRIPTION": "Nova Options", "PRE_CONDITION": "CONFIG_NOVA_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, ] for group in nova_groups: params = nova_params[group["GROUP_NAME"]] controller.addGroup(group, params)
def initConfig(controller): ceilometer_params = { "CEILOMETER": [ { "CONF_NAME": "CONFIG_CEILOMETER_SECRET", "CMD_OPTION": "ceilometer-secret", "PROMPT": "Enter the Ceilometer secret key", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": uuid.uuid4().hex[:16], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "USE_DEFAULT": True, "NEED_CONFIRM": True, "CONDITION": False }, { "CONF_NAME": "CONFIG_CEILOMETER_KS_PW", "CMD_OPTION": "ceilometer-ks-passwd", "PROMPT": "Enter the password for the Ceilometer Keystone access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }, { "CMD_OPTION": "ceilometer-service-name", "PROMPT": "Enter the Ceilometer service name.", "OPTION_LIST": ['ceilometer', 'httpd'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "httpd", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_CEILOMETER_SERVICE_NAME', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CONF_NAME": "CONFIG_CEILOMETER_COORDINATION_BACKEND", "CMD_OPTION": "ceilometer-coordination-backend", "PROMPT": "Enter the coordination driver", "OPTION_LIST": ['redis', 'none'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": 'redis', "MASK_INPUT": False, "USE_DEFAULT": True, "NEED_CONFIRM": False, "CONDITION": False }, { "CONF_NAME": "CONFIG_ENABLE_CEILOMETER_MIDDLEWARE", "CMD_OPTION": "enable-ceilometer-middleware", "PROMPT": ("Enable ceilometer middleware in swift proxy"), "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "n", "MASK_INPUT": False, "USE_DEFAULT": True, "NEED_CONFIRM": False, "CONDITION": False }, ], "REDIS": [ { "CMD_OPTION": "redis-host", "PROMPT": "Enter the host for the Redis server", "OPTION_LIST": [], "VALIDATORS": [validators.validate_ssh], "DEFAULT_VALUE": utils.get_localhost_ip(), "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_REDIS_HOST", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False, "DEPRECATES": ["CONFIG_REDIS_MASTER_HOST"] }, { "CMD_OPTION": "redis-port", "PROMPT": "Enter the port of the redis server(s)", "OPTION_LIST": [], "VALIDATORS": [validators.validate_port], "DEFAULT_VALUE": 6379, "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_REDIS_PORT", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, ], } update_params_usage(basedefs.PACKSTACK_DOC, ceilometer_params) ceilometer_groups = [ { "GROUP_NAME": "CEILOMETER", "DESCRIPTION": "Ceilometer Config parameters", "PRE_CONDITION": "CONFIG_CEILOMETER_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True }, { "GROUP_NAME": "REDIS", "DESCRIPTION": "Redis Config parameters", "PRE_CONDITION": "CONFIG_CEILOMETER_COORDINATION_BACKEND", "PRE_CONDITION_MATCH": "redis", "POST_CONDITION": False, "POST_CONDITION_MATCH": True }, ] for group in ceilometer_groups: paramList = ceilometer_params[group["GROUP_NAME"]] controller.addGroup(group, paramList)
def initConfig(controller): def process_tempest(param, param_name, config=None): if param == "": # In case of multinode installs by default we deploy # Tempest on network node return config['CONFIG_NETWORK_HOSTS'].split(',')[0] return param conf_params = { "PROVISION_INIT": [ { "CMD_OPTION": "provision-demo", "PROMPT": ("Would you like to provision for demo usage " "and testing"), "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "y", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_DEMO", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "provision-tempest", "PROMPT": ("Would you like to configure Tempest (OpenStack test " "suite). Note that provisioning is only supported for " "all-in-one installations."), "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "n", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, ], "PROVISION_DEMO": [ { "CMD_OPTION": "provision-demo-floatrange", "PROMPT": "Enter the network address for the floating IP subnet", "OPTION_LIST": False, "VALIDATORS": False, "DEFAULT_VALUE": "172.24.4.224/28", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_DEMO_FLOATRANGE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "provision-image-name", "PROMPT": "Enter the name to be assigned to the demo image", "OPTION_LIST": False, "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": DEMO_IMAGE_NAME, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_IMAGE_NAME", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "provision-image-url", "PROMPT": ("Enter the location of an image to be loaded " "into Glance"), "OPTION_LIST": False, "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": DEMO_IMAGE_URL, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_IMAGE_URL", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "provision-image-format", "PROMPT": ("Enter the format of the demo image"), "OPTION_LIST": False, "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": DEMO_IMAGE_FORMAT, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_IMAGE_FORMAT", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "provision-image-ssh-user", "PROMPT": ("Enter the name of a user to use when connecting " "to the demo image via ssh"), "OPTION_LIST": False, "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": DEMO_IMAGE_SSH_USER, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_IMAGE_SSH_USER", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, ], "PROVISION_TEMPEST": [{ "CMD_OPTION": "tempest-host", "PROMPT": "Enter the host where to deploy Tempest", "OPTION_LIST": [], "VALIDATORS": [validators.validate_ssh], "DEFAULT_VALUE": "", "PROCESSORS": [process_tempest], "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_TEMPEST_HOST", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "provision-tempest-user", "PROMPT": ("Enter the name of the Tempest Provisioning user " "(if blank, Tempest will be configured in a " "standalone mode) "), "OPTION_LIST": False, "VALIDATORS": False, "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_USER", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "provision-tempest-user-passwd", "PROMPT": "Enter the password for the Tempest Provisioning user", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_USER_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }, { "CMD_OPTION": "provision-tempest-floatrange", "PROMPT": "Enter the network address for the floating IP subnet", "OPTION_LIST": False, "VALIDATORS": False, "DEFAULT_VALUE": "172.24.4.224/28", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_FLOATRANGE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "provision-tempest-repo-uri", "PROMPT": "What is the uri of the Tempest git repository?", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "https://github.com/openstack/tempest.git", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_REPO_URI", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "provision-tempest-repo-revision", "PROMPT": ("What revision, branch, or tag of the Tempest git " "repository should be used"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "master", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_REPO_REVISION", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "run-tempest", "PROMPT": ("Do you wish to run tempest?"), "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "n", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_RUN_TEMPEST", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "run-tempest-tests", "PROMPT": ("What tempest tests should run ?" " (If blank, Tempest will run smoke tests)"), "OPTION_LIST": [], "VALIDATORS": False, "DEFAULT_VALUE": "smoke", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_RUN_TEMPEST_TESTS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }], "PROVISION_OVS_BRIDGE": [ { "CMD_OPTION": "provision-ovs-bridge", "PROMPT": "Would you like to configure the external ovs bridge", "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "y", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_OVS_BRIDGE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False, "DEPRECATES": ['CONFIG_PROVISION_ALL_IN_ONE_OVS_BRIDGE'] }, ], } update_params_usage(basedefs.PACKSTACK_DOC, conf_params) def check_provisioning_demo(config): return (config.get('CONFIG_PROVISION_DEMO', 'n') == 'y') def check_provisioning_tempest(config): return (config.get('CONFIG_PROVISION_TEMPEST', 'n') == 'y') def allow_all_in_one_ovs_bridge(config): return (config['CONFIG_NEUTRON_INSTALL'] == 'y') conf_groups = [ { "GROUP_NAME": "PROVISION_INIT", "DESCRIPTION": "Provisioning demo config", "PRE_CONDITION": lambda x: 'yes', "PRE_CONDITION_MATCH": "yes", "POST_CONDITION": False, "POST_CONDITION_MATCH": True }, { "GROUP_NAME": "PROVISION_DEMO", "DESCRIPTION": "Provisioning demo config", "PRE_CONDITION": check_provisioning_demo, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True }, { "GROUP_NAME": "PROVISION_TEMPEST", "DESCRIPTION": "Provisioning tempest config", "PRE_CONDITION": check_provisioning_tempest, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True }, { "GROUP_NAME": "PROVISION_OVS_BRIDGE", "DESCRIPTION": "Provisioning all-in-one ovs bridge config", "PRE_CONDITION": allow_all_in_one_ovs_bridge, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True }, ] for group in conf_groups: paramList = conf_params[group["GROUP_NAME"]] controller.addGroup(group, paramList) # Due to group checking some parameters might not be initialized, but # provision.pp needs them all. So we will initialize them with default # values params = [ controller.getParamByName(x) for x in [ 'CONFIG_PROVISION_TEMPEST_REPO_URI', 'CONFIG_PROVISION_TEMPEST_REPO_REVISION', 'CONFIG_PROVISION_OVS_BRIDGE' ] ] for param in params: value = controller.CONF.get(param.CONF_NAME, param.DEFAULT_VALUE) controller.CONF[param.CONF_NAME] = value
def initConfig(controller): def process_tempest(param, param_name, config=None): if param == "": # In case of multinode installs by default we deploy # Tempest on network node return config['CONFIG_NETWORK_HOSTS'].split(',')[0] return param conf_params = { "PROVISION_INIT": [ { "CMD_OPTION": "provision-demo", "PROMPT": ("Would you like to provision for demo usage " "and testing"), "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "y", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_DEMO", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "provision-tempest", "PROMPT": ("Would you like to configure Tempest (OpenStack test " "suite). Note that provisioning is only supported for " "all-in-one installations."), "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "n", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, ], "PROVISION_DEMO": [ { "CMD_OPTION": "provision-demo-floatrange", "PROMPT": "Enter the network address for the floating IP subnet", "OPTION_LIST": False, "VALIDATORS": False, "DEFAULT_VALUE": "172.24.4.0/24", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_DEMO_FLOATRANGE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "provision-demo-allocation-pools", "PROMPT": ("Enter the allocation pools from the floating IP " "subnet, as JSON list [\"start=ip1,end=ip2\", ...]"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "[]", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_PROVISION_DEMO_ALLOCATION_POOLS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "provision-image-name", "PROMPT": "Enter the name to be assigned to the demo image", "OPTION_LIST": False, "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": DEMO_IMAGE_NAME, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_IMAGE_NAME", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "provision-image-url", "PROMPT": ("Enter the location of an image to be loaded " "into Glance"), "OPTION_LIST": False, "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": DEMO_IMAGE_URL, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_IMAGE_URL", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "provision-image-format", "PROMPT": ("Enter the format of the demo image"), "OPTION_LIST": False, "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": DEMO_IMAGE_FORMAT, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_IMAGE_FORMAT", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "provision-image-properties", "PROMPT": ("Enter the comma-separated list of key=value pairs " "to set as the properties of the demo image"), "OPTION_LIST": False, "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_IMAGE_PROPERTIES", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "provision-image-ssh-user", "PROMPT": ("Enter the name of a user to use when connecting " "to the demo image via ssh"), "OPTION_LIST": False, "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": DEMO_IMAGE_SSH_USER, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_IMAGE_SSH_USER", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "provision-uec-image-name", "PROMPT": "Enter the name to be assigned to the uec image used for tempest", "OPTION_LIST": False, "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": UEC_IMAGE_NAME, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_UEC_IMAGE_NAME", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "provision-uec-kernel-url", "PROMPT": ("Enter the location of a uec kernel to be loaded " "into Glance"), "OPTION_LIST": False, "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": UEC_IMAGE_KERNEL_URL, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_UEC_IMAGE_KERNEL_URL", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "provision-uec-ramdisk-url", "PROMPT": ("Enter the location of a uec ramdisk to be loaded " "into Glance"), "OPTION_LIST": False, "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": UEC_IMAGE_RAMDISK_URL, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_UEC_IMAGE_RAMDISK_URL", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "provision-uec-disk-url", "PROMPT": ("Enter the location of a uec disk image to be loaded " "into Glance"), "OPTION_LIST": False, "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": UEC_IMAGE_DISK_URL, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_UEC_IMAGE_DISK_URL", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, ], "PROVISION_TEMPEST": [{ "CMD_OPTION": "tempest-host", "PROMPT": "Enter the host where to deploy Tempest", "OPTION_LIST": [], "VALIDATORS": [validators.validate_ssh], "DEFAULT_VALUE": "", "PROCESSORS": [process_tempest], "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_TEMPEST_HOST", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "provision-tempest-user", "PROMPT": ("Enter the name of the Tempest Provisioning user " "(if blank, Tempest will be configured in a " "standalone mode) "), "OPTION_LIST": False, "VALIDATORS": False, "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_USER", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "provision-tempest-user-passwd", "PROMPT": "Enter the password for the Tempest Provisioning user", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_USER_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }, { "CMD_OPTION": "provision-tempest-floatrange", "PROMPT": "Enter the network address for the floating IP subnet", "OPTION_LIST": False, "VALIDATORS": False, "DEFAULT_VALUE": "172.24.4.0/24", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_FLOATRANGE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "provision-tempest-flavor-name", "PROMPT": "What is the name of the primary Tempest flavor?", "OPTION_LIST": False, "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "m1.nano", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_FLAVOR_NAME", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "provision-tempest-flavor-disk", "PROMPT": ("How much of disk space has " "the primary Tempest flavor (Gb)?"), "OPTION_LIST": False, "VALIDATORS": [validators.validate_integer], "DEFAULT_VALUE": "1", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_FLAVOR_DISK", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "provision-tempest-flavor-ram", "PROMPT": "How much is the primary Tempest flavor's ram (Mb)?", "OPTION_LIST": False, "VALIDATORS": [validators.validate_integer], "DEFAULT_VALUE": "128", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_FLAVOR_RAM", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "provision-tempest-flavor-vcpus", "PROMPT": "How many vcpus is in the primary Tempest flavor?", "OPTION_LIST": False, "VALIDATORS": [validators.validate_integer], "DEFAULT_VALUE": "1", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_FLAVOR_VCPUS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "provision-tempest-flavor-alt-name", "PROMPT": "What is the name of the alternative Tempest flavor?", "OPTION_LIST": False, "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "m1.micro", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_FLAVOR_ALT_NAME", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "provision-tempest-flavor-alt-disk", "PROMPT": ("How much of disk space has " "the alternative Tempest flavor (Gb)?"), "OPTION_LIST": False, "VALIDATORS": [validators.validate_integer], "DEFAULT_VALUE": "1", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_FLAVOR_ALT_DISK", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "provision-tempest-flavor-alt-ram", "PROMPT": "How much is the alternative Tempest flavor's ram?", "OPTION_LIST": False, "VALIDATORS": [validators.validate_integer], "DEFAULT_VALUE": "128", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_FLAVOR_ALT_RAM", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "provision-tempest-flavor-alt-vcpus", "PROMPT": "How many vcpus has the alternative Tempest flavor?", "OPTION_LIST": False, "VALIDATORS": [validators.validate_integer], "DEFAULT_VALUE": "1", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_FLAVOR_ALT_VCPUS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "run-tempest", "PROMPT": ("Do you wish to run tempest?"), "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "n", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_RUN_TEMPEST", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "run-tempest-tests", "PROMPT": ("What tempest tests should run ?" " (If blank, Tempest will run smoke tests)"), "OPTION_LIST": [], "VALIDATORS": False, "DEFAULT_VALUE": "smoke", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_RUN_TEMPEST_TESTS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }], "PROVISION_OVS_BRIDGE": [ { "CMD_OPTION": "provision-ovs-bridge", "PROMPT": "Would you like to configure the external ovs bridge", "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "y", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_OVS_BRIDGE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False, "DEPRECATES": ['CONFIG_PROVISION_ALL_IN_ONE_OVS_BRIDGE'] }, ], } update_params_usage(basedefs.PACKSTACK_DOC, conf_params) def check_provisioning_demo(config): return (config.get('CONFIG_PROVISION_DEMO', 'n') == 'y') def check_provisioning_tempest(config): return (config.get('CONFIG_PROVISION_TEMPEST', 'n') == 'y') def allow_all_in_one_ovs_bridge(config): return (config['CONFIG_NEUTRON_INSTALL'] == 'y') conf_groups = [ { "GROUP_NAME": "PROVISION_INIT", "DESCRIPTION": "Provisioning demo config", "PRE_CONDITION": lambda x: 'yes', "PRE_CONDITION_MATCH": "yes", "POST_CONDITION": False, "POST_CONDITION_MATCH": True }, { "GROUP_NAME": "PROVISION_DEMO", "DESCRIPTION": "Provisioning demo config", "PRE_CONDITION": check_provisioning_demo, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True }, { "GROUP_NAME": "PROVISION_TEMPEST", "DESCRIPTION": "Provisioning tempest config", "PRE_CONDITION": check_provisioning_tempest, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True }, { "GROUP_NAME": "PROVISION_OVS_BRIDGE", "DESCRIPTION": "Provisioning all-in-one ovs bridge config", "PRE_CONDITION": allow_all_in_one_ovs_bridge, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True }, ] for group in conf_groups: paramList = conf_params[group["GROUP_NAME"]] controller.addGroup(group, paramList) # Due to group checking some parameters might not be initialized, but # provision.pp needs them all. So we will initialize them with default # values params = [controller.getParamByName('CONFIG_PROVISION_OVS_BRIDGE')] for param in params: value = controller.CONF.get(param.CONF_NAME, param.DEFAULT_VALUE) controller.CONF[param.CONF_NAME] = value
def initConfig(controller): params = { "SSL": [ {"CMD_OPTION": "ssl-cacert-file", "PROMPT": ("Enter the filename of the SSL CAcertificate, if the" " CONFIG_SSL_CACERT_SELFSIGN is set to y the path " "will be CONFIG_SSL_CERT_DIR/certs/selfcert.crt"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "/etc/pki/tls/certs/selfcert.crt", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_SSL_CACERT_FILE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "ssl-cacert-key-file", "PROMPT": ("Enter the filename of the SSL CAcertificate Key file" ", if the CONFIG_SSL_CACERT_SELFSIGN is set to y the " "path will be CONFIG_SSL_CERT_DIR/keys/selfkey.key"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "/etc/pki/tls/private/selfkey.key", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_SSL_CACERT_KEY_FILE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "ssl-cert-dir", "PROMPT": ("Enter the path to use to store generated SSL certificates in"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty, validators.validate_writeable_directory], "DEFAULT_VALUE": "~/packstackca/", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_SSL_CERT_DIR", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "ssl-cacert-selfsign", "PROMPT": "Should packstack use selfsigned CAcert.", "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "y", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_SSL_CACERT_SELFSIGN', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "ssl-cert-subject-country", "PROMPT": "Enter the ssl certificates subject country.", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "--", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_SSL_CERT_SUBJECT_C', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False, "DEPRECATES": ['CONFIG_SELFSIGN_CACERT_SUBJECT_C']}, {"CMD_OPTION": "ssl-cert-subject-state", "PROMPT": "Enter the ssl certificates subject state.", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "State", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_SSL_CERT_SUBJECT_ST', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False, "DEPRECATES": ['CONFIG_SELFSIGN_CACERT_SUBJECT_ST']}, {"CMD_OPTION": "ssl-cert-subject-location", "PROMPT": "Enter the ssl certificate subject location.", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "City", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_SSL_CERT_SUBJECT_L', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False, "DEPRECATES": ['CONFIG_SELFSIGN_CACERT_SUBJECT_L']}, {"CMD_OPTION": "ssl-cert-subject-organization", "PROMPT": "Enter the ssl certificate subject organization.", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "openstack", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_SSL_CERT_SUBJECT_O', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False, "DEPRECATES": ['CONFIG_SELFSIGN_CACERT_SUBJECT_O']}, {"CMD_OPTION": "ssl-cert-subject-organizational-unit", "PROMPT": "Enter the ssl certificate subject organizational unit.", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "packstack", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_SSL_CERT_SUBJECT_OU', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False, "DEPRECATES": ['CONFIG_SELFSIGN_CACERT_SUBJECT_OU']}, {"CMD_OPTION": "ssl-cert-subject-common-name", "PROMPT": "Enter the ssl certificaate subject common name.", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": gethostname(), "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_SSL_CERT_SUBJECT_CN', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False, "DEPRECATES": ['CONFIG_SELFSIGN_CACERT_SUBJECT_CN']}, {"CMD_OPTION": "ssl-cert-subject-email", "PROMPT": "Enter the ssl certificate subject admin email.", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "admin@%s" % gethostname(), "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_SSL_CERT_SUBJECT_MAIL', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False, "DEPRECATES": ['CONFIG_SELFSIGN_CACERT_SUBJECT_MAIL']}, ] } update_params_usage(basedefs.PACKSTACK_DOC, params) groups = [ {"GROUP_NAME": "SSL", "DESCRIPTION": "SSL Config parameters", "PRE_CONDITION": lambda x: 'yes', "PRE_CONDITION_MATCH": "yes", "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, ] for group in groups: controller.addGroup(group, params[group['GROUP_NAME']])
def initConfig(controller): conf_params = { "NEUTRON": [ {"CMD_OPTION": "os-neutron-ks-password", "PROMPT": "Enter the password for Neutron Keystone access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_NEUTRON_KS_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "os-neutron-db-password", "PROMPT": "Enter the password for Neutron DB access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_NEUTRON_DB_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "os-neutron-l3-ext-bridge", "PROMPT": ("Enter the ovs bridge the Neutron L3 agent will use " "for external traffic, or 'provider' if using " "provider networks."), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "br-ex", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NEUTRON_L3_EXT_BRIDGE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "os-neutron-metadata-pw", "PROMPT": "Enter Neutron metadata agent password", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_NEUTRON_METADATA_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "os-neutron-lbaas-install", "PROMPT": "Should Packstack install Neutron LBaaS", "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "n", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_LBAAS_INSTALL", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "os-neutron-metering-agent-install", "PROMPT": ("Should Packstack install Neutron L3 Metering agent"), "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "y", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_NEUTRON_METERING_AGENT_INSTALL", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "neutron-fwaas", "PROMPT": "Would you like to configure neutron FWaaS?", "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "n", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NEUTRON_FWAAS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "os-neutron-vpnaas-install", "PROMPT": "Would you like to configure neutron VPNaaS?", "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "n", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NEUTRON_VPNAAS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "NEUTRON_LB_AGENT": [ {"CMD_OPTION": "os-neutron-lb-interface-mappings", "PROMPT": ("Enter a comma separated list of interface mappings " "for the Neutron linuxbridge plugin"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NEUTRON_LB_INTERFACE_MAPPINGS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "NEUTRON_OVS_AGENT": [ {"CMD_OPTION": "os-neutron-ovs-bridge-mappings", "PROMPT": ("Enter a comma separated list of bridge mappings for " "the Neutron openvswitch plugin"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "os-neutron-ovs-bridge-interfaces", "PROMPT": ("Enter a comma separated list of OVS bridge:interface " "pairs for the Neutron openvswitch plugin"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NEUTRON_OVS_BRIDGE_IFACES", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "os-neutron-ovs-bridges-compute", "PROMPT": ("Enter a comma separated list of bridges for the " "Neutron OVS plugin in compute nodes. They must " "be included in os-neutron-ovs-bridge-mappings and " "os-neutron-ovs-bridge-interfaces."), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NEUTRON_OVS_BRIDGES_COMPUTE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "NEUTRON_OVS_AGENT_TUNNEL": [ {"CMD_OPTION": "os-neutron-ovs-tunnel-if", "PROMPT": ("Enter interface with IP to override the default " "tunnel local_ip"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NEUTRON_OVS_TUNNEL_IF", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "os-neutron-ovs-tunnel-subnets", "PROMPT": ("Enter comma separated list of subnets used for " "tunneling to make them allowed by IP filtering."), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NEUTRON_OVS_TUNNEL_SUBNETS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "NEUTRON_OVS_AGENT_VXLAN": [ {"CMD_OPTION": "os-neutron-ovs-vxlan-udp-port", "CONF_NAME": "CONFIG_NEUTRON_OVS_VXLAN_UDP_PORT", "PROMPT": "Enter VXLAN UDP port number", "OPTION_LIST": [], "VALIDATORS": [validators.validate_port], "DEFAULT_VALUE": 4789, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "NEUTRON_ML2_PLUGIN": [ {"CMD_OPTION": "os-neutron-ml2-type-drivers", "CONF_NAME": "CONFIG_NEUTRON_ML2_TYPE_DRIVERS", "PROMPT": ("Enter a comma separated list of network type driver " "entrypoints"), "OPTION_LIST": ["local", "flat", "vlan", "gre", "vxlan"], "VALIDATORS": [validators.validate_multi_options], "DEFAULT_VALUE": "vxlan", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "os-neutron-ml2-tenant-network-types", "CONF_NAME": "CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES", "PROMPT": ("Enter a comma separated ordered list of " "network_types to allocate as tenant networks"), "OPTION_LIST": ["local", "vlan", "gre", "vxlan"], "VALIDATORS": [validators.validate_multi_options], "DEFAULT_VALUE": "vxlan", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "os-neutron-ml2-mechanism-drivers", "CONF_NAME": "CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS", "PROMPT": ("Enter a comma separated ordered list of networking " "mechanism driver entrypoints"), "OPTION_LIST": ["logger", "test", "linuxbridge", "openvswitch", "hyperv", "ncs", "arista", "cisco_nexus", "mlnx", "l2population", "sriovnicswitch"], "VALIDATORS": [validators.validate_multi_options], "DEFAULT_VALUE": "openvswitch", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "os-neutron-ml2-flat-networks", "CONF_NAME": "CONFIG_NEUTRON_ML2_FLAT_NETWORKS", "PROMPT": ("Enter a comma separated list of physical_network " "names with which flat networks can be created"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "*", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "os-neutron-ml2-vlan-ranges", "CONF_NAME": "CONFIG_NEUTRON_ML2_VLAN_RANGES", "PROMPT": ("Enter a comma separated list of physical_network " "names usable for VLAN"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "os-neutron-ml2-tunnel-id-ranges", "CONF_NAME": "CONFIG_NEUTRON_ML2_TUNNEL_ID_RANGES", "PROMPT": ("Enter a comma separated list of <tun_min>:<tun_max> " "tuples enumerating ranges of GRE tunnel IDs that " "are available for tenant network allocation"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "os-neutron-ml2-vxlan-group", "CONF_NAME": "CONFIG_NEUTRON_ML2_VXLAN_GROUP", "PROMPT": "Enter a multicast group for VXLAN", "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "os-neutron-ml2-vni-ranges", "CONF_NAME": "CONFIG_NEUTRON_ML2_VNI_RANGES", "PROMPT": ("Enter a comma separated list of <vni_min>:<vni_max> " "tuples enumerating ranges of VXLAN VNI IDs that are " "available for tenant network allocation"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "10:100", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, # We need to ask for this only in case of ML2 plugins {"CMD_OPTION": "os-neutron-l2-agent", "PROMPT": ("Enter the name of the L2 agent to be used " "with Neutron"), "OPTION_LIST": ["linuxbridge", "openvswitch"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "openvswitch", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_NEUTRON_L2_AGENT", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "os-neutron-ml2-supported-pci-vendor-devs", "CONF_NAME": "CONFIG_NEUTRON_ML2_SUPPORTED_PCI_VENDOR_DEVS", "PROMPT": ("Enter a comma separated list of supported PCI " "vendor devices, defined by vendor_id:product_id " "according to the PCI ID Repository."), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": ['15b3:1004', '8086:10ca'], "MASK_INPUT": False, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "os-neutron-ml2-sriov-agent-required", "CONF_NAME": "CONFIG_NEUTRON_ML2_SRIOV_AGENT_REQUIRED", "PROMPT": ("Set to y if the sriov agent is required"), "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "n", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "os-neutron-ml2-sriov-interface-mappings", "PROMPT": ("Enter a comma separated list of interface mappings " "for the Neutron ML2 sriov agent"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NEUTRON_ML2_SRIOV_INTERFACE_MAPPINGS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], } update_params_usage(basedefs.PACKSTACK_DOC, conf_params) conf_groups = [ {"GROUP_NAME": "NEUTRON", "DESCRIPTION": "Neutron config", "PRE_CONDITION": "CONFIG_NEUTRON_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "NEUTRON_ML2_PLUGIN", "DESCRIPTION": "Neutron ML2 plugin config", "PRE_CONDITION": neutron_install, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "NEUTRON_LB_AGENT", "DESCRIPTION": "Neutron LB agent config", "PRE_CONDITION": use_ml2_with_linuxbridge, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "NEUTRON_OVS_AGENT", "DESCRIPTION": "Neutron OVS agent config", "PRE_CONDITION": use_ml2_with_ovs, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "NEUTRON_OVS_AGENT_TUNNEL", "DESCRIPTION": "Neutron OVS agent config for tunnels", "PRE_CONDITION": use_ml2_with_ovs, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "NEUTRON_OVS_AGENT_VXLAN", "DESCRIPTION": "Neutron OVS agent config for VXLAN", "PRE_CONDITION": use_openvswitch_vxlan, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, ] for group in conf_groups: params = conf_params[group["GROUP_NAME"]] controller.addGroup(group, params)
def initConfig(controller): params = [ {"CMD_OPTION": "os-swift-ks-passwd", "PROMPT": "Enter the password for the Swift Keystone access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_SWIFT_KS_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "os-swift-storages", "PROMPT": "Enter the Swift Storage devices e.g. /path/to/dev", "OPTION_LIST": [], "VALIDATORS": [validate_storage], "DEFAULT_VALUE": '', "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_SWIFT_STORAGES", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False, "DEPRECATES": ['CONFIG_SWIFT_STORAGE_HOSTS']}, {"CMD_OPTION": "os-swift-storage-zones", "PROMPT": ("Enter the number of swift storage zones, MUST be no " "bigger than the number of storage devices configured"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_integer], "DEFAULT_VALUE": "1", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_SWIFT_STORAGE_ZONES", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "os-swift-storage-replicas", "PROMPT": ("Enter the number of swift storage replicas, MUST be no " "bigger than the number of storage zones configured"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_integer], "DEFAULT_VALUE": "1", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_SWIFT_STORAGE_REPLICAS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "os-swift-storage-fstype", "PROMPT": "Enter FileSystem type for storage nodes", "OPTION_LIST": ['xfs', 'ext4'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "ext4", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_SWIFT_STORAGE_FSTYPE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "os-swift-hash", "PROMPT": "Enter hash for Swift shared secret", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": uuid.uuid4().hex[:16], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_SWIFT_HASH", "USE_DEFAULT": True, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "os-swift-storage-size", "PROMPT": ("Enter the size of the storage device (eg. 2G, 2000M, " "2000000K)"), "OPTION_LIST": [], "VALIDATORS": [validate_storage_size], "DEFAULT_VALUE": "2G", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_SWIFT_STORAGE_SIZE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ] update_params_usage(basedefs.PACKSTACK_DOC, params, sectioned=False) group = {"GROUP_NAME": "OSSWIFT", "DESCRIPTION": "OpenStack Swift Config parameters", "PRE_CONDITION": "CONFIG_SWIFT_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True} controller.addGroup(group, params)
def initConfig(controller): params = [ {"CMD_OPTION": "os-horizon-ssl", "PROMPT": "Would you like to set up Horizon communication over https", "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "n", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_HORIZON_SSL", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ] update_params_usage(basedefs.PACKSTACK_DOC, params, sectioned=False) group = {"GROUP_NAME": "OSHORIZON", "DESCRIPTION": "OpenStack Horizon Config parameters", "PRE_CONDITION": "CONFIG_HORIZON_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True} controller.addGroup(group, params) params = [ {"CMD_OPTION": "os-ssl-cert", "USAGE": ("PEM encoded certificate to be used for ssl on the https " "server, leave blank if one should be generated, this " "certificate should not require a passphrase"), "PROMPT": ("Enter the path to a PEM encoded certificate to be used " "on the https server, leave blank if one should be " "generated, this certificate should not require " "a passphrase"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": '', "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_SSL_CERT", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "os-ssl-key", "USAGE": ("SSL keyfile corresponding to the certificate if one was " "entered"), "PROMPT": ("Enter the SSL keyfile corresponding to the certificate " "if one was entered"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_SSL_KEY", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "os-ssl-cachain", "USAGE": ("PEM encoded CA certificates from which the certificate " "chain of the server certificate can be assembled."), "PROMPT": ("Enter the CA cahin file corresponding to the certificate " "if one was entered"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_SSL_CACHAIN", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ] update_params_usage(basedefs.PACKSTACK_DOC, params, sectioned=False) group = {"GROUP_NAME": "OSSSL", "DESCRIPTION": "SSL Config parameters", "PRE_CONDITION": "CONFIG_HORIZON_SSL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True} controller.addGroup(group, params)
def initConfig(controller): params = [ {"CMD_OPTION": "amqp-backend", "PROMPT": "Set the AMQP service backend", "OPTION_LIST": ["qpid", "rabbitmq"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "rabbitmq", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_AMQP_BACKEND", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False, "DEPRECATES": ['CONFIG_AMQP_SERVER']}, {"CMD_OPTION": "amqp-host", "PROMPT": "Enter the host for the AMQP service", "OPTION_LIST": [], "VALIDATORS": [validators.validate_ssh], "DEFAULT_VALUE": utils.get_localhost_ip(), "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_AMQP_HOST", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "amqp-enable-ssl", "PROMPT": "Enable SSL for the AMQP service?", "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "n", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_AMQP_ENABLE_SSL", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "amqp-enable-auth", "PROMPT": "Enable Authentication for the AMQP service?", "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "n", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_AMQP_ENABLE_AUTH", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ] update_params_usage(basedefs.PACKSTACK_DOC, params, sectioned=False) group = {"GROUP_NAME": "AMQP", "DESCRIPTION": "AMQP Config parameters", "PRE_CONDITION": False, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True} controller.addGroup(group, params) params = [ {"CMD_OPTION": "amqp-nss-certdb-pw", "PROMPT": "Enter the password for NSS certificate database", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_AMQP_NSS_CERTDB_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, ] update_params_usage(basedefs.PACKSTACK_DOC, params, sectioned=False) group = {"GROUP_NAME": "AMQPSSL", "DESCRIPTION": "AMQP Config SSL parameters", "PRE_CONDITION": "CONFIG_AMQP_ENABLE_SSL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True} controller.addGroup(group, params) params = [ {"CMD_OPTION": "amqp-auth-user", "PROMPT": "Enter the user for amqp authentication", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "amqp_user", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_AMQP_AUTH_USER", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "amqp-auth-password", "PROMPT": "Enter the password for user authentication", "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_not_empty], "PROCESSORS": [processors.process_password], "DEFAULT_VALUE": "PW_PLACEHOLDER", "MASK_INPUT": True, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_AMQP_AUTH_PASSWORD", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, ] update_params_usage(basedefs.PACKSTACK_DOC, params, sectioned=False) group = {"GROUP_NAME": "AMQPAUTH", "DESCRIPTION": "AMQP Config Athentication parameters", "PRE_CONDITION": "CONFIG_AMQP_ENABLE_AUTH", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True} controller.addGroup(group, params)
def initConfig(controller): ceilometer_params = { "CEILOMETER": [ {"CONF_NAME": "CONFIG_CEILOMETER_SECRET", "CMD_OPTION": "ceilometer-secret", "PROMPT": "Enter the Ceilometer secret key", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": uuid.uuid4().hex[:16], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "USE_DEFAULT": True, "NEED_CONFIRM": True, "CONDITION": False}, {"CONF_NAME": "CONFIG_CEILOMETER_KS_PW", "CMD_OPTION": "ceilometer-ks-passwd", "PROMPT": "Enter the password for the Ceilometer Keystone access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "ceilometer-service-name", "PROMPT": "Enter the Ceilometer service name.", "OPTION_LIST": ['ceilometer', 'httpd'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "httpd", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_CEILOMETER_SERVICE_NAME', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CONF_NAME": "CONFIG_CEILOMETER_COORDINATION_BACKEND", "CMD_OPTION": "ceilometer-coordination-backend", "PROMPT": "Enter the coordination driver", "OPTION_LIST": ['redis', 'none'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": 'redis', "MASK_INPUT": False, "USE_DEFAULT": True, "NEED_CONFIRM": False, "CONDITION": False}, {"CONF_NAME": "CONFIG_CEILOMETER_METERING_BACKEND", "CMD_OPTION": "ceilometer-metering-backend", "PROMPT": "Enter the metering backend to use", "OPTION_LIST": ['database', 'gnocchi'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": 'database', "MASK_INPUT": False, "USE_DEFAULT": True, "NEED_CONFIRM": False, "CONDITION": False}, ], "MONGODB": [ {"CMD_OPTION": "mongodb-host", "PROMPT": "Enter the host for the MongoDB server", "OPTION_LIST": [], "VALIDATORS": [validators.validate_ssh], "DEFAULT_VALUE": utils.get_localhost_ip(), "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_MONGODB_HOST", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "REDIS": [ {"CMD_OPTION": "redis-host", "PROMPT": "Enter the host for the Redis server", "OPTION_LIST": [], "VALIDATORS": [validators.validate_ssh], "DEFAULT_VALUE": utils.get_localhost_ip(), "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_REDIS_HOST", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False, "DEPRECATES": ["CONFIG_REDIS_MASTER_HOST"]}, {"CMD_OPTION": "redis-port", "PROMPT": "Enter the port of the redis server(s)", "OPTION_LIST": [], "VALIDATORS": [validators.validate_port], "DEFAULT_VALUE": 6379, "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_REDIS_PORT", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], } update_params_usage(basedefs.PACKSTACK_DOC, ceilometer_params) ceilometer_groups = [ {"GROUP_NAME": "CEILOMETER", "DESCRIPTION": "Ceilometer Config parameters", "PRE_CONDITION": "CONFIG_CEILOMETER_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "MONGODB", "DESCRIPTION": "MONGODB Config parameters", "PRE_CONDITION": "CONFIG_CEILOMETER_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "REDIS", "DESCRIPTION": "Redis Config parameters", "PRE_CONDITION": "CONFIG_CEILOMETER_COORDINATION_BACKEND", "PRE_CONDITION_MATCH": "redis", "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, ] for group in ceilometer_groups: paramList = ceilometer_params[group["GROUP_NAME"]] controller.addGroup(group, paramList)
def initConfig(controller): parameters = [ { "CMD_OPTION": "os-heat-mysql-password", "PROMPT": "Enter the password for the Heat DB user", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_HEAT_DB_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }, { "CMD_OPTION": "heat-auth-encryption-key", "PROMPT": ("Enter the authentication key for Heat to use for " "authenticate info in database (16, 24, or 32 chars)"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": uuid.uuid4().hex[:16], "PROCESSORS": [processors.process_string_nofloat], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_HEAT_AUTH_ENC_KEY", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }, { "CMD_OPTION": "os-heat-ks-passwd", "PROMPT": "Enter the password for the Heat Keystone access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_HEAT_KS_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }, { "CMD_OPTION": "os-heat-cfn-install", "PROMPT": "Should Packstack install Heat CloudFormation API", "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "y", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_HEAT_CFN_INSTALL", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "os-heat-domain", "PROMPT": "Enter name of Keystone domain for Heat", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "heat", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_HEAT_DOMAIN", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "os-heat-domain-admin", "PROMPT": "Enter name of Keystone domain admin user for Heat", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "heat_admin", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_HEAT_DOMAIN_ADMIN", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "os-heat-domain-password", "PROMPT": "Enter password for Keystone domain admin user for Heat", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_HEAT_DOMAIN_PASSWORD", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }, ] update_params_usage(basedefs.PACKSTACK_DOC, parameters, sectioned=False) group = { "GROUP_NAME": "Heat", "DESCRIPTION": "Heat Config parameters", "PRE_CONDITION": "CONFIG_HEAT_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True } controller.addGroup(group, parameters)
def initConfig(controller): if platform.linux_distribution()[0] == "Fedora": primary_netif = "em1" secondary_netif = "em2" else: primary_netif = "eth0" secondary_netif = "eth1" nova_params = { "NOVA": [ {"CMD_OPTION": "nova-db-passwd", "PROMPT": "Enter the password for the Nova DB access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_NOVA_DB_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "nova-ks-passwd", "PROMPT": "Enter the password for the Nova Keystone access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_NOVA_KS_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "novasched-cpu-allocation-ratio", "PROMPT": "Enter the CPU overcommitment ratio. Set to 1.0 to " "disable CPU overcommitment", "OPTION_LIST": [], "VALIDATORS": [validators.validate_float], "DEFAULT_VALUE": 16.0, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_SCHED_CPU_ALLOC_RATIO", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "novasched-ram-allocation-ratio", "PROMPT": ("Enter the RAM overcommitment ratio. Set to 1.0 to " "disable RAM overcommitment"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_float], "DEFAULT_VALUE": 1.5, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_SCHED_RAM_ALLOC_RATIO", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "novacompute-migrate-protocol", "PROMPT": ("Enter protocol which will be used for instance " "migration"), "OPTION_LIST": ['tcp', 'ssh'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": 'tcp', "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_COMPUTE_MIGRATE_PROTOCOL", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "nova-compute-manager", "PROMPT": ("Enter the compute manager for nova " "migration"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "nova.compute.manager.ComputeManager", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_COMPUTE_MANAGER", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "NOVA_NETWORK": [ {"CMD_OPTION": "novacompute-privif", "PROMPT": ("Enter the Private interface for Flat DHCP on the Nova" " compute servers"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": secondary_netif, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_COMPUTE_PRIVIF", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "novanetwork-manager", "PROMPT": "Enter the Nova network manager", "OPTION_LIST": [r'^nova\.network\.manager\.\w+Manager$'], "VALIDATORS": [validators.validate_regexp], "DEFAULT_VALUE": "nova.network.manager.FlatDHCPManager", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_NETWORK_MANAGER", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "novanetwork-pubif", "PROMPT": "Enter the Public interface on the Nova network server", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": primary_netif, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_NETWORK_PUBIF", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "novanetwork-privif", "PROMPT": ("Enter the Private interface for network manager on " "the Nova network server"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": secondary_netif, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_NETWORK_PRIVIF", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "novanetwork-fixed-range", "PROMPT": "Enter the IP Range for network manager", "OPTION_LIST": ["^[\:\.\da-fA-f]+(\/\d+){0,1}$"], "PROCESSORS": [processors.process_cidr], "VALIDATORS": [validators.validate_regexp], "DEFAULT_VALUE": "192.168.32.0/22", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_NETWORK_FIXEDRANGE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "novanetwork-floating-range", "PROMPT": "Enter the IP Range for Floating IP's", "OPTION_LIST": ["^[\:\.\da-fA-f]+(\/\d+){0,1}$"], "PROCESSORS": [processors.process_cidr], "VALIDATORS": [validators.validate_regexp], "DEFAULT_VALUE": "10.3.4.0/22", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_NETWORK_FLOATRANGE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "novanetwork-auto-assign-floating-ip", "PROMPT": ("Should new instances automatically have a floating " "IP assigned?"), "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "n", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_NOVA_NETWORK_AUTOASSIGNFLOATINGIP", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "NOVA_NETWORK_VLAN": [ {"CMD_OPTION": "novanetwork-vlan-start", "PROMPT": "Enter first VLAN for private networks", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": 100, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_NETWORK_VLAN_START", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "novanetwork-num-networks", "PROMPT": "How many networks should be supported", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": 1, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_NETWORK_NUMBER", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "novanetwork-network-size", "PROMPT": "How many addresses should be in each private subnet", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": 255, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_NETWORK_SIZE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], } update_params_usage(basedefs.PACKSTACK_DOC, nova_params) def use_nova_network(config): return (config['CONFIG_NOVA_INSTALL'] == 'y' and config['CONFIG_NEUTRON_INSTALL'] != 'y') def use_nova_network_vlan(config): manager = 'nova.network.manager.VlanManager' return (config['CONFIG_NOVA_INSTALL'] == 'y' and config['CONFIG_NEUTRON_INSTALL'] != 'y' and config['CONFIG_NOVA_NETWORK_MANAGER'] == manager) nova_groups = [ {"GROUP_NAME": "NOVA", "DESCRIPTION": "Nova Options", "PRE_CONDITION": "CONFIG_NOVA_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "NOVA_NETWORK", "DESCRIPTION": "Nova Network Options", "PRE_CONDITION": use_nova_network, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "NOVA_NETWORK_VLAN", "DESCRIPTION": "Nova Network VLAN Options", "PRE_CONDITION": use_nova_network_vlan, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, ] for group in nova_groups: params = nova_params[group["GROUP_NAME"]] controller.addGroup(group, params)
def initConfig(controller): params = [ { "CMD_OPTION": "os-horizon-ssl", "PROMPT": "Would you like to set up Horizon communication over https", "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "n", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_HORIZON_SSL", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "os-horizon-secretkey", "PROMPT": "Horizon Secret Encryption Key", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": uuid.uuid4().hex, "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_HORIZON_SECRET_KEY", "USE_DEFAULT": True, "NEED_CONFIRM": False, "CONDITION": False }, ] update_params_usage(basedefs.PACKSTACK_DOC, params, sectioned=False) group = { "GROUP_NAME": "OSHORIZON", "DESCRIPTION": "OpenStack Horizon Config parameters", "PRE_CONDITION": "CONFIG_HORIZON_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True } controller.addGroup(group, params) params = [ { "CMD_OPTION": "os-ssl-cert", "PROMPT": ("Enter the path to a PEM encoded certificate to be used " "on the https server, leave blank if one should be " "generated, this certificate should not require " "a passphrase"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": '', "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_HORIZON_SSL_CERT", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False, "DEPRECATES": ['CONFIG_SSL_CERT'] }, { "CMD_OPTION": "os-ssl-key", "PROMPT": ("Enter the SSL keyfile corresponding to the certificate " "if one was entered"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_HORIZON_SSL_KEY", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False, "DEPRECATES": ['CONFIG_SSL_KEY'] }, { "CMD_OPTION": "os-ssl-cachain", "PROMPT": ("Enter the CA chain file corresponding to the certificate " "if one was entered"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_HORIZON_SSL_CACERT", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False, "DEPRECATES": ['CONFIG_SSL_CACHAIN'] }, ] update_params_usage(basedefs.PACKSTACK_DOC, params, sectioned=False) group = { "GROUP_NAME": "OSSSL", "DESCRIPTION": "SSL Config parameters", "PRE_CONDITION": "CONFIG_HORIZON_SSL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True } controller.addGroup(group, params)
def initConfig(controller): conf_params = { "CINDER": [ {"CMD_OPTION": "cinder-db-passwd", "PROMPT": "Enter the password for the Cinder DB access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_CINDER_DB_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": 'cinder-db-purge-enable', "PROMPT": ( "Enter y if cron job for removing soft deleted DB rows " "should be created" ), "OPTION_LIST": ['y', 'n'], "VALIDATORS": [validators.validate_not_empty], "PROCESSORS": [processors.process_bool], "DEFAULT_VALUE": 'y', "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_CINDER_DB_PURGE_ENABLE', "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "cinder-ks-passwd", "PROMPT": "Enter the password for the Cinder Keystone access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_CINDER_KS_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "cinder-backend", "PROMPT": "Enter the Cinder backend to be configured", "OPTION_LIST": ["lvm", "nfs", "vmdk", "netapp", "solidfire"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "lvm", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_CINDER_BACKEND", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "CINDERVOLUMECREATE": [ {"CMD_OPTION": "cinder-volumes-create", "PROMPT": ("Should Cinder's volumes group be created (for " "proof-of-concept installation)?"), "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "y", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_CINDER_VOLUMES_CREATE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "CINDERVOLUMESIZE": [ {"CMD_OPTION": "cinder-volumes-size", "PROMPT": "Enter Cinder's volumes group usable size", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "20G", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_CINDER_VOLUMES_SIZE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "CINDERVOLUMENAME": [ {"CMD_OPTION": "cinder-volume-name", "PROMPT": "Enter a name for the Cinder volume", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "cinder-volumes", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_CINDER_VOLUME_NAME", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "CINDERNFSMOUNTS": [ {"CMD_OPTION": "cinder-nfs-mounts", "PROMPT": ("Enter a single or comma seprated list of NFS exports " "to use with Cinder"), "OPTION_LIST": [""], "VALIDATORS": [validators.validate_multi_export], "PROCESSORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_CINDER_NFS_MOUNTS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "CINDERNETAPPMAIN": [ {"CMD_OPTION": "cinder-netapp-login", "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", "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", "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", "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", "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", "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", "PROMPT": ("Enter a NetApp storage protocol"), "OPTION_LIST": ["iscsi", "fc", "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}, ], "CINDERNETAPPONTAPISCSI": [ {"CMD_OPTION": "cinder-netapp-size-multiplier", "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}, ], "CINDERNETAPPNFS": [ {"CMD_OPTION": "cinder-netapp-expiry-thres-minutes", "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", "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", "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", "PROMPT": ("Enter a single or comma-separated list of NetApp NFS shares"), "OPTION_LIST": [""], "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", "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, "CONDITION": False}, ], "CINDERNETAPPISCSI7MODE": [ {"CMD_OPTION": "cinder-netapp-volume-list", "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", "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}, ], "CINDERNETAPP7MODEFC": [ {"CMD_OPTION": "cinder-netapp-partner-backend-name", "PROMPT": ("Enter a NetApp partner backend name"), "OPTION_LIST": [""], "VALIDATORS": [validators.validate_not_empty], "PROCESSORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_CINDER_NETAPP_PARTNER_BACKEND_NAME", "USE_DEFAULT": True, "NEED_CONFIRM": False, "CONDITION": False}, ], "CINDERNETAPPVSERVER": [ {"CMD_OPTION": "cinder-netapp-vserver", "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}, ], "CINDERNETAPPESERIES": [ {"CMD_OPTION": "cinder-netapp-controller-ips", "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", "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-eseries-host-type", "PROMPT": ("Enter a host type"), "OPTION_LIST": [""], "VALIDATORS": [validators.validate_not_empty], "PROCESSORS": [], "DEFAULT_VALUE": "linux_dm_mp", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_CINDER_NETAPP_ESERIES_HOST_TYPE", "USE_DEFAULT": True, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "cinder-netapp-webservice-path", "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", "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}, ], "CINDERSOLIDFIRE": [ {"CMD_OPTION": "cinder-solidfire-login", "PROMPT": ("Enter the cluster admin login"), "OPTION_LIST": [""], "VALIDATORS": [validators.validate_not_empty], "PROCESSORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_CINDER_SOLIDFIRE_LOGIN", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "cinder-solidfire-password", "PROMPT": ("Enter cluster admin password"), "OPTION_LIST": [""], "VALIDATORS": [validators.validate_not_empty], "PROCESSORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_CINDER_SOLIDFIRE_PASSWORD", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "cinder-solidfire-hostname", "PROMPT": ("Enter a SolidFire hostname or IP"), "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_SOLIDFIRE_HOSTNAME", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ] } update_params_usage(basedefs.PACKSTACK_DOC, conf_params) conf_groups = [ {"GROUP_NAME": "CINDER", "DESCRIPTION": "Cinder Config parameters", "PRE_CONDITION": "CONFIG_CINDER_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "CINDERVOLUMECREATE", "DESCRIPTION": "Cinder volume create Config parameters", "PRE_CONDITION": check_lvm_options, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "CINDERVOLUMENAME", "DESCRIPTION": "Cinder volume custom name", "PRE_CONDITION": check_lvm_options, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "CINDERVOLUMESIZE", "DESCRIPTION": "Cinder volume size Config parameters", "PRE_CONDITION": check_lvm_vg_options, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "CINDERNFSMOUNTS", "DESCRIPTION": "Cinder NFS Config parameters", "PRE_CONDITION": check_nfs_options, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "CINDERNETAPPMAIN", "DESCRIPTION": "Cinder NetApp main configuration", "PRE_CONDITION": check_netapp_options, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"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}, {"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}, {"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}, {"GROUP_NAME": "CINDERNETAPP7MODEFC", "DESCRIPTION": "Cinder NetApp 7-mode Fibre Channel configuration", "PRE_CONDITION": check_netapp_7mode_fc_options, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"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}, {"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}, {"GROUP_NAME": "CINDERSOLIDFIRE", "DESCRIPTION": "Cinder SolidFire configuration", "PRE_CONDITION": check_solidfire_options, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True} ] for group in conf_groups: params = conf_params[group["GROUP_NAME"]] controller.addGroup(group, params)
def initConfig(controller): conf_params = { "MANILA": [ {"CMD_OPTION": "manila-db-passwd", "PROMPT": "Enter the password for the Manila DB access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_DB_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "manila-ks-passwd", "PROMPT": "Enter the password for the Manila Keystone access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_KS_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "manila-backend", "PROMPT": "Enter the Manila backend to be configured", "OPTION_LIST": ["generic", "netapp", "glusternative", "glusternfs"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "generic", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_BACKEND", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "MANILANETAPP": [ {"CMD_OPTION": "manila-netapp-driver-handles-share-servers", "PROMPT": ("Enter whether the driver handles share servers"), "OPTION_LIST": ["true", "false"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "false", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_NETAPP_DRV_HANDLES_SHARE_SERVERS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "manila-netapp-transport-type", "PROMPT": ("Enter a NetApp transport type"), "OPTION_LIST": ["http", "https"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "https", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_NETAPP_TRANSPORT_TYPE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "manila-netapp-login", "PROMPT": ("Enter a NetApp login"), "OPTION_LIST": [""], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "admin", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_NETAPP_LOGIN", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "manila-netapp-password", "PROMPT": ("Enter a NetApp password"), "OPTION_LIST": [""], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "", "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_NETAPP_PASSWORD", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "manila-netapp-server-hostname", "PROMPT": ("Enter a NetApp hostname"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "PROCESSORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_NETAPP_SERVER_HOSTNAME", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "manila-netapp-storage-family", "PROMPT": ("Enter a NetApp storage family"), "OPTION_LIST": ['ontap_cluster'], "VALIDATORS": [validators.validate_options], "PROCESSORS": [], "DEFAULT_VALUE": "ontap_cluster", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_NETAPP_STORAGE_FAMILY", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "manila-netapp-server-port", "PROMPT": ("Enter a NetApp server port"), "OPTION_LIST": [], "VALIDATORS": [], "PROCESSORS": [], "DEFAULT_VALUE": "443", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_NETAPP_SERVER_PORT", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "manila-netapp-aggregate-name-search-pattern", "PROMPT": ("Enter a NetApp aggregate name search pattern"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "(.*)", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_NETAPP_AGGREGATE_NAME_SEARCH_PATTERN", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "MANILANETAPPMULTISVM": [ {"CMD_OPTION": "manila-netapp-root-volume-aggregate", "PROMPT": ("Enter a NetApp root volume aggregate"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_NETAPP_ROOT_VOLUME_AGGREGATE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "manila-netapp-root-volume-name", "PROMPT": ("Enter a NetApp root volume name."), "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "root", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_NETAPP_ROOT_VOLUME_NAME", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "MANILANETAPPSINGLESVM": [ {"CMD_OPTION": "manila-netapp-vserver", "PROMPT": ("Enter a NetApp Vserver"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "PROCESSORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_NETAPP_VSERVER", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "MANILAGENERIC": [ {"CMD_OPTION": "manila-generic-driver-handles-share-servers", "USAGE": ("Denotes whether the driver should handle the " "responsibility of managing share servers. This must be " "set to false if the driver is to operate without " "managing share servers."), "PROMPT": ("Enter whether the driver handles share servers"), "OPTION_LIST": ["true", "false"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "true", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_GENERIC_DRV_HANDLES_SHARE_SERVERS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "manila-generic-volume-name-template", "PROMPT": ("Enter a volume name template"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "manila-share-%s", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_GENERIC_VOLUME_NAME_TEMPLATE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "manila-generic-share-mount-path", "PROMPT": ("Enter a share mount path"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "/shares", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_GENERIC_SHARE_MOUNT_PATH", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "manila-service-image-location", "PROMPT": ("Enter a service image location"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": 'https://www.dropbox.com/s/vi5oeh10q1qkckh/' 'ubuntu_1204_nfs_cifs.qcow2', "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_SERVICE_IMAGE_LOCATION", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "manila-service-instance-user", "PROMPT": ("Enter a service instance user"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": 'ubuntu', "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_SERVICE_INSTANCE_USER", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "manila-service-instance-password", "PROMPT": ("Enter a service instance password"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": 'ubuntu', "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_SERVICE_INSTANCE_PASSWORD", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "MANILANETWORK": [ {"CMD_OPTION": "manila-network-type", "PROMPT": ("Enter a network type"), "OPTION_LIST": ['neutron', 'nova-network', 'standalone'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "neutron", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_NETWORK_TYPE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "MANILANETWORKSTANDALONE": [ {"CMD_OPTION": "standalone_network_plugin_gateway", "PROMPT": ("Enter a plugin gateway"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_NETWORK_STANDALONE_GATEWAY", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "standalone_network_plugin_mask", "PROMPT": ("Enter a network mask"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_NETWORK_STANDALONE_NETMASK", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "standalone_network_plugin_segmentation_id", "PROMPT": ("Enter a segmentation ID"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_NETWORK_STANDALONE_SEG_ID", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "standalone_network_plugin_ip_range", "PROMPT": ("Enter a network mask"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_NETWORK_STANDALONE_IP_RANGE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "standalone_network_plugin_ip_version", "PROMPT": ("Enter an IP version"), "OPTION_LIST": ['4', '6'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "4", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_NETWORK_STANDALONE_IP_VERSION", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "MANILAGLUSTERNATIVE": [ {"CMD_OPTION": "glusterfs-servers", "PROMPT": ("Enter GlusterFS servers"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_GLUSTERFS_SERVERS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "glusterfs-native-path-to-private_key", "PROMPT": ("Enter path to the GlusterFS private key"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_GLUSTERFS_NATIVE_PATH_TO_PRIVATE_KEY", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "glusterfs-volume-pattern", "PROMPT": ("Enter volume pattern for GlusterFS"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_GLUSTERFS_VOLUME_PATTERN", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "MANILAGLUSTERNFS": [ {"CMD_OPTION": "glusterfs-target", "PROMPT": ("Enter GlusterFS target"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_GLUSTERFS_TARGET", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "glusterfs-mount-point-base", "PROMPT": ("Enter a mount point for GlusterFS mount"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_GLUSTERFS_MOUNT_POINT_BASE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "glusterfs-nfs-server-type", "PROMPT": ("Enter NFS server type (gluster/ganesha)"), "OPTION_LIST": ['gluster', 'ganesha'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "gluster", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_GLUSTERFS_NFS_SERVER_TYPE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "glusterfs-path-to-private-key", "PROMPT": ("Enter path to GlusterFS server private key"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_GLUSTERFS_PATH_TO_PRIVATE_KEY", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "glusterfs-ganesha-server-ip", "PROMPT": ("Enter ip address of GlusterFS ganesha server"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_MANILA_GLUSTERFS_GANESHA_SERVER_IP", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], } update_params_usage(basedefs.PACKSTACK_DOC, conf_params) conf_groups = [ {"GROUP_NAME": "MANILA", "DESCRIPTION": "Manila Config parameters", "PRE_CONDITION": "CONFIG_MANILA_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "MANILANETAPP", "DESCRIPTION": "Manila NetApp configuration", "PRE_CONDITION": check_netapp_options, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "MANILANETAPPMULTISVM", "DESCRIPTION": "Manila NetApp multi-SVM configuration", "PRE_CONDITION": check_netapp_options_multi_svm, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "MANILANETAPPSINGLESVM", "DESCRIPTION": "Manila NetApp single-SVM configuration", "PRE_CONDITION": check_netapp_options_single_svm, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "MANILAGENERIC", "DESCRIPTION": "Manila generic driver configuration", "PRE_CONDITION": check_generic_options, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "MANILANETWORK", "DESCRIPTION": "Manila general network configuration", "PRE_CONDITION": "CONFIG_MANILA_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "MANILANETWORKSTANDALONE", "DESCRIPTION": "Manila standalone network configuration", "PRE_CONDITION": check_network_standalone_options, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "MANILAGLUSTERNATIVE", "DESCRIPTION": "Manila GlusterFS native configuration", "PRE_CONDITION": check_glusternative_options, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "MANILAGLUSTERNFS", "DESCRIPTION": "Manila GlusterNFS configuration", "PRE_CONDITION": check_glusternfs_options, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, ] for group in conf_groups: params = conf_params[group["GROUP_NAME"]] controller.addGroup(group, params)
def initConfig(controller): keystone_params = { "KEYSTONE": [ # base keystone options {"CMD_OPTION": "keystone-db-passwd", "PROMPT": "Enter the password for the Keystone DB access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "PROCESSORS": [processors.process_password], "DEFAULT_VALUE": "PW_PLACEHOLDER", "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_KEYSTONE_DB_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "keystone-region", "PROMPT": "Region name", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "RegionOne", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_KEYSTONE_REGION", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-admin-token", "PROMPT": "The token to use for the Keystone service api", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": uuid.uuid4().hex, "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_KEYSTONE_ADMIN_TOKEN", "USE_DEFAULT": True, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-admin-email", "PROMPT": "Enter the email address for the Keystone admin user", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "root@localhost", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_KEYSTONE_ADMIN_EMAIL", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-admin-username", "PROMPT": "Enter the username for the Keystone admin user", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "admin", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_KEYSTONE_ADMIN_USERNAME", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-admin-passwd", "PROMPT": "Enter the password for the Keystone admin user", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_KEYSTONE_ADMIN_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "keystone-demo-passwd", "PROMPT": "Enter the password for the Keystone demo user", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_KEYSTONE_DEMO_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "keystone-api-version", "PROMPT": "Enter the Keystone API version string.", "OPTION_LIST": ['v2.0', 'v3'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": 'v2.0', "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_API_VERSION', "USE_DEFAULT": True, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-token-format", "PROMPT": "Enter the Keystone token format.", "OPTION_LIST": ['UUID', 'PKI'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": 'UUID', "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_TOKEN_FORMAT', "USE_DEFAULT": True, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-service-name", "PROMPT": "Enter the Keystone service name.", "OPTION_LIST": ['keystone', 'httpd'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "httpd", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_SERVICE_NAME', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-identity-backend", "PROMPT": "Enter the Keystone identity backend type.", "OPTION_LIST": ['sql', 'ldap'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "sql", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_IDENTITY_BACKEND', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False} ], "KEYSTONE_LDAP": [ # keystone ldap identity backend options {"CMD_OPTION": "keystone-ldap-url", "PROMPT": "Enter the Keystone LDAP backend URL.", "OPTION_LIST": [], "VALIDATORS": [validators.validate_ldap_url], "DEFAULT_VALUE": host_to_ldap_url(utils.get_localhost_ip()), "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_URL', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-user-dn", "PROMPT": "Enter the Keystone LDAP user DN.", "OPTION_LIST": [], "VALIDATORS": [validators.validate_ldap_dn], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_DN', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-user-password", "PROMPT": "Enter the Keystone LDAP user password.", "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_PASSWORD', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-suffix", "PROMPT": "Enter the Keystone LDAP suffix.", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty, validators.validate_ldap_dn], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_SUFFIX', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-query-scope", "PROMPT": "Enter the Keystone LDAP query scope.", "OPTION_LIST": ['base', 'one', 'sub'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "one", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_QUERY_SCOPE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-page-size", "PROMPT": "Enter the Keystone LDAP query page size.", "OPTION_LIST": [], "VALIDATORS": [validators.validate_integer], "DEFAULT_VALUE": "-1", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_PAGE_SIZE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-user-subtree", "PROMPT": "Enter the Keystone LDAP user subtree.", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty, validators.validate_ldap_dn], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_SUBTREE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-user-filter", "PROMPT": "Enter the Keystone LDAP user query filter.", "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_FILTER', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-user-objectclass", "PROMPT": "Enter the Keystone LDAP user objectclass.", "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_OBJECTCLASS', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-user-id-attribute", "PROMPT": "Enter the Keystone LDAP user ID attribute.", "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_ID_ATTRIBUTE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-user-name-attribute", "PROMPT": "Enter the Keystone LDAP user name attribute.", "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_NAME_ATTRIBUTE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-user-mail-attribute", "PROMPT": "Enter the Keystone LDAP user email address attribute.", "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_MAIL_ATTRIBUTE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-user-enabled-attribute", "PROMPT": "Enter the Keystone LDAP user enabled attribute.", "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_ENABLED_ATTRIBUTE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-user-enabled-mask", "PROMPT": "Enter the Keystone LDAP user enabled mask.", "OPTION_LIST": [], "VALIDATORS": [validators.validate_integer], "DEFAULT_VALUE": "-1", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_ENABLED_MASK', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-user-enabled-default", "PROMPT": "Enter the Keystone LDAP user enabled default.", "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "TRUE", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_ENABLED_DEFAULT', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-user-enabled-invert", "PROMPT": "Enter the Keystone LDAP user enabled invert (n or y).", "OPTION_LIST": ['n', 'y'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": 'n', "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_ENABLED_INVERT', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-user-attribute-ignore", "PROMPT": ( "Enter the comma separated Keystone LDAP user " "attributes to ignore." ), "OPTION_LIST": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_ATTRIBUTE_IGNORE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-user-default-project-id-attribute", "PROMPT": ( "Enter the Keystone LDAP user default_project_id attribute." ), "OPTION_LIST": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_DEFAULT_PROJECT_ID_ATTRIBUTE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-user-allow-create", "PROMPT": ( "Do you want to allow user create through Keystone (n or y)." ), "OPTION_LIST": ['n', 'y'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": 'n', "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_ALLOW_CREATE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-user-allow-update", "PROMPT": ( "Do you want to allow user update through Keystone (n or y)." ), "OPTION_LIST": ['n', 'y'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": 'n', "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_ALLOW_UPDATE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-user-allow-delete", "PROMPT": ( "Do you want to allow user delete through Keystone (n or y)." ), "OPTION_LIST": ['n', 'y'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": 'n', "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_ALLOW_DELETE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-user-pass-attribute", "PROMPT": "Enter the Keystone LDAP user password attribute.", "OPTION_LIST": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_PASS_ATTRIBUTE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-user-enabled-emulation-dn", "PROMPT": "Enter the Keystone LDAP enabled emulation DN.", "OPTION_LIST": [], "VALIDATORS": [validators.validate_ldap_dn], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_ENABLED_EMULATION_DN', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-user-additional-attribute-mapping", "PROMPT": ( "Enter the comma separated Keystone LDAP user additional " "attribute mappings in the form " "ldap_attr:user_attr[,ldap_attr:user_attr]...." ), "OPTION_LIST": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_ADDITIONAL_ATTRIBUTE_MAPPING', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-group-subtree", "PROMPT": "Enter the Keystone LDAP group subtree.", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty, validators.validate_ldap_dn], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_GROUP_SUBTREE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-group-filter", "PROMPT": "Enter the Keystone LDAP group query filter.", "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_GROUP_FILTER', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-group-objectclass", "PROMPT": "Enter the Keystone LDAP group objectclass.", "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_GROUP_OBJECTCLASS', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-group-id-attribute", "PROMPT": "Enter the Keystone LDAP group ID attribute.", "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_GROUP_ID_ATTRIBUTE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-group-name-attribute", "PROMPT": "Enter the Keystone LDAP group name attribute.", "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_GROUP_NAME_ATTRIBUTE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-group-member-attribute", "PROMPT": "Enter the Keystone LDAP group member attribute.", "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_GROUP_MEMBER_ATTRIBUTE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-group-desc-attribute", "PROMPT": "Enter the Keystone LDAP group description attribute.", "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_GROUP_DESC_ATTRIBUTE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-group-attribute-ignore", "PROMPT": ( "Enter the comma separated Keystone LDAP group " "attributes to ignore." ), "OPTION_LIST": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_GROUP_ATTRIBUTE_IGNORE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-group-allow-create", "PROMPT": ( "Do you want to allow group create through Keystone (n or y)." ), "OPTION_LIST": ['n', 'y'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": 'n', "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_GROUP_ALLOW_CREATE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-group-allow-update", "PROMPT": ( "Do you want to allow group update through Keystone (n or y)." ), "OPTION_LIST": ['n', 'y'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": 'n', "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_GROUP_ALLOW_UPDATE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-group-allow-delete", "PROMPT": ( "Do you want to allow group delete through Keystone (n or y)." ), "OPTION_LIST": ['n', 'y'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": 'n', "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_GROUP_ALLOW_DELETE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-group-additional-attribute-mapping", "PROMPT": ( "Enter the comma separated Keystone LDAP group additional " "attribute mappings in the form " "ldap_attr:group_attr[,ldap_attr:group_attr]...." ), "OPTION_LIST": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_GROUP_ADDITIONAL_ATTRIBUTE_MAPPING', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-use-tls", "PROMPT": ( "Enable TLS for Keystone communicating with " "LDAP servers (n or y)." ), "OPTION_LIST": ['n', 'y'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": 'n', "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USE_TLS', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-tls-cacertdir", "PROMPT": "CA Certificate directory for Keystone LDAP.", "OPTION_LIST": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_TLS_CACERTDIR', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-tls-cacertfile", "PROMPT": "CA Certificate file for Keystone LDAP.", "OPTION_LIST": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_TLS_CACERTFILE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "keystone-ldap-tls-req-cert", "PROMPT": ( "Keystone LDAP certificate checking strictness " "(never, allow, demand)" ), "OPTION_LIST": ["never", "allow", "demand"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "demand", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_TLS_REQ_CERT', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False} ] } update_params_usage(basedefs.PACKSTACK_DOC, keystone_params) keystone_groups = [ {"GROUP_NAME": "KEYSTONE", "DESCRIPTION": "Keystone Config parameters", "PRE_CONDITION": lambda x: 'yes', "PRE_CONDITION_MATCH": "yes", "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "KEYSTONE_LDAP", "DESCRIPTION": "Keystone LDAP Identity Backend Config parameters", "PRE_CONDITION": 'CONFIG_KEYSTONE_IDENTITY_BACKEND', "PRE_CONDITION_MATCH": "ldap", "POST_CONDITION": False, "POST_CONDITION_MATCH": True} ] for group in keystone_groups: params = keystone_params[group["GROUP_NAME"]] controller.addGroup(group, params)
def initConfig(controller): parameters = [ {"CONF_NAME": "CONFIG_TROVE_DB_PW", "CMD_OPTION": "trove-db-passwd", "PROMPT": "Enter the password to use for Trove to access the DB", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CONF_NAME": "CONFIG_TROVE_KS_PW", "CMD_OPTION": "trove-ks-passwd", "PROMPT": "Enter the password for Trove Keystone access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CONF_NAME": "CONFIG_TROVE_NOVA_USER", "CMD_OPTION": "trove-nova-user", "PROMPT": "Enter the user for Trove to use to connect to Nova", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "admin", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "USE_DEFAULT": True, "NEED_CONFIRM": True, "CONDITION": False}, {"CONF_NAME": "CONFIG_TROVE_NOVA_TENANT", "CMD_OPTION": "trove-nova-tenant", "PROMPT": "Enter the tenant for Trove to use to connect to Nova", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "services", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "USE_DEFAULT": True, "NEED_CONFIRM": True, "CONDITION": False}, {"CONF_NAME": "CONFIG_TROVE_NOVA_PW", "CMD_OPTION": "trove-nova-passwd", "PROMPT": "Enter the password for Trove to use to connect to Nova", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", # default is admin pass "PROCESSORS": [process_trove_nova_pw], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, ] update_params_usage(basedefs.PACKSTACK_DOC, parameters, sectioned=False) group = {"GROUP_NAME": "Trove", "DESCRIPTION": "Trove config parameters", "PRE_CONDITION": "CONFIG_TROVE_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True} controller.addGroup(group, parameters)
def initConfig(controller): parameters = [ {"CMD_OPTION": "os-heat-mysql-password", "PROMPT": "Enter the password for the Heat DB user", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_HEAT_DB_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "heat-auth-encryption-key", "PROMPT": ("Enter the authentication key for Heat to use for " "authenticate info in database (16, 24, or 32 chars)"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": uuid.uuid4().hex[:16], "PROCESSORS": [processors.process_string_nofloat], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_HEAT_AUTH_ENC_KEY", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "os-heat-ks-passwd", "PROMPT": "Enter the password for the Heat Keystone access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_HEAT_KS_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "os-heat-cloudwatch-install", "PROMPT": "Should Packstack install Heat CloudWatch API", "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "n", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_HEAT_CLOUDWATCH_INSTALL", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "os-heat-cfn-install", "PROMPT": "Should Packstack install Heat CloudFormation API", "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "y", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_HEAT_CFN_INSTALL", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "os-heat-domain", "PROMPT": "Enter name of Keystone domain for Heat", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "heat", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_HEAT_DOMAIN", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "os-heat-domain-admin", "PROMPT": "Enter name of Keystone domain admin user for Heat", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "heat_admin", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_HEAT_DOMAIN_ADMIN", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "os-heat-domain-password", "PROMPT": "Enter password for Keystone domain admin user for Heat", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_HEAT_DOMAIN_PASSWORD", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, ] update_params_usage(basedefs.PACKSTACK_DOC, parameters, sectioned=False) group = {"GROUP_NAME": "Heat", "DESCRIPTION": "Heat Config parameters", "PRE_CONDITION": "CONFIG_HEAT_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True} controller.addGroup(group, parameters)
def initConfig(controller): conf_params = { "NEUTRON": [ { "CMD_OPTION": "os-neutron-ks-password", "PROMPT": "Enter the password for Neutron Keystone access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_NEUTRON_KS_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }, { "CMD_OPTION": "os-neutron-db-password", "PROMPT": "Enter the password for Neutron DB access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_NEUTRON_DB_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }, { "CMD_OPTION": "os-neutron-l3-ext-bridge", "PROMPT": ("Enter the ovs bridge the Neutron L3 agent will use " "for external traffic, or 'provider' if using " "provider networks."), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "br-ex", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NEUTRON_L3_EXT_BRIDGE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "os-neutron-metadata-pw", "PROMPT": "Enter Neutron metadata agent password", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_NEUTRON_METADATA_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }, { "CMD_OPTION": "os-neutron-lbaas-install", "PROMPT": "Should Packstack install Neutron LBaaS", "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "n", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_LBAAS_INSTALL", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "os-neutron-metering-agent-install", "PROMPT": ("Should Packstack install Neutron L3 Metering agent"), "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "y", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_NEUTRON_METERING_AGENT_INSTALL", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "neutron-fwaas", "PROMPT": "Would you like to configure neutron FWaaS?", "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "n", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NEUTRON_FWAAS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "os-neutron-vpnaas-install", "PROMPT": "Would you like to configure neutron VPNaaS?", "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "n", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NEUTRON_VPNAAS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, ], "NEUTRON_LB_AGENT": [ { "CMD_OPTION": "os-neutron-lb-interface-mappings", "PROMPT": ("Enter a comma separated list of interface mappings " "for the Neutron linuxbridge plugin"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NEUTRON_LB_INTERFACE_MAPPINGS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, ], "NEUTRON_OVS_AGENT": [ { "CMD_OPTION": "os-neutron-ovs-bridge-mappings", "PROMPT": ("Enter a comma separated list of bridge mappings for " "the Neutron openvswitch plugin"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "extnet:br-ex", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "os-neutron-ovs-bridge-interfaces", "PROMPT": ("Enter a comma separated list of OVS bridge:interface " "pairs for the Neutron openvswitch plugin"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NEUTRON_OVS_BRIDGE_IFACES", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "os-neutron-ovs-bridges-compute", "PROMPT": ("Enter a comma separated list of bridges for the " "Neutron OVS plugin in compute nodes. They must " "be included in os-neutron-ovs-bridge-mappings and " "os-neutron-ovs-bridge-interfaces."), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NEUTRON_OVS_BRIDGES_COMPUTE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "os-neutron-ovs-external-physnet", "PROMPT": ("Enter the name of the physical external network as" "defined in bridge mappings"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "extnet", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NEUTRON_OVS_EXTERNAL_PHYSNET", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, ], "NEUTRON_OVS_AGENT_TUNNEL": [ { "CMD_OPTION": "os-neutron-ovs-tunnel-if", "PROMPT": ("Enter interface with IP to override the default " "tunnel local_ip"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NEUTRON_OVS_TUNNEL_IF", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "os-neutron-ovs-tunnel-subnets", "PROMPT": ("Enter comma separated list of subnets used for " "tunneling to make them allowed by IP filtering."), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NEUTRON_OVS_TUNNEL_SUBNETS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, ], "NEUTRON_OVS_AGENT_VXLAN": [ { "CMD_OPTION": "os-neutron-ovs-vxlan-udp-port", "CONF_NAME": "CONFIG_NEUTRON_OVS_VXLAN_UDP_PORT", "PROMPT": "Enter VXLAN UDP port number", "OPTION_LIST": [], "VALIDATORS": [validators.validate_port], "DEFAULT_VALUE": 4789, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, ], "NEUTRON_OVN_AGENT": [ { "CMD_OPTION": "os-neutron-ovn-bridge-mappings", "PROMPT": ("Enter a comma separated list of bridge mappings for " "the Neutron Open Virtual Network plugin"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "extnet:br-ex", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NEUTRON_OVN_BRIDGE_MAPPINGS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "os-neutron-ovn-bridge-interfaces", "PROMPT": ("Enter a comma separated list of OVS bridge:interface " "pairs for the Neutron Open Virtual Network plugin"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NEUTRON_OVN_BRIDGE_IFACES", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "os-neutron-ovn-bridges-compute", "PROMPT": ("Enter a comma separated list of bridges for the " "Neutron Open Virtual Network plugin in compute nodes." "They must be included in os-neutron-ovs-bridge-mappings " "and os-neutron-ovs-bridge-interfaces."), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NEUTRON_OVN_BRIDGES_COMPUTE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "os-neutron-ovn-external-physnet", "PROMPT": ("Enter the name of the physical external network as" "defined in bridge mappings"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "extnet", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NEUTRON_OVN_EXTERNAL_PHYSNET", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, ], "NEUTRON_OVN_AGENT_TUNNEL": [ { "CMD_OPTION": "os-neutron-ovn-tunnel-if", "PROMPT": ("Enter interface with IP to override the default " "tunnel local IP"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NEUTRON_OVN_TUNNEL_IF", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "os-neutron-ovn-tunnel-subnets", "PROMPT": ("Enter comma separated list of subnets used for " "tunneling to make them allowed by IP filtering."), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NEUTRON_OVN_TUNNEL_SUBNETS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, ], "NEUTRON_ML2_PLUGIN": [ { "CMD_OPTION": "os-neutron-ml2-type-drivers", "CONF_NAME": "CONFIG_NEUTRON_ML2_TYPE_DRIVERS", "PROMPT": ("Enter a comma separated list of network type driver " "entrypoints"), "OPTION_LIST": ["local", "flat", "vlan", "gre", "vxlan", "geneve"], "VALIDATORS": [validators.validate_multi_options], "DEFAULT_VALUE": "geneve,flat", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "os-neutron-ml2-tenant-network-types", "CONF_NAME": "CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES", "PROMPT": ("Enter a comma separated ordered list of " "network_types to allocate as tenant networks"), "OPTION_LIST": ["local", "vlan", "gre", "vxlan", "geneve"], "VALIDATORS": [validators.validate_multi_options], "DEFAULT_VALUE": "geneve", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "os-neutron-ml2-mechanism-drivers", "CONF_NAME": "CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS", "PROMPT": ("Enter a comma separated ordered list of networking " "mechanism driver entrypoints"), "OPTION_LIST": [ "logger", "test", "linuxbridge", "openvswitch", "hyperv", "ncs", "arista", "cisco_nexus", "mlnx", "l2population", "sriovnicswitch", "ovn" ], "VALIDATORS": [validators.validate_multi_options], "DEFAULT_VALUE": "ovn", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "os-neutron-ml2-flat-networks", "CONF_NAME": "CONFIG_NEUTRON_ML2_FLAT_NETWORKS", "PROMPT": ("Enter a comma separated list of physical_network " "names with which flat networks can be created"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "*", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "os-neutron-ml2-vlan-ranges", "CONF_NAME": "CONFIG_NEUTRON_ML2_VLAN_RANGES", "PROMPT": ("Enter a comma separated list of physical_network " "names usable for VLAN"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "os-neutron-ml2-tunnel-id-ranges", "CONF_NAME": "CONFIG_NEUTRON_ML2_TUNNEL_ID_RANGES", "PROMPT": ("Enter a comma separated list of <tun_min>:<tun_max> " "tuples enumerating ranges of GRE tunnel IDs that " "are available for tenant network allocation"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "os-neutron-ml2-vxlan-group", "CONF_NAME": "CONFIG_NEUTRON_ML2_VXLAN_GROUP", "PROMPT": "Enter a multicast group for VXLAN", "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "os-neutron-ml2-vni-ranges", "CONF_NAME": "CONFIG_NEUTRON_ML2_VNI_RANGES", "PROMPT": ("Enter a comma separated list of <vni_min>:<vni_max> " "tuples enumerating ranges of VXLAN VNI IDs that are " "available for tenant network allocation"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "10:100", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, # We need to ask for this only in case of ML2 plugins { "CMD_OPTION": "os-neutron-l2-agent", "PROMPT": ("Enter the name of the L2 agent to be used " "with Neutron"), "OPTION_LIST": ["linuxbridge", "openvswitch", "ovn"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "ovn", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_NEUTRON_L2_AGENT", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False, "MESSAGE": ("You have choosen OVN neutron backend. Note that this backend does not support LBaaS, VPNaaS or FWaaS services. " "Geneve will be used as encapsulation method for tenant networks" ), "MESSAGE_VALUES": ["ovn"] }, { "CMD_OPTION": "os-neutron-ml2-sriov-interface-mappings", "PROMPT": ("Enter a comma separated list of interface mappings " "for the Neutron ML2 sriov agent"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NEUTRON_ML2_SRIOV_INTERFACE_MAPPINGS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, ], } update_params_usage(basedefs.PACKSTACK_DOC, conf_params) conf_groups = [ { "GROUP_NAME": "NEUTRON", "DESCRIPTION": "Neutron config", "PRE_CONDITION": "CONFIG_NEUTRON_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True }, { "GROUP_NAME": "NEUTRON_ML2_PLUGIN", "DESCRIPTION": "Neutron ML2 plugin config", "PRE_CONDITION": neutron_install, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True }, { "GROUP_NAME": "NEUTRON_LB_AGENT", "DESCRIPTION": "Neutron LB agent config", "PRE_CONDITION": use_ml2_with_linuxbridge, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True }, { "GROUP_NAME": "NEUTRON_OVS_AGENT", "DESCRIPTION": "Neutron OVS agent config", "PRE_CONDITION": use_ml2_with_ovs, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True }, { "GROUP_NAME": "NEUTRON_OVS_AGENT_TUNNEL", "DESCRIPTION": "Neutron OVS agent config for tunnels", "PRE_CONDITION": use_ml2_with_ovs, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True }, { "GROUP_NAME": "NEUTRON_OVS_AGENT_VXLAN", "DESCRIPTION": "Neutron OVS agent config for VXLAN", "PRE_CONDITION": use_openvswitch_vxlan, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True }, { "GROUP_NAME": "NEUTRON_OVN_AGENT", "DESCRIPTION": "Neutron OVN agent config", "PRE_CONDITION": use_ml2_with_ovn, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True }, { "GROUP_NAME": "NEUTRON_OVN_AGENT_TUNNEL", "DESCRIPTION": "Neutron OVN agent config for tunnels", "PRE_CONDITION": use_ml2_with_ovn, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True }, ] for group in conf_groups: params = conf_params[group["GROUP_NAME"]] controller.addGroup(group, params)
def initConfig(controller): keystone_params = { "KEYSTONE": [ # base keystone options { "CMD_OPTION": "keystone-db-passwd", "PROMPT": "Enter the password for the Keystone DB access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "PROCESSORS": [processors.process_password], "DEFAULT_VALUE": "PW_PLACEHOLDER", "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_KEYSTONE_DB_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }, { "CMD_OPTION": 'keystone-db-purge-enable', "PROMPT": ("Enter y if cron job for removing soft deleted DB rows " "should be created"), "OPTION_LIST": ['y', 'n'], "VALIDATORS": [validators.validate_not_empty], "PROCESSORS": [processors.process_bool], "DEFAULT_VALUE": 'y', "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_DB_PURGE_ENABLE', "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }, { "CMD_OPTION": "keystone-region", "PROMPT": "Region name", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "RegionOne", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_KEYSTONE_REGION", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-admin-token", "PROMPT": "The token to use for the Keystone service api", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": uuid.uuid4().hex, "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_KEYSTONE_ADMIN_TOKEN", "USE_DEFAULT": True, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-admin-email", "PROMPT": "Enter the email address for the Keystone admin user", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "root@localhost", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_KEYSTONE_ADMIN_EMAIL", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-admin-username", "PROMPT": "Enter the username for the Keystone admin user", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "admin", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_KEYSTONE_ADMIN_USERNAME", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-admin-passwd", "PROMPT": "Enter the password for the Keystone admin user", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_KEYSTONE_ADMIN_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }, { "CMD_OPTION": "keystone-demo-passwd", "PROMPT": "Enter the password for the Keystone demo user", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_KEYSTONE_DEMO_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }, { "CMD_OPTION": "keystone-api-version", "PROMPT": "Enter the Keystone API version string.", "OPTION_LIST": ['v2.0', 'v3'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": 'v3', "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_API_VERSION', "USE_DEFAULT": True, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-token-format", "PROMPT": "Enter the Keystone token format.", "OPTION_LIST": ['FERNET'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": 'FERNET', "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_TOKEN_FORMAT', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-identity-backend", "PROMPT": "Enter the Keystone identity backend type.", "OPTION_LIST": ['sql', 'ldap'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "sql", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_IDENTITY_BACKEND', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False } ], "KEYSTONE_LDAP": [ # keystone ldap identity backend options { "CMD_OPTION": "keystone-ldap-url", "PROMPT": "Enter the Keystone LDAP backend URL.", "OPTION_LIST": [], "VALIDATORS": [validators.validate_ldap_url], "DEFAULT_VALUE": host_to_ldap_url(utils.get_localhost_ip()), "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_URL', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-user-dn", "PROMPT": "Enter the Keystone LDAP user DN.", "OPTION_LIST": [], "VALIDATORS": [validators.validate_ldap_dn], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_DN', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-user-password", "PROMPT": "Enter the Keystone LDAP user password.", "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_PASSWORD', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-suffix", "PROMPT": "Enter the Keystone LDAP suffix.", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty, validators.validate_ldap_dn], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_SUFFIX', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-query-scope", "PROMPT": "Enter the Keystone LDAP query scope.", "OPTION_LIST": ['base', 'one', 'sub'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "one", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_QUERY_SCOPE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-page-size", "PROMPT": "Enter the Keystone LDAP query page size.", "OPTION_LIST": [], "VALIDATORS": [validators.validate_integer], "DEFAULT_VALUE": "-1", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_PAGE_SIZE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-user-subtree", "PROMPT": "Enter the Keystone LDAP user subtree.", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty, validators.validate_ldap_dn], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_SUBTREE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-user-filter", "PROMPT": "Enter the Keystone LDAP user query filter.", "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_FILTER', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-user-objectclass", "PROMPT": "Enter the Keystone LDAP user objectclass.", "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_OBJECTCLASS', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-user-id-attribute", "PROMPT": "Enter the Keystone LDAP user ID attribute.", "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_ID_ATTRIBUTE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-user-name-attribute", "PROMPT": "Enter the Keystone LDAP user name attribute.", "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_NAME_ATTRIBUTE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-user-mail-attribute", "PROMPT": "Enter the Keystone LDAP user email address attribute.", "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_MAIL_ATTRIBUTE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-user-enabled-attribute", "PROMPT": "Enter the Keystone LDAP user enabled attribute.", "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_ENABLED_ATTRIBUTE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-user-enabled-mask", "PROMPT": "Enter the Keystone LDAP user enabled mask.", "OPTION_LIST": [], "VALIDATORS": [validators.validate_integer], "DEFAULT_VALUE": "-1", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_ENABLED_MASK', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-user-enabled-default", "PROMPT": "Enter the Keystone LDAP user enabled default.", "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "TRUE", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_ENABLED_DEFAULT', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-user-enabled-invert", "PROMPT": "Enter the Keystone LDAP user enabled invert (n or y).", "OPTION_LIST": ['n', 'y'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": 'n', "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_ENABLED_INVERT', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-user-attribute-ignore", "PROMPT": ("Enter the comma separated Keystone LDAP user " "attributes to ignore."), "OPTION_LIST": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_ATTRIBUTE_IGNORE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-user-default-project-id-attribute", "PROMPT": ("Enter the Keystone LDAP user default_project_id attribute."), "OPTION_LIST": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_DEFAULT_PROJECT_ID_ATTRIBUTE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-user-allow-create", "PROMPT": ("Do you want to allow user create through Keystone (n or y)." ), "OPTION_LIST": ['n', 'y'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": 'n', "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_ALLOW_CREATE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-user-allow-update", "PROMPT": ("Do you want to allow user update through Keystone (n or y)." ), "OPTION_LIST": ['n', 'y'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": 'n', "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_ALLOW_UPDATE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-user-allow-delete", "PROMPT": ("Do you want to allow user delete through Keystone (n or y)." ), "OPTION_LIST": ['n', 'y'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": 'n', "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_ALLOW_DELETE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-user-pass-attribute", "PROMPT": "Enter the Keystone LDAP user password attribute.", "OPTION_LIST": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_PASS_ATTRIBUTE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-user-enabled-emulation-dn", "PROMPT": "Enter the Keystone LDAP enabled emulation DN.", "OPTION_LIST": [], "VALIDATORS": [validators.validate_ldap_dn], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_ENABLED_EMULATION_DN', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-user-additional-attribute-mapping", "PROMPT": ("Enter the comma separated Keystone LDAP user additional " "attribute mappings in the form " "ldap_attr:user_attr[,ldap_attr:user_attr]...."), "OPTION_LIST": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USER_ADDITIONAL_ATTRIBUTE_MAPPING', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-group-subtree", "PROMPT": "Enter the Keystone LDAP group subtree.", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty, validators.validate_ldap_dn], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_GROUP_SUBTREE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-group-filter", "PROMPT": "Enter the Keystone LDAP group query filter.", "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_GROUP_FILTER', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-group-objectclass", "PROMPT": "Enter the Keystone LDAP group objectclass.", "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_GROUP_OBJECTCLASS', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-group-id-attribute", "PROMPT": "Enter the Keystone LDAP group ID attribute.", "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_GROUP_ID_ATTRIBUTE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-group-name-attribute", "PROMPT": "Enter the Keystone LDAP group name attribute.", "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_GROUP_NAME_ATTRIBUTE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-group-member-attribute", "PROMPT": "Enter the Keystone LDAP group member attribute.", "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_GROUP_MEMBER_ATTRIBUTE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-group-desc-attribute", "PROMPT": "Enter the Keystone LDAP group description attribute.", "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_GROUP_DESC_ATTRIBUTE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-group-attribute-ignore", "PROMPT": ("Enter the comma separated Keystone LDAP group " "attributes to ignore."), "OPTION_LIST": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_GROUP_ATTRIBUTE_IGNORE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-group-allow-create", "PROMPT": ("Do you want to allow group create through Keystone (n or y)." ), "OPTION_LIST": ['n', 'y'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": 'n', "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_GROUP_ALLOW_CREATE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-group-allow-update", "PROMPT": ("Do you want to allow group update through Keystone (n or y)." ), "OPTION_LIST": ['n', 'y'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": 'n', "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_GROUP_ALLOW_UPDATE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-group-allow-delete", "PROMPT": ("Do you want to allow group delete through Keystone (n or y)." ), "OPTION_LIST": ['n', 'y'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": 'n', "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_GROUP_ALLOW_DELETE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-group-additional-attribute-mapping", "PROMPT": ("Enter the comma separated Keystone LDAP group additional " "attribute mappings in the form " "ldap_attr:group_attr[,ldap_attr:group_attr]...."), "OPTION_LIST": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_GROUP_ADDITIONAL_ATTRIBUTE_MAPPING', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-use-tls", "PROMPT": ("Enable TLS for Keystone communicating with " "LDAP servers (n or y)."), "OPTION_LIST": ['n', 'y'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": 'n', "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_USE_TLS', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-tls-cacertdir", "PROMPT": "CA Certificate directory for Keystone LDAP.", "OPTION_LIST": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_TLS_CACERTDIR', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-tls-cacertfile", "PROMPT": "CA Certificate file for Keystone LDAP.", "OPTION_LIST": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_TLS_CACERTFILE', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "keystone-ldap-tls-req-cert", "PROMPT": ("Keystone LDAP certificate checking strictness " "(never, allow, demand)"), "OPTION_LIST": ["never", "allow", "demand"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "demand", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_KEYSTONE_LDAP_TLS_REQ_CERT', "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False } ] } update_params_usage(basedefs.PACKSTACK_DOC, keystone_params) keystone_groups = [{ "GROUP_NAME": "KEYSTONE", "DESCRIPTION": "Keystone Config parameters", "PRE_CONDITION": lambda x: 'yes', "PRE_CONDITION_MATCH": "yes", "POST_CONDITION": False, "POST_CONDITION_MATCH": True }, { "GROUP_NAME": "KEYSTONE_LDAP", "DESCRIPTION": "Keystone LDAP Identity Backend Config parameters", "PRE_CONDITION": 'CONFIG_KEYSTONE_IDENTITY_BACKEND', "PRE_CONDITION_MATCH": "ldap", "POST_CONDITION": False, "POST_CONDITION_MATCH": True }] for group in keystone_groups: params = keystone_params[group["GROUP_NAME"]] controller.addGroup(group, params)
def initConfig(controller): if platform.linux_distribution()[0] == "Fedora": primary_netif = "em1" secondary_netif = "em2" else: primary_netif = "eth0" secondary_netif = "eth1" nova_params = { "NOVA": [ { "CMD_OPTION": 'nova-db-purge-enable', "PROMPT": ("Enter y if cron job for removing soft deleted DB rows " "should be created"), "OPTION_LIST": ['y', 'n'], "VALIDATORS": [validators.validate_not_empty], "PROCESSORS": [processors.process_bool], "DEFAULT_VALUE": 'y', "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": 'CONFIG_NOVA_DB_PURGE_ENABLE', "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }, { "CMD_OPTION": "nova-db-passwd", "PROMPT": "Enter the password for the Nova DB access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_NOVA_DB_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }, { "CMD_OPTION": "nova-ks-passwd", "PROMPT": "Enter the password for the Nova Keystone access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_NOVA_KS_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False }, { "CMD_OPTION": "nova-manage-flavors", "PROMPT": ("Should Packstack manage default Nova flavors"), "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "y", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_NOVA_MANAGE_FLAVORS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "novasched-cpu-allocation-ratio", "PROMPT": "Enter the CPU overcommitment ratio. Set to 1.0 to " "disable CPU overcommitment", "OPTION_LIST": [], "VALIDATORS": [validators.validate_float], "DEFAULT_VALUE": 16.0, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_SCHED_CPU_ALLOC_RATIO", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "novasched-ram-allocation-ratio", "PROMPT": ("Enter the RAM overcommitment ratio. Set to 1.0 to " "disable RAM overcommitment"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_float], "DEFAULT_VALUE": 1.5, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_SCHED_RAM_ALLOC_RATIO", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "novacompute-migrate-protocol", "PROMPT": ("Enter protocol which will be used for instance " "migration"), "OPTION_LIST": ['tcp', 'ssh'], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": 'tcp', "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_COMPUTE_MIGRATE_PROTOCOL", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "nova-compute-manager", "PROMPT": ("Enter the compute manager for nova " "migration"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "nova.compute.manager.ComputeManager", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_COMPUTE_MANAGER", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "nova-ssl-cert", "PROMPT": ("Enter the path to a PEM encoded certificate to be used " "on the https server, leave blank if one should be " "generated, this certificate should not require " "a passphrase"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": '', "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_VNC_SSL_CERT", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "nova-ssl-key", "PROMPT": ("Enter the SSL keyfile corresponding to the certificate " "if one was entered"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_VNC_SSL_KEY", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "nova-pci-alias", "PROMPT": ("Enter the PCI passthrough array of hash in JSON style for controller eg. " "[{'vendor_id':'1234', 'product_id':'5678', " "'name':'default'}, {...}] "), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_PCI_ALIAS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "nova-pci-passthrough-whitelist", "PROMPT": ("Enter the PCI passthrough whitelist as array of hash in JSON style for " "controller eg. " "[{'vendor_id':'1234', 'product_id':'5678', " "'name':'default'}, {...}]"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_PCI_PASSTHROUGH_WHITELIST", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, ], "NOVA_NETWORK": [ { "CMD_OPTION": "novacompute-privif", "PROMPT": ("Enter the Private interface for Flat DHCP on the Nova" " compute servers"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": '', "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_COMPUTE_PRIVIF", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "novanetwork-manager", "PROMPT": "Enter the Nova network manager", "OPTION_LIST": [r'^nova\.network\.manager\.\w+Manager$'], "VALIDATORS": [validators.validate_regexp], "DEFAULT_VALUE": "nova.network.manager.FlatDHCPManager", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_NETWORK_MANAGER", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "novanetwork-pubif", "PROMPT": "Enter the Public interface on the Nova network server", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": primary_netif, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_NETWORK_PUBIF", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "novanetwork-privif", "PROMPT": ("Enter the Private interface for network manager on " "the Nova network server"), "OPTION_LIST": [], "VALIDATORS": [], "DEFAULT_VALUE": '', "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_NETWORK_PRIVIF", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "novanetwork-fixed-range", "PROMPT": "Enter the IP Range for network manager", "OPTION_LIST": ["^[\:\.\da-fA-f]+(\/\d+){0,1}$"], "PROCESSORS": [processors.process_cidr], "VALIDATORS": [validators.validate_regexp], "DEFAULT_VALUE": "192.168.32.0/22", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_NETWORK_FIXEDRANGE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "novanetwork-floating-range", "PROMPT": "Enter the IP Range for Floating IP's", "OPTION_LIST": ["^[\:\.\da-fA-f]+(\/\d+){0,1}$"], "PROCESSORS": [processors.process_cidr], "VALIDATORS": [validators.validate_regexp], "DEFAULT_VALUE": "10.3.4.0/22", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_NETWORK_FLOATRANGE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "novanetwork-auto-assign-floating-ip", "PROMPT": ("Should new instances automatically have a floating " "IP assigned?"), "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "n", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_NOVA_NETWORK_AUTOASSIGNFLOATINGIP", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, ], "NOVA_NETWORK_VLAN": [ { "CMD_OPTION": "novanetwork-vlan-start", "PROMPT": "Enter first VLAN for private networks", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": 100, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_NETWORK_VLAN_START", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "novanetwork-num-networks", "PROMPT": "How many networks should be supported", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": 1, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_NETWORK_NUMBER", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, { "CMD_OPTION": "novanetwork-network-size", "PROMPT": "How many addresses should be in each private subnet", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": 255, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_NETWORK_SIZE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False }, ], } update_params_usage(basedefs.PACKSTACK_DOC, nova_params) def use_nova_network(config): return (config['CONFIG_NOVA_INSTALL'] == 'y' and config['CONFIG_NEUTRON_INSTALL'] != 'y') def use_nova_network_vlan(config): manager = 'nova.network.manager.VlanManager' return (config['CONFIG_NOVA_INSTALL'] == 'y' and config['CONFIG_NEUTRON_INSTALL'] != 'y' and config['CONFIG_NOVA_NETWORK_MANAGER'] == manager) nova_groups = [ { "GROUP_NAME": "NOVA", "DESCRIPTION": "Nova Options", "PRE_CONDITION": "CONFIG_NOVA_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True }, { "GROUP_NAME": "NOVA_NETWORK", "DESCRIPTION": "Nova Network Options", "PRE_CONDITION": use_nova_network, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True }, { "GROUP_NAME": "NOVA_NETWORK_VLAN", "DESCRIPTION": "Nova Network VLAN Options", "PRE_CONDITION": use_nova_network_vlan, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True }, ] for group in nova_groups: params = nova_params[group["GROUP_NAME"]] controller.addGroup(group, params)
def initConfig(controller): def process_tempest(param, param_name, config=None): if param == "": # In case of multinode installs by default we deploy # Tempest on network node return config['CONFIG_NETWORK_HOSTS'].split(',')[0] return param conf_params = { "PROVISION_INIT": [ {"CMD_OPTION": "provision-demo", "PROMPT": ("Would you like to provision for demo usage " "and testing"), "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "y", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_DEMO", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "provision-tempest", "PROMPT": ("Would you like to configure Tempest (OpenStack test " "suite). Note that provisioning is only supported for " "all-in-one installations."), "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "n", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "PROVISION_DEMO": [ {"CMD_OPTION": "provision-demo-floatrange", "PROMPT": "Enter the network address for the floating IP subnet", "OPTION_LIST": False, "VALIDATORS": False, "DEFAULT_VALUE": "172.24.4.224/28", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_DEMO_FLOATRANGE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "provision-image-name", "PROMPT": "Enter the name to be assigned to the demo image", "OPTION_LIST": False, "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": DEMO_IMAGE_NAME, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_IMAGE_NAME", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "provision-image-url", "PROMPT": ("Enter the location of an image to be loaded " "into Glance"), "OPTION_LIST": False, "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": DEMO_IMAGE_URL, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_IMAGE_URL", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "provision-image-format", "PROMPT": ("Enter the format of the demo image"), "OPTION_LIST": False, "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": DEMO_IMAGE_FORMAT, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_IMAGE_FORMAT", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "provision-image-ssh-user", "PROMPT": ("Enter the name of a user to use when connecting " "to the demo image via ssh"), "OPTION_LIST": False, "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": DEMO_IMAGE_SSH_USER, "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_IMAGE_SSH_USER", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, ], "PROVISION_TEMPEST": [ {"CMD_OPTION": "tempest-host", "PROMPT": "Enter the host where to deploy Tempest", "OPTION_LIST": [], "VALIDATORS": [validators.validate_ssh], "DEFAULT_VALUE": "", "PROCESSORS": [process_tempest], "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_TEMPEST_HOST", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "provision-tempest-user", "PROMPT": ("Enter the name of the Tempest Provisioning user " "(if blank, Tempest will be configured in a " "standalone mode) "), "OPTION_LIST": False, "VALIDATORS": False, "DEFAULT_VALUE": "", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_USER", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "provision-tempest-user-passwd", "PROMPT": "Enter the password for the Tempest Provisioning user", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_USER_PW", "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CMD_OPTION": "provision-tempest-floatrange", "PROMPT": "Enter the network address for the floating IP subnet", "OPTION_LIST": False, "VALIDATORS": False, "DEFAULT_VALUE": "172.24.4.224/28", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_FLOATRANGE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "provision-tempest-repo-uri", "PROMPT": "What is the uri of the Tempest git repository?", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "https://github.com/openstack/tempest.git", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_REPO_URI", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "provision-tempest-repo-revision", "PROMPT": ("What revision, branch, or tag of the Tempest git " "repository should be used"), "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "master", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_TEMPEST_REPO_REVISION", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "run-tempest", "PROMPT": ("Do you wish to run tempest?"), "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "n", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_RUN_TEMPEST", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, {"CMD_OPTION": "run-tempest-tests", "PROMPT": ("What tempest tests should run ?" " (If blank, Tempest will run smoke tests)"), "OPTION_LIST": [], "VALIDATORS": False, "DEFAULT_VALUE": "smoke", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_RUN_TEMPEST_TESTS", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False} ], "PROVISION_OVS_BRIDGE": [ {"CMD_OPTION": "provision-ovs-bridge", "PROMPT": "Would you like to configure the external ovs bridge", "OPTION_LIST": ["y", "n"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "y", "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_PROVISION_OVS_BRIDGE", "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False, "DEPRECATES": ['CONFIG_PROVISION_ALL_IN_ONE_OVS_BRIDGE']}, ], } update_params_usage(basedefs.PACKSTACK_DOC, conf_params) def check_provisioning_demo(config): return (config.get('CONFIG_PROVISION_DEMO', 'n') == 'y') def check_provisioning_tempest(config): return (config.get('CONFIG_PROVISION_TEMPEST', 'n') == 'y') def allow_all_in_one_ovs_bridge(config): return (config['CONFIG_NEUTRON_INSTALL'] == 'y') conf_groups = [ {"GROUP_NAME": "PROVISION_INIT", "DESCRIPTION": "Provisioning demo config", "PRE_CONDITION": lambda x: 'yes', "PRE_CONDITION_MATCH": "yes", "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "PROVISION_DEMO", "DESCRIPTION": "Provisioning demo config", "PRE_CONDITION": check_provisioning_demo, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "PROVISION_TEMPEST", "DESCRIPTION": "Provisioning tempest config", "PRE_CONDITION": check_provisioning_tempest, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, {"GROUP_NAME": "PROVISION_OVS_BRIDGE", "DESCRIPTION": "Provisioning all-in-one ovs bridge config", "PRE_CONDITION": allow_all_in_one_ovs_bridge, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, "POST_CONDITION_MATCH": True}, ] for group in conf_groups: paramList = conf_params[group["GROUP_NAME"]] controller.addGroup(group, paramList) # Due to group checking some parameters might not be initialized, but # provision.pp needs them all. So we will initialize them with default # values params = [ controller.getParamByName(x) for x in ['CONFIG_PROVISION_TEMPEST_REPO_URI', 'CONFIG_PROVISION_TEMPEST_REPO_REVISION', 'CONFIG_PROVISION_OVS_BRIDGE'] ] for param in params: value = controller.CONF.get(param.CONF_NAME, param.DEFAULT_VALUE) controller.CONF[param.CONF_NAME] = value
def initConfig(controller): parameters = [ {"CONF_NAME": "CONFIG_TROVE_DB_PW", "CMD_OPTION": "trove-db-passwd", "PROMPT": "Enter the password to use for Trove to access the DB", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CONF_NAME": "CONFIG_TROVE_KS_PW", "CMD_OPTION": "trove-ks-passwd", "PROMPT": "Enter the password for Trove Keystone access", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", "PROCESSORS": [processors.process_password], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, {"CONF_NAME": "CONFIG_TROVE_NOVA_USER", "CMD_OPTION": "trove-nova-user", "PROMPT": "Enter the user for Trove to use to connect to Nova", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "trove", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "USE_DEFAULT": True, "NEED_CONFIRM": True, "CONDITION": False}, {"CONF_NAME": "CONFIG_TROVE_NOVA_TENANT", "CMD_OPTION": "trove-nova-tenant", "PROMPT": "Enter the tenant for Trove to use to connect to Nova", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "services", "MASK_INPUT": False, "LOOSE_VALIDATION": False, "USE_DEFAULT": True, "NEED_CONFIRM": True, "CONDITION": False}, {"CONF_NAME": "CONFIG_TROVE_NOVA_PW", "CMD_OPTION": "trove-nova-passwd", "PROMPT": "Enter the password for Trove to use to connect to Nova", "OPTION_LIST": [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE": "PW_PLACEHOLDER", # default is trove pass "PROCESSORS": [process_trove_nova_pw], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "USE_DEFAULT": False, "NEED_CONFIRM": True, "CONDITION": False}, ] update_params_usage(basedefs.PACKSTACK_DOC, parameters, sectioned=False) group = {"GROUP_NAME": "Trove", "DESCRIPTION": "Trove config parameters", "PRE_CONDITION": "CONFIG_TROVE_INSTALL", "PRE_CONDITION_MATCH": "y", "POST_CONDITION": False, "POST_CONDITION_MATCH": True} controller.addGroup(group, parameters)