Commit graph

263 commits

Author SHA1 Message Date
Blake Harnden
09aa882017 fixed config service to leverage validation_timer properly, added unit tests for config service base class 2020-01-27 10:57:16 -08:00
Blake Harnden
aa96484fb6 updated utils.validate_mac format to use unix expanded to avoid singular values 2020-01-15 17:02:27 -08:00
Blake Harnden
7028d3e78f added unit tests to help check new utils functions and usages within nodes for adding addresses and macs 2020-01-09 14:23:08 -08:00
Blake Harnden
fd10663323 changes to replaces known usages of ipaddress, leaving only ipaddress.MacAddress 2020-01-08 13:25:00 -08:00
Blake Harnden
513eaf2b76 improved coretk gui alerts to display alert text when selected, fixed merged code for adding a check to cleanup interfaces, updated session.exceptions to use enums directly 2019-12-20 10:51:52 -08:00
Blake Harnden
44df926fb9 updated events streamed from sessions to include session id for easy identification 2019-12-16 12:21:03 -08:00
Blake Harnden
424f69bb15 updated grpc throughputs to only check a specific session and verify the data being collected and sent is for that session, fixed data from throughputs being in hex getting converted to int, updated coretk to only run throughputs when enabled, updated grpc streams to return the stream to allow it being canceled 2019-12-16 11:14:05 -08:00
Blake Harnden
85521e8c8f added grpc to get current service configurations, fixed bug for core daemon not using custom service configs 2019-12-13 18:17:42 -08:00
Blake Harnden
47e087b365 fixed unit tests for grpc get emane model configs 2019-12-13 15:28:22 -08:00
Blake Harnden
d5b2edb6ab fixed unit tests for broadcasted exceptions to use proper values 2019-12-12 21:10:30 -08:00
Blake Harnden
45a23a6c14 updated usage of time.time to time.monotonic or time.perf_counter due to time.time possibly rolling backwards 2019-12-06 09:42:41 -08:00
Blake Harnden
059b0cc316 changes to fix session adding default emane configuration 2019-11-21 12:44:50 -08:00
Blake Harnden
18c9904d58 modified grpc set node service and node service file to use messages for their config, updated start session to leverage these messages to set them when starting a session 2019-11-11 10:19:30 -08:00
Blake Harnden
79dfbaa3ec switched session.metadata to just be a standard dict, fixed shutdown service issue during session.data_collect 2019-10-30 13:27:12 -07:00
Blake Harnden
fe95f246d4 added grpc get/set session metadata 2019-10-30 12:01:01 -07:00
bharnden
c0516255f2 added emane model configs and mobility configs to grpc.StartSession 2019-10-29 14:40:37 -07:00
bharnden
de936ea315 added hook creation and set location to grpc.StartSession 2019-10-29 12:35:07 -07:00
bharnden
fff281a452 removed master from corehandlers and session, since it will not be needed any more 2019-10-25 22:06:30 -07:00
Blake Harnden
77c7bf798e changes to tests to fix session fixture not being master and updated emane xml config test to use a valid value 2019-10-25 15:32:12 -07:00
bharnden
5c12651e4e updates to session.clear to clear out all configuration data as well, updated session.shutdown to use clear, updated tests to account for this 2019-10-24 13:05:02 -07:00
bharnden
dc27fadb10 added distributed tests based on new distributed, removed old distributed tests and fixture to support it 2019-10-24 11:52:25 -07:00
bharnden
c255625d2f removed skipping TestCore:test_mobility 2019-10-24 11:20:38 -07:00
bharnden
6045908a14 cleanup for test fixtures to help simplify test_gui fixture setup 2019-10-24 10:58:26 -07:00
bharnden
27be86f175 fixed unwanted patcher in test fixture 2019-10-24 09:26:28 -07:00
bharnden
4a6a87b931 updates to how test fixtures are created 2019-10-24 09:06:14 -07:00
bharnden
ade1d980a8 updates to speed up tests 2019-10-23 23:15:19 -07:00
bharnden
6a0a9e7698 updated all classes to be created without using (object), in python3 all classes are new style classes 2019-10-23 09:31:34 -07:00
bharnden
945f3cce5b removed session.create_emane_network, removed unused node types 2019-10-22 21:27:31 -07:00
bharnden
14d759667c refactored session.update_node to session.edit_node to match grpc call 2019-10-22 20:55:06 -07:00
bharnden
cb81095b64 refactored NodeData and NodeOptions to use server instead of emulation_server 2019-10-22 20:50:01 -07:00
Blake Harnden
ab0abd65aa modified session.add_node parameter node_options, to just be options 2019-10-22 15:31:50 -07:00
Blake Harnden
ce411a07d7 removed session.create_wireless_node, can be achieved simply without needing this function 2019-10-22 15:13:28 -07:00
Blake Harnden
0a689a3e96 updates to grpc to provide a consistent config response, mapping config ids to ConfigOptions 2019-10-22 09:57:41 -07:00
Blake Harnden
78f981463d renamed utils.check_cmd to utils.cmd, updated host_cmd to allow for shell commands for output redirection 2019-10-21 10:32:42 -07:00
bharnden
6006710c32 changed net_cmd to host_cmd and node_net_cmd to cmd, for simpler more logical naming 2019-10-18 23:28:09 -07:00
Blake Harnden
79cde8cd59 further f string updates 2019-10-17 19:25:52 -07:00
Blake Harnden
da946f1f56 removing builtins imports 2019-10-17 15:02:24 -07:00
Blake Harnden
e94a6d1afa separated distributed session logic into its own class to help reduce session.py size as it is already too big 2019-10-17 11:10:59 -07:00
Blake Harnden
b2d2705849 removed broker from session, updated most places using broker to use alternative logic to compensate where needed 2019-10-15 14:13:42 -07:00
Blake Harnden
02ef91242e initial changes to convert all commands to be string based for consistency 2019-10-11 16:36:57 -07:00
Blake Harnden
69772f993c removed VnodeClient.icmd and VnodeClient.term 2019-10-11 13:55:06 -07:00
Blake Harnden
b5d71bab82 removed VnodeClient.popen 2019-10-11 13:36:00 -07:00
Blake Harnden
d326f246a7 removed node based check_cmd, updated to use appropriate function 2019-10-11 12:57:37 -07:00
Blake Harnden
4a6d69bb09 removing cmd_output function from utils and nodes 2019-10-11 09:34:49 -07:00
Blake Harnden
c3d27eb8a5 removed utils.cmd and related node functions 2019-10-10 23:01:16 -07:00
Blake Harnden
f6cdeb23de changes to update commands to leverage either node_net_cmd/net_cmd 2019-10-10 15:25:12 -07:00
bharnden
af7faa85df removed redircmd, shcmd, shcmd_result, getaddr, netifstats from VnodeClient 2019-10-01 14:40:24 -07:00
bharnden
223590c8fb removed vnode client netif stats, since was not being used 2019-10-01 12:52:25 -07:00
bharnden
d3d70ecc54 removed getaddr from node clients, since it was not being used 2019-10-01 12:30:32 -07:00
bharnden
503fa754a9 updates to fail early for required executables that are not in PATH 2019-09-27 23:29:15 -07:00
Blake Harnden
5b8a7b1cfd fixed path for example tdma schedule from moving emane tests 2019-09-12 16:13:24 -07:00
bharnden
2a4ee68fd9 moved ping test method into the emane test itself 2019-09-11 13:16:09 -07:00
bharnden
3776e1dda7 moved emane dependent tests into subdir, moved pytest config into setup.cfg, added CoreError and made use of in session.py 2019-09-11 13:12:42 -07:00
bharnden
3e325fcdc7 fixed typo in test_links 2019-09-10 21:35:47 -07:00
bharnden
b4bc9c23a3 updated test_links to avoid running a system command and the need to use iperf/ping 2019-09-10 21:33:35 -07:00
bharnden
dee91e97bf changes to fix flake8 issues 2019-09-10 21:01:51 -07:00
bharnden
1fc8d647c3 added flake8/black, pre-commit integration for flake8/black, and black formatting changes 2019-09-10 15:10:24 -07:00
bharnden
d5055f85d3 pass over files using isort 2019-09-10 14:20:51 -07:00
bharnden
ae5d718737 revert loss pack to using floats in all related places 2019-07-03 23:09:55 -07:00
Blake Harnden
ca10ef4e9e finished initial pass on adding tests to help run through and validate tlv message handling 2019-06-25 12:29:46 -07:00
Blake Harnden
4f4605163f fixed issues executing xml from gui, added more tests for testing message handling 2019-06-24 15:49:12 -07:00
bharnden
588a0932d3 beginning to add some tests to help verify handling different tlv messages, added delete link logic for net to node and node to net 2019-06-21 23:12:18 -07:00
Blake Harnden
b5acdf0c3d updated tests for running distributed to working order and adding simple emane case 2019-06-19 17:34:33 -07:00
Blake Harnden
38c58d9603 fixed tlv api changing wlan config during runtime, fixed for grpc as well and added grpc test 2019-06-11 13:11:36 -07:00
bharnden
10df7d35ee fixed saving bidirectional params for ptp networks, storing to xml and loading back into running environment 2019-06-08 21:46:07 -07:00
bharnden
191d392c46 updated grpc node x,y types, added new grpc session position type, grpc updated link options to use int, fixed corehandlers handling of dup, fixed corexml type handling for link options, updated mobility config types to correlate with link options 2019-06-08 16:56:39 -07:00
bharnden
e2f2d9dca0 added xml tests for network to network links and verifying saving/loading of link options for network and ptp cases 2019-06-08 14:01:26 -07:00
Blake Harnden
597bd21994 updated logging.warn to logging.warning due to deprecation in python3, fixed python 2/3 filter issue in tests, fixed utf decoding for some missed popen commands 2019-06-03 14:36:21 -07:00
Blake Harnden
69b1297002 updated protobuf to use string instead of bytes for 2/3 compatibility for now, updated default service in grpc tests, fixed byte string issues for python3 in coreapi 2019-06-03 13:34:54 -07:00
Blake Harnden
7efec88e79 merged latest from develop 2019-06-03 13:06:11 -07:00
bharnden
40176e861d fixed unit test for vnode client, due to changes using python directly 2019-06-02 22:31:23 -07:00
bharnden
7a0edd5927 fixed bad logic introduced into interface setparams, fixed grpc edit link test 2019-06-02 22:20:00 -07:00
bharnden
a8061b811d grpc added get node terminal, updated corefx to leverage get node terminal to launch local terminals on double click 2019-05-31 22:20:19 -07:00
Blake Harnden
4c1d7bfb22 grpc added simple throughputs stream events 2019-05-31 14:19:23 -07:00
Blake Harnden
1890db5991 added grpc for a node command and fixed grpc unit tests 2019-05-31 11:46:47 -07:00
Blake Harnden
df3a8980ed grpc merged multiple event request/handlers into a singular event request for a session, which will return all events 2019-05-30 13:07:45 -07:00
Blake Harnden
2ed2b4a879 encapsulated grpc enums within messages to help provide better namespace separation due to python/c code generation 2019-05-30 08:57:24 -07:00
Blake Harnden
3e194af5ee updated all grpc variables to use more explicit naming for session/node/interface ids 2019-05-28 14:31:34 -07:00
bharnden
864c7b69a1 updated Queue and ConfigParser to use 2/3 compatible imports 2019-05-05 21:49:42 -07:00
bharnden
8d6bf54a16 removed usage of longs, updated int instance checking and octal constants to be 2/3 compliant 2019-05-05 17:11:07 -07:00
bharnden
feebd8704f updated all print calls to use print() method for 2/3 2019-05-05 16:52:55 -07:00
bharnden
66e603906a updates to layout core module packages in a more logical way, including renaming methods from objects to nodes and nodes.objid to nodes.id 2019-04-29 23:31:47 -07:00
bharnden
9517740704 initial refactor for all variables named objid 2019-04-26 22:07:51 -07:00
bharnden
73bc56e4c3 renamed session.session_id to session.id 2019-04-08 10:39:36 -07:00
bharnden
6672fd0f7a updates to allow configuration of installed emane_prefix for default models, requires small tweaks to custom models 2019-04-08 09:49:37 -07:00
bharnden
b518105e5f updated link test due to change on what get_node_count returns 2019-04-06 23:06:35 -07:00
bharnden
5c47b0cc43 grpc updated client methods to use proto objects directly, added more docs 2019-03-29 22:12:34 -07:00
bharnden
5161e4812a grpc updates to use proto values from client, rather than trying to squeeze in existing data types 2019-03-28 21:47:30 -07:00
bharnden
51d93db586 grpc updated get_node method for server and added some more test cases 2019-03-25 22:00:08 -07:00
bharnden
fdc0362ba5 updated proto enums to be prefixed with a contextual name, since they all derive from the module directly 2019-03-25 17:16:54 -07:00
bharnden
7299abd64d grpc added service/events rpc tests 2019-03-25 14:03:04 -07:00
bharnden
b15e525cc1 grpc added mobility tests 2019-03-25 12:59:07 -07:00
bharnden
03c221efa9 grpc added all emane rpc tests 2019-03-25 11:52:16 -07:00
bharnden
d880960cf7 grpc added get/set emane config test, fixed logic for setting emane/session configs in grpc server 2019-03-24 14:13:04 -07:00
bharnden
6d79014aad grpc added wlan rpc tests 2019-03-24 13:48:27 -07:00
bharnden
96d38e0b40 grpc updated create link/node to use the verbage add, to align with the actual python EmuSession class 2019-03-24 13:14:39 -07:00
bharnden
6f428bd68a grpc added link tests, fixed client mac conversion 2019-03-24 13:04:18 -07:00
bharnden
782b9d5ce6 grpc added hook and xml rpc tests 2019-03-22 21:44:16 -07:00
bharnden
01979d53ec grpc added node rpc tests 2019-03-22 21:20:37 -07:00
bharnden
c6cfe1a8f4 grpc update to get session and get sessions 2019-03-22 14:02:18 -07:00
bharnden
1f3e72e014 grpc create session can now specify id, updated all session proto to use SessionState for state, added suite for session testing for grpc 2019-03-22 13:45:53 -07:00
bharnden
3498a59ed5 grpc added initial tests and fixture to support them 2019-03-21 23:29:26 -07:00
bharnden
b37eb2fe74 updated xml tests and removed unused xml code 2018-10-11 21:22:57 -07:00
bharnden
b839482198 fixes #197 removes wireless_link_all and updates example 2018-10-09 12:46:27 -07:00
Blake J. Harnden
991abb1895 added test for utils.make_tuple_fromstr and fixed send_objects to ignore checking nodes for all configs, since that is not always the case 2018-08-17 08:25:57 -07:00
Blake J. Harnden
4a9c751935 refactored service boot path discovery to be more robust, still based on services provided alone 2018-08-01 10:13:57 -07:00
Blake J. Harnden
adfa835886 added xml hook test 2018-07-27 16:31:33 -07:00
Blake J. Harnden
9ce28da658 fixed bug with custom service files using the same dict across instances of the class 2018-07-25 09:37:59 -07:00
Blake J. Harnden
3d59a68299 refactored how getters for configurations worked, to avoid setting defaults and causing undesireable states 2018-07-11 21:34:21 -07:00
Blake J. Harnden
1d355d98ec added more services tests 2018-06-25 08:41:23 -07:00
Blake J. Harnden
bb533406a6 refactored service methods to be shorter, updated some logging to debug, added some more service tests 2018-06-22 15:47:02 -07:00
Blake J. Harnden
8186f3716c refactored service function names 2018-06-22 14:41:06 -07:00
Blake J. Harnden
37517c45f4 changed some logging from info to debug, removed startindex and depends from services 2018-06-22 08:16:59 -07:00
Blake J. Harnden
08956e7b93 making use of threadpools to boot each node and boot the services within a node 2018-06-20 16:18:30 -07:00
Blake J. Harnden
c6d2ca6b02 made use of threadpool for starting services, refactored services to support 3 validation models (blocking, non-blocking, timer) 2018-06-20 12:59:07 -07:00
Blake J. Harnden
37ce407460 added logic to help provide dependent service ordering 2018-06-19 18:36:53 -07:00
Blake J. Harnden
e80736061f refactored service interaction use names with a _, and cleanup up some of the CoreServices methods 2018-06-15 14:03:27 -07:00
Blake J. Harnden
82c3d57dd3 setup a simple default way for dealing with configurable options and added conifg group opbjects as a better way to access the same information formatted within a string 2018-06-14 08:41:48 -07:00
Blake J. Harnden
8e3cd0e013 refactored modelmanager getmodels to get_models 2018-06-13 16:23:51 -07:00
Blake J. Harnden
25cfb21586 added modelmanager for both mobility and emane to leverage and reduce duplicate logic 2018-06-13 16:17:47 -07:00
Blake J. Harnden
a52e454111 renamed dict variable in ConfigurationManager 2018-06-13 12:39:50 -07:00
Blake J. Harnden
3a39432fc7 refactored configs back to be able to provide instance conifgurations for sessions 2018-06-13 11:59:50 -07:00
Blake J. Harnden
52230bc026 refactored configuration managers and options into a single class, now the models that can be configured will deal with and handle configurations for nodes themselves 2018-06-11 12:26:12 -07:00
Blake J. Harnden
044e7de5e3 update to support consistently retrieving the last set configuration 2018-06-08 13:53:16 -07:00
Blake J. Harnden
52bfd1edf4 refactored get_config_types to get_all_configs and NewConfigurableManager back to ConfigurableManager 2018-06-08 10:30:41 -07:00
Blake J. Harnden
f6656f0245 added some initial tests for conf objects 2018-06-08 10:25:56 -07:00
Blake J. Harnden
7abf4bca16 updates to get all tests working with config changes 2018-06-07 12:57:32 -07:00
Blake J. Harnden
f5bff494c7 refactored new apis to sit under the emulator module, also reverted moving files under a legacy module to help avoid breaking code using core internals for 5.0+ 2018-05-01 10:40:25 -07:00
Blake J. Harnden
44781d0aec set default logging to INFO, cleaned up logging to help isolate debug type messages to DEBUG level, fixed issue with shutdown 2018-04-27 12:09:31 -07:00
Blake J. Harnden
ba3669712a updated gui test to working order, moved distributed test to a sub directory to be ignored by default, added pytest.ini to ignore distributed directory by default 2018-04-27 10:12:01 -07:00
Blake J. Harnden
8644e9d61e moved future core server and handler code to act as the default core-daemon, updated future examples and tests to leverage new api 2018-04-25 16:33:58 -07:00
Blake J. Harnden
c0b450789a updates to make future apis a bit better, updated handlers and all tests to account for changes 2018-04-25 10:55:48 -07:00
Blake J. Harnden
3ea885e2eb refactored some future naming to be more consistent, added new data objects to pass into coreemu api to help make scripting easier, set sessions to master by default now 2018-04-24 16:24:54 -07:00
Blake J. Harnden
1404ca19c5 added some test cases based on future api interactions, node add/delete/update link add/delete/update 2018-04-23 15:46:08 -07:00
Blake J. Harnden
a48036b353 updated emane tests, all currently working 2018-03-27 23:38:34 -07:00
Blake J. Harnden
a8ee7f35d6 updates to check_cmd to just return output, as status is pointless 2018-03-02 13:57:50 -08:00
Blake J. Harnden
d3bd61ddcf updates to consolidate commands that need to be defined by a new node type 2018-03-01 13:21:25 -08:00
Blake J. Harnden
127d0b0666 added a shell command with result, leveraged it usage to get output for failures during addfile and mounting within nodes 2018-02-07 19:13:51 -08:00
Blake J. Harnden
e35b4a0a4b fixed bug with loading emane models in tests, after changing how emane models are loaded 2018-02-07 16:55:53 -08:00
Blake J. Harnden
6b8ee13f5d initial changes to try and cleanup shell commands used within core 2018-02-27 10:48:01 -08:00
Blake J. Harnden
3ce416b610 updated test cases to fix old broken code 2018-01-09 15:52:29 -08: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
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
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
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
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