From 93ac134f1e5c4c4c22029eca241f75362303837a Mon Sep 17 00:00:00 2001 From: Murali Reddy Date: Wed, 5 Oct 2016 14:52:06 +0530 Subject: [PATCH] CLOUDSTACK-9533: gateway of public IP is not handled correctly when parsing the cmd_line.json to create ips.json databag using 'gateway' in cmd_line for the public ip gateway while creating ips.json databag --- systemvm/patches/debian/config/opt/cloud/bin/merge.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/systemvm/patches/debian/config/opt/cloud/bin/merge.py b/systemvm/patches/debian/config/opt/cloud/bin/merge.py index 76c0ffb8c02..aab29e8a4cd 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/merge.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/merge.py @@ -222,10 +222,13 @@ class updateDataBag: dp['source_nat'] = False dp['add'] = True dp['one_to_one_nat'] = False - if('localgw' in self.qFile.data['cmd_line']): - dp['gateway'] = self.qFile.data['cmd_line']['localgw'] + if nw_type == "public": + dp['gateway'] = self.qFile.data['cmd_line']['gateway'] else: - dp['gateway'] = 'None' + if('localgw' in self.qFile.data['cmd_line']): + dp['gateway'] = self.qFile.data['cmd_line']['localgw'] + else: + dp['gateway'] = 'None' dp['nic_dev_id'] = num dp['nw_type'] = nw_type qf = QueueFile()