in marketplace/deployer_util/expand_config.py [0:0]
def generate_v1_properties_for_image(prop, value, result):
if prop.image.split_by_colon:
before_name, after_name = prop.image.split_by_colon
parts = value.split(':', 1)
if len(parts) != 2:
raise InvalidProperty(
'Property {} has value that does not contain a colon: {}'.format(
prop.name, value))
before_value, after_value = parts
result[before_name] = before_value
result[after_name] = after_value
if prop.image.split_to_registry_repo_tag:
reg_name, repo_name, tag_name = prop.image.split_to_registry_repo_tag
parts = value.split(':', 1)
if len(parts) != 2:
raise InvalidProperty(
'Property {} has value that does not contain a tag: {}'.format(
prop.name, value))
nontag_value, tag_value = parts
parts = nontag_value.split('/', 1)
if len(parts) != 2:
raise InvalidProperty(
'Property {} has value that does not include a registry: {}'.format(
prop.name, value))
reg_value, repo_value = parts
result[reg_name] = reg_value
result[repo_name] = repo_value
result[tag_name] = tag_value