}
for profile_type in profiles_to_detach:
if db_cluster.get(profile_type):
- self.logger.info("the profile_type is :{}".format(profile_type))
+ self.logger.debug("the profile_type is :{}".format(profile_type))
profile_ids = db_cluster[profile_type]
- self.logger.info("the profile_ids is :{}".format(profile_ids))
+ self.logger.debug("the profile_ids is :{}".format(profile_ids))
profile_ids_copy = deepcopy(profile_ids)
- self.logger.info("the profile_ids_copy is :{}".format(profile_ids_copy))
+ self.logger.debug(
+ "the profile_ids_copy is :{}".format(profile_ids_copy)
+ )
for profile_id in profile_ids_copy:
- self.logger.info("the profile_id is :{}".format(profile_id))
+ self.logger.debug("the profile_id is :{}".format(profile_id))
db_collection = profiles_collection[profile_type]
- self.logger.info("the db_collection is :{}".format(db_collection))
+ self.logger.debug("the db_collection is :{}".format(db_collection))
db_profile = self.db.get_one(db_collection, {"_id": profile_id})
- self.logger.info("the db_profile is :{}".format(db_profile))
- self.logger.info(
+ self.logger.debug("the db_profile is :{}".format(db_profile))
+ self.logger.debug(
"the item_content name is :{}".format(db_cluster["name"])
)
- self.logger.info(
+ self.logger.debug(
"the db_profile name is :{}".format(db_profile["name"])
)
if db_cluster["name"] == db_profile["name"]:
- self.logger.info("it is getting into if default")
+ self.logger.debug("it is getting into if default")
self.db.del_one(db_collection, {"_id": profile_id})
else:
- self.logger.info("it is getting into else non default")
+ self.logger.debug("it is getting into else non default")
profile_ids.remove(profile_id)
update_dict = {profile_type: profile_ids}
- self.logger.info(f"the update dict is :{update_dict}")
+ self.logger.debug(f"the update dict is :{update_dict}")
self.db.set_one(
"clusters", {"_id": db_cluster["_id"]}, update_dict
)
self.db.del_one("clusters", {"_id": db_cluster["_id"]})
- self.logger.info("the id is :{}".format(db_cluster["_id"]))
+ self.logger.debug("the id is :{}".format(db_cluster["_id"]))
async def attach_profile(self, op_id, op_params, content):
self.logger.info("profile attach Enter")