Commit graph

1668 commits

Author SHA1 Message Date
Blake Harnden
0462c1b084 daemon: added usage of ABC to NodeBase, CoreNodeBase, and CoreNetworkBase to help enforce accounting for abstract functions 2020-06-14 13:35:06 -07:00
Blake Harnden
f5916fab5b daemon: added not implemented methods to CoreNodeBase 2020-06-14 12:44:51 -07:00
Blake Harnden
cf41948894 daemon: fixed error with EmaneNet startup throwing an error, updated Rj45Node and PhysicalNode to implement all abstract methods 2020-06-14 12:36:07 -07:00
Blake Harnden
c4c667bb74 daemon: removed node.startup from inside constructor, session is now responsible, providing more control and avoiding issues when using super calls where you dont want to start just yet 2020-06-14 09:37:58 -07:00
Blake Harnden
3243a69afa daemon: updated xml files to use node1 and interface1 instead of node_one and interface_one, will still fallback to parse old names 2020-06-14 00:46:11 -07:00
Blake Harnden
8587da0621 daemon: moved node instantiation into lock to guarantee id uniqueness, removed node count from environment as it also attmpts to use lock and wouldnt be accurate either 2020-06-13 23:50:08 -07:00
Blake Harnden
d94bae6b42 daemon: added class variable type hinting to core.services.coreservices 2020-06-13 22:25:38 -07:00
Blake Harnden
91f1f7f004 daemon: added global type hinting to core.emulator.session and core.api.grpc.server 2020-06-13 22:01:07 -07:00
Blake Harnden
8d48393525 daemon: updated usage of if1/2 to be consistent with interface1/2 for now 2020-06-13 21:53:09 -07:00
Blake Harnden
5df2e36083 daemon: fixed session.add_event parameter to be specific to node_id 2020-06-13 21:48:51 -07:00
Blake Harnden
83f66d33f7 merged latest from develop 2020-06-13 18:07:21 -07:00
Blake Harnden
e18ffaafce daemon: xml files will now write and read loss, but fallback to looking for per for compatibility 2020-06-13 17:41:13 -07:00
Blake Harnden
23d957679e daemon: Session cleanup, removed unused functions, used context managers for writing files, made variables used externally no longer private 2020-06-12 20:22:51 -07:00
Blake Harnden
178d12b327 daemon: updated variables for InterfaceData to be denote data to make it more clear 2020-06-12 17:32:55 -07:00
Blake Harnden
876699e8ef variable/grpc cleanup to rename everything using spelt out numbers instead of actual numbers 2020-06-12 16:52:41 -07:00
Blake Harnden
76305f7257 converted usages of per to loss 2020-06-12 12:49:53 -07:00
Blake Harnden
b28ef76d65 daemon: added class variable type hinting to core.config 2020-06-12 10:05:49 -07:00
Blake Harnden
6201875b78 daemon: added class variable type hinting to core.emane 2020-06-12 09:52:01 -07:00
Blake Harnden
ef3cf5697d daemon: added class variable type hinting for core.xml 2020-06-12 08:54:06 -07:00
Blake Harnden
cfaa9397ad daemon: added class variable type hinting to core.api.grpc 2020-06-12 08:34:02 -07:00
Blake Harnden
e72e332bab daemon: removed need to use getaddr for CoreInterface.othernet as it now has a default of None 2020-06-11 19:12:51 -07:00
Blake Harnden
00cda5c550 fixed test_link name 2020-06-11 19:08:50 -07:00
Blake Harnden
c64094ac1c daemon: updated session.delete_link to have the interface ids default to none, since only one may need to be provided, updated link tests to account for more cases 2020-06-11 19:01:38 -07:00
Blake Harnden
ccf2646c00 daemon: refactored add_link,update_link,delete_link to have more specific logic, refactored CoreNodeBase to have newnetif and for it to return the interface created 2020-06-11 13:59:29 -07:00
Blake Harnden
9ed42cfba8 pygui: avoid issue when joining opened xml that has a node with no ip4 address 2020-06-10 11:04:33 -07:00
Blake Harnden
39fd11efb3 daemon: added missing type hint to core.nodes.interface.CoreInterface 2020-06-10 10:40:24 -07:00
Blake Harnden
a389dc6240 daemon: improve type hinting for WayPoint 2020-06-10 10:31:13 -07:00
Blake Harnden
784c4d2419 daemon: added core.location class variable type hinting 2020-06-10 10:24:44 -07:00
Blake Harnden
fd341bd69b daemon: added class variable type hinting to core.plugins 2020-06-10 09:01:38 -07:00
Blake Harnden
6ee9590bdc daemon: finished class variable type hinting for core.nodes 2020-06-10 08:52:51 -07:00
Blake Harnden
452e0720f2 daemon: added type hinting to DistributedControll and removed bad logic looking for tunnels during add_link 2020-06-09 21:03:19 -07:00
Blake Harnden
32ad8a9b68 daemon: added type hinting to Session 2020-06-09 20:03:32 -07:00
Blake Harnden
a79ba1b8d3 daemon: added type hints to CoreEmu 2020-06-09 19:48:29 -07:00
Blake Harnden
4cc9d3debf added pydoc for grpc client InterfaceHelper 2020-06-09 18:59:14 -07:00
Blake Harnden
f73c617ecf daemon: removed utils.make_tuple and last remaining usage 2020-06-09 18:53:42 -07:00
Blake Harnden
d71d84fae7 daemon: updated IpPrefixes and InterfaceHelper to remove duplicate code 2020-06-09 18:40:50 -07:00
Blake Harnden
21da670698 daemon: renamed link_options to options in both session.add_link and session.update_link 2020-06-09 13:46:26 -07:00
Blake Harnden
2965273f58 daemon: CoreNetworkBase.linkconfig now takes a LinkOptions object, removed usage of emudata.link_config 2020-06-09 13:41:31 -07:00
Blake Harnden
3be15a1316 daemon: update CoreNode.newnetif to require parameters, CoreNode.newnetif now depends on being provided InterfaceData 2020-06-09 12:42:15 -07:00
Blake Harnden
3691c6029f updated corexml InterfaceData instantiation to use named params 2020-06-09 10:48:50 -07:00
Blake Harnden
7d2034df71 daemon: updated NodeOptions to leverage dataclass 2020-06-09 10:45:18 -07:00
Blake Harnden
b5e53e573a daemon: LinkOptions now leverage dataclass and has type hinting, improve test_gui type hinting 2020-06-09 09:12:31 -07:00
Blake Harnden
18044f9474 daemon: cleaned up InterfaceData class, it now leverages dataclass, removed extra bloat and no longer requires parameters as they are optional 2020-06-09 08:48:18 -07:00
Blake Harnden
6ddf1ac9a4 removed IdGen class, added simple function to find next valid node id 2020-06-09 00:56:34 -07:00
Blake Harnden
7ffbf457be update to netclient existing bridge check to avoid using the -j flag, which requires version 4.7+ vs 4.5+ that we currently expect 2020-06-08 09:55:05 -07:00
Blake Harnden
bf1bc511e2 removed configuration option for number of for corehandler threads as it cannot properly deal with anything more than 1, updated man pages to current 6.4 versions for now 2020-06-05 14:34:19 -07:00
Blake Harnden
75d5bced9c grpc doc improvements, grpc examples additions, small tweak to grpc client for setting emane models not requiring a config when using default configuration 2020-06-05 11:20:23 -07:00
Blake Harnden
9a5fc94ba2 improvements for grpc docs and upates to grpc client pydocs 2020-06-05 08:44:19 -07:00
Blake Harnden
eaa05c34ba avoid piping subprocess command output when not waiting for results 2020-06-04 21:14:11 -07:00
Blake Harnden
7b2dd59c81 grpc: node_command improvements to include return code and options for wait and shell when running commands 2020-06-04 13:48:25 -07:00
Blake Harnden
29d09c8397 updates to move_nodes and emane_pathlosses type hinting and naming 2020-06-03 14:58:29 -07:00
Blake Harnden
3b0ca1638c grpc: implemened initial support for streaming emane pathloss events 2020-06-03 14:35:17 -07:00
Blake Harnden
1884103cb4 grpc: added call to stream node movements using geo/xy and tests to validate usage, fixed potential exception when not setting session geo ref and using conversions 2020-06-03 08:47:36 -07:00
Blake Harnden
0d2bcccf3e added initial files to support transitioning to using poetry/invoke to provide an environment for core 2020-06-02 14:48:57 -07:00
Blake Harnden
c6a06baf29 add geo to grpc calls getting node values, updated emane position hook to set lon/lat/alt values 2020-05-30 14:24:38 -07:00
Blake Harnden
82c33345be merged latest from develop 2020-05-29 23:47:31 -07:00
Blake Harnden
73a5567084 added network policy enum to avoid string usage 2020-05-29 23:22:21 -07:00
Blake Harnden
b034ba6cc3 turned transport type usages of raw and virtual across the board to an enumerated type 2020-05-29 22:48:00 -07:00
Blake Harnden
8ad3f7961a renamed netclient create_interface to set_interface_master to better describe its purpose 2020-05-29 22:07:50 -07:00
Blake Harnden
10fd844397 further type hinting for tests 2020-05-29 21:41:58 -07:00
bharnden
048fc1aaf9
Merge pull request #458 from coreemu/enhancement/rj45-cleanup
changes to make rj45 maintain the interface information, instead of t…
2020-05-29 21:30:36 -07:00
Blake Harnden
b88df84d62 removed logs from emane network all_link_data 2020-05-29 14:42:38 -07:00
Blake Harnden
183ffda570 daemon: changes to support providing emane wireless links in all_link_data, which makes it accessible over grpc 2020-05-29 11:48:00 -07:00
Blake Harnden
4ab415e37d grpc: updated node events to contain geo data when present 2020-05-28 16:12:11 -07:00
Blake Harnden
7e4ef0b280 changes to make rj45 maintain the interface information, instead of trying to be 2 classes at once 2020-05-25 23:18:20 -07:00
Blake Harnden
8fed201fd8 added type hints to class variables in nodes/physical.py 2020-05-25 11:33:59 -07:00
Blake Harnden
f95a8113c9 added type hinting to nodes/network.py class variables 2020-05-25 11:17:28 -07:00
Blake Harnden
2e78025249 started type hinting on class variables for nodes/base 2020-05-25 00:16:58 -07:00
Blake Harnden
ba8b16ec34 added some type hinting with tests to help in refactoring in the future 2020-05-24 23:37:38 -07:00
Blake Harnden
964f78f06a added othernet to CoreInterface to avoid hasattr checks 2020-05-23 01:14:47 -07:00
Blake Harnden
c580e15f8e moved common variables up and localname to CoreInterface, they were being created in all subclasses and avoids type hinting errors 2020-05-23 01:05:46 -07:00
Blake Harnden
37ff989aa4 fixed bad check in linkconfig 2020-05-23 00:19:32 -07:00
Blake Harnden
26b0868f65 removed devname from linkconfig as the only usage was of it was using a parametr that was already being passed in 2020-05-23 00:00:40 -07:00
Blake Harnden
dd13bc8379 moved linkconfig to CoreNetworkBase and made linkconfig defined the same across the board 2020-05-22 23:44:10 -07:00
Blake Harnden
fe09b37819 removed bootsh from CoreNode types as it was not being used 2020-05-21 22:41:03 -07:00
Blake Harnden
56fbc0e3c5 docker changes to avoid issues running commands without mount and running containers as prvileged to allow changing files in /sys 2020-05-21 22:26:54 -07:00
Blake Harnden
70bd837f02 Merge branch 'enhancement/type-checking-node-retrieval' into develop 2020-05-21 07:39:15 -07:00
Blake Harnden
bcd9e4ceb1 fixed session.add_hook to not require a source, since it was not typically used an None was being passed, cleaned up some bad type hinting in related to session.py 2020-05-21 00:20:05 -07:00
Blake Harnden
4b6ba90331 fixed bad type hint for EventData 2020-05-20 23:27:17 -07:00
Blake Harnden
d5016bf44f removed pointless wlan instance check in grpc wlan_link api since it is already being done when retrieving the wlan node 2020-05-20 22:36:04 -07:00
Blake Harnden
c07766e1eb updated session.add_node to use better type hinting and force usage of classes directly, instead of indirectly through NodeTypes 2020-05-20 22:14:03 -07:00
Blake Harnden
d5254e6a91 changes to support better type checking for retrieving an arbitrary node from a session, get_node now requires an expected class that the node would be an instance of, if the returned node is not an instance a CoreError is thrown, this also helps editors pick up expected types to account for variable/function usage better as well 2020-05-20 14:44:34 -07:00
Blake Harnden
0a792f7b3f updates to grpc rpc wlan link, added node class type checking and hinting in grpc server code 2020-05-19 22:36:10 -07:00
Blake Harnden
d14056393b added grpc call to allow direct control of nodes connected through wlan to be linked or not 2020-05-19 16:46:44 -07:00
Blake Harnden
8bae0611a4 pygui: updated icon for observers tool on run menu, added observers to run menu and created custom observers widget 2020-05-19 00:35:48 -07:00
Blake Harnden
773f733cb8 pygui: changes to leverage common icon scaling function, fix issue with scaling toolbar 2020-05-18 23:25:42 -07:00
Blake Harnden
cde053da73 pygui: implemented toolbar based marker configuration, fixed some issues when switching between different node bar states 2020-05-17 23:08:53 -07:00
Blake Harnden
bd897efd05 pygui: allow shapes to be moved in annotation/select modes and nodes in node/select modes 2020-05-17 10:21:54 -07:00
Blake Harnden
d0520bf21d pygui: fixed resizing toolbar with custom node selected 2020-05-17 08:51:51 -07:00
Blake Harnden
34f86174a2 pygui: cleaned up color picker layout 2020-05-17 00:28:03 -07:00
Blake Harnden
8979c86187 pygui: fixed issue with moving text shapes 2020-05-17 00:11:28 -07:00
Blake Harnden
41df8a57b8 pygui: revert change to keep references for created interfaces properly 2020-05-16 23:59:36 -07:00
Blake Harnden
06e3d84862 pygui: fixed interface creation after deletion, fixed issue reusing deleted subnets 2020-05-16 23:35:19 -07:00
Blake Harnden
91220078f1 pygui: created a singular func for ordering items on canvas by tags, updates so that drawing edges are behind nodes 2020-05-16 14:12:08 -07:00
Blake Harnden
50816b3b80 pygui: cleaned up toolbar picker code, fixed closing app when a picker is showing 2020-05-16 01:14:48 -07:00
Blake Harnden
29fc5acb99 pygui: toolbar cleanup for buttonbar frames 2020-05-15 23:23:07 -07:00
Blake Harnden
4eaecd6a7b pygui: simplified a couple of the other widget constructors 2020-05-15 14:46:35 -07:00
Blake Harnden
0dcfcbf4ea pygui: simplified toolbar constructor, since there is no need for something more complicated 2020-05-15 11:43:54 -07:00
Blake Harnden
ee5d5b9864 pygui: removed duplicate get_icon functionality, added more type hints, added enable/disable of toolbar button when running start/stop 2020-05-15 11:41:18 -07:00
Blake Harnden
5e69ea48b3 pygui: fixed tracking for throughputs when joining a session 2020-05-14 23:07:21 -07:00
Blake Harnden
3b1a9bc3e3 pygui: changes to improve grpc event handling 2020-05-14 17:57:32 -07:00
Blake Harnden
df03f1e173 pygui: improvements to handling grpc events and updating gui 2020-05-14 16:24:22 -07:00
Blake Harnden
433fe4ae58 pygui: removed undesired logging in interface manager 2020-05-13 23:59:00 -07:00
Blake Harnden
95d3a6ca8c updates to force CoreCommandError to contain string values for stderr and stdout, couple bugfixes in handling bad commands when using execute commands from tlv based api or coresendmsg, also updates to coresendmsg to display everything in lowercase to mimic previous look and feel, however coresendmg will now work regardless of casing to avoid breaking things again 2020-05-13 12:01:28 -07:00
Blake Harnden
454dc8091e coresendmsg: small usage cleanup, removed printing enum values when listing tlvs, updated examples to use current expected values 2020-05-13 09:25:56 -07:00
Blake Harnden
fa163c3ed6 pygui: update file dialogs to hide hidden files by default and provide a hidden file toggle 2020-05-12 08:31:53 -07:00
Blake Harnden
22d813df63 pygui: updated validation to be wrapper classes around ttk.Entry for convenience and less code 2020-05-11 22:00:52 -07:00
Blake Harnden
150db07497 pygui: updated canvas size and scale dialog to allow negative values for lon,lat,alt 2020-05-11 16:02:23 -07:00
Blake Harnden
124d655dc6 fixed issue when sorting hook when saving to xml, due to enum refactoring, updated test case to hit this potential issue in the future 2020-05-11 12:41:57 -07:00
Blake Harnden
88a98fff82 docs: added initial documentation for the python beta gui based on prior gui documentation 2020-05-11 12:26:05 -07:00
Blake Harnden
a36674aba9 pygui: adjustment to compensate for ip4/ip6 address not being present on joined links 2020-05-11 08:33:56 -07:00
Blake Harnden
5d99244596 removed docker service and associated documentation, was not functioning and will cause confusion with new support in the new GUI 2020-05-09 21:50:16 -07:00
Blake Harnden
0aba1aa928 pygui: updated gui home directory to ~/.coregui and changed config file name to config.yaml from gui.yaml to be more explicit 2020-05-08 09:08:01 -07:00
Blake Harnden
4379ef32e9 pygui: removed restriction on wlan nodes context linking to mdrs only, since custom nodes and other types may be configured and desired to be linked in the same way 2020-05-08 08:29:45 -07:00
Blake Harnden
32558d15d2 pygui: removed comment in appconfig 2020-05-08 00:46:02 -07:00
Blake Harnden
86ae87eafe pygui: revamped config to leverage classes mapped to yaml, removes need for using keys all over and type hinting on glasses, future changes should support defaults better 2020-05-08 00:16:25 -07:00
Blake Harnden
d9f48d14a7 pygui fixed button layout on session options dialog 2020-05-05 13:00:22 -07:00
Blake Harnden
41b46b7e7a pygui display error and link to emane docs when attempting to use emane node and it is not installed, fix dialog refactoring breaking mobility player, updated emane docs 2020-05-05 12:55:25 -07:00
Blake Harnden
1d620a0b17 pygui some cleanup for dialog constructors to avoid passing duplicate parameters in most cases 2020-05-04 22:50:59 -07:00
Blake Harnden
185c6736b3 pygui moved custom nodes dialog to menubar and small layout cleanup 2020-05-03 22:47:46 -07:00
Blake Harnden
828254dccd pygui switched netstat socket observer to use ss instead 2020-05-03 22:01:21 -07:00
Blake Harnden
0e08242128 pygui close mobility players when stopping session 2020-05-03 21:55:34 -07:00
Blake Harnden
4ec6ef25fe pygui updated progress tasks to be self contained and leverage a title value to display runtime with more context to user 2020-05-03 21:47:58 -07:00
Blake Harnden
1dd45f4424 pygui cleaned up error display by creating top level app methods for displaying exceptions and errors, logging exceptions, and making sure they work for background tasks 2020-05-03 12:42:56 -07:00
Blake Harnden
0999fabb14 pygui revamped progress bar functionality into app task calls to simplify and commonize the functionality, handle and display task exceptions 2020-05-03 10:41:36 -07:00
Blake Harnden
835675480b pygui removed unimplemented runtime node context options and moved find node to tools menu 2020-05-02 23:57:27 -07:00
Blake Harnden
b858e66c49 pygui updated main app frame to use grid layout like everything else 2020-05-02 23:51:42 -07:00
Blake Harnden
be70c5383e pygui removed manage members context from wireless node 2020-05-02 09:23:06 -07:00
Blake Harnden
ac2d60dad6 pygui improved node context to properly use tk_popup, avoiding bandage code to compensate for other issues 2020-05-02 09:20:36 -07:00
Blake Harnden
65466909d3 pygui improved edge context by properly using tk_popup 2020-05-02 08:41:10 -07:00
Blake Harnden
491f2a8e93 pygui enabled delete on link context menu, removed split/merge for now, set edge labels to bold to stand out until better solution 2020-05-01 23:47:37 -07:00
Blake Harnden
5a8984de10 pygui some delete node/link cleanup and added unlink option to node context menu for an easier unlinking 2020-05-01 23:36:33 -07:00
Blake Harnden
d158fc99c6 pygui small cleanup to layout of find dialog 2020-05-01 19:59:41 -07:00
Blake Harnden
9d1f5cfcc6 pygui most dialogs are modal, default dialogs to modal 2020-05-01 19:56:57 -07:00
Blake Harnden
ea4271d7cb changed defaultroute service to behave similarly as before and use the first interface for a default .1 address 2020-05-01 19:15:53 -07:00
Blake Harnden
0ee679d978 pygui changes to disable most widgets related to configuring a node during runtime 2020-05-01 18:05:54 -07:00
Blake Harnden
686026d9f2 improved netaddr mac dialect usage to leverage constructor parameter 2020-05-01 17:40:53 -07:00
Blake Harnden
4ae5936bdc pygui raise copied nodes above copied edges 2020-05-01 17:28:28 -07:00
Blake Harnden
2e9968c306 pygui further changes to mimic old gui behavior, parsing link data when joining and removing link data when they are removed 2020-05-01 15:35:53 -07:00
Blake Harnden
6ba065e8b6 Merge branch 'develop' into enhancement/pygui-address-creation 2020-05-01 14:23:18 -07:00
Blake Harnden
f7281459ed pygui changes to avoid deleting session and open xml race conditions, fix to reset canvas view options when creating a new session 2020-05-01 14:13:44 -07:00
Blake Harnden
1f1b1c7b65 Merge branch 'develop' of https://github.com/coreemu/core into develop 2020-05-01 13:42:39 -07:00
Blake Harnden
4a7abe71e4 removed unwanted grpc client stream log 2020-05-01 13:42:15 -07:00
Blake Harnden
9a42368221 initial changes to mimic prior address creation 2020-05-01 13:39:27 -07:00
Huy Pham
b116d525d9 Merge branch 'develop' into pygui-rmallservices-fix 2020-04-30 13:48:38 -07:00
Huy Pham
580641f5d9 remove CoreClient.modified_service_node. When a new CORE node is created, assign default services right away (instead of leaving it empty), therefore no more confusion whether [] means empty service or means CORE node with default services 2020-04-30 13:47:45 -07:00
Blake Harnden
7e0ead0766 fixed formatting for quagga fast convergence merge 2020-04-30 13:23:00 -07:00
bharnden
3c49d0676a
Merge branch 'develop' into bugfix/quagga-ipv6-only-and-fast-convergence 2020-04-30 13:13:53 -07:00
Blake Harnden
d945e7c41e formatted sdn.py after recent merge 2020-04-30 12:57:05 -07:00
Huy Pham
4037da49c2 Fix issue: node's services won't save when clearing all the services and add default services back to the node. Set core node's services to default services (instead of leaving it empty) when a new node is created. 2020-04-30 12:48:51 -07:00