Moving polling logs to debug
Change-Id: Ie3f7a76e4fddbe5bb41432b2ecd8ef35ca461058
diff --git a/xos/synchronizer/pull_steps/pull_olts.py b/xos/synchronizer/pull_steps/pull_olts.py
index acb6a10..9c02466 100644
--- a/xos/synchronizer/pull_steps/pull_olts.py
+++ b/xos/synchronizer/pull_steps/pull_olts.py
@@ -54,7 +54,7 @@
raise Exception("Can't find a logical device for device id: %s" % o.device_id)
def pull_records(self):
- log.info("[OLT pull step] pulling OLT devices from VOLTHA")
+ log.debug("[OLT pull step] pulling OLT devices from VOLTHA")
try:
self.volt_service = VOLTService.objects.all()[0]
@@ -69,7 +69,7 @@
r = requests.get("%s:%s/api/v1/devices" % (voltha_url, voltha_port))
if r.status_code != 200:
- log.info("[OLT pull step] It was not possible to fetch devices from VOLTHA")
+ log.debug("[OLT pull step] It was not possible to fetch devices from VOLTHA")
# keeping only OLTs
devices = [d for d in r.json()["items"] if "olt" in d["type"]]
@@ -104,7 +104,7 @@
log.debug("[OLT pull step] OLTDevice already exists, updating it", device_type=olt["type"], host=host, port=port)
if model.enacted < model.updated:
- log.info("[OLT pull step] Skipping pull on OLTDevice %s as enacted < updated" % model.name, name=model.name, id=model.id, enacted=model.enacted, updated=model.updated)
+ log.debug("[OLT pull step] Skipping pull on OLTDevice %s as enacted < updated" % model.name, name=model.name, id=model.id, enacted=model.enacted, updated=model.updated)
# if we are not updating the device we still need to pull ports
self.fetch_olt_ports(model)
updated_olts.append(model)
@@ -152,7 +152,7 @@
r = requests.get("%s:%s/api/v1/devices/%s/ports" % (voltha_url, voltha_port, olt.device_id))
if r.status_code != 200:
- log.info("[OLT pull step] It was not possible to fetch ports from VOLTHA for device %s" % olt.device_id)
+ log.debug("[OLT pull step] It was not possible to fetch ports from VOLTHA for device %s" % olt.device_id)
ports = r.json()['items']
@@ -230,9 +230,9 @@
if model.enacted < model.updated:
# DO NOT delete a model that is being processed
- log.info("[OLT pull step] device is not present in VOLTHA, skipping deletion as sync is in progress", device_id=o.device_id,
+ log.debug("[OLT pull step] device is not present in VOLTHA, skipping deletion as sync is in progress", device_id=o.device_id,
name=o.name)
continue
- log.info("[OLT pull step] deleting device as it's not present in VOLTHA", device_id=o.device_id, name=o.name)
+ log.debug("[OLT pull step] deleting device as it's not present in VOLTHA", device_id=o.device_id, name=o.name)
model.delete()
diff --git a/xos/synchronizer/pull_steps/pull_onus.py b/xos/synchronizer/pull_steps/pull_onus.py
index 8c9efe9..8ad59cb 100644
--- a/xos/synchronizer/pull_steps/pull_onus.py
+++ b/xos/synchronizer/pull_steps/pull_onus.py
@@ -34,7 +34,7 @@
super(ONUDevicePullStep, self).__init__(observed_model=ONUDevice)
def pull_records(self):
- log.info("pulling ONU devices from VOLTHA")
+ log.debug("pulling ONU devices from VOLTHA")
try:
self.volt_service = VOLTService.objects.all()[0]
@@ -49,7 +49,7 @@
r = requests.get("%s:%s/api/v1/devices" % (voltha_url, voltha_port))
if r.status_code != 200:
- log.info("It was not possible to fetch devices from VOLTHA")
+ log.debug("It was not possible to fetch devices from VOLTHA")
# keeping only ONUs
devices = [d for d in r.json()["items"] if "onu" in d["type"]]
@@ -60,7 +60,7 @@
# [ ] delete ONUS as ONUDevice.objects.all() - updated ONUs
if r.status_code != 200:
- log.info("It was not possible to fetch devices from VOLTHA")
+ log.debug("It was not possible to fetch devices from VOLTHA")
onus_in_voltha = self.create_or_update_onus(devices)
@@ -82,7 +82,7 @@
log.debug("ONUDevice already exists, updating it", serial_number=onu["serial_number"])
if model.enacted < model.updated:
- log.info("Skipping pull on ONUDevice %s as enacted < updated" % model.serial_number, serial_number=model.serial_number, id=model.id, enacted=model.enacted, updated=model.updated)
+ log.debug("Skipping pull on ONUDevice %s as enacted < updated" % model.serial_number, serial_number=model.serial_number, id=model.id, enacted=model.enacted, updated=model.updated)
# if we are not updating the device we still need to pull ports
self.fetch_onu_ports(model)
return
@@ -125,7 +125,7 @@
r = requests.get("%s:%s/api/v1/devices/%s/ports" % (voltha_url, voltha_port, onu.device_id))
if r.status_code != 200:
- log.info("It was not possible to fetch ports from VOLTHA for ONUDevice %s" % onu.device_id)
+ log.debug("It was not possible to fetch ports from VOLTHA for ONUDevice %s" % onu.device_id)
ports = r.json()['items']
@@ -159,13 +159,13 @@
r = requests.get("%s:%s/api/v1/logical_devices/%s/ports" % (voltha_url, voltha_port, logical_device_id))
if r.status_code != 200:
- log.info("It was not possible to fetch ports from VOLTHA for logical_device %s" % logical_device_id)
+ log.debug("It was not possible to fetch ports from VOLTHA for logical_device %s" % logical_device_id)
logical_ports = r.json()['items']
log.debug("logical device ports for ONUDevice %s" % onu.device_id, logical_ports=logical_ports)
ports = [p['ofp_port']['port_no'] for p in logical_ports if p['device_id'] == onu.device_id]
- # log.info("Port_id for port %s on ONUDevice %s: %s" % (port['label'], onu.device_id, ports), logical_ports=logical_ports)
+ # log.debug("Port_id for port %s on ONUDevice %s: %s" % (port['label'], onu.device_id, ports), logical_ports=logical_ports)
return int(ports[0])
except ConnectionError, e: