gitlab loaction: https://gitlab.geant.net/omar.qouqas/mdvpn-msr- there are 2 branches, test and master.
This programme accepts value entries of year and month from within the "Run Configuration" in the IDE (i.e. Eclipse). Year must be >= current year (i.e. 2018).
The code consists of three Java classes:
The programme connects to two databases, "md_vpn and "reports". Currently, they are local instances on my machine(md_vpn,reports) using my credentials (test password). In order to run this code on production environment; the database URLs and credentials are stored in a config. file named "application.properties"
The "run" method in "Controller" class will execute the basic update statements, as per this wiki page: https://wiki.geant.org/display/SD/1.1+Initialising+The+Data . Also, it executes the Splunk Data and all other steps in 3.2 https://wiki.geant.org/display/SD/3.2+MD+VPN+Availability+Detailed . Finally, it will execute step 3.1 MD-VPN Availability Summary https://wiki.geant.org/display/SD/3.1+MD-VPN+Availability+Summary
The two methods "isYearValid" and "isMonthValid" in the "Controller" class validate the year and month input.