Fixing profile polling
Change-Id: Ibe4ae05a696151978badff812556d3f23b476e1b
diff --git a/xos/synchronizer/steps/sync_progranserviceinstance.py b/xos/synchronizer/steps/sync_progranserviceinstance.py
index 84f60c5..d4e3d70 100644
--- a/xos/synchronizer/steps/sync_progranserviceinstance.py
+++ b/xos/synchronizer/steps/sync_progranserviceinstance.py
@@ -83,6 +83,7 @@
log.info("EnodeB synchronized", response=r.json())
o.previously_sync = True
+ o.no_sync = True
o.save()
def get_handover_for_profile(self, o):
diff --git a/xos/synchronizer/steps/sync_progranserviceinstance_back.py b/xos/synchronizer/steps/sync_progranserviceinstance_back.py
index 5b8552b..3c94b34 100644
--- a/xos/synchronizer/steps/sync_progranserviceinstance_back.py
+++ b/xos/synchronizer/steps/sync_progranserviceinstance_back.py
@@ -58,10 +58,11 @@
r = requests.get(profile_url, auth=HTTPBasicAuth(onos['username'], onos['password']))
res = r.json()['ProfileArray']
- log.debug("Received Profiles: ", profiles=res)
# remove default profiles
res = [p for p in res if "Default" not in p['Name']]
+ pnames = [p['Name'] for p in res]
+ log.debug("Received Profiles: ", profiles=pnames)
field_mapping = {
'Name': 'name',
@@ -129,7 +130,7 @@
# if the model has not been synchronized yet, skip it
if not si.is_new and si.no_sync is False:
- log.info("Skipping profile %s as not synchronized" % p['Name'])
+ log.debug("Skipping profile %s as not synchronized" % p['Name'])
# NOTE add it to the removed profiles to avoid deletion (this is ugly, I know)
updated_profiles.append(si.name)
continue