@@ -499,18 +499,31 @@ def get_machine_sync_details(self) -> List[Any]:
499499 # output to stdout for interactive usage
500500 return response_list
501501
502- def get_backlogged_synced_machines (self ) -> List [Any ]:
502+ def get_machines_not_synced (self ) -> List [Any ]:
503503 backlogged_machines : List [Any ] = []
504504 sync_report : List [Any ] = self .get_machine_sync_details ()
505505 print (f"INFO: Filtering for backlogged servers in Project: ({ self .project_name } )" )
506506 for item in sync_report :
507- if item ['backlogged_storage_bytes' ] > 0 :
507+ if item ['backlogged_storage_bytes' ] > 0 or item [ 'rescanned_storage_bytes' ] > 0 :
508508 backlogged_machines .append (item )
509509 if len (backlogged_machines ) > 0 :
510510 print (f"INFO: The following machines are backlogged in Project: ({ self .project_name } )" )
511511 return backlogged_machines
512512 else :
513513 print (f"INFO: All machines are in Continuous Data Replication in Project: ({ self .project_name } )" )
514+
515+ def get_machines_not_started (self ) -> List [Any ]:
516+ not_started_machines : List [Any ] = []
517+ sync_report : List [Any ] = self .get_machine_sync_details ()
518+ print (f"INFO: Getting replication not STARTED for machines in Project: ({ self .project_name } )" )
519+ for item in sync_report :
520+ if item ['replication_status' ] != "STARTED" :
521+ not_started_machines .append (item )
522+ if len (not_started_machines ) > 0 :
523+ print (f"INFO: Machines not STARTED found in Project: ({ self .project_name } )" )
524+ return not_started_machines
525+ else :
526+ print (f"INFO: All machines are STARTED in Project: ({ self .project_name } )" )
514527
515528
516529
0 commit comments