From: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
V2 -> V3
rebase
V1 -> V2
use the "mac" to identify the iface and remove "name" parameter
$ curl -u user -H 'Accept: application/json' -H 'Content-type:
application/json' \
http://localhost:800/vms/test-vm-8/ifaces/
[
{
"mac":"52:54:00:00:00:08",
"model":"virtio",
"type":"network",
"network":"default",
"name":"52:54:00:00:00:08"
}
]
$ curl -u user -H 'Accept: application/json' -H 'Content-type:
application/json' \
http://localhost:800/vms/test-vm-8/ifaces/52:54:00:00:00:08
{
"mac":"52:54:00:00:00:08",
"model":"virtio",
"type":"network",
"network":"default",
"name":"52:54:00:00:00:08"
}
ShaoHe Feng (6):
Add a control.vm module
VM supports interfaces: update API
VM supports interfaces: update model
VM supports interfaces: update controller
VM supports interfaces: update mockmodel
VM supports interfaces: update testcase
Makefile.am | 1 +
configure.ac | 1 +
contrib/kimchi.spec.fedora.in | 1 +
contrib/kimchi.spec.suse.in | 1 +
docs/API.md | 46 +++++++++++++++++++++++++++++++++++++
src/kimchi/control/Makefile.am | 2 ++
src/kimchi/control/vm/Makefile.am | 32 ++++++++++++++++++++++++++
src/kimchi/control/vm/__init__.py | 30 ++++++++++++++++++++++++
src/kimchi/control/vm/ifaces.py | 48 +++++++++++++++++++++++++++++++++++++++
src/kimchi/control/vms.py | 3 +++
src/kimchi/mockmodel.py | 33 +++++++++++++++++++++++++++
src/kimchi/model.py | 35 ++++++++++++++++++++++++++++
tests/test_model.py | 19 ++++++++++++++++
tests/test_rest.py | 31 +++++++++++++++++++++++++
14 files changed, 283 insertions(+)
create mode 100644 src/kimchi/control/vm/Makefile.am
create mode 100644 src/kimchi/control/vm/__init__.py
create mode 100644 src/kimchi/control/vm/ifaces.py
--
1.8.4.2