cloudstack/systemvm
Remi Bergsma a243339faa Merge pull request #1386 from remibergsma/fix-del-private-gw-route
CLOUDSTACK-9266: Make deleting static routes in private gw workThe to-be-deleted static routes were removed from the json file, instead of putting them there with revoke=true. The script that parses the json now doesn't find it and thus does not delete it.

Example after adding/removing some:
```
root@r-3-VM:/var/cache/cloud# cat /etc/cloudstack/staticroutes.json
{
    "1.2.3.0/24": {
        "gateway": "172.16.0.1",
        "ip_address": "172.16.0.2",
        "network": "1.2.3.0/24",
        "revoke": true
    },
    "1.2.3.4/32": {
        "gateway": "172.16.0.1",
        "ip_address": "172.16.0.2",
        "network": "1.2.3.4/32",
        "revoke": true
    },
    "1.2.33.3/32": {
        "gateway": "172.16.0.1",
        "ip_address": "172.16.0.2",
        "network": "1.2.33.3/32",
        "revoke": true
    },
    "1.22.2.2/32": {
        "gateway": "172.16.0.1",
        "ip_address": "172.16.0.2",
        "network": "1.22.2.2/32",
        "revoke": true
    },
    "10.1.2.1/32": {
        "gateway": "172.16.0.1",
        "ip_address": "172.16.0.2",
        "network": "10.1.2.1/32",
        "revoke": true
    },
    "10.1.200.0/25": {
        "gateway": "172.16.0.1",
        "ip_address": "172.16.0.2",
        "network": "10.1.200.0/25",
        "revoke": true
    },
    "10.11.12.13/32": {
        "gateway": "172.16.0.1",
        "ip_address": "172.16.0.2",
        "network": "10.11.12.13/32",
        "revoke": true
    },
    "172.16.1.3/32": {
        "gateway": "172.16.0.1",
        "ip_address": "172.16.0.2",
        "network": "172.16.1.3/32",
        "revoke": true
    },
    "172.16.15.14/32": {
        "gateway": "172.16.0.1",
        "ip_address": "172.16.0.2",
        "network": "172.16.15.14/32",
        "revoke": false
    },
    "172.16.17.0/25": {
        "gateway": "172.16.0.1",
        "ip_address": "172.16.0.2",
        "network": "172.16.17.0/25",
        "revoke": false
    },
    "id": "staticroutes"
}
```

This results in:
```
root@r-3-VM:/var/cache/cloud# ip route show
default via 192.168.23.1 dev eth1
169.254.0.0/16 dev eth0  proto kernel  scope link  src 169.254.1.67
172.16.0.0/24 dev eth2  proto kernel  scope link  src 172.16.0.2
172.16.15.14 via 172.16.0.1 dev eth2
172.16.17.0/25 via 172.16.0.1 dev eth2
192.168.23.0/24 dev eth1  proto kernel  scope link  src 192.168.23.4
```

Two static routes left, the rest deleted:
```
172.16.15.14 via 172.16.0.1 dev eth2
172.16.17.0/25 via 172.16.0.1 dev eth2
```

That also matches the UI:

<img width="1327" alt="screen shot 2016-01-30 at 06 34 06" src="https://cloud.githubusercontent.com/assets/1630096/12693933/83e67d80-c71b-11e5-9241-9f478522b7a4.png">

* pr/1386:
  CLOUDSTACK-9266: Make deleting static routes in private gw work

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-02-04 09:13:00 +01:00
..
bindir Move the system vm to a separate maven project. 2013-09-20 18:31:02 +08:00
certs Move the system vm to a separate maven project. 2013-09-20 18:31:02 +08:00
conf CLOUDSTACK-9062: Improve S3 implementation. 2015-11-19 15:29:10 +01:00
conf.dom0 CLOUDSTACK-9105: Logging enhancement: Handle/reference to track API calls end to end in the MS logs 2015-12-04 12:45:57 +05:30
css console-proxy add support of AltGr key and FR azerty keyboard 2014-12-08 18:05:43 +05:30
distro CLOUDSTACK-6220: Take 2, Fix cloudstack init scripts so that they 2014-03-10 16:11:52 -06:00
images Move the system vm to a separate maven project. 2013-09-20 18:31:02 +08:00
js console-proxy add support of AltGr key and FR azerty keyboard 2014-12-08 18:05:43 +05:30
libexec Move the system vm to a separate maven project. 2013-09-20 18:31:02 +08:00
patches/debian Merge pull request #1386 from remibergsma/fix-del-private-gw-route 2016-02-04 09:13:00 +01:00
scripts Merge branch 'volume-upload' into master 2015-04-29 11:12:53 +05:30
test/python Fixed defaultroute on VPC routers in CsRoute and CsAddress 2015-08-24 13:35:29 +02:00
ui Move the system vm to a separate maven project. 2013-09-20 18:31:02 +08:00
vm-script Move the system vm to a separate maven project. 2013-09-20 18:31:02 +08:00
pom.xml Updating pom.xml version numbers for release 4.7.2-SNAPSHOT 2016-01-26 09:33:56 +01:00
systemvm-descriptor.xml Remove duplicate scripts and move the remaining items to the systemvm project 2013-10-14 08:02:35 +02:00