Base Provider

Providers

Abstract classes to define the common data and interfaces for associating and publishing a VM Image into a cloud marketplace.

class cloudpub.common.PublishingMetadata(image_path, architecture, destination, overwrite=False, keepdraft=False)[source]

A collection of necessary information for associating a VM Image with a product.

__init__(image_path, architecture, destination, overwrite=False, keepdraft=False)[source]

Create an instanece of PublishingMetadata.

Args: image_path (str)

The image URL or ID to be associated with a product listing

architecture (str)

The VM Image architecture

destination (str)

The product listing to update with the given image_path

overwrite (bool, optional)

Whether to overwrite the product listing with the given image or not (append only). This defaults to False.

keepdraft (bool, optional):

Whether to just associate the VM Image with the destination but avoid publishing or not. When set to False it will publish the content as GA. This defaults to True.

class cloudpub.common.BaseService[source]

Base class for all cloud provider services.

abstract publish(metadata)[source]

Associate a VM image with a given product listing (destination) and publish it.

Parameters:

metadata (PublishingMetadata) – metadata for the VM image publishing.

Return type:

None

Models