[Kimchi-devel] [PATCH 0/5 V3] Host's software update support

Paulo Vital pvital at linux.vnet.ibm.com
Tue Feb 11 17:28:49 UTC 2014


This patch set provides support to host's software update operations.

To test the backend (ONLY mockmodel) execute the following commands:
$ cd tests
$ sudo ./run_tests.sh test_mockmodel.MockModelTests.test_packages_update

To test the REST API, execute the following commands (all them are agnostic
of the host's distro):

1) Get list of all packages to be updated in the host:
$ curl -H 'Content-type: application/json' -H 'Accept: application/json' http://localhost:8000/host/packagesupdate/ -X GET

2) Update the host system:
$ curl -H 'Content-type: application/json' -H 'Accept: application/json' http://localhost:8000/host/packagesupdate/update -X POST -d ''


V2 -> V3:
 * Fixed indent and wrong bullets on docs/API.md
 * Changed to use Collection and Resource
 * Removed unnecessary 'exposed'
 * PEP8 compatibility on mockmodel.py
 * Removed debug prints from swupdate.py
 * Fixed indent in swupdate.py
 * Usage of utils.run_command() to execute Zypper update
 * Updated swupdate.py and mockmodel.py to make consistent with docs/API.md
 * Usage of Task element in mockmodel.py
 * Created test case in test_mockmodel.py


V1 -> V2:
 * rebased to use new model framework
 * added SLES as Zypper supported distro
 * PEP8 compatibility
 * changed import sentences
 * use of run_command() from utils.py to execute shell commands
 * usage of Task element to return update status

V1:

At this point, an agnostic class is providing support to backend and 
REST API operations. In addition, YUM (for RHEL and Fedora), APT (for
Debian and Ubuntu) and ZYPPER (for OpenSuse) specific classes are provided
to support the operation os each software update system.

There's no test case to check backend once the software update information 
is volatile to each system/box.

Paulo Vital (5):
  Host's software update: Update API.md
  Host's software update: Update REST API
  Host's software update: Update backend.
  Host's software update: Update Makefile
  Host's software update: Update test cases.

 Makefile.am                |   1 +
 docs/API.md                |  30 +++++
 src/kimchi/Makefile.am     |   1 +
 src/kimchi/control/host.py |  17 +++
 src/kimchi/mockmodel.py    |  45 ++++++++
 src/kimchi/model/host.py   |  28 ++++-
 src/kimchi/swupdate.py     | 269 +++++++++++++++++++++++++++++++++++++++++++++
 tests/test_mockmodel.py    |  11 ++
 8 files changed, 401 insertions(+), 1 deletion(-)
 create mode 100644 src/kimchi/swupdate.py

-- 
1.8.3.1




More information about the Kimchi-devel mailing list