From 2b0c4c85a90e3ae929e0d2c47ca95331c99172a6 Mon Sep 17 00:00:00 2001 From: Ian Southam Date: Wed, 28 Jan 2015 16:41:12 +0100 Subject: [PATCH] Fixed up get_dns for normal isolated vrs --- .../patches/debian/config/opt/cloud/bin/cs/CsConfig.py | 9 ++++++++- .../patches/debian/config/opt/cloud/bin/cs/CsDatabag.py | 8 -------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsConfig.py b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsConfig.py index 2e8db0177e3..a08f1cc7690 100644 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsConfig.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsConfig.py @@ -67,7 +67,14 @@ class CsConfig(object): return self.cl.get_domain() def get_dns(self): - return self.cmdline().get_dns() + dns = [] + # Check what happens with use_ext_dns + dns.append(self.address().get_guest_ip()) + names = ["dns1", "dns2"] + for name in names: + if name in self.cmdline().idata(): + dns.append(self.cmdline().idata()[name]) + return dns def get_format(self): return self.__LOG_FORMAT diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDatabag.py b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDatabag.py index 936f993f431..e6ad6e5779f 100644 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDatabag.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDatabag.py @@ -93,14 +93,6 @@ class CsCmdLine(CsDataBag): else: return "unloved-router" - def get_dns(self): - dns = [] - names = "dns1 dns2" - for name in names: - if name in self.idata(): - dns.append(self.idata()[name]) - return dns - def get_type(self): if "type" in self.idata(): return self.idata()['type']