Commit graph

625 commits

Author SHA1 Message Date
Blake J. Harnden
d799390c4a moved netns code from daemon/src to netns at the top level, updated files to account for location change 2018-01-04 12:03:14 -08:00
Blake J. Harnden
e4a0069bc3 updated configuration to define the core bin dir within constants, updated code to use the core bin dir for vnoded and vcmd, based on using the fpm build system 2018-01-04 10:09:35 -08:00
Blake J. Harnden
42bcb1c79d add default node map configuration, to avoid the need to set this up every time 2018-01-04 08:19:34 -08:00
Blake J. Harnden
afb6af5f87 removed old olog format line 2018-01-03 14:40:45 -08:00
Blake J. Harnden
e4c3d9d13a updated daemon setup.py to leverage find_packages 2018-01-03 13:45:19 -08:00
Blake J. Harnden
742ad0e3a2 removed the usage of logzero, added a formal logging configuration file using json 2018-01-03 10:53:34 -08:00
Blake J. Harnden
59e6b6630a added initial fpm commands for building packages and minor updates to support 2017-12-21 16:19:12 -08:00
Blake J. Harnden
58c6d03bc4 updates to target building separate packages with fpm 2017-12-19 09:43:19 -08:00
Blake J. Harnden
d3210815ab updated email in python setup.py files, shifted test dependency together 2017-12-18 15:50:28 -08:00
Gabriel Somlo
f8e941a2b0 daemon: add ${pyexecdir} to $PYTHONPATH in daemon/src/Makefile
On x86_64, the "core_python_netns" module is installed into ${pyexecdir},
a.k.a. %{python_sitearch}, a.k.a. "/usr/lib64/python2.7/site-packages".
Adding ${pyexecdir} to $PYTHONPATH will prevent the "install" target in
"daemon/src/Makefile" from failing.

Signed-off-by: Gabriel Somlo <glsomlo@cert.org>
2017-11-20 20:56:48 -05:00
Gabriel Somlo
5901f2e1de daemon: use "require" to make eggs available for import
Since version 5.0, python modules (e.g. core, corens3, and netns)
are installed as .egg bundles, and are not available for importing
by default, unless explicitly we use "pkg-resources.require()".

Signed-off-by: Gabriel Somlo <glsomlo@cert.org>
2017-11-20 20:56:48 -05:00
Gabriel Somlo
6d3d17f470 SimpleLxcNode: Remove unused umount method
The umount method was used to remove private mount points before
tearing down a node. Since non-persistend mount namespaces are
automatically cleaned up by he kernel, this method is now unused.

Signed-off-by: Gabriel Somlo <glsomlo@cert.org>
2017-10-11 14:54:27 -04:00
Gabriel Somlo
a5ae485fa6 SimpleLxcNode: Don't umount directories before killing vnoded
A node's private mounts are currently removed before killing
vnoded, which makes them unavailable during container service
shutdown. Any such service accessing the filesystem for atexit()
cleanup (e.g., rsyslogd), will do so on the host filesystem
instead, very likely causing unintended damage.

For example, the default behavior of rsyslogd is to remove its
listening socket (/dev/log, or /run/systemd/journal/dev-log) at
shutdown from its atexit() handler. If the node's private '/dev'
or '/run/systemd/journal' mount has already been removed, the
host-side /dev/log or /run/systemd/journal/dev-log sockets will
be removed instead!

Since non-persistent (mount) namespaces are automatically
destroyed by the kernel when the last process referencing them
is killed, we should simply rely on that behavior instead of
explicitly (and prematurely) unmounting a node's private
directories during shutdown.

