Revision e7a73512

b/utils/proxy.py
22 22
handler.setFormatter(formatter)
23 23
logger.addHandler(handler)
24 24

  
25
def fod_unknown_host_cb(host, fingerprint):
26
    return True
27

  
25 28
class Retriever(object):
26 29
    def __init__(self, device=settings.NETCONF_DEVICE, username=settings.NETCONF_USER, password=settings.NETCONF_PASS, filter=settings.ROUTES_FILTER, route_name=None, xml=None):
27 30
        self.device = device
......
33 36
            self.filter = settings.ROUTE_FILTER%route_name
34 37
    
35 38
    def fetch_xml(self):
36
        with manager.connect(host=self.device, port=830, username=self.username, password=self.password) as m:
39
        with manager.connect(host=self.device, port=830, username=self.username, password=self.password, unknown_host_cb=fod_unknown_host_cb) as m:
37 40
            xmlconfig = m.get_config(source='running', filter=('subtree',self.filter)).data_xml
38 41
        return xmlconfig
39 42
    
......
161 164
        commit_confirmed_is_successful = False
162 165
        commit_is_successful = False
163 166
        if configuration:
164
            with manager.connect(host=self.device, port=830, username=self.username, password=self.password) as m:
167
            with manager.connect(host=self.device, port=830, username=self.username, password=self.password, unknown_host_cb=fod_unknown_host_cb) as m:
165 168
                assert(":candidate" in m.server_capabilities)
166 169
                with m.locked(target='candidate'):
167 170
                    m.discard_changes()

Also available in: Unified diff