cloudstack/scripts/network/juniper
Richard Lawley d70f574a7e plugins: fix removing SRX port forwarding rules, improve add/remove logic (#3393)
This PR partially fixes the logic around port forwarding rules on the Juniper SRX plugin. The code in the plugin is based on JunOS 10, which is very old. The changes here should not break compatibility, but should enable the plugin to be used on newer devices. Note that an additional change to a script file is required to be able to add port forwarding rules, but as this PR was targetted for 4.11.3, I thought it best not to include this change as it might break compatibility for anyone still using JunOS 10.

I've made the logic better and consistent for adding/removing static nat and port forwarding rules - these were multi-step processes which did not check each individual step. This would aid in manually fixing rules in case of further problems.

I've also improved the logging for communication with the SRX by stripping out the Apache header before sending it, and indicating the name of the template filename in use.

To be able to add port forwarding rules, the <dst-port> tags in dest-nat-rule-add.xml must be changed to <low>.

Fixes: #3379
2019-07-08 15:46:12 +05:30
..
access-profile-add.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
access-profile-getall.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
access-profile-getone.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
address-book-entry-add.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
address-book-entry-getall.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
address-book-entry-getone.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
address-pool-add.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
address-pool-getall.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
address-pool-getone.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
application-add.xml CLOUDSTACK-779 Egress firewall rules support for Juniper SRX 2013-04-10 10:54:04 -07:00
application-getone.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
close-configuration.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
commit.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
dest-nat-pool-add.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
dest-nat-pool-getall.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
dest-nat-pool-getone.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
dest-nat-rule-add.xml plugins: fix removing SRX port forwarding rules, improve add/remove logic (#3393) 2019-07-08 15:46:12 +05:30
dest-nat-rule-getall.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
dest-nat-rule-getone.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
dynamic-vpn-client-add.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
dynamic-vpn-client-getall.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
dynamic-vpn-client-getone.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
filter-getone.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
filter-term-getone.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
firewall-filter-bytes-getall.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
firewall-filter-term-add.xml Fix license issue of new added xml files 2013-01-04 19:52:21 -08:00
firewall-filter-term-getone.xml Fix license issue of new added xml files 2013-01-04 19:52:21 -08:00
guest-vlan-filter-term-add.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
ike-gateway-add.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
ike-gateway-getall.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
ike-gateway-getone.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
ike-policy-add.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
ike-policy-getall.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
ike-policy-getone.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
ipsec-vpn-add.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
ipsec-vpn-getall.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
ipsec-vpn-getone.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
login.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
open-configuration.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
private-interface-add.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
private-interface-getall.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
private-interface-getone.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
private-interface-with-filters-add.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
proxy-arp-add.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
proxy-arp-getall.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
proxy-arp-getone.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
public-ip-filter-term-add.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
rollback.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
security-policy-add.xml CLOUDSTACK-1578 SRX: Egress default policy configurable using network offering on SRX firewall 2013-06-24 13:37:01 +05:30
security-policy-getall.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
security-policy-getone.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
security-policy-group.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
security-policy-rename.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
src-nat-pool-add.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
src-nat-pool-getone.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
src-nat-rule-add.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
src-nat-rule-getall.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
src-nat-rule-getone.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
static-nat-rule-add.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
static-nat-rule-getall.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
static-nat-rule-getone.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
template-entry.xml The other xml license fix 2013-01-04 20:03:16 -08:00
test.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
zone-interface-add.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00
zone-interface-getone.xml License header updates for the scripts folder. 2012-08-03 09:38:28 -04:00