Signed-off-by: Gabriel Somlo <glsomlo@cert.org>
2017-10-09 20:53:38 -04:00
Blake J. Harnden
2c154bb255 fixed typo in bridge name for ovs 2017-10-03 11:38:58 -07:00
Blake J. Harnden
f61c07c108 removed pip check, updated make files for using DESTDIR, removed usage of pip during make install 2017-08-21 12:55:51 -07:00
Blake J. Harnden
abc9e06fe1 small doc cleanup, updated python specific docs to leverage the sphix rtd theme as well 2017-08-18 11:34:25 -07:00
Blake J. Harnden
f55d241b36 removed copyright header from all files for core-python and corens3 2017-08-18 10:38:27 -07:00
Blake J. Harnden
67501c9000 updates to set default nodes for ns3 examples 2017-08-18 08:48:33 -07:00
Blake J. Harnden
8155cdc617 documentation theme update, version bumping to 5.0, changes to cleanup pass for ns3 code 2017-08-17 15:25:12 -07:00
Blake J. Harnden
f282f4ea15 initial pass on converting corens3 to use latest code and small cleanup 2017-08-17 13:29:19 -07:00
Blake J. Harnden
fc7fb0f76c fixed sendall in sdt, after testing core/sdt3d integration 2017-08-16 12:03:32 -07:00
Blake J. Harnden
f9847cef34 changed core_python to define version locally, instead of in another file causing import issues 2017-08-10 08:43:02 -07:00
Blake J. Harnden
463618ddf8 small refactoring on how node maps are used, added logic to switch to using a map based on bsd nodes using previous logic 2017-08-09 10:03:43 -07:00
Blake J. Harnden
eb5dd3780c updated installation to use pip for core_python, added a pip check to configure.ac 2017-08-08 11:29:01 -07:00
Blake J. Harnden
67d451c3e9 fixed old log imports and dont bail out on tdma model exception 2017-08-08 09:17:09 -07:00
Blake J. Harnden
f3863ead73 removed service load methids, since they are no longer used, added way for custom service load code to facilitate the unique docker service case 2017-08-07 16:40:39 -07:00
Blake J. Harnden
73eea80f51 attempt to fix missing updates for sdt, moved broker specific code to broker 2017-08-07 15:37:41 -07:00
Blake J. Harnden
8612c73d49 worked through a couple todos, removed usage of eval within parsing xml files 2017-08-07 13:02:25 -07:00
Blake J. Harnden
e4b280196b switched to making use of logzero for logging, provides nicer color output, and an easier path to switch to rotating log files 2017-08-07 11:58:51 -07:00
Blake J. Harnden
76bec9950d more changes to support a common usage of double quotes 2017-08-04 14:51:25 -07:00
Blake J. Harnden
2281051edf making usage of double quotes standard for emane files 2017-08-04 14:34:44 -07:00
Blake J. Harnden
850cc599c8 refactored how services are loaded to be more dynamic 2017-08-03 16:33:54 -07:00
Blake J. Harnden
35c48e67a3 modified the way custom services can be imported and added a test case to verify the import functionality 2017-08-03 14:27:39 -07:00
Blake J. Harnden
78ff7f2189 quick pass for small cleanup within bsd nodes 2017-08-03 12:44:08 -07:00
Blake J. Harnden
1f9a8879c1 quick pass at small xen code cleanup and usage of double quotes 2017-08-03 12:04:22 -07:00
Blake J. Harnden
bc1a24e880 fixed some refactoring issues with xen and bsd code 2017-08-03 09:48:26 -07:00
Blake J. Harnden
d915436c7d added a simple test for a tunnel node, although better testing awwma to require configuration outside of core 2017-08-03 09:37:22 -07:00
Blake J. Harnden
b62076c240 added test script and test for mobility script testing 2017-08-02 16:39:38 -07:00
Blake J. Harnden
05ce19b0c0 fixed refactoring issues in mobility.py, fixed issue with parsing config files in a tuple string format 2017-08-02 14:07:56 -07:00
Blake J. Harnden
4d21314798 fixed renaming issue with sessionid to session_id 2017-08-02 12:25:57 -07:00
Blake J. Harnden
f67547faa6 small test cleanup, functioning distributed core test case, depends on an already running server 2017-08-01 09:28:11 -07:00
Blake J. Harnden
350341cda7 added various log messages to help with correcting issues, added some for adding tunnels that fixes p2p with distributed core, but teardown for p2p is still broken 2017-07-31 09:08:57 -07:00
Blake J. Harnden
e2a932698c appear to have fixed the gui shutdown issue with messages being sent out of order, causing a node to remain with a red box 2017-07-27 16:03:27 -07:00
Blake J. Harnden
14a5d11c4e parameterized emane tests, added tdma test, although it is currently failing 2017-07-27 14:59:40 -07:00
Blake J. Harnden
832f497d47 updated tests to leverage parameterized tests, reduces bloat and make testing the same situation differently much easier 2017-07-27 14:17:33 -07:00
Blake J. Harnden
6a875bcd8d added vnodeclient testing, added a run tests script to make testing easier 2017-07-27 11:57:01 -07:00
Blake J. Harnden
ebe3b9e3e3 added mock for python testing, removed a couple unused methods, added some more quick tests for a variety of interface related methods 2017-07-26 16:52:17 -07:00
Blake J. Harnden
62e8ff8731 fixed one small sdt renaming issue, updated a gui test case 2017-07-26 08:48:59 -07:00
Blake J. Harnden
f767c32643 small test cleanup, can isolate to a singular core test fixture 2017-07-25 10:16:18 -07:00
Blake J. Harnden
45a11f7586 removed session from manager after from server fixes issue in gui with red shutdown box not being removed 2017-07-13 10:10:54 -07:00
Blake J. Harnden
ad179438c6 fixed issue where config messages were not being broadcasted out 2017-07-13 09:36:09 -07:00
Blake J. Harnden
3ba7e3b1a3 added broadcasting of node/link messages to multiple session client scenarios 2017-07-12 12:39:40 -07:00
Blake J. Harnden
964fdd6793 fixed issue causing service configuration loop 2017-07-12 10:35:53 -07:00
Blake J. Harnden
fe08481763 updated wlan tests to be mdr based nodes with emane services 2017-07-12 09:46:57 -07:00
Blake J. Harnden
d51e80fac8 updated emane commeffect test to turn on default connectivity, test now passes 2017-07-12 09:29:36 -07:00
Blake J. Harnden
9934ce8d3f fixed issue with core config messages generating file messages, still seems to be an inifinite loop issue 2017-07-11 15:51:56 -07:00
Blake J. Harnden
336702a056 updated emane tests to use mdr models for the nodes, add a couple extra logs 2017-07-11 10:35:08 -07:00
Blake J. Harnden
777e19de93 initial effort to try and fix multiple clients to behave as before, includes fixes for guaranteed message ordering of nodes before links when joining a session 2017-07-11 08:55:15 -07:00
Blake J. Harnden
673fdc94b5 removed unused imports in emane files, refactored emane testing to simplify test cases and reduce repeated code 2017-07-10 10:44:10 -07:00
Blake J. Harnden
dced47b588 fixed emane version checks, fixed emane config message handling, added initial emane test cases 2017-07-10 09:25:33 -07:00
Blake J. Harnden
613e550e8a merged latest code from rodolfos merge from the latest github pull 2017-07-06 15:10:50 -07:00
Blake J. Harnden
77890841bc fixed incorrect usage of getattr, the default value can not be a keyword argument 2017-07-05 13:43:57 -07:00
Blake J. Harnden
6bfa81f3a8 small cleanup to sdn services, added loadservice line to daemon, and updated example service for how current services are coded 2017-07-05 13:32:16 -07:00
Rod A Santiago
55a6e2dcef merged cleanup branch with master 2017-06-19 18:09:28 -07:00
Rod A Santiago
0a91fe7a3e merged cleanup branch with master 2017-06-19 18:03:39 -07:00
Blake J. Harnden
1caa6ab8c9 bug cleanup pass from sonarqube 2017-06-16 15:17:12 -07:00
Blake J. Harnden
5920a09aae Merge branch 'cleanup' of git-ssh.web.boeing.com:Boeing-CORE/CORE into cleanup 2017-06-16 14:31:23 -07:00
Blake J. Harnden
a0edc0b499 updated branch name to be appropriate 2017-06-16 14:31:07 -07:00
cspiker
192b362ae6 cleaned up SDN services for release 2017-06-08 13:19:06 -07:00
cspiker
a1007e2391 Updated service files to support new format 2017-06-08 12:30:43 -07:00
cspiker
46baca85d9 Add OVS and Ryu Services to CORE for SDN support 2017-06-08 08:31:50 -07:00
cspiker
b37d1d52fa added new OVS service file 2017-06-07 12:41:52 -07:00
Rod A Santiago
a4f47a17e3 Merge branch 'master' of https://github.com/coreemu/core 2017-06-05 10:20:39 -07:00
Dustin Spicuzza
17e4fc0933 Emit more descriptive error message if config file is incorrect 2017-05-18 18:39:19 -04:00
Blake J. Harnden
97f3c3a070 fixed issue with sending the wrong type flag from cleaning up configuration request code in services 2017-05-05 15:14:27 -07:00
Blake J. Harnden
8e9dc21c3c removed some commented out code and fixed a documentation parameter mistake 2017-05-04 15:24:45 -07:00
Blake J. Harnden
603179d8ca fix control net method naming error 2017-05-04 14:43:57 -07:00
Blake J. Harnden
fd29b4a141 fixed documentation for mac address paramters in seen locations 2017-05-04 14:22:02 -07:00
Blake J. Harnden
7ad57bfb53 removed the core server reference from sessions, added a shutdown handler to initiate callbacks for when a session shutsdown, this is how the core server can run the same functionality going forward, small core-daemon documentation cleanup 2017-05-04 13:49:14 -07:00
Blake J. Harnden
3f82c980de pass to help flesh out documentation for core.misc 2017-05-04 10:36:13 -07:00
Blake J. Harnden
8ade6f4f02 fixed bug with unpacking objects introduced while cleaning things up, added a basic gui broker test that depends on an existing daemon running 2017-05-03 15:29:15 -07:00
Blake J. Harnden
2b866e1b3f quick pass to try and provide documentation within core.netns 2017-05-03 13:20:56 -07:00
Blake J. Harnden
4ae7958a63 quick base to try and help flesh out documentation under core.* 2017-05-03 09:30:49 -07:00
Blake J. Harnden
8f45e5c4da core test cleanup, conslidating network creation for link modification testing 2017-04-27 14:49:51 -07:00
Blake J. Harnden
14cb7dc251 caught up with latest gitlab commits, added a new tests directory leveraging pytest based tests for testing core functionality 2017-04-27 13:34:23 -07:00
Blake J. Harnden
2fc6345138 catching up with commits: daemon: Add an instantiation-complete CORE API event type 2017-04-25 11:38:53 -07:00
Blake J. Harnden
00f4ebf5a9 initial commit after bringing over cleaned up code and testing some examples 2017-04-25 08:45:34 -07:00
Jeff Ahrenholz
0b0557e008 fix /var/run/quagga permissions for Ubuntu 16.04 2017-03-31 10:59:58 -07:00
lbaumgaertner
e665a122b6 fix to add correct broadcast address for ipv4 interfaces with netns backend 2017-03-28 12:00:24 +02:00
Tom Goff
67117a3af3 daemon: Improve importing custom services.
This should help avoid python module name conflicts.
2017-02-24 01:02:08 +00:00
adamson
56896bddd1 fixed issue with indexing EMANE RJ45 objects 2017-02-23 18:40:54 -05:00
Gabriel Somlo
b1ea0574e5 daemon: start Quagga with default user/group names
Allow native distribution packages to run with their default user
and group names by no longer forcing "-u root -g root" on any of
the Quagga daemons' command lines.

This should continue to allow hand-compiled and/or "side-loaded"
Quagga software to run as root, if configured to do so at build
time.

Signed-off-by: Gabriel Somlo <glsomlo@cert.org>
2017-02-02 11:25:53 -05:00
Gabriel Somlo
33906aae9f daemon: remove Quagga 'vtysh' service
Since all Quagga daemons are configured from a consolidated
location (the 'zebra' service), there is nothing left to do
for a dedicated service such as 'vtysh'. This patch removes
the service, along with all references to it from the rest
of the source tree (sample *.imn files, examples, etc.)

Signed-off-by: Gabriel Somlo <glsomlo@cert.org>
2017-02-01 09:55:58 -05:00
Gabriel Somlo
6609d2c394 daemon: streamline Quagga startup
Currently, all Quagga daemons are started concurrently by their
respective CORE services, using "quaggaboot.sh" generated by the
'zebra' service. However, all routing services depend on 'zebra'
already running, and 'vtysh' depends on ALL other Quagga services
before it can push configuration from the common "Quagga.conf" to
all running daemons (see "waitforvtyfiles()" in "quaggaboot.sh").

The spinwait+timeout based implementation of "waitforvtyfiles()"
may, depending on load, give up too early and fail to configure
all Quagga daemons.

This patch streamlines the way Quagga daemons are started, by
launching them all from the 'zebra' service. The correct sequence
is to first launch the 'zebra' daemon itself, then proceed with
all routing daemons, and finish with a call to "vtysh -b" which
configures all running daemons.

The list of all applicable daemons to launch is obtained using
'grep' from Quagga.conf, in the same way "waitforvtyfiles()" used
to discover which *.vty files to look for in /var/run/quagga/.

The startup command for all services other than 'zebra' becomes
empty, and "quaggaboot.sh" issues a warning on attempts to have
it launch any other daemon.

Signed-off-by: Gabriel Somlo <glsomlo@cert.org>
2017-01-12 16:40:45 -05:00
Tom Goff
cec880e6e2 daemon: Add the EMANE TDMA model to the list of an available models. 2016-12-22 10:53:23 -05:00
Rod A Santiago
6e610f4309 ensured the shutdown event doesn't get sent until all node delete replies have been sent 2016-12-14 17:24:21 -08:00
Tom Goff
7bbc2aef0e daemon: Remove the SIGPIPE signal handler.
Python installs a default signal handler for SIGPIPE that raises an
exception.  Let core-daemon handle the exception instead of exiting.
2016-10-20 18:10:41 -04:00
Rod A Santiago
3f6040a0f3 Merge branch 'master' of https://github.com/coreemu/core 2016-10-19 16:21:10 -07:00
Rod A Santiago
d17ed889d2 remerged with git pending fix to distributed configuration problem 2016-10-19 16:21:06 -07:00
Tom Goff
c01d1226c3 daemon: Fix determining when to handle API messages locally.
This fixes distributed wired scenarios.

