def configure(self,config): ConfigurableNode.configure(self, config) message = '' if not (config.has_key('message') and config['message']): for var in self.variables: if message: message += ', ' message += '%s = ${%s}' % (var['vn'],var['vn']) set_attribute(self, 'message', message, {}) else: set_attribute(self, 'message', REQUIRED, config) set_attribute(self, 'subject', '', config, str) set_attribute(self, 'send_retries', 3, config, int) set_attribute(self, 'enabled', 1, config, as_boolean) set_attribute(self, 'prodnode', '', config, str) set_attribute(self, 'eventmodule', '', config, str) set_attribute(self, 'eventclass', '', config, str) set_attribute(self, 'debug', 0, config, int) self._event_class = None # Try to import our specified event class. try: x = __import__(self.eventmodule, {}, {}, self.eventclass) self._event_class = eval('x.%s' % self.eventclass) except: msglog.log('broadway',msglog.types.WARN, 'Got exception trying to import event class.') msglog.exception() self._manager = self.parent.parent
def configure(self, config): """method configure(): Called by MFW.""" self.debug_print('Starting configuration...', 0) ConfigurableNode.configure(self, config) self.debug_print('Configuration complete.', 0)
def configure(self, config): ConfigurableNode.configure(self, config) message = '' if not (config.has_key('message') and config['message']): for var in self.variables: if message: message += ', ' message += '%s = ${%s}' % (var['vn'], var['vn']) set_attribute(self, 'message', message, {}) else: set_attribute(self, 'message', REQUIRED, config) set_attribute(self, 'subject', '', config, str) set_attribute(self, 'send_retries', 3, config, int) set_attribute(self, 'enabled', 1, config, as_boolean) set_attribute(self, 'prodnode', '', config, str) set_attribute(self, 'eventmodule', '', config, str) set_attribute(self, 'eventclass', '', config, str) set_attribute(self, 'debug', 0, config, int) self._event_class = None # Try to import our specified event class. try: x = __import__(self.eventmodule, {}, {}, self.eventclass) self._event_class = eval('x.%s' % self.eventclass) except: msglog.log('broadway', msglog.types.WARN, 'Got exception trying to import event class.') msglog.exception() self._manager = self.parent.parent
def configure(self, config): """method configure(): Called by MFW.""" self.debug_print('Starting configuration...', 0) ConfigurableNode.configure(self, config) self.debug_print('Configuration complete.', 0)
def configure(self, config): set_attribute(self, 'enable', 0, config, int) set_attribute(self, 'user_id', '', config) set_attribute(self, 'password', '', config) set_attribute(self, 'local_ip', '', config) set_attribute(self, 'client_ip', '', config) set_attribute(self, 'debug', 0, config, int) ConfigurableNode.configure(self, config)
def configure( self, config ): set_attribute( self, 'enable', 0, config, int ) set_attribute( self, 'user_id', '', config ) set_attribute( self, 'password', '', config ) set_attribute( self, 'local_ip', '', config ) set_attribute( self, 'client_ip', '', config ) set_attribute( self, 'debug', 0, config, int ) ConfigurableNode.configure( self, config )
def configure(self, config): """method configure(): Called by MFW.""" self.debug_print('Starting configuration...', 0) ConfigurableNode.configure(self, config) # includes addition of "parent" attr self._port = self.parent self.debug_print('Configuration complete.', 0)
def configure(self, config): """method configure(): Called by MFW.""" self.debug_print('Starting configuration...', 0) ConfigurableNode.configure(self, config) # includes addition of "parent" attr try: self.parent.open() except termios.error, details: print 'termios.error: %s.' % str(details)
def configure(self, config): """method configure(): Called by MFW.""" self.debug_print('Starting configuration...', 0) ConfigurableNode.configure( self, config) # includes addition of "parent" attr self._port = self.parent self.debug_print('Configuration complete.', 0)
def configure( self, config_dict ): ConfigurableNode.configure( self, config_dict ) set_attribute( self, 'enable', 0, config_dict, int ) set_attribute( self, 'debug', 0, config_dict, int ) set_attribute( self, 'ddns_service', 0, config_dict ) set_attribute( self, 'ddns_acct', 0, config_dict ) set_attribute( self, 'ddns_pswd', 0, config_dict ) set_attribute( self, 'host_name', 0, config_dict ) map_to_attribute( self, 'period', 0, config_dict, map_to_seconds )
def configure(self, config): """method configure(): Called by MFW.""" self.debug_print('Starting configuration...', 0) ConfigurableNode.configure( self, config) # includes addition of "parent" attr try: self.parent.open() except termios.error, details: print 'termios.error: %s.' % str(details)
def configure(self, config): set_attribute(self, 'debug', self.debug, config, int) self._init_debug() self.DEBUG3("configure(%r):\n", config) ConfigurableNode.configure(self, config) self._url = as_node_url(self) if self.output is REQUIRED: self.output = self.parent set_attribute(self, 'output', self.parent, config, self.as_deferred_node) set_attribute(self, 'input', REQUIRED, config, self.as_deferred_node) set_attribute(self, 'period', self.period, config, float) set_attribute(self, 'asyncOK', self.asyncOK, config, int) # in cov mode, only changing values are driven. set_attribute(self, 'cov_mode', self.cov_mode, config, int) set_attribute(self, 'enabled', 1, config, as_boolean) set_attribute(self, 'backoff_on_failure', 0, config, as_boolean) set_attribute(self, 'conversion', self.conversion, config, str) self._period = self.period return
def configure(self, config): set_attribute(self, 'debug', self.debug, config, int) self._init_debug() self.DEBUG3("configure(%r):\n", config) ConfigurableNode.configure(self, config) self._url = as_node_url(self) if self.output is REQUIRED: self.output = self.parent set_attribute(self, 'output', self.parent, config, self.as_deferred_node) set_attribute(self, 'input', REQUIRED, config, self.as_deferred_node) set_attribute(self, 'period', self.period, config, float) set_attribute(self, 'asyncOK', self.asyncOK, config, int) # in cov mode, only changing values are driven. set_attribute(self, 'cov_mode', self.cov_mode, config, int) set_attribute(self, 'enabled', 1, config, as_boolean) set_attribute(self, 'backoff_on_failure', 0, config, as_boolean) set_attribute(self, 'conversion', self.conversion, config, str) self._period = self.period return
def configure(self, config): set_attribute(self, 'debug', self.debug, config, int) self._init_debug() self.DEBUG3("configure(%r):\n", config) # @fixme Add the option to output on change (default), output every # time, or the check the outputs state. ConfigurableNode.configure(self, config) self._url = as_node_url(self) if self.output is REQUIRED: self.output = self.parent set_attribute(self, 'off_text', self.off_text, config, str) set_attribute(self, 'on_text', self.on_text, config, str) set_attribute(self, 'auto_text', self.auto_text, config, str) set_attribute(self, 'reverse_output', self.reverse_output, config, int) set_attribute(self, 'output', self.parent, config, self.as_deferred_node) set_attribute(self, 'input', REQUIRED, config, self.as_deferred_node) set_attribute(self, 'period', self.period, config, float) set_attribute(self, 'asyncOK', self.asyncOK, config, int) set_attribute(self, 'state', self.state, config, self._set_state) set_attribute(self, 'enabled', 1, config, as_boolean) set_attribute(self, 'min_on_time', 0, config, float) set_attribute(self, 'min_off_time', 0, config, float) return
def configure(self, config): set_attribute(self, 'debug', self.debug, config, int) self._init_debug() self.DEBUG3("configure(%r):\n", config) # @fixme Add the option to output on change (default), output every # time, or the check the outputs state. ConfigurableNode.configure(self, config) self._url = as_node_url(self) if self.output is REQUIRED: self.output = self.parent set_attribute(self, 'off_text', self.off_text, config, str) set_attribute(self, 'on_text', self.on_text, config, str) set_attribute(self, 'auto_text', self.auto_text, config, str) set_attribute(self, 'reverse_output', self.reverse_output, config, int) set_attribute(self, 'output', self.parent, config, self.as_deferred_node) set_attribute(self, 'input', REQUIRED, config, self.as_deferred_node) set_attribute(self, 'period', self.period, config, float) set_attribute(self, 'asyncOK', self.asyncOK, config, int) set_attribute(self, 'state', self.state, config, self._set_state) set_attribute(self, 'enabled', 1, config, as_boolean) set_attribute(self, 'min_on_time', 0, config, float) set_attribute(self, 'min_off_time', 0, config, float) return
def configure(self, config): ConfigurableNode.configure(self, config) set_attribute(self, self.ION, self.parent, config, as_node) set_attribute(self, self.MULTIPLIER, REQUIRED, config)
def configure(self, config): if config.has_key("node"): self._Alias__node = config["node"] elif config.has_key("node_url"): set_attribute(self, "node_url", REQUIRED, config) return ConfigurableNode.configure(self, config)
def configure(self, config): if config.has_key("node"): self._Alias__node = config["node"] elif config.has_key("node_url"): set_attribute(self, "node_url", REQUIRED, config) return ConfigurableNode.configure(self, config)
def configure(self, config): ConfigurableNode.configure(self, config) set_attribute(self, 'bit', REQUIRED, config, int)
def configure(self, dict): ConfigurableNode.configure(self, dict) set_attribute(self, 'debug', 0, dict, as_boolean) set_attribute(self, 'value', None, dict) set_attribute(self, '__node_id__', '120075', dict)
def configure(self,config): ConfigurableNode.configure(self,config) set_attribute(self, 'bit', REQUIRED, config, int)
def configure(self, cd): ConfigurableNode.configure(self, cd) set_attribute(self, 'www_file_path', '/test_html_node.xyz', cd, str) html_str = '<a href=%s>Download File</a>' % self.www_file_path set_attribute(self, 'HTML_target_file', html_str, cd, str) return
def configure(self, config): ConfigurableNode.configure(self, config) # set ion attribute to be a reference to parent. set_attribute(self, 'ion', self.parent, config, as_node) set_attribute(self, 'divisor', REQUIRED, config, float)
def configure(self,config): ConfigurableNode.configure(self, config) set_attribute(self, self.ION, self.parent, config, as_node) set_attribute(self, self.MULTIPLIER, REQUIRED, config)
def configure( self, config_dict ): ConfigurableNode.configure( self, config_dict ) set_attribute( self, 'debug', 0, config_dict, int )
def configure(self, dict): ConfigurableNode.configure(self, dict) set_attribute(self, 'debug', 0, dict, as_boolean) set_attribute(self, 'value', None, dict) set_attribute(self, '__node_id__', '120075', dict)
def configure(self, config): ConfigurableNode.configure(self, config) # set ion attribute to be a reference to parent. set_attribute(self, 'ion', self.parent, config, as_node) set_attribute(self, 'divisor', REQUIRED, config, float)
def configure(self, cd): ConfigurableNode.configure(self,cd) set_attribute(self,'www_file_path','/test_html_node.xyz',cd,str) html_str = '<a href=%s>Download File</a>' % self.www_file_path set_attribute(self,'HTML_target_file',html_str,cd,str) return