Webserver - Ockle’s GUI

Ockle’s GUI is a pyramid 1.2 application that communicates to the Ockle Daemon.

There are a few helper functions for the view’s page

Helper fuctions for generating multi-choice config pages

When creating config pages with multi choice fields, you must populate the multiListChoices variable and pass it to the template, this can be done using the views.multiChoiceGenerators module:

Ockle PDU and servers manager Helper functions for creating multi-choice fields that can then be displayed by the GUI

Created on Oct 27, 2012

@author: Guy Sheffer <guy.sheffer at mail.huji.ac.il>

views.multiChoiceGenerators._makeMultichoice(section, option, multiListChoicesCallback, INIFileDict, multiListChoices=None)[source]

Generate a multilist format for a template. So it can be rendered on a template

Parameters:
  • section – The option section in the ini file
  • option – The name of the option in the ini file
  • multiListChoicesCallback – a callback function the returns a dict of the available options
  • INIFileDict – An INI file dict that holds the list of selected choices
  • multiListChoices – If there is a multiListChoices dict you want to append the existing configuration to
Returns:

a multiListChoices dict ready to be rendred in a template

views.multiChoiceGenerators._makeSelectMulitChoice(existingType, objectType, item, getObjectDict, multiListChoices=None)[source]

Make a multi select option for the select type

Parameters:
  • existingType – The selected option
  • objectType – The section to build
  • item – The item to build
  • getObjectCallback – the Dict holding the select list
  • multiListChoices – an existing multiListChoices dict (optional)
Returns:

The updated multiListChoices dict

Project Versions

Table Of Contents

Previous topic

Plugins

Next topic

The Communication Client

This Page