def edit_pool(self, action, stack_name=DEFAULT_STACK_NAME, pool_name=None, return_to=None, formset_name=None, formset_quota_mode=None, formset_quota_value=None, formset_quota_units=None, formset_description=None, formset_slaves=None, formset_slave_mode=None, **unused): ''' Handles adding a new pool or editing an existing pool ''' # setup mako args template_args = { 'action': action, 'return_to': util.make_url_internal(return_to), 'stack_name': stack_name, 'is_success': False } # check that desired stack exists try: stack_id = Stack.build_id(stack_name, namespace=None, owner=None) stack = Stack.get(stack_id) stack_label = stack.label except splunk.ResourceNotFound, e: logger.exception(e) raise cherrypy.HTTPError( 400, 'The "%s" stack was not found. This interface only supports managing pools within that stack.' % DEFAULT_STACK_NAME)
def edit_pool(self, action, stack_name=DEFAULT_STACK_NAME, pool_name=None, return_to=None, formset_name=None, formset_quota_mode=None, formset_quota_value=None, formset_quota_units=None, formset_description=None, formset_slaves=None, formset_slave_mode=None, **unused ): ''' Handles adding a new pool or editing an existing pool ''' # setup mako args template_args = { 'action': action, 'return_to': util.make_url_internal(return_to), 'stack_name': stack_name, 'is_success': False } # check that desired stack exists try: stack_id = Stack.build_id(stack_name, namespace=None, owner=None) stack = Stack.get(stack_id) stack_label = stack.label except splunk.ResourceNotFound, e: logger.exception(e) raise cherrypy.HTTPError(400, 'The "%s" stack was not found. This interface only supports managing pools within that stack.' % DEFAULT_STACK_NAME)