diff --git a/packstack/plugins/cinder_250.py b/packstack/plugins/cinder_250.py index 6e56780fb..9d057b376 100644 --- a/packstack/plugins/cinder_250.py +++ b/packstack/plugins/cinder_250.py @@ -221,57 +221,6 @@ def initConfig(controllerObject): controller.addGroup(groupDict, paramsList) - def check_vcenter_options(config): - return (config.get('CONFIG_NOVA_INSTALL', 'y') == 'n' and - config.get('CONFIG_VMWARE_BACKEND', 'n') == 'y' and - config.get('CONFIG_CINDER_BACKEND', 'lvm') == 'vmdk') - - paramsList = [ - {"CMD_OPTION" : "cinder-vcenter-host", - "USAGE" : ("The IP address of the VMware vCenter datastore"), - "PROMPT" : ("Enter the IP address of the VMware vCenter datastore to use with Cinder"), - "OPTION_LIST" : [], - "VALIDATORS" : [validators.validate_ip], - "DEFAULT_VALUE" : "", - "MASK_INPUT" : False, - "LOOSE_VALIDATION": True, - "CONF_NAME" : "CONFIG_VCENTER_HOST", - "USE_DEFAULT" : False, - "NEED_CONFIRM" : False, - "CONDITION" : False }, - {"CMD_OPTION" : "cinder-vcenter-username", - "USAGE" : ("The username to authenticate to VMware vCenter datastore"), - "PROMPT" : ("Enter the username to authenticate on VMware vCenter datastore"), - "VALIDATORS" : [validators.validate_not_empty], - "DEFAULT_VALUE" : "", - "MASK_INPUT" : False, - "LOOSE_VALIDATION": True, - "CONF_NAME" : "CONFIG_VCENTER_USER", - "USE_DEFAULT" : False, - "NEED_CONFIRM" : False, - "CONDITION" : False,}, - {"CMD_OPTION" : "cinder-vcenter-password", - "USAGE" : ("The password to authenticate to VMware vCenter datastore"), - "PROMPT" : ("Enter the password to authenticate on VMware vCenter datastore"), - "VALIDATORS" : [validators.validate_not_empty], - "DEFAULT_VALUE" : "", - "MASK_INPUT" : True, - "LOOSE_VALIDATION": True, - "CONF_NAME" : "CONFIG_VCENTER_PASSWORD", - "VALIDATORS" : [validators.validate_not_empty], - "USE_DEFAULT" : False, - "NEED_CONFIRM" : False, - "CONDITION" : False,}, - ] - - groupDict = { "GROUP_NAME" : "CINDERVCENTEROPTIONS", - "DESCRIPTION" : "Cinder VMware vCenter Config parameters", - "PRE_CONDITION" : check_vcenter_options, - "PRE_CONDITION_MATCH" : True, - "POST_CONDITION" : False, - "POST_CONDITION_MATCH" : True} - - controller.addGroup(groupDict, paramsList) def initSequences(controller): if controller.CONF['CONFIG_CINDER_INSTALL'] != 'y': @@ -427,7 +376,7 @@ def create_manifest(config): config['FIREWALL_PORTS'] = "'3260', '8776'" config['FIREWALL_CHAIN'] = "INPUT" - if config['CONFIG_NOVA_INSTALL'] == 'y': + if (config['CONFIG_NOVA_INSTALL'] == 'y' and config['CONFIG_VMWARE_BACKEND']=='n'): for host in split_hosts(config['CONFIG_NOVA_COMPUTE_HOSTS']): config['FIREWALL_ALLOWED'] = "'%s'" % host config['FIREWALL_SERVICE_ID'] = "cinder_%s" % host diff --git a/packstack/plugins/nova_300.py b/packstack/plugins/nova_300.py index 77fb9f814..0587ca081 100644 --- a/packstack/plugins/nova_300.py +++ b/packstack/plugins/nova_300.py @@ -309,50 +309,6 @@ def initConfig(controllerObject): "NEED_CONFIRM" : False, "CONDITION" : False }, ], - "NOVA_VCENTER": [ - {"CMD_OPTION" : "nova-vcenter-host", - "USAGE" : ("The IP address of the VMware vCenter server"), - "PROMPT" : ("Enter the IP address of the VMware vCenter server to use with Nova"), - "OPTION_LIST" : [], - "VALIDATORS" : [validators.validate_ip], - "DEFAULT_VALUE" : "", - "MASK_INPUT" : False, - "LOOSE_VALIDATION": True, - "CONF_NAME" : "CONFIG_VCENTER_HOST", - "USE_DEFAULT" : False, - "NEED_CONFIRM" : False, - "CONDITION" : False }, - {"CMD_OPTION" : "nova-vcenter-username", - "USAGE" : ("The username to authenticate to VMware vCenter server"), - "PROMPT" : ("Enter the username to authenticate on VMware vCenter server"), - "DEFAULT_VALUE" : "", - "MASK_INPUT" : False, - "LOOSE_VALIDATION": True, - "CONF_NAME" : "CONFIG_VCENTER_USER", - "USE_DEFAULT" : False, - "NEED_CONFIRM" : False, - "CONDITION" : False,}, - {"CMD_OPTION" : "nova-vcenter-password", - "USAGE" : ("The password to authenticate to VMware vCenter server"), - "PROMPT" : ("Enter the password to authenticate on VMware vCenter server"), - "DEFAULT_VALUE" : "", - "MASK_INPUT" : True, - "LOOSE_VALIDATION": True, - "CONF_NAME" : "CONFIG_VCENTER_PASSWORD", - "USE_DEFAULT" : False, - "NEED_CONFIRM" : False, - "CONDITION" : False,}, - {"CMD_OPTION" : "nova-vcenter-cluster", - "USAGE" : ("The name of the vCenter cluster"), - "PROMPT" : ("Enter the name of the vCenter datastore"), - "DEFAULT_VALUE" : "", - "MASK_INPUT" : False, - "LOOSE_VALIDATION": True, - "CONF_NAME" : "CONFIG_VCENTER_CLUSTER_NAME", - "USE_DEFAULT" : False, - "NEED_CONFIRM" : False, - "CONDITION" : False,}, - ], } def use_nova_network(config): @@ -365,10 +321,6 @@ def initConfig(controllerObject): config['CONFIG_NEUTRON_INSTALL'] != 'y' and \ config['CONFIG_NOVA_NETWORK_MANAGER'] == manager - def use_nova_vcenter(config): - return (config['CONFIG_NOVA_INSTALL'] == 'y' and - config['CONFIG_VMWARE_BACKEND'] == 'y') - nova_groups = [ {"GROUP_NAME" : "NOVA", "DESCRIPTION" : "Nova Options", @@ -388,12 +340,6 @@ def initConfig(controllerObject): "PRE_CONDITION_MATCH" : True, "POST_CONDITION" : False, "POST_CONDITION_MATCH" : True}, - {"GROUP_NAME" : "NOVA_VCENTER", - "DESCRIPTION" : "Nova VMware vCenter Config parameters", - "PRE_CONDITION" : use_nova_vcenter, - "PRE_CONDITION_MATCH" : True, - "POST_CONDITION" : False, - "POST_CONDITION_MATCH" : True}, ] for group in nova_groups: @@ -557,7 +503,7 @@ def createcomputemanifest(config): else: manifestdata += getManifestTemplate("nova_compute_libvirt.pp") if (config['CONFIG_VMWARE_BACKEND'] != 'y' and - config['CONFIG_CINDER_INSTALL'] == 'y' and + config['CONFIG_CINDER_INSTALL'] == 'y' and config['CONFIG_CINDER_BACKEND'] == 'gluster'): manifestdata += getManifestTemplate("nova_gluster.pp") if (config['CONFIG_VMWARE_BACKEND'] != 'y' and diff --git a/packstack/plugins/prescript_000.py b/packstack/plugins/prescript_000.py index 5eb214eb7..fb4ec5131 100644 --- a/packstack/plugins/prescript_000.py +++ b/packstack/plugins/prescript_000.py @@ -236,6 +236,63 @@ def initConfig(controllerObject): "POST_CONDITION_MATCH" : True} controller.addGroup(groupDict, paramsList) + def use_vcenter(config): + return (config['CONFIG_NOVA_INSTALL'] == 'y' and + config['CONFIG_VMWARE_BACKEND'] == 'y') + + paramsList = [ + {"CMD_OPTION" : "vcenter-host", + "USAGE" : ("The IP address of the VMware vCenter server"), + "PROMPT" : ("Enter the IP address of the VMware vCenter server to use with Nova"), + "OPTION_LIST" : [], + "VALIDATORS" : [validators.validate_ip], + "DEFAULT_VALUE" : "", + "MASK_INPUT" : False, + "LOOSE_VALIDATION": True, + "CONF_NAME" : "CONFIG_VCENTER_HOST", + "USE_DEFAULT" : False, + "NEED_CONFIRM" : False, + "CONDITION" : False }, + {"CMD_OPTION" : "vcenter-username", + "USAGE" : ("The username to authenticate to VMware vCenter server"), + "PROMPT" : ("Enter the username to authenticate on VMware vCenter server"), + "DEFAULT_VALUE" : "", + "MASK_INPUT" : False, + "LOOSE_VALIDATION": True, + "CONF_NAME" : "CONFIG_VCENTER_USER", + "USE_DEFAULT" : False, + "NEED_CONFIRM" : False, + "CONDITION" : False,}, + {"CMD_OPTION" : "vcenter-password", + "USAGE" : ("The password to authenticate to VMware vCenter server"), + "PROMPT" : ("Enter the password to authenticate on VMware vCenter server"), + "DEFAULT_VALUE" : "", + "MASK_INPUT" : True, + "LOOSE_VALIDATION": True, + "CONF_NAME" : "CONFIG_VCENTER_PASSWORD", + "USE_DEFAULT" : False, + "NEED_CONFIRM" : False, + "CONDITION" : False,}, + {"CMD_OPTION" : "vcenter-cluster", + "USAGE" : ("The name of the vCenter cluster"), + "PROMPT" : ("Enter the name of the vCenter datastore"), + "DEFAULT_VALUE" : "", + "MASK_INPUT" : False, + "LOOSE_VALIDATION": True, + "CONF_NAME" : "CONFIG_VCENTER_CLUSTER_NAME", + "USE_DEFAULT" : False, + "NEED_CONFIRM" : False, + "CONDITION" : False,}, + ] + + groupDict = {"GROUP_NAME" : "VMWARE", + "DESCRIPTION" : "vCenter Config Parameters", + "PRE_CONDITION" : use_vcenter, + "PRE_CONDITION_MATCH" : True, + "POST_CONDITION" : False, + "POST_CONDITION_MATCH" : True} + + controller.addGroup(groupDict, paramsList) def initSequences(controller): prescript_steps = [