The problem was introduced by commit 42b1771.
2016-10-19 18:49:34 -04:00
Rod A Santiago
5d0aa4ac1a Reverted changes due to merge with github commits made on Oct 12. An issue with distributed deployment seem to have been introduced in those commits. 2016-10-19 13:09:21 -07:00
Rod A Santiago
35356dc9c8 Merge branch 'master' of https://github.com/coreemu/core 2016-10-18 16:40:47 -07:00
Tom Goff
5ec7e39a28 daemon: Sort EMANE servers so NEM ids are deterministic. 2016-10-12 17:37:40 +00:00
Tom Goff
b1beff1eba daemon: Wait longer for EMANE network interfaces to exist.
When EMANE is still running.
2016-10-12 17:37:27 +00:00
Tom Goff
6d1b5d28a1 daemon: Remove tracking remote node boot status.
The instantiation-complete status of remote servers should indicate
when all nodes are running.
2016-10-12 17:37:13 +00:00
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
tgoff0
5d08aa21bf daemon: Set session configuration before setting the initial session state. 2015-03-24 23:30:04 +00:00
tgoff0
abaed4924b daemon: Improve event handling some. 2015-03-24 18:06:49 +00:00
tgoff0
61d0f34982 added a default olsrd config file to the olsrorg service template
From: dean
2015-03-09 15:21:22 +00:00
tgoff0
e9a4a52755 daemon: Make Configurable.valueof() a class method. 2015-03-09 15:21:16 +00:00
tgoff0
8248a292d0 daemon: Use a consistent interface naming convention when creating
links between layer-2 devices.
2015-03-09 15:20:59 +00:00
tgoff0
61f1a6e72e daemon: Represent object ids in hex when used to generate interface
names (to reduce length if possible).
2015-03-09 15:20:54 +00:00
tgoff0
db15bee60c daemon: Include MAC addresses in CORE API link messages. 2015-03-09 15:20:42 +00:00
tgoff0
db03927892 daemon: Fix encoding MAC addresses for CORE API messages. 2015-03-09 15:20:33 +00:00
tgoff0
f2cd25d893 daemon: Update the example emane 802.11 python script. 2015-02-27 22:03:52 +00:00
tgoff0
750b6c507d daemon: Minor XML-related cleanup. 2015-02-27 00:06:47 +00:00
tgoff0
cb93153007 daemon: Use autoconf to build the vnoded, vcmd, and netns programs. 2015-02-20 03:10:56 +00:00
tgoff0
99ab22c78c Improve determining an appropriate python install prefix. 2015-02-19 02:00:11 +00:00
tgoff0
9cae7819bf daemon: Have git ignore files generated when creating python
documentation.
2015-02-13 22:35:34 +00:00
tgoff0
145866b70b daemon: Improve the python documentation Makefile. 2015-02-13 21:34:41 +00:00
tgoff0
ca8856d6c8 daemon: Initial support for writing different versions of XML scenario files. 2015-02-05 00:16:14 +00:00
tgoff0
899b5ae5be daemon: Renumber XML versioning.
Consider the current XML representation version 0.0.
2015-02-05 00:15:59 +00:00
tgoff0
bc3ba68b28 daemon/services: Update NRL services. 2015-02-05 00:15:54 +00:00
tgoff0
5bb00646d7 daemon: Call the EMANE post-startup function when entering the session
runtime state.

