def parse_repository_tag(repo_path):
 tag_separator = u':'
 digest_separator = u'@'
 if (digest_separator in repo_path):
  (repo, tag) = repo_path.rsplit(digest_separator, 1)
  return (repo, tag, digest_separator)
 (repo, tag) = (repo_path, u'')
 if (tag_separator in repo_path):
  (repo, tag) = repo_path.rsplit(tag_separator, 1)
  if (u'/' in tag):
   (repo, tag) = (repo_path, u'')
 return (repo, tag, tag_separator)

def parse_repository_tag ( repo_path ) : tag_separator = u':' digest_separator = u'@' if ( digest_separator in repo_path ) : ( repo , tag ) = repo_path . rsplit ( digest_separator , 1 ) return ( repo , tag , digest_separator ) ( repo , tag ) = ( repo_path , u'' ) if ( tag_separator in repo_path ) : ( repo , tag ) = repo_path . rsplit ( tag_separator , 1 ) if ( u'/' in tag ) : ( repo , tag ) = ( repo_path , u'' ) return ( repo , tag , tag_separator )
splits image identification into base image path .