OPSI.SharedAlgorithm module

Algorithms to get a product order for an installation.

Changed in version 4.0.6.1.

Changed in version 4.0.7.1: Refactored algorithm 1.

author:Niko Wenselowski <n.wenselowski@uib.de>
author:Jan Schneider <j.schneider@uib.de>
author:Rupert Röder <r.roeder@uib.de>
license:GNU Affero General Public License version 3
exception OPSI.SharedAlgorithm.CircularProductDependencyError(message='')

Bases: OPSI.Types.BackendUnaccomplishableError

ExceptionShortDescription = 'A circular dependency between products.'
class OPSI.SharedAlgorithm.OrderBuild(elementCount, requs, completing)

Bases: object

getOrdering()
proceed()
class OPSI.SharedAlgorithm.OrderRequirement(prior, posterior, fulfilled=False)

Bases: object

Represents a request for ordering of two elements with a notice if it is fulfilled.

class OPSI.SharedAlgorithm.Requirements

Bases: object

add(requirement)
firstPriorNotOccurringAsPosterior(startI)
getCount()
getOrderByPosteriors()
getOrderByPrior()
getRequList()
indexOfFirstNotFulfilledRequirementOrderedByPrior()
posteriorIndexOf(posti)
class OPSI.SharedAlgorithm.XClassifiedProduct(product)

Bases: object

has String member id, int members priority, revisedPriority, and a member that is intendend to be a reference to a Product

OPSI.SharedAlgorithm.addActionRequest(productOnClientByProductId, productId, productDependenciesByProductId, availableProductsByProductId, addedInfo=None)
OPSI.SharedAlgorithm.addDependentProductOnClients(productOnClients, availableProducts, productDependencies)
OPSI.SharedAlgorithm.generateProductOnClientSequence(productOnClients, sortedList)
OPSI.SharedAlgorithm.generateProductOnClientSequenceX(productOnClients, sortedList)
OPSI.SharedAlgorithm.generateProductOnClientSequence_algorithm1(productOnClients, availableProducts, productDependencies)
OPSI.SharedAlgorithm.generateProductOnClientSequence_algorithm2(productOnClients, availableProducts, productDependencies)
OPSI.SharedAlgorithm.generateProductSequenceFromRequPairs_algorithm1(availableProducts, setupRequirements)
OPSI.SharedAlgorithm.generateProductSequenceFromRequPairs_algorithm2(availableProducts, setupRequirements)
OPSI.SharedAlgorithm.generateProductSequence_algorithm1(availableProducts, productDependencies)
OPSI.SharedAlgorithm.generateProductSequence_algorithm2(availableProducts, productDependencies)
OPSI.SharedAlgorithm.getSetupRequirements(productDependencies)
OPSI.SharedAlgorithm.modifySortingClassesForAlgorithm1(products, setupRequirements)