mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
Add purpose to tuf.interposition.README
This commit is contained in:
parent
a514546187
commit
ccaa3ad648
1 changed files with 34 additions and 1 deletions
|
|
@ -1,4 +1,37 @@
|
|||
## Examples
|
||||
## Interposition
|
||||
|
||||
Interposition is the high-level integration of TUF. 'updater.py' is used to
|
||||
perform high-level integration of TUF to the software updater. This means
|
||||
that all the processes which are taking place in the low-level integration
|
||||
will be done automatically. This layer of processes will be transparent to
|
||||
the client.
|
||||
|
||||
Updater.py have two classes named as Updater and UpdaterController.
|
||||
|
||||
tuf.interposition.updater.Updater contains those methods which are to be
|
||||
performed on each individual updater. For example - refresh(), cleanup(),
|
||||
download_target(target_filepath), get_target_filepath(source_url), open(url),
|
||||
retrieve(url), switch_context(), all these for a particular updater.
|
||||
|
||||
tuf.interposition.updater.UpdaterController contains those methods which
|
||||
are performed on updaters as a group. It basically keeps track of all the
|
||||
updaters. For example - add(configuration), get(configuration),
|
||||
refresh(configuration), remove(configuration), all these are performed on the
|
||||
list of updaters. tuf.interposition.updater.UpdaterController maintains a
|
||||
map of updaters and a set of its mirrors. The map of updaters contains the
|
||||
objects of tuf.interposition.updater.Updater for each updater. The set
|
||||
contains all the mirrors. The addition and removal of these updaters and their
|
||||
mirrors depends on the methods of tuf.interposition.updater.UpdaterController
|
||||
|
||||
### Integration with interposition example
|
||||
|
||||
To implement interpostion, client only need to have the following-
|
||||
First, a client module which is modified to include interposition library and
|
||||
code and second, a JSON configuration file is created, each of which is
|
||||
explained below -
|
||||
|
||||
1. "interposition.py" is an example client updater module that is integrating
|
||||
TUF with interposition.
|
||||
|
||||
```python
|
||||
import tuf.interposition
|
||||
|
|
|
|||
Loading…
Reference in a new issue