Classes which implement IException are used to report errors.
Extends: slapos.slap.interface.slap.IException
Classes which implement INotFoundError are used to report missing informations on the slap server.
Extends: slapos.slap.interface.slap.IException
Classes which implement IUnauthorized are used to report missing permissions on the slap server.
Classes which implement IRequester can request software instance to the slapgrid server.
Request software release instantiation to slapgrid server.
Returns a new computer partition document, where this sofware release will be installed.
software_type – type of component provided by software_release
shared – boolean to use a shared service
computer partition.
computer_guid - computer of the requested partition partition_type - virtio, slave, full, limited port - port provided by the requested partition
Classes which implement IBuildoutController can report the buildout run status to the slapgrid server.
Notify (to the slapgrid server) that the software instance is available.
Notify (to the slapgrid server) that the buildout is not available and under creation.
Notify (to the slapgrid server) that the buildout is not available and reports an error.
Extends: slapos.slap.interface.slap.IBuildoutController
Software release interface specification
Returns a string representing the expected state of the software installation.
The result can be: available, destroyed
Returns a string representing the uri of the software release.
Returns a string representing the identifier of the computer where the SR is installed.
Notify (to the slapgrid server) that the software installation has been correctly destroyed.
Extends: slapos.slap.interface.slap.IBuildoutController, slapos.slap.interface.slap.IRequester
Computer Partition interface specification
Classes which implement IComputerPartition can propagate the computer partition state to the SLAPGRID server and request new computer partition creation.
Change the partition reference of a partition
slave_reference – current reference of the slave instance to modify
Returns a string representing the expected state of the computer partition.
The result can be: started, stopped, destroyed
Returns a dictionnary containing the latest status of the computer partition. The dictionnary keys are:
user – user who reported the latest status created_at – date of the status text – message log of the status
Returns a dictionary of instance parameters.
The contained values can be used to fill the software instanciation profile.
Return the connection parameter associate to the key.
Raise an INotFoundError if no key is defined.
key – a string name of the parameter
Notify (to the slapgrid server) that the software instance is available and started.
Returns a string representing the unique identifier of the instance inside the slapgrid server.
Returns a dictionary of connection parameters.
The contained values are connection parameters of a compute partition.
Returns the software release associate to the computer partition.
Raise an INotFoundError if no software release is associated.
Returns a string representing the identifier of the computer partition inside the slapgrid server.
Returns a dictionnary containing the authentification certificates associated to the computer partition. The dictionnary keys are:
key – value is a SSL key certificate – value is a SSL certificate
Raise an INotFoundError if no software release is associated.
Notify (to the slapgrid server) that the software instance has been correctly destroyed.
Report a problem detected on a computer partition. This will trigger the reinstanciation of all partitions in the instance tree.
log – a text explaining why the method was called
Notify (to the slapgrid server) that the software instance is available and stopped.
Associate a usage log to the computer partition. This method does not report the usage to the slapgrid server. See IComputer.report.
Returns the instance parameter associated to the key.
Raise an INotFoundError if no key is defined.
key – a string name of the parameter
Store the connection parameters associated to a partition.
slave_reference – current reference of the slave instance to modify
Returns the Software Type of the instance.
Computer interface specification
Classes which implement IComputer can fetch informations from the slapgrid server to know which Software Releases and Software Instances have to be installed.
Report the current computer configuration.
configuration_xml – computer XML description generated by slapformat
Returns a dictionnary containing the latest status of the computer. The dictionnary keys are:
user – user who reported the latest status created_at – date of the status text – message log of the status
Report the computer usage to the slapgrid server. IComputerPartition.setUsage has to be called on each computer partition to define each usage.
Report a problem detected on a computer. This will trigger IComputerPartition.bang on all instances hosted by the Computer.
log – a text explaining why the method was called
Returns the list of software release which has to be supplied by the computer.
Raise an INotFoundError if computer_guid doesn’t exist.
Returns a dictionnary containing the new certificate files for the computer. The dictionnary keys are:
key – key file certificate – certificate file
Raise ValueError is another certificate is already valid.
Revoke current computer certificate.
Raise ValueError is there is not valid certificate.
Returns the list of configured computer partitions associated to this computer.
Raise an INotFoundError if computer_guid doesn’t exist.
Extends: slapos.slap.interface.slap.IRequester
Open Order interface specification
Classes which implement Open Order describe which kind of software instances is requested by a given client.
Request a computer to slapgrid server.
Returns a new computer document.
computer_reference – local reference of the computer
Supply interface specification
Classes which implement Supply describe which kind of software releases a given client is ready to supply.
Tell that given client is ready to supply given sofware release
Initialise slap connection to the slapgrid server
Slapgrid server URL is defined during the slap library installation, as recipes should not use another server.
Instanciate a supply in the slap library.
Instanciate an open order in the slap library.
Instanciate a computer in the slap library.
computer_guid – the identifier of the computer inside the slapgrid server.
Initialize the connection parameters to the slapgrid servers.
slapgrid_uri – uri the slapgrid server connector
authentification_key – string the authentificate the agent.
Example: https://slapos.server/slap_interface
Instanciate a computer partition in the slap library.
computer_guid – the identifier of the computer inside the slapgrid server.
Raise an INotFoundError if computer_guid doesn’t exist.
Get the list of Software Releases from a product or from another related Sofware Release, from a Software Product point of view.
Instanciate a software release in the slap library.
software_release – uri of the software release definition