Package comodit_client :: Package api :: Module store :: Class DistStoreCollection

Class DistStoreCollection


Instance Methods
 
__init__(self, client)
Creates an instance of collection.
PublishedDistribution
new(self, dist_uuid, authorized_orgs=None)
Instantiates a new published distribution representation.
PublishedDistribution
create(self, dist_uuid, authorized_orgs=None)
Creates a remote published distribution and returns its representation.
PublishedDistribution
get(self, identifier='', parameters={}, org_name=None)
Fetches a published distribution.

Inherited from collection.Collection: __iter__, clear, delete, list, refresh

Inherited from object: __long__, __native__, __nonzero__, __unicode__, next

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, client)
(Constructor)

 

Creates an instance of collection. Note that Collection class should never be instantiated directly.

Parameters:
  • client - ComodIT client.
  • url - URL of remote collection on ComodIT server. This URL must be relative to ComodIT server's API URL and should not start with a slash.
Overrides: object.__init__
(inherited documentation)

new(self, dist_uuid, authorized_orgs=None)

 

Instantiates a new published distribution representation.

Parameters:
  • dist_uuid (string) - The UUID of the distribution to publish.
  • authorized_orgs (list of string) - The list of organizations that have access to this distribution. If left None or empty, distribution is public.
Returns: PublishedDistribution
New published distribution.

create(self, dist_uuid, authorized_orgs=None)

 

Creates a remote published distribution and returns its representation.

Parameters:
  • dist_uuid (string) - The UUID of the distribution to publish.
  • authorized_orgs (list of string) - The list of organizations that have access to this distribution. If left None or empty, distribution is public.
Returns: PublishedDistribution
New published distribution.

get(self, identifier='', parameters={}, org_name=None)

 

Fetches a published distribution. Giving an organization name can give access to published distributions with restricted access.

Parameters:
  • identifier - The identifier of the entity to retrieve.
  • parameters - Query parameters to send to ComodIT server.
Returns: PublishedDistribution
Fetched published distribution.
Raises:
Overrides: collection.Collection.get