This should help synchronization startup for distributed emulations.
2015-02-05 00:15:48 +00:00
tgoff0
978f9946f1 daemon: Add initial support for invoking python callbacks when session
state changes occur.
2015-02-05 00:15:43 +00:00
tgoff0
fb662d06b7 daemon: Ignore redundant session state changes. 2015-02-05 00:15:38 +00:00
tgoff0
4599520518 Add some gitignore files. 2015-01-28 02:15:45 +00:00
tgoff0
baa9afc20f script fix 2015-01-21 21:38:19 +00:00
tgoff0
458d1d64e6 added olsr.org service template 2015-01-21 21:38:15 +00:00
tgoff0
6159d31f66 daemon: Refactor waiting for a TunTap device to exist.
This should also fix an issue that caused excessive startup delay.
2015-01-21 21:38:10 +00:00
tgoff0
d40b0dd89c Adjust file mode bits. 2015-01-21 21:38:02 +00:00
tgoff0
3d7aab1149 daemon: Use interface names from /sys/class/net when it exists. 2015-01-21 21:37:52 +00:00
tgoff0
dfc4b2b9a2 daemon: Trivial debug message cleanup.
Check that a message header was received before trying to log it.
2015-01-21 21:37:48 +00:00
tgoff0
29c31aad9a daemon: Send an exception message reply if an error occurs when
importing/executing a file.
2015-01-21 21:37:43 +00:00
tgoff0
b9ebcd979c daemon: Do some session cleanup if an error occurs when importing an
XML scenario.
2015-01-21 21:37:38 +00:00
tgoff0
d56f26b5d6 Some trivial code cleanup. 2015-01-21 21:37:31 +00:00
tgoff0
a0d4ac4ec4 daemon: Wait for a TunTap device to exist before trying to configure
addresses.
2014-12-15 22:24:17 +00:00
tgoff0
6084b4f416 Adjust file mode bits. 2014-12-15 18:23:25 +00:00
tgoff0
598cd87080 daemon: Export the filename as a global variable when executing a file. 2014-12-15 18:23:13 +00:00
tgoff0
104e68a712 daemon: Initial support to allow multiple versions of XML scenario files. 2014-12-15 18:22:53 +00:00
tgoff0
3ffdf7c420 daemon: Some code reorganization to make XML support more modular. 2014-12-15 18:22:46 +00:00
ahrenholz
b89e7d6471 fix MDR test to work with Quagga under Ubuntu found in quagga_search_path
(Boeing r1901)
2014-11-05 21:31:01 +00:00
ahrenholz
c5f1fa7d13 added docker service file from r603 2014-10-31 18:47:57 +00:00
ahrenholz
90f3c6569f convert node count to string before building session message (fixes bug #258)
patch from Björn Axelsson
(Boeing r1900)
2014-10-31 18:35:38 +00:00
ahrenholz
f5e3461903 make calcdistance a staticmethod
(Boeing r1897)
2014-10-31 16:46:43 +00:00
ahrenholz
267c49dfab added Docker service contributed by Stuart Marsden, with some mods
fixes bug #264
(Boeing r1896)
2014-10-31 16:45:03 +00:00
ahrenholz
f61522207d update HTTP service to support apache 2.4 on Ubuntu 14.04 (fixes bug #261)
(Boeing r1895)
2014-10-30 18:13:43 +00:00
ahrenholz
503713f0bc use hex value for short session ID used in naming interfaces
use interface names "vethOOOOO.ii.ss" and "vethOOOOO.iipss" for veth pairs

(where OOOOO = object id, ii = interface index, ss = hex short session ID)

fixes bug #260 virtual interface names too long
(Boeing r1894)
2014-10-28 21:18:16 +00:00
ahrenholz
96dd48e3c3 fixed sample scripts to work with EMANE 0.9.x
(Boeing r1893)
2014-10-28 17:40:14 +00:00
ahrenholz
5c9c8bfff7 set IP addresses on TAP devices used with EMANE 0.9.2 (fixes bug #268)
(Boeing r1892)
2014-10-28 17:24:31 +00:00
ahrenholz
be4f431ab6 revise EMANE 0.9.2 detection due to protobuf file under Ubuntu 12.04
make Emane.detectversionfromcmd() a classmethod
(Boeing r1890,1891)
2014-10-27 20:52:01 +00:00