original_docstring: Given a zone, validate current versus desired rrsets.
  
          If there are any missing records, a corrective message for each
          record will be published.
  
          Args:
              zone (str): zone to query Google Cloud DNS API.
              rrsets (list): desired record sets to which to compare the
                  Cloud DNS API's response.
          
docstring: Given a zone, validate current versus desired rrsets.
  If there are any missing records, a corrective message for each
  record will be published.
docstring_tokens: Given a zone validate current versus desired rrsets . If there are any missing records a corrective message for each record will be published .
code: async def validate_rrsets_by_zone(self, zone, rrsets):
          """Given a zone, validate current versus desired rrsets.
  
          If there are any missing records, a corrective message for each
          record will be published.
  
          Args:
              zone (str): zone to query Google Cloud DNS API.
              rrsets (list): desired record sets to which to compare the
                  Cloud DNS API's response.
          """
          desired_rrsets = [
              gdns.GCPResourceRecordSet(**record) for record in rrsets
          ]
  
          actual_rrsets = await self.dns_client.get_records_for_zone(zone)
  
          # NOTE: only working on "additions" (which includes changes to
          #       current records) right now.
          # TODO: (FEATURE) add support for cleaning up records that
          #       should have been deleted.
          missing_rrsets = [
              rs for rs in desired_rrsets if rs not in actual_rrsets
          ]
          msg = (f'[{zone}] Processed {len(actual_rrsets)} rrset messages '
                 f'and found {len(missing_rrsets)} missing rrsets.')
          logging.info(msg)
          # TODO (lynn): emit or incr metric of missing_rrsets by zone once
          #              aioshumway is released
          # TODO: (FEATURE): have separate metrics for additions and deletions
          await self.publish_change_messages(missing_rrsets, action='additions')
code_tokens: async def validate_rrsets_by_zone ( self , zone , rrsets ) : desired_rrsets = [ gdns . GCPResourceRecordSet ( ** record ) for record in rrsets ] actual_rrsets = await self . dns_client . get_records_for_zone ( zone ) missing_rrsets = [ rs for rs in desired_rrsets if rs not in actual_rrsets ] msg = ( f'[{zone}] Processed {len(actual_rrsets)} rrset messages ' f'and found {len(missing_rrsets)} missing rrsets.' ) logging . info ( msg ) await self . publish_change_messages ( missing_rrsets , action = 'additions' )
short_docstring: Given a zone, validate current versus desired rrsets.
short_docstring_tokens: Given a zone validate current versus desired rrsets .
comment: """Given a zone, validate current versus desired rrsets.
  
          If there are any missing records, a corrective message for each
          record will be published.
  
          Args:
              zone (str): zone to query Google Cloud DNS API.
              rrsets (list): desired record sets to which to compare the
                  Cloud DNS API's response.
          """$SEP$# NOTE: only working on "additions" (which includes changes to$SEP$#       current records) right now.$SEP$# TODO: (FEATURE) add support for cleaning up records that$SEP$#       should have been deleted.$SEP$# TODO (lynn): emit or incr metric of missing_rrsets by zone once$SEP$#              aioshumway is released$SEP$# TODO: (FEATURE): have separate metrics for additions and deletions