Commit graph

370 commits

Author SHA1 Message Date
Tom Goff
d33147154c daemon: Add an instantiation-complete CORE API event type.
Have CORE servers send an instantiation-complete event after a session
has completed instantiating.  Only enter the runtime state after
instantiation-complete events have been received form all servers.
2016-10-12 17:36:59 +00:00
Tom Goff
42b1771dcb daemon: Create a CoreServer class to represent CORE servers.
Includes related changes and refactoring.
2016-10-12 17:36:42 +00:00
Tom Goff
8479ccd2c5 daemon: Use a set to store the broker node map. 2016-10-12 17:36:30 +00:00
Tom Goff
6494605298 daemon: Use a set to store broker physical nodes. 2016-10-12 17:36:16 +00:00
Tom Goff
4662164ece daemon: Use a set to store broker networks. 2016-10-12 17:35:18 +00:00
Tom Goff
31a9f6fb34 daemon: Use a set to store broker handlers. 2016-10-12 15:55:30 +00:00
Rod A Santiago
b12c795aa8 removed modules that are currently in the API_2.0 repo 2016-09-23 09:04:01 -07:00
Tom Goff
e1aec0ea1d daemon/examples: Update the distributed netns example.
The number of nodes used can depend on a command-line argument, but
node one should always exist.
2016-09-16 10:48:22 -04:00
Rod A Santiago
2d745c339f Moved classes CoreRequestHandler, CoreDatagramRequestHandler, CoreServer, CoreUdpServer to a separate core.coreserver module. This will allow future definition of auxiliary request handlers for providing alternative interfaces with CORE. 2016-09-14 18:06:19 -07:00
Rod A Santiago
9913168896 Fixed sendnodeemuid to use the handler's sendall() method instead of BaseRequestHandler's request.sendall(). Added a method to retrieve a configuration item by key. 2016-09-14 18:05:52 -07:00
Rod A Santiago
520dce894a New file from NRL 2016-09-14 17:15:43 -07:00
Rod A Santiago
b239b906bd Cleaned up for checking in to NRL repo 2016-09-14 17:15:16 -07:00
Rod A Santiago
ae4a4b903e Merged with new version from NRL 2016-09-14 17:13:46 -07:00
Rod A Santiago
928617e613 Merged new versions from NRL 2016-09-14 17:12:25 -07:00
Rod A Santiago
65803f9334 Last cleanup prior to merging with changes in proteanforge 2016-09-13 17:46:39 -07:00
Rod A Santiago
7991cba55e removed import of apibridge 2016-09-08 17:53:20 -07:00
Rod A Santiago
ebd931d2ec added methods for adding node/device specific fileds 2016-09-08 17:52:08 -07:00
Rod A Santiago
fa1b79fe68 minor update to start message 2016-09-06 15:48:41 -07:00
Rod A Santiago
3ea417b855 moved servers and request handlers to separate module. added support for auxiliary server with configurable request handlers 2016-09-06 15:46:54 -07:00
Tom Goff
c0a9c6c9af daemon: Remove unused variable. 2016-09-06 10:38:38 -04:00
adamson
f8da9334d8 fix to EMANE TDMA XML generation 2016-09-06 10:16:31 -04:00
Tom Goff
e5e75756ea daemon: Remove session-related changes introduced by 68532cb. 2016-09-05 17:12:16 -04:00
Tom Goff
1c91f41742 daemon: Remove unused traceback code introduced by 68532cb. 2016-09-05 17:09:49 -04:00
adamson
d270da8f41 added daemon/core/emane/tdma.py module to support EMANE 1.0.1 TDMA model 2016-09-05 17:06:31 -04:00
Tom Goff
f03311b50a daemon: Add support for EMANE 1.0.1. 2016-09-05 17:02:59 -04:00
Rod A Santiago
5934b23b18 enabled trace messages only when debugging 2016-08-22 16:45:50 -07:00
Rod A Santiago
695da8a153 Fixed assignment of the session clientId and port_num fields. 2016-08-22 16:10:48 -07:00
Rod A Santiago
1dfacdbaea handled config messages from the daemon;handled link messages from the daemon; handled modified session message from an api2 client to connect with an experiment that has already been added by other clients 2016-08-22 15:33:50 -07:00
Rod A Santiago
a6e7c0da7e added methods getDeviceInterfaceByIdx and getNodeInterfaceByIdx 2016-08-22 15:23:18 -07:00
Rod A Santiago
e45a83143f Added method getsession to CoreApi2Server 2016-08-22 15:22:25 -07:00
Rod A Santiago
96af8a439c started adding server code for joining experiments 2016-08-19 16:58:03 -07:00
Rod A Santiago
1a249fe1ec some refactoring. added mappings of legacy node types to Node and Device types and emulation types 2016-08-19 15:29:07 -07:00
Rod A Santiago
71c2dcf0af returned a list of experiments on session establishment including legacy core sessions 2016-08-12 16:54:24 -07:00
Rod A Santiago
ad0b45c8f3 added method getitem() to the SessionMetaData class 2016-08-12 16:53:01 -07:00
Rod A Santiago
36c82d1960 moved apibridge to misc 2016-08-12 11:58:30 -07:00
Rod A Santiago
3359aeb323 moved from api to misc directory 2016-08-12 10:35:12 -07:00
Rod A Santiago
ea3becb38b convenience module for the python module generated from the core.proto IDL file. 2016-08-12 10:34:32 -07:00
Rod A Santiago
3cf9c80d15 moved as much api2 handling as possible into apibridge.py 2016-08-11 16:51:46 -07:00
Rod A Santiago
cf2912e8a4 API2 add/modify experiment support. 2016-08-10 17:27:15 -07:00
Rod A Santiago
3ba2b685b6 Initial commit of data store for API2 experiments 2016-08-10 17:24:56 -07:00
Rod A Santiago
2f7c337b02 translated events, node updates to api2 2016-08-02 14:33:24 -07:00
Rod A Santiago
4c4a44777b remove trace logs 2016-08-02 14:32:05 -07:00
Rod A Santiago
8a9d4e7216 renamed coreapi2 to apibridge 2016-08-02 14:31:24 -07:00
Rod A Santiago
3cb41c0e03 renamed coreapi2 to apibridge 2016-08-02 14:31:03 -07:00
Rod A Santiago
dfd643789c removed because core_pb2.py is a generated file. added an install option instead from the API_2.0 root. 2016-08-02 10:33:23 -07:00
Rod A Santiago
cb73e6225d updated Node message class with new fields 2016-08-01 17:25:07 -07:00
Rod A Santiago
4acb9f5359 Handled transitions to runtime state 2016-08-01 17:19:23 -07:00
Rod A Santiago
2bf3594cd1 sent node emulation updates via handler sendall method, instead of directly via handler.request.sendall. 2016-08-01 16:07:40 -07:00
Rod A Santiago
39fc11c8fd synced with API2 repo 2016-07-29 15:53:19 -07:00
Rod A Santiago
35141b130c separated legacy API wrapper. added ipv4 addresses to interfaces 2016-07-29 15:52:56 -07:00
Rod A Santiago
864b869526 separated legacy API wrapper. added ipv4 addresses to interfaces 2016-07-29 15:52:32 -07:00
Rod A Santiago
05683bb232 separated legacy API wrapper. added ipv4 addresses to interfaces 2016-07-29 15:52:00 -07:00
Rod A Santiago
2a8eb823ca basic api2 experiment is loadable 2016-07-28 16:47:14 -07:00
Rod A Santiago
36390cbba6 removed stack trace 2016-07-28 16:45:52 -07:00
Rod A Santiago
6538490c41 progressing .... 2016-07-27 17:37:55 -07:00
Rod A Santiago
821d78dfb5 Fixed typo in dispatchReplies argument. 2016-07-27 10:02:35 -07:00
Rod A Santiago
d710eb3734 initial coreapi2 specification and legacy to api2 translation 2016-07-26 17:55:29 -07:00
Rod A Santiago
e9c0730c12 added api2 handler and server 2016-07-26 17:54:11 -07:00
Rod A Santiago
e4cd3b064f added api2port 2016-07-26 17:53:37 -07:00
Rod A Santiago
88e285f016 daemon: added option API TLVs so that per-interface parameters are kept for EMANE models when a single node has multiple interfaces of the same EMANE model type but different model parameters 2016-04-20 08:45:16 -07:00
Rod A Santiago
68532cb818 daemon: added option API TLVs so that per-interface parameters are kept for EMANE models when a single node has multiple interfaces of the same EMANE model type but different model parameters 2016-04-20 08:43:39 -07:00
Rod A Santiago
46cd65c821 daemon: added support to set <address> 'iface' attribute with interface name in XML written by CORE so different interface addresses can be discriminated on <testHost> instances 2016-04-20 08:41:59 -07:00
Rod A Santiago
139b495982 examples: added option API TLVs so that per-interface parameters are kept for EMANE models when a single node has multiple interfaces of the same EMANE model type but different model parameters 2016-04-20 08:38:10 -07:00
Rod A Santiago
b91b5125f2 daemon: changes to support optional retainment of per-interface parameters for EMANE models when multiple EMANE models of the same type are used as interfaces for a node 2016-04-20 08:36:58 -07:00
Rod A Santiago
c66914ec21 daemon: added option API TLVs so that per-interface parameters are kept for EMANE models when a single node has multiple interfaces of the same EMANE model type but different model parameters 2016-04-20 08:33:58 -07:00
Rod A Santiago
5895ba2d20 fixed issue with wlan objects from previous sessions lingering in EbtablesQueue and causing the daemon to hang. 2016-04-19 14:10:03 -07:00
Tom Goff
76bf200f41 daemon: Explicitly close EMANE event service files. 2016-03-04 16:57:56 -05:00
Tom Goff
d681534b17 daemon: Minor code reorganization. 2016-03-04 16:57:46 -05:00
Tom Goff
6f77086540 daemon: Remove __del__() methods.
This simplifies Python garbage collection.
2016-03-04 16:57:29 -05:00
Tom Goff
ef85995cc6 daemon: Explicitly close vnode clients at shutdown. 2016-03-04 16:57:17 -05:00
Tom Goff
5a58978f79 netns: Add a close() method to VCmd objects. 2016-03-04 16:56:56 -05:00
Tom Goff
b1de00be1a netns: Remove the explicit client connected flag.
Use the client variable directly.
2016-03-04 16:56:29 -05:00
Tom Goff
73b14f17b8 netns: Delete the associated client if an I/O error occurs. 2016-03-04 16:56:09 -05:00
Tom Goff
d40dae4e1c netns: Change the argument passed to client delete requests.
Directly pass a pointer to the containing VCmd struct.
2016-03-04 16:55:42 -05:00
Tom Goff
b86881aba9 netns: Add a kill() method to VCmdWait objects. 2016-02-23 17:33:05 -05:00
Tom Goff
d7bce43e42 netns: Have VCmdWait objects hold a reference to the corresponding Vcmd.
Also have VCmdWait methods check if the object is associated with an
actual command.
2016-02-23 17:33:05 -05:00
Tom Goff
d42d54a477 netns: Trivial code reorganization. 2016-02-19 17:57:21 -05:00
Tom Goff
d4d2f36481 daemon: Fix typo. 2016-02-18 17:23:10 -05:00
Tom Goff
85a3eee5b7 daemon: Have the xpimd service enable IGMP by default. 2016-02-18 15:35:17 -05:00
Tom Goff
360de10e1e daemon: Add IPv4 multicast routing using xpimd as a Quagga service. 2016-02-17 13:33:19 -05:00
Tom Goff
d21de76dfa daemon: Save NEM information in the session directory during EMANE startup.
Write NEM information formatted as:
    <node hostname> <network interface name> <NEM ID>
