SV = request_handler.SyndicationViewer sv = SV() from mpx.lib.node import as_node server = as_node('/services/network/http_server') c = server.children_nodes()[7].configuration() c['name'] = 'syndication_viewer' c['request_path'] = '/syndication' sv.configure(c) from mpx.service.alarms2.alarmmanager import AlarmManager from mpx.lib.neode.node import NodeSpace, CompositeNode, RootNode from mpx.lib.neode.tests import test_tree test_tree.queue_node(AlarmManager, test_tree.services, 'Alarm Manager') ns = test_tree.build_tree('') services = ns.as_node('/services') alarm_manager = services.get_child('Alarm Manager') from mpx.service.alarms2.alarm import Alarm from mpx.service.alarms2.alarmevent import AlarmEvent, StateChangedEvent import random class Trigger(object): def __init__(self, name): self.name = name def __str__(self): return self.name
accordance with section (3) of the GNU General Public License. This exception does not invalidate any other reasons why a work based on this file might be covered by the GNU General Public License. """ # Refactor 2/11/2007 import time from mpx.service.alarms2.alarm import Alarm from mpx.service.alarms2.alarmevent import AlarmEvent, StateChangedEvent from mpx.service.alarms2.alarmmanager import AlarmManager from mpx.lib.neode.node import NodeSpace, CompositeNode, RootNode from mpx.lib.neode.tests import test_tree test_tree.queue_node(AlarmManager, test_tree.services, "Alarm Manager") ns = test_tree.build_tree("mpx://localhost:5150") root = ns.as_node("/") services = ns.as_node("/services") alarm_manager = services.get_child("Alarm Manager") a1 = ns.create_node(Alarm) a1.configure( {"parent": alarm_manager, "name": "Test Alarm 1", "priority": "low", "description": "Really, this is just test 1"} ) a2 = ns.create_node(Alarm) a2.configure( {"parent": alarm_manager, "name": "Test Alarm 2", "priority": "low", "description": "Really, this is just test 2"} )
accordance with section (3) of the GNU General Public License. This exception does not invalidate any other reasons why a work based on this file might be covered by the GNU General Public License. """ # Refactor 2/11/2007 import time from mpx.service.alarms2.alarm import Alarm from mpx.service.alarms2.alarmevent import AlarmEvent, StateChangedEvent from mpx.service.alarms2.alarmmanager import AlarmManager from mpx.lib.neode.node import NodeSpace, CompositeNode, RootNode from mpx.lib.neode.tests import test_tree test_tree.queue_node(AlarmManager, test_tree.services, 'Alarm Manager') ns = test_tree.build_tree('mpx://localhost:5150') root = ns.as_node('/') services = ns.as_node('/services') alarm_manager = services.get_child('Alarm Manager') a1 = ns.create_node(Alarm) a1.configure({'parent': alarm_manager, 'name': 'Test Alarm 1', 'priority': 'low', 'description': 'Really, this is just test 1'}) a2 = ns.create_node(Alarm) a2.configure({'parent': alarm_manager, 'name': 'Test Alarm 2', 'priority': 'low', 'description': 'Really, this is just test 2'}) a3 = ns.create_node(Alarm) a3.configure({'parent': alarm_manager, 'name': 'Test Alarm 3', 'priority': 'low', 'description': 'Really, this is just test 3'}) a4 = ns.create_node(Alarm)