Example #1
0
def gen_artifact(url=CONTAINER_IMAGE_URL):
    """Create an artifact."""
    response = requests.get(url)
    with NamedTemporaryFile() as temp_file:
        temp_file.write(response.content)
        artifact = ArtifactsApi(core_client).create(file=temp_file.name)
        return artifact.to_dict()
Example #2
0
def gen_artifact(url=PYTHON_URL):
    """Creates an artifact."""
    with NamedTemporaryFile() as temp_file:
        temp_file.write(http_get(url))
        temp_file.flush()
        artifact = ArtifactsApi(core_client).create(file=temp_file.name)
        return artifact.to_dict()
Example #3
0
def gen_artifact(url=RPM_SIGNED_URL):
    """Creates an artifact."""
    response = requests.get(url)
    with NamedTemporaryFile() as temp_file:
        temp_file.write(response.content)
        temp_file.flush()
        artifact = ArtifactsApi(core_client).create(file=temp_file.name)
        return artifact.to_dict()
Example #4
0
def gen_artifact(url):
    """Creates an artifact."""
    response = utils.http_get(url)
    with NamedTemporaryFile() as temp_file:
        temp_file.write(response)
        temp_file.flush()
        artifact = ArtifactsApi(core_client).create(file=temp_file.name)
        return artifact.to_dict()