Skip to content

Commit

Permalink
Merge dev into main (Release v1.2.2) (#398)
Browse files Browse the repository at this point in the history
* Create startup capture (#37)

* Connection (#40)

* Initial add of connection test module with ping test

* Update host user resolving

* Update host user resolving for validator

* add get user method to validator

* Conn mac oui (#42)

* Initial add of connection test module with ping test

* Update host user resolving

* Update host user resolving for validator

* add get user method to validator

* Add mac_oui test
Add option to return test result and details of test for reporting

* Con mac address (#43)

* Initial add of connection test module with ping test

* Update host user resolving

* Update host user resolving for validator

* add get user method to validator

* Add mac_oui test
Add option to return test result and details of test for reporting

* Add connection.mac_address test

* Dns (#44)

* Add MDNS test

* Update existing mdns logging to be more consistent with other tests

* Add startup and monitor captures

* File permissions (#45)

* Fix validator file permissions

* Fix test module permissions

* Fix device capture file permissions

* Fix device results permissions

* Add connection single ip test (#47)

* Nmap results (#49)

* Update processing of nmap results to use xml output and json conversions for stability

* Update matching with regex to prevent wrong service matches and duplicate processing for partial matches

* Update max port scan range

* Framework restructure (#50)

* Restructure framework and modules

* Fix CI paths

* Fix base module

* Add build script

* Remove build logs

* Update base and template docker files to fit the new format
Implement a template option on network modules
Fix skipping of base image build

* remove base image build in ci

* Remove group from chown

---------

Co-authored-by: jhughesbiot <[email protected]>

* Ip control (#51)

* Add initial work for ip control module

* Implement ip control module with additional cleanup methods

* Update link check to not use error stream

* Add error checking around container network configurations

* Add network cleanup for namespaces and links

* formatting

* Move config to /local (#52)

* Move config to /local

* Fix testing config

* Fix ovs_control config location

* Fix faux dev config location

* Add documentation (#53)

* Sync dev to main (#56)

* Merge dev into main (Sprint 7 and 8) (#33)

* Implement test orchestrator (#4)

* Initial work on test-orchestrator

* Ignore runtime folder

* Update runtime directory for test modules

* Fix logging
Add initial framework for running tests

* logging and misc cleanup

* logging changes

* Add a stop hook after all tests complete

* Refactor test_orc code

* Add arg passing
Add option to use locally cloned via install or remote via main project network orchestrator

* Fix baseline module
Fix orchestrator exiting only after timeout

* Add result file to baseline test module
Change result format to match closer to design doc

* Refactor pylint

* Skip test module if it failed to start

* Refactor

* Check for valid log level

---------

Co-authored-by: Jacob Boddey <[email protected]>

* Add issue report templates (#7)

* Add issue templates

* Update README.md

* Discover devices on the network (#5)

* Test run sync (#8)

* Initial work on test-orchestrator

* Ignore runtime folder

* Update runtime directory for test modules

* Fix logging
Add initial framework for running tests

* logging and misc cleanup

* logging changes

* Add a stop hook after all tests complete

* Refactor test_orc code

* Add arg passing
Add option to use locally cloned via install or remote via main project network orchestrator

* Fix baseline module
Fix orchestrator exiting only after timeout

* Add result file to baseline test module
Change result format to match closer to design doc

* Refactor pylint

* Skip test module if it failed to start

* Refactor

* Check for valid log level

* Add config file arg
Misc changes to network start procedure

* fix merge issues

* Update runner and test orch procedure
Add useful runtiem args

* Restructure test run startup process
Misc updates to work with net orch updates

* Refactor

---------

* Quick refactor (#9)

* Fix duplicate sleep calls

* Add net orc (#11)

* Add network orchestrator repository

* cleanup duplicate start and install scripts

* Temporary fix for python dependencies

* Remove duplicate python requirements

* remove duplicate conf files

* remove remote-net option

* cleanp unecessary files

* Add the DNS test module (#12)

* Add network orchestrator repository

* cleanup duplicate start and install scripts

* Temporary fix for python dependencies

* Remove duplicate python requirements

* remove duplicate conf files

* remove remote-net option

* cleanp unecessary files

* Add dns test module
Fix test module build process

* Add mac address of device under test to test container
Update dns test to use mac address filter

* Update dns module tests

* Change result output

* logging update

* Update test module for better reusability

* Load in module config to test module

* logging cleanup

* Update baseline module to new template
Misc cleanup

* Add ability to disable individual tests

* remove duplicate readme

* Update device directories

* Remove local folder

* Update device template
Update test module to work with new device config file format

* Change test module network config options
Do not start network services for modules not configured for network

* Refactor

---------

* Add baseline and pylint tests (#25)

* Discover devices on the network (#22)

* Discover devices on the network

* Add defaults when missing from config
Implement monitor wait period from config

* Add steady state monitor
Remove duplicate callback registrations

* Load devices into network orchestrator during testrun start

---------

Co-authored-by: jhughesbiot <[email protected]>

* Build dependencies first (#21)

* Build dependencies first

* Remove debug message

* Add depend on option to test modules

* Re-add single interface option

* Import subprocess

---------

Co-authored-by: jhughesbiot <[email protected]>

* Port scan test module (#23)

* Add network orchestrator repository

* cleanup duplicate start and install scripts

* Temporary fix for python dependencies

* Remove duplicate python requirements

* remove duplicate conf files

* remove remote-net option

* cleanp unecessary files

* Add dns test module
Fix test module build process

* Add mac address of device under test to test container
Update dns test to use mac address filter

* Update dns module tests

* Change result output

* logging update

* Update test module for better reusability

* Load in module config to test module

* logging cleanup

* Update baseline module to new template
Misc cleanup

* Add ability to disable individual tests

* remove duplicate readme

* Update device directories

* Remove local folder

* Update device template
Update test module to work with new device config file format

* Change test module network config options
Do not start network services for modules not configured for network

* Initial nmap test module add
Add device ip resolving to base module
Add network mounting for test modules

* Update ipv4 device resolving in test modules

* Map in ip subnets and remove hard coded references

* Add ftp port test

* Add ability to pass config for individual tests within a module
Update nmap module scan to run tests based on config

* Add full module check for compliance

* Add all tcp port scans to config

* Update nmap commands to match existing DAQ tests
Add udp scanning and tests

* logging cleanup

* Update TCP port scanning range
Update logging

* Merge device config into module config
Update device template

* fix merge issues

* Update timeouts
Add multi-threading for multiple scanns to run simultaneously
Add option to use scan scripts for services

* Fix merge issues

* Fix device configs

* Remove unecessary files

* Cleanup duplicate properties

* Cleanup install script

* Formatting (#26)

* Fix pylint issues in net orc

* more pylint fixes

* fix listener lint issues

* fix logger lint issues

* fix validator lint issues

* fix util lint issues

* Update base network module linting issues

* Cleanup linter issues for dhcp modules
Remove old code testing code

* change to single quote delimeter

* Cleanup linter issues for ntp module

* Cleanup linter issues for radius module

* Cleanup linter issues for template module

* fix linter issues with faux-dev

* Test results (#27)

* Collect all module test results

* Fix test modules without config options

* Add timestamp to test results

* Test results (#28)

* Collect all module test results

* Fix test modules without config options

* Add timestamp to test results

* Add attempt timing and device info to test results

* Ignore disabled test containers when generating results

* Fully skip modules that are disabled

* Fix pylint test and skip internet tests so CI passes (#29)

* disable internet checks for pass

* fix pylint test

* Increase pylint score (#31)

* More formatting fixes

* More formatting fixes

* More formatting fixes

* More formatting fixes

* Misc pylint fixes
Fix test module logger

---------

Co-authored-by: jhughesbiot <[email protected]>

* Pylint (#32)

* More formatting fixes

* More formatting fixes

* More formatting fixes

* More formatting fixes

* Misc pylint fixes
Fix test module logger

* remove unused files

* more formatting

* revert breaking pylint changes

* more formatting

* fix results file

* More formatting

* ovs module formatting

---------

Co-authored-by: Jacob Boddey <[email protected]>

* Add license header (#36)

* More formatting fixes

* More formatting fixes

* More formatting fixes

* More formatting fixes

* Misc pylint fixes
Fix test module logger

* remove unused files

* more formatting

* revert breaking pylint changes

* more formatting

* fix results file

* More formatting

* ovs module formatting

* Add ovs control into network orchestrator

* Add verification methods for the base network

* Add network validation and misc logging updates

* remove ovs module

* add license header to all python files

---------

Co-authored-by: Jacob Boddey <[email protected]>
Co-authored-by: SuperJonotron <[email protected]>

* Ovs (#35)

* More formatting fixes

* More formatting fixes

* More formatting fixes

* More formatting fixes

* Misc pylint fixes
Fix test module logger

* remove unused files

* more formatting

* revert breaking pylint changes

* more formatting

* fix results file

* More formatting

* ovs module formatting

* Add ovs control into network orchestrator

* Add verification methods for the base network

* Add network validation and misc logging updates

* remove ovs module

---------

Co-authored-by: Jacob Boddey <[email protected]>
Co-authored-by: SuperJonotron <[email protected]>

* remove ovs files added back in during merge

* Nmap (#38)

* More formatting fixes

* More formatting fixes

* More formatting fixes

* More formatting fixes

* Misc pylint fixes
Fix test module logger

* remove unused files

* more formatting

* revert breaking pylint changes

* more formatting

* fix results file

* More formatting

* ovs module formatting

* Add ovs control into network orchestrator

* Add verification methods for the base network

* Add network validation and misc logging updates

* remove ovs module

* add license header to all python files

* Update tcp scans to speed up full port range scan
Add version checking
Implement ssh version checking

* Add unknown port checks
Match unknown ports to existing services
Add unknown ports without existing services to results file

---------

Co-authored-by: Jacob Boddey <[email protected]>
Co-authored-by: SuperJonotron <[email protected]>

* Create startup capture (#37)

* Connection (#40)

* Initial add of connection test module with ping test

* Update host user resolving

* Update host user resolving for validator

* add get user method to validator

* Conn mac oui (#42)

* Initial add of connection test module with ping test

* Update host user resolving

* Update host user resolving for validator

* add get user method to validator

* Add mac_oui test
Add option to return test result and details of test for reporting

* Con mac address (#43)

* Initial add of connection test module with ping test

* Update host user resolving

* Update host user resolving for validator

* add get user method to validator

* Add mac_oui test
Add option to return test result and details of test for reporting

* Add connection.mac_address test

* Dns (#44)

* Add MDNS test

* Update existing mdns logging to be more consistent with other tests

* Add startup and monitor captures

* File permissions (#45)

* Fix validator file permissions

* Fix test module permissions

* Fix device capture file permissions

* Fix device results permissions

* Add connection single ip test (#47)

* Nmap results (#49)

* Update processing of nmap results to use xml output and json conversions for stability

* Update matching with regex to prevent wrong service matches and duplicate processing for partial matches

* Update max port scan range

* Framework restructure (#50)

* Restructure framework and modules

* Fix CI paths

* Fix base module

* Add build script

* Remove build logs

* Update base and template docker files to fit the new format
Implement a template option on network modules
Fix skipping of base image build

* remove base image build in ci

* Remove group from chown

---------

Co-authored-by: jhughesbiot <[email protected]>

* Ip control (#51)

* Add initial work for ip control module

* Implement ip control module with additional cleanup methods

* Update link check to not use error stream

* Add error checking around container network configurations

* Add network cleanup for namespaces and links

* formatting

* Move config to /local (#52)

* Move config to /local

* Fix testing config

* Fix ovs_control config location

* Fix faux dev config location

* Add documentation (#53)

---------

Co-authored-by: jhughesbiot <[email protected]>
Co-authored-by: jhughesbiot <[email protected]>
Co-authored-by: Noureddine <[email protected]>
Co-authored-by: SuperJonotron <[email protected]>

* Sprint 8 Hotfix (#54)

* Fix connection results.json

* Re add try/catch

* Fix log level

* Debug test module load order

* Add depends on to nmap module

* Remove logging change

---------

Co-authored-by: jhughesbiot <[email protected]>
Co-authored-by: jhughesbiot <[email protected]>
Co-authored-by: Noureddine <[email protected]>
Co-authored-by: SuperJonotron <[email protected]>

* Fix missing results on udp tests when tcp ports are also defined (#59)

* Add licence header (#61)

* Resolve merge conflict

* Add network docs (#63)

* Add network docs

* Rename to readme

* Add link to template module

* Dhcp (#64)

* Add initial work for ip control module

* Implement ip control module with additional cleanup methods

* Update link check to not use error stream

* Add error checking around container network configurations

* Add network cleanup for namespaces and links

* formatting

* initial work on adding grpc functions for dhcp tests

* rework code to allow for better usage and unit testing

* working poc for test containers and grpc client to dhcp-1

* Move grpc client code into base image

* Move grpc proto builds outside of dockerfile into module startup script

* Setup pythonpath var in test module base startup process
misc cleanup

* pylinting and logging updates

* Add python path resolving to network modules
Update grpc path to prevent conflicts
misc pylinting

* Change lease resolving method to fix pylint issue

* cleanup unit tests

* cleanup unit tests

* Add grpc updates to dhcp2 module
Update dhcp_config to deal with missing optional variables

* Add grpc updates to dhcp2 module
Update dhcp_config to deal with missing optional variables

* fix line endings

* misc cleanup

* Dhcp (#67)

* Add initial work for ip control module

* Implement ip control module with additional cleanup methods

* Update link check to not use error stream

* Add error checking around container network configurations

* Add network cleanup for namespaces and links

* formatting

* initial work on adding grpc functions for dhcp tests

* rework code to allow for better usage and unit testing

* working poc for test containers and grpc client to dhcp-1

* Move grpc client code into base image

* Move grpc proto builds outside of dockerfile into module startup script

* Setup pythonpath var in test module base startup process
misc cleanup

* pylinting and logging updates

* Add python path resolving to network modules
Update grpc path to prevent conflicts
misc pylinting

* Change lease resolving method to fix pylint issue

* cleanup unit tests

* cleanup unit tests

* Add grpc updates to dhcp2 module
Update dhcp_config to deal with missing optional variables

* Add grpc updates to dhcp2 module
Update dhcp_config to deal with missing optional variables

* fix line endings

* misc cleanup

* Move isc-dhcp-server and radvd to services
Move DHCP server monitoring and booting to python script

* Add grpc methods to interact with dhcp_server module
Update dhcp_server to control radvd server directly from calls
Fix radvd service status method

* Add updates to dhcp2 module
Update radvd service

* Add license headers

* Add connection.dhcp_address test (#68)

* Add NTP tests (#60)

* Add ntp support test

* Add extra log message

* Modify descriptions

* Pylint

* Pylint (#69)

---------

Co-authored-by: jhughesbiot <[email protected]>

* Add ipv6 tests (#65)

* Add ipv6 tests

* Check for ND_NS

* Connection private address (#71)

* Add ntp support test

* Add extra log message

* Modify descriptions

* Pylint

* formatting

* Change isc-dhcp service setup
Fix dhcpd logging
Add start and stop methods to grpc dhcp client
Add dhcp2 client
Inttial private_addr test

* Add max lease time
Add unit tests

* fix last commit

* finish initial work on test

* pylinting

* Breakup test and allow better failure reporting

* restore network after test

* Wait for device to get a lease from original dhcp range after network restore

* pylinting

* Fix ipv6 tests

---------

Co-authored-by: Jacob Boddey <[email protected]>

* fix windows line ending

* Fix python import

* move isc-dhcp service commands to their own class
update logging
pylinting

* fix dhcp1

* Initial CI testing for tests (#72)

* Fix radvd conf

* Fix individual test disable

* Add NTP Pass CI test (#76)

* add shared address test (#75)

* Fix single ip test (#58)

* Fix single ip test from detecting faux-device during validation as a failure

* remove dhcp server capture file from scan

---------

Co-authored-by: J Boddey <[email protected]>

* Merge API into dev (#70)

* Start API

* Write interfaces

* Get current configuration

* Set versions

* Add more API methods

* Correct no-ui flag

* Do not launch API on baseline test

* Move loading devices back to Test Run core

* Merge dev into api (#74)

* Merge dev into main (Add license header) (#62)

Add license header

* Add network docs (#63)

* Add network docs

* Rename to readme

* Add link to template module

* Dhcp (#64)

* Add initial work for ip control module

* Implement ip control module with additional cleanup methods

* Update link check to not use error stream

* Add error checking around container network configurations

* Add network cleanup for namespaces and links

* formatting

* initial work on adding grpc functions for dhcp tests

* rework code to allow for better usage and unit testing

* working poc for test containers and grpc client to dhcp-1

* Move grpc client code into base image

* Move grpc proto builds outside of dockerfile into module startup script

* Setup pythonpath var in test module base startup process
misc cleanup

* pylinting and logging updates

* Add python path resolving to network modules
Update grpc path to prevent conflicts
misc pylinting

* Change lease resolving method to fix pylint issue

* cleanup unit tests

* cleanup unit tests

* Add grpc updates to dhcp2 module
Update dhcp_config to deal with missing optional variables

* Add grpc updates to dhcp2 module
Update dhcp_config to deal with missing optional variables

* fix line endings

* misc cleanup

* Dhcp (#67)

* Add initial work for ip control module

* Implement ip control module with additional cleanup methods

* Update link check to not use error stream

* Add error checking around container network configurations

* Add network cleanup for namespaces and links

* formatting

* initial work on adding grpc functions for dhcp tests

* rework code to allow for better usage and unit testing

* working poc for test containers and grpc client to dhcp-1

* Move grpc client code into base image

* Move grpc proto builds outside of dockerfile into module startup script

* Setup pythonpath var in test module base startup process
misc cleanup

* pylinting and logging updates

* Add python path resolving to network modules
Update grpc path to prevent conflicts
misc pylinting

* Change lease resolving method to fix pylint issue

* cleanup unit tests

* cleanup unit tests

* Add grpc updates to dhcp2 module
Update dhcp_config to deal with missing optional variables

* Add grpc updates to dhcp2 module
Update dhcp_config to deal with missing optional variables

* fix line endings

* misc cleanup

* Move isc-dhcp-server and radvd to services
Move DHCP server monitoring and booting to python script

* Add grpc methods to interact with dhcp_server module
Update dhcp_server to control radvd server directly from calls
Fix radvd service status method

* Add updates to dhcp2 module
Update radvd service

* Add license headers

* Add connection.dhcp_address test (#68)

* Add NTP tests (#60)

* Add ntp support test

* Add extra log message

* Modify descriptions

* Pylint

* Pylint (#69)

---------

Co-authored-by: jhughesbiot <[email protected]>

* Add ipv6 tests (#65)

* Add ipv6 tests

* Check for ND_NS

* Merge dev into main (Sprint 9) (#66)

* Implement test orchestrator (#4)

* Initial work on test-orchestrator

* Ignore runtime folder

* Update runtime directory for test modules

* Fix logging
Add initial framework for running tests

* logging and misc cleanup

* logging changes

* Add a stop hook after all tests complete

* Refactor test_orc code

* Add arg passing
Add option to use locally cloned via install or remote via main project network orchestrator

* Fix baseline module
Fix orchestrator exiting only after timeout

* Add result file to baseline test module
Change result format to match closer to design doc

* Refactor pylint

* Skip test module if it failed to start

* Refactor

* Check for valid log level

---------

Co-authored-by: Jacob Boddey <[email protected]>

* Add issue report templates (#7)

* Add issue templates

* Update README.md

* Discover devices on the network (#5)

* Test run sync (#8)

* Initial work on test-orchestrator

* Ignore runtime folder

* Update runtime directory for test modules

* Fix logging
Add initial framework for running tests

* logging and misc cleanup

* logging changes

* Add a stop hook after all tests complete

* Refactor test_orc code

* Add arg passing
Add option to use locally cloned via install or remote via main project network orchestrator

* Fix baseline module
Fix orchestrator exiting only after timeout

* Add result file to baseline test module
Change result format to match closer to design doc

* Refactor pylint

* Skip test module if it failed to start

* Refactor

* Check for valid log level

* Add config file arg
Misc changes to network start procedure

* fix merge issues

* Update runner and test orch procedure
Add useful runtiem args

* Restructure test run startup process
Misc updates to work with net orch updates

* Refactor

---------

* Quick refactor (#9)

* Fix duplicate sleep calls

* Add net orc (#11)

* Add network orchestrator repository

* cleanup duplicate start and install scripts

* Temporary fix for python dependencies

* Remove duplicate python requirements

* remove duplicate conf files

* remove remote-net option

* cleanp unecessary files

* Add the DNS test module (#12)

* Add network orchestrator repository

* cleanup duplicate start and install scripts

* Temporary fix for python dependencies

* Remove duplicate python requirements

* remove duplicate conf files

* remove remote-net option

* cleanp unecessary files

* Add dns test module
Fix test module build process

* Add mac address of device under test to test container
Update dns test to use mac address filter

* Update dns module tests

* Change result output

* logging update

* Update test module for better reusability

* Load in module config to test module

* logging cleanup

* Update baseline module to new template
Misc cleanup

* Add ability to disable individual tests

* remove duplicate readme

* Update device directories

* Remove local folder

* Update device template
Update test module to work with new device config file format

* Change test module network config options
Do not start network services for modules not configured for network

* Refactor

---------

* Add baseline and pylint tests (#25)

* Discover devices on the network (#22)

* Discover devices on the network

* Add defaults when missing from config
Implement monitor wait period from config

* Add steady state monitor
Remove duplicate callback registrations

* Load devices into network orchestrator during testrun start

---------

Co-authored-by: jhughesbiot <[email protected]>

* Build dependencies first (#21)

* Build dependencies first

* Remove debug message

* Add depend on option to test modules

* Re-add single interface option

* Import subprocess

---------

Co-authored-by: jhughesbiot <[email protected]>

* Port scan test module (#23)

* Add network orchestrator repository

* cleanup duplicate start and install scripts

* Temporary fix for python dependencies

* Remove duplicate python requirements

* remove duplicate conf files

* remove remote-net option

* cleanp unecessary files

* Add dns test module
Fix test module build process

* Add mac address of device under test to test container
Update dns test to use mac address filter

* Update dns module tests

* Change result output

* logging update

* Update test module for better reusability

* Load in module config to test module

* logging cleanup

* Update baseline module to new template
Misc cleanup

* Add ability to disable individual tests

* remove duplicate readme

* Update device directories

* Remove local folder

* Update device template
Update test module to work with new device config file format

* Change test module network config options
Do not start network services for modules not configured for network

* Initial nmap test module add
Add device ip resolving to base module
Add network mounting for test modules

* Update ipv4 device resolving in test modules

* Map in ip subnets and remove hard coded references

* Add ftp port test

* Add ability to pass config for individual tests within a module
Update nmap module scan to run tests based on config

* Add full module check for compliance

* Add all tcp port scans to config

* Update nmap commands to match existing DAQ tests
Add udp scanning and tests

* logging cleanup

* Update TCP port scanning range
Update logging

* Merge device config into module config
Update device template

* fix merge issues

* Update timeouts
Add multi-threading for multiple scanns to run simultaneously
Add option to use scan scripts for services

* Fix merge issues

* Fix device configs

* Remove unecessary files

* Cleanup duplicate properties

* Cleanup install script

* Formatting (#26)

* Fix pylint issues in net orc

* more pylint fixes

* fix listener lint issues

* fix logger lint issues

* fix validator lint issues

* fix util lint issues

* Update base network module linting issues

* Cleanup linter issues for dhcp modules
Remove old code testing code

* change to single quote delimeter

* Cleanup linter issues for ntp module

* Cleanup linter issues for radius module

* Cleanup linter issues for template module

* fix linter issues with faux-dev

* Test results (#27)

* Collect all module test results

* Fix test modules without config options

* Add timestamp to test results

* Test results (#28)

* Collect all module test results

* Fix test modules without config options

* Add timestamp to test results

* Add attempt timing and device info to test results

* Ignore disabled test containers when generating results

* Fully skip modules that are disabled

* Fix pylint test and skip internet tests so CI passes (#29)

* disable internet checks for pass

* fix pylint test

* Increase pylint score (#31)

* More formatting fixes

* More formatting fixes

* More formatting fixes

* More formatting fixes

* Misc pylint fixes
Fix test module logger

---------

Co-authored-by: jhughesbiot <[email protected]>

* Pylint (#32)

* More formatting fixes

* More formatting fixes

* More formatting fixes

* More formatting fixes

* Misc pylint fixes
Fix test module logger

* remove unused files

* more formatting

* revert breaking pylint changes

* more formatting

* fix results file

* More formatting

* ovs module formatting

---------

Co-authored-by: Jacob Boddey <[email protected]>

* Add license header (#36)

* More formatting fixes

* More formatting fixes

* More formatting fixes

* More formatting fixes

* Misc pylint fixes
Fix test module logger

* remove unused files

* more formatting

* revert breaking pylint changes

* more formatting

* fix results file

* More formatting

* ovs module formatting

* Add ovs control into network orchestrator

* Add verification methods for the base network

* Add network validation and misc logging updates

* remove ovs module

* add license header to all python files

---------

Co-authored-by: Jacob Boddey <[email protected]>
Co-authored-by: SuperJonotron <[email protected]>

* Ovs (#35)

* More formatting fixes

* More formatting fixes

* More formatting fixes

* More formatting fixes

* Misc pylint fixes
Fix test module logger

* remove unused files

* more formatting

* revert breaking pylint changes

* more formatting

* fix results file

* More formatting

* ovs module formatting

* Add ovs control into network orchestrator

* Add verification methods for the base network

* Add network validation and misc logging updates

* remove ovs module

---------

Co-authored-by: Jacob Boddey <[email protected]>
Co-authored-by: SuperJonotron <[email protected]>

* remove ovs files added back in during merge

* Nmap (#38)

* More formatting fixes

* More formatting fixes

* More formatting fixes

* More formatting fixes

* Misc pylint fixes
Fix test module logger

* remove unused files

* more formatting

* revert breaking pylint changes

* more formatting

* fix results file

* More formatting

* ovs module formatting

* Add ovs control into network orchestrator

* Add verification methods for the base network

* Add network validation and misc logging updates

* remove ovs module

* add license header to all python files

* Update tcp scans to speed up full port range scan
Add version checking
Implement ssh version checking

* Add unknown port checks
Match unknown ports to existing services
Add unknown ports without existing services to results file

---------

Co-authored-by: Jacob Boddey <[email protected]>
Co-authored-by: SuperJonotron <[email protected]>

* Create startup capture (#37)

* Connection (#40)

* Initial add of connection test module with ping test

* Update host user resolving

* Update host user resolving for validator

* add get user method to validator

* Conn mac oui (#42)

* Initial add of connection test module with ping test

* Update host user resolving

* Update host user resolving for validator

* add get user method to validator

* Add mac_oui test
Add option to return test result and details of test for reporting

* Con mac address (#43)

* Initial add of connection test module with ping test

* Update host user resolving

* Update host user resolving for validator

* add get user method to validator

* Add mac_oui test
Add option to return test result and details of test for reporting

* Add connection.mac_address test

* Dns (#44)

* Add MDNS test

* Update existing mdns logging to be more consistent with other tests

* Add startup and monitor captures

* File permissions (#45)

* Fix validator file permissions

* Fix test module permissions

* Fix device capture file permissions

* Fix device results permissions

* Add connection single ip test (#47)

* Nmap results (#49)

* Update processing of nmap results to use xml output and json conversions for stability

* Update matching with regex to prevent wrong service matches and duplicate processing for partial matches

* Update max port scan range

* Framework restructure (#50)

* Restructure framework and modules

* Fix CI paths

* Fix base module

* Add build script

* Remove build logs

* Update base and template docker files to fit the new format
Implement a template option on network modules
Fix skipping of base image build

* remove base image build in ci

* Remove group from chown

---------

Co-authored-by: jhughesbiot <[email protected]>

* Ip control (#51)

* Add initial work for ip control module

* Implement ip control module with additional cleanup methods

* Update link check to not use error stream

* Add error checking around container network configurations

* Add network cleanup for namespaces and links

* formatting

* Move config to /local (#52)

* Move config to /local

* Fix testing config

* Fix ovs_control config location

* Fix faux dev config location

* Add documentation (#53)

* Sync dev to main (#56)

* Merge dev into main (Sprint 7 and 8) (#33)

* Implement test orchestrator (#4)

* Initial work on test-orchestrator

* Ignore runtime folder

* Update runtime directory for test modules

* Fix logging
Add initial framework for running tests

* logging and misc cleanup

* logging changes

* Add a stop hook after all tests complete

* Refactor test_orc code

* Add arg passing
Add option to use locally cloned via install or remote via main project network orchestrator

* Fix baseline module
Fix orchestrator exiting only after timeout

* Add result file to baseline test module
Change result format to match closer to design doc

* Refactor pylint

* Skip test module if it failed to start

* Refactor

* Check for valid log level

---------

Co-authored-by: Jacob Boddey <[email protected]>

* Add issue report templates (#7)

* Add issue templates

* Update README.md

* Discover devices on the network (#5)

* Test run sync (#8)

* Initial work on test-orchestrator

* Ignore runtime folder

* Update runtime directory for test modules

* Fix logging
Add initial framework for running tests

* logging and misc cleanup

* logging changes

* Add a stop hook after all tests complete

* Refactor test_orc code

* Add arg passing
Add option to use locally cloned via install or remote via main project network orchestrator

* Fix baseline module
Fix orchestrator exiting only after timeout

* Add result file to baseline test module
Change result format to match closer to design doc

* Refactor pylint

* Skip test module if it failed to start

* Refactor

* Check for valid log level

* Add config file arg
Misc changes to network start procedure

* fix merge issues

* Update runner and test orch procedure
Add useful runtiem args

* Restructure test run startup process
Misc updates to work with net orch updates

* Refactor

---------

* Quick refactor (#9)

* Fix duplicate sleep calls

* Add net orc (#11)

* Add network orchestrator repository

* cleanup duplicate start and install scripts

* Temporary fix for python dependencies

* Remove duplicate python requirements

* remove duplicate conf files

* remove remote-net option

* cleanp unecessary files

* Add the DNS test module (#12)

* Add network orchestrator repository

* cleanup duplicate start and install scripts

* Temporary fix for python dependencies

* Remove duplicate python requirements

* remove duplicate conf files

* remove remote-net option

* cleanp unecessary files

* Add dns test module
Fix test module build process

* Add mac address of device under test to test container
Update dns test to use mac address filter

* Update dns module tests

* Change result output

* logging update

* Update test module for better reusability

* Load in module config to test module

* logging cleanup

* Update baseline module to new template
Misc cleanup

* Add ability to disable individual tests

* remove duplicate readme

* Update device directories

* Remove local folder

* Update device template
Update test module to work with new device config file format

* Change test module network config options
Do not start network services for modules not configured for network

* Refactor

---------

* Add baseline and pylint tests (#25)

* Discover devices on the network (#22)

* Discover devices on the network

* Add defaults when missing from config
Implement monitor wait period from config

* Add steady state monitor
Remove duplicate callback registrations

* Load devices into network orchestrator during testrun start

---------

Co-authored-by: jhughesbiot <[email protected]>

* Build dependencies first (#21)

* Build dependencies first

* Remove debug message

* Add depend on option to test modules

* Re-add single interface option

* Import subprocess

---------

Co-authored-by: jhughesbiot <[email protected]>

* Port scan test module (#23)

* Add network orchestrator repository

* cleanup duplicate start and install scripts

* Temporary fix for python dependencies

* Remove duplicate python requirements

* remove duplicate conf files

* remove remote-net option

* cleanp unecessary files

* Add dns test module
Fix test module build process

* Add mac address of device under test to test container
Update dns test to use mac address filter

* Update dns module tests

* Change result output

* logging update

* Update test module for better reusability

* Load in module config to test module

* logging cleanup

* Update baseline module to new template
Misc cleanup

* Add ability to disable individual tests

* remove duplicate readme

* Update device directories

* Remove local folder

* Update device template
Update test module to work with new device config file format

* Change test module network config options
Do not start network services for modules not configured for network

* Initial nmap test module add
Add device ip resolving to base module
Add network mounting for test modules

* Update ipv4 device resolving in test modules

* Map in ip subnets and remove hard coded references

* Add ftp port test

* Add ability to pass config for individual tests within a module
Update nmap module scan to run tests based on config

* Add full module check for compliance

* Add all tcp port scans to config

* Update nmap commands to match existing DAQ tests
Add udp scanning and tests

* logging cleanup

* Update TCP port scanning range
Update logging

* Merge device config into module config
Update device template

* fix merge issues

* Update timeouts
Add multi-threading for multiple scanns to run simultaneously
Add option to use scan scripts for services

* Fix merge issues

* Fix device configs

* Remove unecessary files

* Cleanup duplicate properties

* Cleanup install script

* Formatting (#26)

* Fix pylint issues in net orc

* more pylint fixes

* fix listener lint issues

* fix logger lint issues

* fix validator lint issues

* fix util lint issues

* Update base network module linting issues

* Cleanup linter issues for dhcp modules
Remove old code testing code

* change to single quote delimeter

* Cleanup linter issues for ntp module

* Cleanup linter issues for radius module

* Cleanup linter issues for template module

* fix linter issues with faux-dev

* Test results (#27)

* Collect all module test results

* Fix test modules without config options

* Add timestamp to test results

* Test results (#28)

* Collect all module test results

* Fix test modules without config options

* Add timestamp to test results

* Add attempt timing and device info to test results

* Ignore disabled test containers when generating results

* Fully skip modules that are disabled

* Fix pylint test and skip internet tests so CI passes (#29)

* disable internet checks for pass

* fix pylint test

* Increase pylint score (#31)

* More formatting fixes

* More formatting fixes

* More formatting fixes

* More formatting fixes

* Misc pylint fixes
Fix test module logger

---------

Co-authored-by: jhughesbiot <[email protected]>

* Pylint (#32)

* More formatting fixes

* More formatting fixes

* More formatting fixes

* More formatting fixes

* Misc pylint fixes
Fix test module logger

* remove unused files

* more formatting

* revert breaking pylint changes

* more formatting

* fix results file

* More formatting

* ovs module formatting

---------

Co-authored-by: Jacob Boddey <[email protected]>

* Add license header (#36)

* More formatting fixes

* More formatting fixes

* More formatting fixes

* More formatting fixes

* Misc pylint fixes
Fix test module logger

* remove unused files

* more formatting

* revert breaking pylint changes

* more formatting

* fix results file

* More formatting

* ovs module formatting

* Add ovs control into network orchestrator

* Add verification methods for the base network

* Add network validation and misc logging updates

* remove ovs module

* add license header to all python files

---------

Co-authored-by: Jacob Boddey <[email protected]>
Co-authored-by: SuperJonotron <[email protected]>

* Ovs (#35)

* More formatting fixes

* More formatting fixes

* More formatting fixes

* More formatting fixes

* Misc pylint fixes
Fix test module logger

* remove unused files

* more formatting

* revert breaking pylint changes

* more formatting

* fix results file

* More formatting

* ovs module formatting

* Add ovs control into network orchestrator

* Add verification methods for the base network

* Add network validation and misc logging updates

* remove ovs module

---------

Co-authored-by: Jacob Boddey <[email protected]>
Co-authored-by: SuperJonotron <[email protected]>

* remove ovs files added back in during merge

* Nmap (#38)

* More formatting fixes

* More formatting fixes

* More formatting fixes

* More formatting fixes

* Misc pylint fixes
Fix test module logger

* remove unused files

* more formatting

* revert breaking pylint changes

* more formatting

* fix results file

* More formatting

* ovs module formatting

* Add ovs control into network orchestrator

* Add verification methods for the base network

* Add network validation and misc logging updates

* remove ovs module

* add license header to all python files

* Update tcp scans to speed up full port range scan
Add version checking
Implement ssh version checking

* Add unknown port checks
Match unknown ports to existing services
Add unknown ports without existing services to results file

---------

Co-authored-by: Jacob Boddey <[email protected]>
Co-authored-by: SuperJonotron <[email protected]>

* Create startup capture (#37)

* Connection (#40)

* Initial add of connection test module with ping test

* Update host user resolving

* Update host user resolving for validator

* add get user method to validator

* Conn mac oui (#42)

* Initial add of connection test module with ping test

* Update host user resolving

* Update host user resolving for validator

* add get user method to validator

* Add mac_oui test
Add option to return test result and details of test for reporting

* Con mac address (#43)

* Initial add of connection test module with ping test

* Update host user resolving

* Update host user resolving for validator

* add get user method to validator

* Add mac_oui test
Add option to return test result and details of test for reporting

* Add connection.mac_address test

* Dns (#44)

* Add MDNS test

* Update existing mdns logging to be more consistent with other tests

* Add startup and monitor captures

* File permissions (#45)

* Fix validator file permissions

* Fix test module permissions

* Fix device capture file permissions

* Fix device results permissions

* Add connection single ip test (#47)

* Nmap results (#49)

* Update processing of nmap results to use xml output and json conversions for stability

* Update matching with regex to prevent wrong service matches and duplicate processing for partial matches

* Update max port scan range

* Framework restructure (#50)

* Restructure framework and modules

* Fix CI paths

* Fix base module

* Add build script

* Remove build logs

* Update base and template docker files to fit the new format
Implement a template option on network modules
Fix skipping of base image build

* remove base image build in ci

* Remove group from chown

---------

Co-authored-by: jhughesbiot <[email protected]>

* Ip control (#51)

* Add initial work for ip control module

* Implement ip control module with additional cleanup methods

* Update link check to not use error stream

* Add error checking around container network configurations

* Add network cleanup for namespaces and links

* formatting

* Move config to /local (#52)

* Move config to /local

* Fix testing config

* Fix ovs_control config location

* Fix faux dev config location

* Add documentation (#53)

---------

Co-authored-by: jhughesbiot <[email protected]>
Co-authored-by: jhughesbiot <[email protected]>
Co-authored-by: Noureddine <[email protected]>
Co-authored-by: SuperJonotron <[email protected]>

* Sprint 8 Hotfix (#54)

* Fix connection results.json

* Re add try/catch

* Fix log level

* Debug test module load order

* Add depends on to nmap module

* Remove logging change

---------

Co-authored-by: jhughesbiot <[email protected]>
Co-authored-by: jhughesbiot <[email protected]>
Co-authored-by: Noureddine <[email protected]>
Co-authored-by: SuperJonotron <[email protected]>

* Fix missing results on udp tests when tcp ports are also defined (#59)

* Add licence header (#61)

* Resolve merge conflict

* Add network docs (#63)

* Add network docs

* Rename to readme

* Add link to template module

* Dhcp (#64)

* Add initial work for ip control module

* Implement ip control module with additional cleanup methods

* Update link check to not use error stream

* Add error checking around container network configurations

* Add network cleanup for namespaces and links

* formatting

* initial work on adding grpc functions for dhcp tests

* rework code to allow for better usage and unit testing

* working poc for test containers and grpc client to dhcp-1

* Move grpc client code into base image

* Move grpc proto builds outside of dockerfile into module startup script

* Setup pythonpath var in test module base startup process
misc cleanup

* pylinting and logging updates

* Add python path resolving to network modules
Update grpc path to prevent conflicts
misc pylinting

* Change lease resolving method to fix pylint issue

* cleanup unit tests

* cleanup unit tests

* Add grpc updates to dhcp2 module
Update dhcp_config to deal with missing optional variables

* Add grpc updates to dhcp2 module
Update dhcp_config to deal with missing optional variables

* fix line endings

* misc cleanup

* Dhcp (#67)

* Add initial work for ip control module

* Implement ip control module with additional cleanup methods

* Update link check to not use error stream

* Add error checking around container network configurations

* Add network cleanup for namespaces and links

* formatting

* initial work on adding grpc functions for dhcp tests

* rework code to allow for better usage and unit testing

* working poc for test containers and grpc client to dhcp-1

* Move grpc client code into base image

* Move grpc proto builds outside of dockerfile into module startup script

* Setup pythonpath var in test module base startup process
misc cleanup

* pylinting and logging updates

* Add python path resolving to network modules
Update grpc path to prevent conflicts
misc pylinting

* Change lease resolving method to fix pylint issue

* cleanup unit tests

* cleanup unit tests

* Add grpc updates to dhcp2 module
Update dhcp_config to deal with missing optional variables

* Add grpc updates to dhcp2 module
Update dhcp_config to deal with missing optional variables

* fix line endings

* misc cleanup

* Move isc-dhcp-server and radvd to services
Move DHCP server monitoring and booting to python script

* Add grpc methods to interact with dhcp_server module
Update dhcp_server to control radvd server directly from calls
Fix radvd service status method

* Add updates to dhcp2 module
Update radvd service

* Add license headers

* Add connection.dhcp_address test (#68)

* Add NTP tests (#60)

* Add ntp support test

* Add extra log message

* Modify descriptions

* Pylint

* Pylint (#69)

---------

Co-authored-by: jhughesbiot <[email protected]>

* Add ipv6 tests (#65)

* Add ipv6 tests

* Check for ND_NS

---------

Co-authored-by: jhughesbiot <[email protected]>
Co-authored-by: jhughesbiot <[email protected]>
Co-authored-by: Noureddine <[email protected]>
Co-authored-by: SuperJonotron <[email protected]>

* Connection private address (#71)

* Add ntp support test

* Add extra log message

* Modify descriptions

* Pylint

* formatting

* Change isc-dhcp service setup
Fix dhcpd logging
Add start and stop methods to grpc dhcp client
Add dhcp2 client
Inttial private_addr test

* Add max lease time
Add unit tests

* fix last commit

* finish initial work on test

* pylinting

* Breakup test and allow better failure reporting

* restore network after test

* Wait for device to get a lease from original dhcp range after network restore

* pylinting

* Fix ipv6 tests

---------

Co-authored-by: Jacob Boddey <[email protected]>

* fix windows line ending

* Fix python import

* move isc-dhcp service commands to their own class
update logging
pylinting

* fix dhcp1

* Initial CI testing for tests (#72)

* Fix radvd conf

---------

Co-authored-by: jhughesbiot <[email protected]>
Co-authored-by: jhughesbiot <[email protected]>
Co-authored-by: Noureddine <[email protected]>
Co-authored-by: SuperJonotron <[email protected]>

* Fix testing command

* Disable API on testing

* Add API session

* Remove old method

* Remove local vars

* Replace old var

* Add device config

* Add device configs

* Fix paths

* Change MAC address

* Revert mac

* Fix copy path

* Debug loading devices

* Remove reference

* Changes

* Re-add checks to prevent null values

* Fix variable

* Fix

* Use dict instead of string

* Try without json conversion

* Container output to log

* Undo changes to nmap module

* Add post devices route

---------

Co-authored-by: jhughesbiot <[email protected]>
Co-authored-by: jhughesbiot <[email protected]>
Co-authored-by: Noureddine <[email protected]>
Co-authored-by: SuperJonotron <[email protected]>

* Dhcp tests (#81)

* Separate dhcp control methods into their own module
Implement ip change test
Add place holder for dhcp failover test

* Stabilize network before leaving ip_change test
Add dhcp_failover test

* fix regression issue with individual test enable/disable setting

* fix gitignore

* Merge tls tests into dev (#80)

* initial add of security module and tls tests

* Fix server test and implement 1.3 version

* pylinting

* More work on client tests

* Add client tls tests
Add unit tets
Add common python code to base test module

* re-enable dhcp unit tests disabled during dev

* rename module to tls

* fix renaming

* Fix unit tests broken by module rename
Add TLS 1.3 tests to config

* Add TLS 1.3 tests to config
fix unit tests

* Add certificate signature checks

* Add local cert mounting for signature validatoin
Fix test results

* Update tls 1.2 server to pass with tls 1.3 compliance
Add unit tests around tls 1.2 server
Misc updates and cleanup

* pylinting

* Update cipher checks and add test

* Fix test results when None is returned with details

* Fix duplicate results

---------

Co-authored-by: jhughesbiot <[email protected]>

* Test output restructure (#79)

* Change runtime test structure to allow for multiple old tests

* fix current test move

* logging changes

* Add device test count to device config

* Change max report naming
Add optional default value to system.json

* Copy current test instead of moving to keep a consistent location of the most recent test

* fix merge issue

* pylint

* Use local device folder and use session for config

---------

Co-authored-by: Jacob Boddey <[email protected]>

* Keep test results in memory (#82)

* Keep results in memory

* More useful debug message

* Fix file path

* Result descriptions (#92)

* Add short descriptions to conn module
Add result_description to results with shorter wording for UI usage

* Add result details to ipv6 tests

* Update test descriptions in baseline module

* Update dns test result details

* Update skip results to include details when present

* dns module formatting

* add result details to nmap tests

* add result details to ntp tests

* Add short descriptions to tls module and formatting

* misc test module formatting

* fix typo

* Misc cleanup (#93)

* Fix network request from module config
Misc formatting issues in test orchestrator

* fix misc network orchestrator formatting issues

* fix misc ovs control formatting issues

* fix misc ip control formatting issues

* Allow CORS (#91)

* Allow CORS

* Fix add device

* Configurable API port

* Add /history and device config endpoints (#88)

* Add /history and device config endpoints

* Add total tests

* Add report to device

* Only run tests if baseline passes

* Re-enable actions, fix conn module (#89)

* Re-enable actions, fix conn module

* Fix net_orc init

* Update report file name in testing

* Add required result to module configs (#95)

* Fix DNS test name (#110)

* Clear runtime folder on start (#111)

* Initial work on pdf report output and format via html (#103)

* Add user interface (#98)

* Add UI, small changes

* Update UI

* Update expected tests

* Add some documentation

* Save test modules (#115)

* Expand testing to include API and more testing (#96)

* Create Testrun package (#114)

* Merge dev into main (Sprint 10 and 11) (#86)

* Implement test orchestrator (#4)

* Initial work on test-orchestrator

* Ignore runtime folder

* Update runtime directory for test modules

* Fix logging
Add initial framework for running tests

* logging and misc cleanup

* logging changes

* Add a stop hook after all tests complete

* Refactor test_orc code

* Add arg passing
Add option to use locally cloned via install or remote via main project network orchestrator

* Fix baseline module
Fix orchestrator exiting only after timeout

* Add result file to baseline test module
Change result format to match closer to design doc

* Refactor pylint

* Skip test module if it failed to start

* Refactor

* Check for valid log level

---------

Co-authored-by: Jacob Boddey <[email protected]>

* Add issue report templates (#7)

* Add issue templates

* Update README.md

* Discover devices on the network (#5)

* Test run sync (#8)

* Initial work on test-orchestrator

* Ignore runtime folder

* Update runtime directory for test modules

* Fix logging
Add initial framework for running tests

* logging and misc cleanup

* logging changes

* Add a stop hook after all tests complete

* Refactor test_orc code

* Add arg passing
Add option to use locally cloned via install or remote via main project network orchestrator

* Fix baseline module
Fix orchestrator exiting only after timeout

* Add result file to baseline test module
Change result format to match closer to design doc

* Refactor pylint

* Skip test module if it failed to start

* Refactor

* Check for valid log level

* Add config file arg
Misc changes to network start procedure

* fix merge issues

* Update runner and test orch procedure
Add useful runtiem args

* Restructure test run startup process
Misc updates to work with net orch updates

* Refactor

---------

* Quick refactor (#9)

* Fix duplicate sleep calls

* Add net orc (#11)

* Add network orchestrator repository

* cleanup duplicate start and install scripts

* Temporary fix for python dependencies

* Remove duplicate python requirements

* remove duplicate conf files

* remove remote-net option

* cleanp unecessary files

* Add the DNS test module (#12)

* Add network orchestrator repository

* cleanup duplicate start and install scripts

* Temporary fix for python dependencies

* Remove duplicate python requirements

* remove duplicate conf files

* remove remote-net option

* cleanp unecessary files

* Add dns test module
Fix test module build process

* Add mac address of device under test to test container
Update dns test to use mac address filter

* Update dns module tests

* Change result output

* logging update

* Update test module for better reusability

* Load in module config to test module

* logging cleanup

* Update baseline module to new template
Misc cleanup

* Add ability to disable individual tests

* remove duplicate readme

* Update device directories

* Remove local folder

* Update device template
Update test module to work with new device config file format

* Change test module network config options
Do not start network services for modules not configured for network

* Refactor

---------

* Add baseline and pylint tests (#25)

* Discover devices on the network (#22)

* Discover devices on the network

* Add defaults when missing from config
Implement monitor wait period from config

* Add steady state monitor
Remove duplicate callback registrations

* Load devices into network orchestrator during testrun start

---------

Co-authored-by: jhughesbiot <[email protected]>

* Build dependencies first (#21)

* Build dependencies first

* Remove debug message

* Add depend on option to test modules

* Re-add single interface option

* Import subprocess

---------

Co-authored-by: jhughesbiot <[email protected]>

* Port scan test module (#23)

* Add network orchestrator repository

* cleanup duplicate start and install scripts

* Temporary fix for python dependencies

* Remove duplicate python requirements

* remove duplicate conf files

* remove remote-net option

* cleanp unecessary files

* Add dns test module
Fix test module build process

* Add mac address of device under test to test container
Update dns test to use mac address filter

* Update dns module tests

* Change result output

* logging update

* Update test module for better reusability

* Load in module config to test module

* logging cleanup

* Update baseline module to new template
Misc cleanup

* Add ability to disable individual tests

* remove duplicate readme

* Update device directories

* Remove local folder

* Update device template
Update test module to work with new device config file format

* Change test module network config options
Do not start network services for modules not configured for network

* Initial nmap test module add
Add device ip resolving to base module
Add network mounting for test modules

* Update ipv4 device resolving in test modules

* Map in ip subnets and remove hard coded references

* Add ftp port test

* Add ability to pass config for individual tests within a module
Update nmap module scan to run tests based on config

* Add full module check for compliance

* Add all tcp port scans to config

* Update nmap commands to match existing DAQ tests
Add udp scanning and tests

* logging cleanup

* Update TCP port scanning range
Update logging

* Merge device config into module config
Update device template

* fix merge issues

* Update timeouts
Add multi-threading for multiple scanns to run simultaneously
Add option to use scan scripts for services

* Fix merge issues

* Fix device configs

* Remove unecessary files

* Cleanup duplicate properties

* Cleanup install script

* Formatting (#26)

* Fix pylint issues in net orc

* more pylint fixes

* fix listener lint issues

* fix logger lint issues

* fix validator lint issues

* fix util lint issues

* Update base network module linting issues

* Cleanup linter issues for dhcp modules
Remove old code testing code

* change to single quote delimeter

* Cleanup linter issues for ntp module

* Cleanup linter issues for radius module

* Cleanup linter issues for template module

* fix linter issues with faux-dev

* Test results (#27)

* Collect all module test results

* Fix test modules without config options

* Add timestamp to test results

* Test results (#28)

* Collect all module test results

* Fix test modules without config options

* Add timestamp to test results

* Add attempt timing and device info to test results

* Ignore disabled test containers when generating results

* Fully skip modules that are disabled

* Fix pylint test and skip internet tests so CI passes (#29)

* disable internet checks for pass

* fix pylint test

* Increase pylint score (#31)

*…
  • Loading branch information
10 people authored May 13, 2024
1 parent 57962d8 commit 3e1fc31
Show file tree
Hide file tree
Showing 16 changed files with 64 additions and 40 deletions.
2 changes: 1 addition & 1 deletion docs/get_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,4 @@ If you encounter any issues or need assistance, consider the following:
Once you have completed a test attempt, you may want to review the test report provided by Testrun. For more information about what Testrun looks for when testing, and what the output means, take a look at the testing documentation: [Testing](/docs/test/index.md).

# Uninstall
To uninstall Testrun, use the built-in dpkg uninstall command to remove Testrun correctly. For Testrun, this would be: ```sudo apt-get remove testrun```. Note that this
To uninstall Testrun, use the built-in dpkg uninstall command to remove Testrun correctly. For Testrun, this would be: ```sudo apt-get remove testrun```.
2 changes: 1 addition & 1 deletion docs/test/statuses.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Testrun will output the result and description of each automated test. The test
| Error | An error occured whilst running the test | Create a bug report requesting additional support to diagnose the issue |
| Skipped | The test has not been executed because a linked test did not produce a compliant result | You may implement the functionality (not required) |

## Test requirement
## Test Requirement
Testrun also determines whether each test is required for the device to receive an overall compliant result. These rules are:

| Name | Description |
Expand Down
2 changes: 1 addition & 1 deletion framework/python/src/common/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def _load_version(self, default_version):
version_cmd = util.run_command(
'dpkg-query --showformat=\'${Version}\' --show testrun')
# index 1 of response is the stderr byte stream so if
# it has any data in it, there was an error and we
# it has any data in it, there was an error and we
# did not resolve the version and we'll use the fallback
if len(version_cmd[1]) == 0:
version = version_cmd[0]
Expand Down
63 changes: 40 additions & 23 deletions framework/python/src/common/testreport.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,27 +296,28 @@ def generate_steps_to_resolve(self, json_data):

# Render test recommendations
page += f'''
<table class="steps-to-resolve">
<tbody>
<tr>
<td width="10%" class="steps-to-resolve index">{index}.</td>
<td width="32%" class="steps-to-resolve"><span class="steps-to-resolve subtitle">Name</span><br>{test["name"]}</td>
<td class="steps-to-resolve"><span class="steps-to-resolve subtitle">Description</span><br>{test["description"]}</td>
</tr>
<tr>
<td width="10%"></td>
<td colspan="2" class="steps-to-resolve" style="padding-bottom:20px;">
<span class="steps-to-resolve subtitle">Steps to resolve</span>
<div class="steps-to-resolve">
<div class="steps-to-resolve-row">
<span class="steps-to-resolve-index">{index}. </span>
<div class="steps-to-resolve-test-name">
<span class="steps-to-resolve subtitle">Name</span><br>{test["name"]}
</div>
<div class="steps-to-resolve-description">
<span class="steps-to-resolve subtitle">Description</span><br>{test["description"]}
</div>
</div>
<div class="steps-to-resolve-row" style="margin-left: 70px;">
<span class="steps-to-resolve subtitle">Steps to resolve</span>
'''

step_number = 1
for recommendation in test['recommendations']:
page += f'''<br>
<span style="font-size: 14px">{
page += f'''
<br><span style="font-size: 14px">{
step_number}. {recommendation}</span>'''
step_number += 1

page += '</td></tbody></table>'
page += '</div></div>'

index += 1
steps_so_far += 1
Expand Down Expand Up @@ -585,6 +586,11 @@ def generate_summary(self, json_data):
return summary

def generate_device_module_label(self, module, enabled):

# Do not render deleted modules
if module == 'nmap':
return ''

label = '<div class="summary-device-module-label">'
if enabled:
label += '<span style="color:#34a853">✔ </span>'
Expand Down Expand Up @@ -787,30 +793,41 @@ def generate_css(self):
font-family: 'Roboto Mono', monospace;
}
table.steps-to-resolve {
div.steps-to-resolve {
background-color: #F8F9FA;
margin-bottom: 30px;
width: var(--page-width);
width: 756px;
padding: 20px 30px;
vertical-align: top;
}
.steps-to-resolve-row {
vertical-align: top;
}
td.steps-to-resolve {
padding-left: 20px;
padding-top: 20px;
padding-right: 15px;
.steps-to-resolve-test-name {
display: inline-block;
margin-left: 70px;
margin-bottom: 20px;
width: 250px;
vertical-align: top;
}
.steps-to-resolve-description {
display: inline-block;
}
.steps-to-resolve.subtitle {
text-align: left;
padding-top: 15px;
font-weight: 500;
color: #5F6368;
font-size: 14px;
}
.steps-to-resolve.index {
.steps-to-resolve-index {
font-size: 40px;
padding-left: 30px;
position: absolute;
}
.callout-container.info {
Expand Down
2 changes: 1 addition & 1 deletion framework/python/src/common/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def get_module_display_name(search):
'ntp': 'NTP',
'dns': 'DNS',
'connection': 'Connection',
'nmap': 'Services',
'services': 'Services',
'tls': 'TLS',
'protocol': 'Protocol'
}
Expand Down
3 changes: 2 additions & 1 deletion modules/test/tls/python/src/tls_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ def __init__(self,
# # cert_table = (f'| Property | Value |\n'
# # f'|---|---|\n'
# # f"| {'Version':<17} | {version_value:^25} |\n"
# # f"| {'Signature Alg.':<17} | {signature_alg_value:^25} |\n"
# # f"| {'Signature Alg.':<17} |
# {signature_alg_value:^25} |\n"
# # f"| {'Validity from':<17} | {not_before:^25} |\n"
# # f"| {'Valid to':<17} | {not_after:^25} |")

Expand Down
5 changes: 4 additions & 1 deletion modules/ui/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,14 +287,16 @@ describe('AppComponent', () => {
});
}));

it('should update interfaces', () => {
it('should update interfaces and config', () => {
fixture.detectChanges();

spyOn(component.settings, 'getSystemInterfaces');
spyOn(component.settings, 'getSystemConfig');

component.openGeneralSettings(false);

expect(component.settings.getSystemInterfaces).toHaveBeenCalled();
expect(component.settings.getSystemConfig).toHaveBeenCalled();
});

it('should call settingsDrawer open on openSetting', fakeAsync(() => {
Expand Down Expand Up @@ -650,6 +652,7 @@ class FakeGeneralSettingsComponent {
@Output() closeSettingEvent = new EventEmitter<void>();
@Output() reloadInterfacesEvent = new EventEmitter<void>();
getSystemInterfaces = () => {};
getSystemConfig = () => {};
}

@Component({
Expand Down
1 change: 1 addition & 0 deletions modules/ui/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ export class AppComponent implements OnInit {
async openGeneralSettings(openSettingFromToggleBtn: boolean) {
this.openedSettingFromToggleBtn = openSettingFromToggleBtn;
this.settings.getSystemInterfaces();
this.settings.getSystemConfig();
await this.settingsDrawer.open();
}

Expand Down
2 changes: 1 addition & 1 deletion modules/ui/src/app/model/testrun-status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export enum StatusOfTestResult {
CompliantHigh = 'Compliant (High)',
SmartReady = 'Smart Ready',
NonCompliant = 'Non-Compliant', // device does not support feature but feature is required
NotPresent = 'Feature Not Present',
NotDetected = 'Feature Not Detected',
NotStarted = 'Not Started',
InProgress = 'In Progress',
Error = 'Error', // test failed to run
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
Component,
inject,
Input,
OnDestroy,
OnInit,
} from '@angular/core';
import {
Expand Down Expand Up @@ -38,7 +37,7 @@ import { KeyValuePipe, NgForOf, NgIf } from '@angular/common';
],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class SettingsDropdownComponent implements OnInit, OnDestroy {
export class SettingsDropdownComponent implements OnInit {
@Input() key = '';
@Input({ required: true }) controlName = '';
@Input() groupLabel = '';
Expand All @@ -55,9 +54,6 @@ export class SettingsDropdownComponent implements OnInit, OnDestroy {
this.parentFormGroup.addControl(this.controlName, new FormControl(''));
this.parentFormGroup.addControl(this.controlName, new FormControl(''));
}
ngOnDestroy() {
this.parentFormGroup.removeControl(this.controlName);
}

get control(): FormControl {
return this.parentFormGroup.get(this.controlName) as FormControl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ export class GeneralSettingsComponent implements OnInit, OnDestroy {
this.hideLoading();
}

getSystemConfig(): void {
this.settingsStore.getSystemConfig();
}

private showLoading() {
this.loaderService.setLoading(true);
}
Expand Down
2 changes: 1 addition & 1 deletion modules/ui/src/app/services/test-run.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ describe('TestRunService', () => {
];

const statusesForGreyRes = [
StatusOfTestResult.NotPresent,
StatusOfTestResult.NotDetected,
StatusOfTestResult.NotStarted,
];

Expand Down
2 changes: 1 addition & 1 deletion modules/ui/src/app/services/test-run.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export class TestRunService {
result === StatusOfTestResult.Info ||
result === StatusOfTestResult.InProgress,
grey:
result === StatusOfTestResult.NotPresent ||
result === StatusOfTestResult.NotDetected ||
result === StatusOfTestResult.NotStarted,
};
}
Expand Down
2 changes: 1 addition & 1 deletion testing/api/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ def test_multiple_runs(testing_devices, testrun):
@pytest.mark.skip()
def test_create_invalid_chars(empty_devices_dir, testrun):
# local_delete_devices(ALL_DEVICES)
# We must start test run with no devices in local/devices for this test
# We must start test run with no devices in local/devices for this test
# to function as expected!
assert len(local_get_devices()) == 0

Expand Down
3 changes: 2 additions & 1 deletion testing/tests/test_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ def test_list_tests(capsys, results, test_matrix):
for test in collect_actual_results(results[tester]):
if test.name in test_matrix[tester]['expected_results']:
print(
f' {test.name}: {test.result} (exp: {test_matrix[tester]["expected_results"][test.name]})'
f''' {test.name}: {test.result} (exp: {test_matrix[
tester]["expected_results"][test.name]})'''
)
else:
print(f' {test.name}: {test.result}')
Expand Down
3 changes: 2 additions & 1 deletion testing/unit/tls/tls_module_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,8 @@ def tls_module_ca_cert_spaces_test(self):
cert_out_dir=OUTPUT_DIR,
root_certs_dir=tmp_dir)

cert_valid = tls_util.validate_local_ca_signature(device_cert_path=cert_path)
cert_valid = tls_util.validate_local_ca_signature(
device_cert_path=cert_path)
self.assertEqual(cert_valid[0], True)


Expand Down

0 comments on commit 3e1fc31

Please sign in to comment.