original_docstring: 
      This function verifies data of each key in the bucket
  
      Parameters:
          key(char): key to be verified
          bucket(char): bucket name
      
docstring: This function verifies data of each key in the bucket
docstring_tokens: This function verifies data of each key in the bucket
code: def verify_key(each_key, bucket):
      """
      This function verifies data of each key in the bucket
  
      Parameters:
          key(char): key to be verified
          bucket(char): bucket name
      """
      log.info("verifying data for key: %s" % os.path.basename(each_key["name"]))
      key_from_s3 = bucket.Object(os.path.basename(each_key["name"]))
      log.info("verifying size")
      log.info("size from yaml: %s" % each_key["size"])
      log.info("size from s3: %s" % key_from_s3.content_length)
      if int(each_key["size"]) != int(key_from_s3.content_length):
          raise TestExecError("Size not matched")
      log.info("verifying md5")
      log.info("md5_local: %s" % each_key["md5_local"])
      key_from_s3.download_file("download.temp")
      downloaded_md5 = utils.get_md5("download.temp")
      log.info("md5_from_s3: %s" % downloaded_md5)
      if each_key["md5_local"] != downloaded_md5:
          raise TestExecError("Md5 not matched")
      utils.exec_shell_cmd("sudo rm -rf download.temp")
      log.info("verification complete for the key: %s" % key_from_s3.key)
code_tokens: def verify_key ( each_key , bucket ) : log . info ( "verifying data for key: %s" % os . path . basename ( each_key [ "name" ] ) ) key_from_s3 = bucket . Object ( os . path . basename ( each_key [ "name" ] ) ) log . info ( "verifying size" ) log . info ( "size from yaml: %s" % each_key [ "size" ] ) log . info ( "size from s3: %s" % key_from_s3 . content_length ) if int ( each_key [ "size" ] ) != int ( key_from_s3 . content_length ) : raise TestExecError ( "Size not matched" ) log . info ( "verifying md5" ) log . info ( "md5_local: %s" % each_key [ "md5_local" ] ) key_from_s3 . download_file ( "download.temp" ) downloaded_md5 = utils . get_md5 ( "download.temp" ) log . info ( "md5_from_s3: %s" % downloaded_md5 ) if each_key [ "md5_local" ] != downloaded_md5 : raise TestExecError ( "Md5 not matched" ) utils . exec_shell_cmd ( "sudo rm -rf download.temp" ) log . info ( "verification complete for the key: %s" % key_from_s3 . key )
short_docstring: This function verifies data of each key in the bucket
short_docstring_tokens: This function verifies data of each key in the bucket
comment: """
      This function verifies data of each key in the bucket
  
      Parameters:
          key(char): key to be verified
          bucket(char): bucket name
      """