Skip to content

Commit

Permalink
Merge pull request #2 from ministryofjustice/james-branch
Browse files Browse the repository at this point in the history
James branch
  • Loading branch information
jamesgreen-moj authored Nov 22, 2023
2 parents 8d5760b + b3ec696 commit ecc9bdb
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
13 changes: 12 additions & 1 deletion src/juniper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ecc9bdb

Please sign in to comment.