to /tmp/pycore.XXXXX/emane_nems as part of starting EMANE.

This happens before the runtime state is entered and is then available
to node services.
2016-02-09 16:57:05 -05:00
Tom Goff
6dbec302e3 daemon: Use /dev/null for stdin when running state hooks. 2016-01-29 18:47:12 -05:00
Tom Goff
23f7995eab daemon: Make EMANE event service file descriptors close-on-exec. 2016-01-29 18:43:54 -05:00
Tom Goff
a102c46d37 daemon: Make asynchronous notifier file descriptors close-on-exec. 2016-01-29 18:42:19 -05:00
Tom Goff
104d05a4be daemon: Minor code reorganization. 2016-01-29 18:22:08 -05:00
Tom Goff
0dcf2c05f0 daemon: Make the UDP server socket close-on-exec. 2016-01-29 18:07:43 -05:00
Tom Goff
0853c95592 daemon: Make command channel file descriptors close-on-exec. 2016-01-29 17:49:16 -05:00
Tom Goff
ec8ac2f258 daemon: Minor code reorganization. 2016-01-29 17:46:55 -05:00
Tom Goff
0333c74bec daemon: Used the communicate() method to interact with subprocesses. 2016-01-29 16:56:49 -05:00
Tom Goff
6fb1eb9bd6 daemon: Log output from state hooks to a file.
Also close other file descriptors when running state hooks.
2016-01-29 16:18:39 -05:00
Rod A Santiago
e8cf15fb64 assigned specific xml element types to network nested devices (switches and hubs) instead of the generic 'host' type 2016-01-28 15:37:52 -08:00
Tom Goff
1787d9e42c services: Add a terminating newline. 2016-01-06 13:42:17 -05:00
Tom Goff
18039a2564 daemon: Add a logrotate configuration file. 2015-12-29 13:50:28 -05:00
Tom Goff
52e75bea3b daemon: Add support for log file rotation when SIGUSR1 is received. 2015-12-29 13:50:18 -05:00
Tom Goff
b84c565329 daemon: Catch additional signals that terminate the process by default. 2015-12-29 13:50:05 -05:00
Tom Goff
ccf0dae139 automake: Add some missing distribution files. 2015-12-28 14:56:00 -05:00
Tom Goff
9440a16ef2 daemon: Add support for EMANE 0.9.3. 2015-12-18 17:12:26 -05:00
Tom Goff
ce0bfc88eb daemon: Improve handling node-specific directory names. 2015-11-23 09:51:07 -05:00
Tom Goff
adbbafcc11 services: Set 'default' sysctl interface settings in addition to 'all'. 2015-11-12 18:22:41 -05:00
Tom Goff
28c27d27c1 daemon: Simplify event loop timer processing. 2015-11-05 12:37:48 -05:00
Tom Goff
c8d5ec994a daemon: Include stack trace information when an exception occurs in a
session state hook.
2015-11-04 19:06:33 -05:00
Tom Goff
fc9a7c5759 daemon: Fix adding events to an event loop that already has an event
pending.
2015-11-04 19:02:21 -05:00
Tom Goff
f16f11c272 daemon: Check if devices are found when generating deployed scenario XML. 2015-10-13 11:07:15 -04:00
Tom Goff
ec5635c4a4 daemon: Add EMANE 0.9.1 R2RI configuration items. 2015-10-09 17:18:18 -04:00
weston
412f86ff15 removed specification of path for executable 2015-10-09 15:54:52 -04:00
weston
0b94aab4ae removed specification of default mgenBasicActor port (to allow default to be changed by mgenBasicActor) 2015-10-09 15:54:28 -04:00
Tom Goff
3a13b8c92d daemon: Use Emane.version directly instead of checking if EventService
exists.
2015-10-09 13:51:04 -04:00
Tom Goff
026f54d658 daemon: Assign version variables to the Emane class instead of
instances.
2015-10-09 13:50:59 -04:00
Tom Goff
63ff54243e daemon: Add an example script that generates skeleton CORE bindings
from EMANE model manifest files.
2015-10-09 13:50:54 -04:00
Tom Goff
1c8c9ce6ea daemon: Make generation of EMANE location events explicitly configurable. 2015-10-09 13:50:50 -04:00
Tom Goff
04e934c93c daemon: Prefer using Session.getcfgitem() instead of direct access. 2015-10-09 13:50:45 -04:00
Tom Goff
e24bc9f3b9 daemon: Fix support for multiple session state hooks. 2015-10-09 13:50:39 -04:00
Jeff Ahrenholz
c37627b67a Merge pull request #70 from stuartmarsden/pythondaemonexample
Add an example which can run on the daemon when run as a standard user.
2015-09-30 20:47:18 -07:00
Tom Goff
ac19cfa7ff daemon: Add a startup service.
When enabled, the startup service ensures that other node services
start in order (according to the service _startindex value) and that
the prior service completes before the next service starts.  It also
captures any output from startup commands in a file named
'startup.log'.
2015-09-11 18:12:57 -04:00
Tom Goff
2c8744f14e Revert "daemon: Use a master script to start node services."
This reverts commit 15adf81954.
2015-09-11 18:12:49 -04:00
Tom Goff
15adf81954 daemon: Use a master script to start node services.
This helps starting services with dependencies by running service
start commands serially.
2015-08-31 11:31:57 -04:00
Stuart Marsden
a9b0014c91 Add a example which can run on the daemon when run as a standard user. 2015-08-04 13:46:09 +03:00
tgoff0
b1322df827 use the modified tun_flowctl driver if it exists
From: weston
2015-06-01 17:52:49 +00:00
tgoff0
d92f1ff89d fixed issue with assigning the 'lo' device for eventservice when using emane 0.9.1
From: santiago
2015-06-01 17:52:43 +00:00
tgoff0
a7e8043db8 daemon: Fix installation of executable example scripts. 2015-05-27 13:29:09 +00:00
tgoff0
5845f7afed Changed default listen address back to localhost from 0.0.0.0 2015-05-26 17:34:33 +00:00
tgoff0
a91e9e0d4c daemon: Fix corens3 examples install directory. 2015-05-26 17:34:28 +00:00
tgoff0
0ce17e8c52 daemon: Use automake to install python data files.
Includes other small changes.
2015-05-26 17:33:57 +00:00
tgoff0
5838814f07 daemon: Improve running session state change hooks. 2015-05-22 00:56:24 +00:00
tgoff0
aedd808f1a daemon: Fix path of python sbin programs. 2015-05-22 00:56:02 +00:00
tgoff0
ad60004fad daemon: Improve launching xterm from a sudo environment. 2015-05-22 00:55:48 +00:00
tgoff0
c68e05b4b5 Prefer using ip instead of ifconfig.
Includes other minor improvements.
2015-05-22 00:55:20 +00:00
tgoff0
2f3ec89ef4 Use sys.prefix instead of sys.exec_prefix for python sbin programs. 2015-05-22 00:55:13 +00:00
tgoff0
e905648d68 change the default pipe name of olsrv2 2015-05-22 00:54:49 +00:00
tgoff0
f675b0a16d added check for all blank option values 2015-05-22 00:54:44 +00:00
tgoff0
b82c94efd8 prevent unintended session options alteration from the gui 2015-05-22 00:54:39 +00:00
tgoff0
0018be074f daemon: Only automatically save a XML representation of the current
running session when NMF version 1.0 is used.
2015-05-22 00:54:34 +00:00
tgoff0
ea4f6ba518 fixed issues with shutting down a distributed batch mode 2015-05-22 00:54:28 +00:00
tgoff0
5b36181956 Raise fatal exception if control nets from earlier sessions are detected 2015-05-22 00:54:23 +00:00
tgoff0
e73dbbe25d Made persistent to allow execution from the GUI 2015-05-22 00:54:17 +00:00
tgoff0
591ec20937 daemon: Automatically save a XML representation of the current session
after starting, including the deployed network plan when the new NMF
format is used.
2015-05-22 00:54:04 +00:00
tgoff0
baec96fac1 Undo check for configured controlnet, which is optional. 2015-05-22 00:53:59 +00:00
tgoff0
f6049614ab Undo check for configured controlnet, which is optional. 2015-05-22 00:53:54 +00:00
tgoff0
9600ce9e03 Added example setting of primary control network ina distributed environment. Added example settings of auxiliary control networks. 2015-05-22 00:53:49 +00:00
tgoff0
06fe91ea86 Added support for auxiliary control networks. Some refactoring. 2015-05-22 00:53:43 +00:00
tgoff0
cd479193fc checked for the attachment of a server interface to a control net before establishing a GRE tunnel with peers. 2015-05-22 00:53:38 +00:00
tgoff0
ab4819ac93 allow attachment of a server interface to a control net. added support for multiple control networks. 2015-05-22 00:53:33 +00:00
tgoff0
13fbea9153 Allow separation of OTA traffic from event traffic and from control backplane traffic. Some refactoring. 2015-05-22 00:53:28 +00:00
tgoff0
0fde50992d daemon: Initial support to include a deployed network plan in the NMF
XML scenario representation.
2015-05-22 00:53:22 +00:00
tgoff0
1112da1417 daemon: Initial support for importing a scenario using the new NRL
Network Modeling Framework (NMF) XML representation.
2015-05-22 00:53:15 +00:00
tgoff0
08c9fd8bf5 daemon: Initial support for exporting a scenario using the new NRL
Network Modeling Framework (NMF) XML representation.
2015-05-22 00:53:01 +00:00
tgoff0
04e98a8004 Improve uninstalling python sbin programs. 2015-05-16 01:53:20 +00:00
tgoff0
692afe7f81 services: Improve the mgen actor service.
Fix shutdown and add a validation command.
2015-04-10 00:55:15 +00:00
tgoff0
4957b73e44 added shutdown to mgen actor
From: macker
2015-04-03 01:49:15 +00:00
tgoff0
ed14bb60e5 added missing 80211abg mac params when running with EMACS 0.9.x
From: santiago
2015-04-03 01:49:09 +00:00