Is there a way to add multiple static routes on web gateway ?
I have about 70 routes to be added, i have 5 web gateways...
It is strange that there is no a field for massive insert for static routes... every network device has one...
If i add via CLI, then i lose them at reboot...
I have 7.8.2.8.0 version
thanks for suggestions
Giuliano
Solved! Go to Solution.
#!/bin/bash
REST="http://127.0.0.1:4711/Konfigurator/REST";
area="appliances"
setting="configuration/com.scur.engine.appliance.routes.configuration/property";
property="network.routes.ip4";
echo "Login to UI"
curl -k -s -c cookies.txt -H "Authorization: Basic YWRtaW46d2ViZ2F0ZXdheQ==" -X POST "$REST/login" > /dev/null
echo -e "Print list of MWG UUIDs within the cluster\n"
curl -k -s -b cookies.txt "$REST/appliances" -H 'Content-Type: application/xml; charset=UTF-8'
echo -e "\n\n ^ The single appliance in my cluster is listed as \"<id>4208e5e8-b21e-073d-e67f-fbd3a833b8f0</id>\" ^"
echo "Appliance UUIDs can also be found through the UI by selecting \"Configuration->Appliances\". When this is selected, the UUID/Hostname/etc is displayed in the bottom-right pane."
UUID="4208e5e8-b21e-073d-e67f-fbd3a833b8f0"
FullRest=$REST/$area/$UUID/$setting/$property;
echo "Write the current Static Route configuration for $UUID to $UUID.xml"
curl -k -s -b cookies.txt -X GET "$FullRest" -H 'Content-Type: application/xml; charset=UTF-8' > $UUID.xml
echo "Edit the Static Route configuration as needed before continuing"
echo "Overwrite Static Route configuration for $UUID"
curl -k -s -b cookies.txt -d @$UUID.xml -X PUT "$FullRest" -H 'Content-Type: application/xml; charset=UTF-8'; > /dev/null
echo "Save changes (will trigger a network service restart)"
curl -k -s -b cookies.txt -X POST "$REST/commit"
echo "Logout from UI (not usually needed due to the service restart, but a good habit nonetheless)"
curl -k -s -b cookies.txt -X POST "$REST/logout"
#!/bin/bash
REST="http://127.0.0.1:4711/Konfigurator/REST";
area="appliances"
setting="configuration/com.scur.engine.appliance.routes.configuration/property";
property="network.routes.ip4";
echo "Login to UI"
curl -k -s -c cookies.txt -H "Authorization: Basic YWRtaW46d2ViZ2F0ZXdheQ==" -X POST "$REST/login" > /dev/null
echo -e "Print list of MWG UUIDs within the cluster\n"
curl -k -s -b cookies.txt "$REST/appliances" -H 'Content-Type: application/xml; charset=UTF-8'
echo -e "\n\n ^ The single appliance in my cluster is listed as \"<id>4208e5e8-b21e-073d-e67f-fbd3a833b8f0</id>\" ^"
echo "Appliance UUIDs can also be found through the UI by selecting \"Configuration->Appliances\". When this is selected, the UUID/Hostname/etc is displayed in the bottom-right pane."
UUID="4208e5e8-b21e-073d-e67f-fbd3a833b8f0"
FullRest=$REST/$area/$UUID/$setting/$property;
echo "Write the current Static Route configuration for $UUID to $UUID.xml"
curl -k -s -b cookies.txt -X GET "$FullRest" -H 'Content-Type: application/xml; charset=UTF-8' > $UUID.xml
echo "Edit the Static Route configuration as needed before continuing"
echo "Overwrite Static Route configuration for $UUID"
curl -k -s -b cookies.txt -d @$UUID.xml -X PUT "$FullRest" -H 'Content-Type: application/xml; charset=UTF-8'; > /dev/null
echo "Save changes (will trigger a network service restart)"
curl -k -s -b cookies.txt -X POST "$REST/commit"
echo "Logout from UI (not usually needed due to the service restart, but a good habit nonetheless)"
curl -k -s -b cookies.txt -X POST "$REST/logout"
New to the forums or need help finding your way around the forums? There's a whole hub of community resources to help you.
Thousands of customers use our Community for peer-to-peer and expert product support. Enjoy these benefits with a free membership: