Package pulp :: Package server :: Package api :: Module consumer :: Class ConsumerApi
[hide private]
[frames] | no frames]

Class ConsumerApi

source code

  object --+    
           |    
base.BaseApi --+
               |
              ConsumerApi

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
_getcollection(self) source code
 
_unique_indexes(self) source code
 
_indexes(self) source code
 
create(self, id, description)
Create a new Consumer object and return it
source code
 
delete(self, id)
Delete a single stored Object
source code
 
certificate(self, id)
Create a X509 Consumer Identity Certificate to associate with the given Consumer
source code
 
bulkcreate(self, consumers)
Create a set of Consumer objects in a bulk manner
source code
 
consumers(self, spec=None, fields=None)
List all consumers.
source code
 
consumer(self, id, fields=None)
Return a single Consumer object
source code
 
packages(self, id) source code
 
consumers_with_package_names(self, names, fields=None)
List consumers using passed in names
source code
 
bind(self, id, repoid)
Bind (subscribe) a consumer to a repo.
source code
 
unbind(self, id, repoid)
Unbind (unsubscribe) a consumer to a repo.
source code
 
profile_update(self, id, package_profile)
Update the consumer information such as package profile
source code
 
installpackages(self, id, packagenames=())
Install packages on the consumer.
source code
 
installpackagegroups(self, id, packageids=())
Install package groups on the consumer.
source code
 
installerrata(self, id, errataids=(), types=())
Install errata on the consumer.
source code
 
listerrata(self, id, types=())
List applicable errata for a given consumer id
source code
 
list_package_updates(self, id, types=())
List applicable package updates for a given consumer id
source code
 
_applicable_errata(self, consumer, types=())
Logic to filter applicable errata for a consumer
source code

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

    Inherited from base.BaseApi
 
clean(self)
Delete all the Objects in the database.
source code
 
insert(self, object, check_keys=False)
Insert the object document to the database
source code
 
update(self, object)
Write the object document to the database
source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

_getcollection(self)

source code 
Overrides: base.BaseApi._getcollection

_unique_indexes(self)

source code 
Decorators:
  • @property
Overrides: base.BaseApi._unique_indexes

_indexes(self)

source code 
Decorators:
  • @property
Overrides: base.BaseApi._indexes

create(self, id, description)

source code 

Create a new Consumer object and return it

Decorators:
  • @audit(params= ['id'])

delete(self, id)

source code 

Delete a single stored Object

Decorators:
  • @audit()
Overrides: base.BaseApi.delete
(inherited documentation)

certificate(self, id)

source code 

Create a X509 Consumer Identity Certificate to associate with the given Consumer

Decorators:
  • @audit()

bulkcreate(self, consumers)

source code 

Create a set of Consumer objects in a bulk manner

Parameters:
  • consumers (list of dictionaries) - dictionaries representing new consumers
Decorators:
  • @audit()

consumers(self, spec=None, fields=None)

source code 

List all consumers. Can be quite large

bind(self, id, repoid)

source code 

Bind (subscribe) a consumer to a repo.

Parameters:
  • id (str) - A consumer id.
  • repoid (str) - A repo id to bind.
Decorators:
  • @audit()
Raises:

unbind(self, id, repoid)

source code 

Unbind (unsubscribe) a consumer to a repo.

Parameters:
  • id (str) - A consumer id.
  • repoid (str) - A repo id to unbind.
Decorators:
  • @audit()
Raises:

profile_update(self, id, package_profile)

source code 

Update the consumer information such as package profile

Decorators:
  • @audit(params= ['id'])

installpackages(self, id, packagenames=())

source code 

Install packages on the consumer.

Parameters:
  • id (str) - A consumer id.
  • packagenames ([str,..]) - The package names to install.
Decorators:
  • @audit()

installpackagegroups(self, id, packageids=())

source code 

Install package groups on the consumer.

Parameters:
  • id (str) - A consumer id.
  • packageids ([str,..]) - The package ids to install.
Decorators:
  • @audit()

installerrata(self, id, errataids=(), types=())

source code 

Install errata on the consumer.

Parameters:
  • id (str) - A consumer id.
  • errataids ([str,..]) - The errata ids to install.
  • types (str) - Errata type filter