diff --git a/README.md b/README.md new file mode 100644 index 0000000..0abe8a9 --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +# Automated Juniper MIST integration + +This repo has been created as part of some spike work to automate the creation of Juniper Mist sites. + +## Local Development: + +Example of test data csv file. Create a file called this [test_data/sites_with_clients.csv](test_data/sites_with_clients.csv) +``` +Client,Shared Secret,Site Name,Site Address,Enable GovWifi,Enable MoJWifi +192.168.1.2/32,0000000000000000000,"Site A", "Number 1 Foobar Road London UK", "TRUE", "FALSE" +192.168.1.3/32,0000000000000000000,"Site B", "Number 2 Foobar Road London UK", "TRUE", "FALSE" +192.168.1.4/32,0000000000000000000,"Site C", "Number 3 Foobar Road London UK", "TRUE", "FALSE" +``` +Setup OS ENVs: + + google_api_key=os.environ['GOOGLE_API_KEY'], + mist_api_token=os.environ['MIST_API_TOKEN'], + org_id=os.environ['ORG_ID'] + +Setup Python Environment and install requirements.txt \ No newline at end of file diff --git a/src/juniper.py b/src/juniper.py index 9996395..c6ab7d1 100644 --- a/src/juniper.py +++ b/src/juniper.py @@ -210,7 +210,18 @@ def juniper_script(file, } } ''' - site_setting = {} + # MOJ specific attributes + site_setting = { + + "vars": { + "Enable GovWifi": d.get('Enable GovWifi', ''), #Not exported from NACS + "Enable MoJWifi": d.get('Enable MoJWifi', ''), #Not exported from NACS + "Weird NACS Radius Key": d.get('Shared Secret', ''), + "GovWifi Radius Key": "WHERE DO I GET THIS?" + + } + + } # # Create Site # (geocoded, geocoding) = geocode(d.get('Site Address', ''), google_api_key, show_more_details)