[PATCH V5 0/3] network improvment: add vms field

From: ShaoHe Feng <shaohef@linux.vnet.ibm.com> V4 -> V5 fix typo in subject. V3 -> V4 the subject of patch V3 3/3 is wrong. fix it. V2 -> V3 update mockmodel and test case V1 -> V2 set the flags argument of listAllDomains as 0 explicitly. For in some distros: $ pydoc libvirt.virConnect.listAllDomains libvirt.virConnect.listAllDomains = listAllDomains(self, flags) \ unbound libvirt.virConnect method And in other distros: $ pydoc libvirt.virConnect.listAllDomains libvirt.virConnect.listAllDomains = listAllDomains(self, flags=0) \ unbound libvirt.virConnect method ShaoHe Feng (3): network improvement: add vms field network improvement: update mockmodel to support vms field network improvement: update test case to support vms field docs/API.md | 1 + src/kimchi/control/networks.py | 1 + src/kimchi/mockmodel.py | 9 +++++++++ src/kimchi/model.py | 15 +++++++++++++++ tests/test_model.py | 1 + tests/test_rest.py | 3 +++ 6 files changed, 30 insertions(+) -- 1.8.4.2

From: ShaoHe Feng <shaohef@linux.vnet.ibm.com> Add vms field for network GET method update API.md add a function to get all vms attach to a network update model add vms field for Network Resource property update controller Now get the info of default network: $ curl -u <user>:<password> -H 'Content-type: application/json' -H 'Accept: application/json' -X GET http://localhost:8000/networks/default { "subnet":"192.168.122.0/24", "connection":"nat", "name":"default", "autostart":true, "state":"active", "interface":"virbr0", "dhcp":{ "start":"192.168.122.2", "end":"192.168.122.254" }, "vms":[ "rhel6", "opensuse12" ] } we can see, there are two vms attched to this network Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com> --- docs/API.md | 1 + src/kimchi/control/networks.py | 1 + src/kimchi/model.py | 15 +++++++++++++++ 3 files changed, 17 insertions(+) diff --git a/docs/API.md b/docs/API.md index 0013e86..32045ac 100644 --- a/docs/API.md +++ b/docs/API.md @@ -364,6 +364,7 @@ A interface represents available interface on host. * active: The Network is ready for use * inactive: The Network is not available * autostart: Network autostart onboot + * vms: all vms attached to this network * subnet: Network segment in slash-separated format with ip address and prefix * dhcp: DHCP services on the virtual network is enabled. * start: start boundary of a pool of addresses to be provided to DHCP clients. diff --git a/src/kimchi/control/networks.py b/src/kimchi/control/networks.py index ad95d69..f3f0b41 100644 --- a/src/kimchi/control/networks.py +++ b/src/kimchi/control/networks.py @@ -40,6 +40,7 @@ class Network(Resource): @property def data(self): return {'name': self.ident, + 'vms': self.info['vms'], 'autostart': self.info['autostart'], 'connection': self.info['connection'], 'interface': self.info['interface'], diff --git a/src/kimchi/model.py b/src/kimchi/model.py index a21fcf7..3e61390 100644 --- a/src/kimchi/model.py +++ b/src/kimchi/model.py @@ -547,6 +547,11 @@ class Model(object): xpath = "/domain/devices/disk[@device='disk']/source/@file" return xmlutils.xpath_get_text(xml, xpath) + def _vm_get_networks(self, dom): + xml = dom.XMLDesc(0) + xpath = "/domain/devices/interface[@type='network']/source/@network" + return xmlutils.xpath_get_text(xml, xpath) + def vm_delete(self, name): if self._vm_exists(name): conn = self.conn.get() @@ -859,6 +864,15 @@ class Model(object): conn = self.conn.get() return sorted(conn.listNetworks() + conn.listDefinedNetworks()) + def _get_vms_attach_to_a_network(self, network): + vms = [] + conn = self.conn.get() + for dom in conn.listAllDomains(0): + networks = self._vm_get_networks(dom) + if network in networks: + vms.append(dom.name()) + return vms + def network_lookup(self, name): network = self._get_network(name) xml = network.XMLDesc(0) @@ -887,6 +901,7 @@ class Model(object): 'interface': interface, 'subnet': subnet, 'dhcp': dhcp, + 'vms': self._get_vms_attach_to_a_network(name), 'autostart': network.autostart() == 1, 'state': network.isActive() and "active" or "inactive"} -- 1.8.4.2

Reviewed-by: Aline Manera <alinefm@linux.vnet.ibm.com> On 01/07/2014 04:50 AM, shaohef@linux.vnet.ibm.com wrote:
From: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
Add vms field for network GET method update API.md
add a function to get all vms attach to a network update model
add vms field for Network Resource property update controller
Now get the info of default network: $ curl -u <user>:<password> -H 'Content-type: application/json' -H 'Accept: application/json' -X GET http://localhost:8000/networks/default { "subnet":"192.168.122.0/24", "connection":"nat", "name":"default", "autostart":true, "state":"active", "interface":"virbr0", "dhcp":{ "start":"192.168.122.2", "end":"192.168.122.254" }, "vms":[ "rhel6", "opensuse12" ] } we can see, there are two vms attched to this network
Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com> --- docs/API.md | 1 + src/kimchi/control/networks.py | 1 + src/kimchi/model.py | 15 +++++++++++++++ 3 files changed, 17 insertions(+)
diff --git a/docs/API.md b/docs/API.md index 0013e86..32045ac 100644 --- a/docs/API.md +++ b/docs/API.md @@ -364,6 +364,7 @@ A interface represents available interface on host. * active: The Network is ready for use * inactive: The Network is not available * autostart: Network autostart onboot + * vms: all vms attached to this network * subnet: Network segment in slash-separated format with ip address and prefix * dhcp: DHCP services on the virtual network is enabled. * start: start boundary of a pool of addresses to be provided to DHCP clients. diff --git a/src/kimchi/control/networks.py b/src/kimchi/control/networks.py index ad95d69..f3f0b41 100644 --- a/src/kimchi/control/networks.py +++ b/src/kimchi/control/networks.py @@ -40,6 +40,7 @@ class Network(Resource): @property def data(self): return {'name': self.ident, + 'vms': self.info['vms'], 'autostart': self.info['autostart'], 'connection': self.info['connection'], 'interface': self.info['interface'], diff --git a/src/kimchi/model.py b/src/kimchi/model.py index a21fcf7..3e61390 100644 --- a/src/kimchi/model.py +++ b/src/kimchi/model.py @@ -547,6 +547,11 @@ class Model(object): xpath = "/domain/devices/disk[@device='disk']/source/@file" return xmlutils.xpath_get_text(xml, xpath)
+ def _vm_get_networks(self, dom): + xml = dom.XMLDesc(0) + xpath = "/domain/devices/interface[@type='network']/source/@network" + return xmlutils.xpath_get_text(xml, xpath) + def vm_delete(self, name): if self._vm_exists(name): conn = self.conn.get() @@ -859,6 +864,15 @@ class Model(object): conn = self.conn.get() return sorted(conn.listNetworks() + conn.listDefinedNetworks())
+ def _get_vms_attach_to_a_network(self, network): + vms = [] + conn = self.conn.get() + for dom in conn.listAllDomains(0): + networks = self._vm_get_networks(dom) + if network in networks: + vms.append(dom.name()) + return vms + def network_lookup(self, name): network = self._get_network(name) xml = network.XMLDesc(0) @@ -887,6 +901,7 @@ class Model(object): 'interface': interface, 'subnet': subnet, 'dhcp': dhcp, + 'vms': self._get_vms_attach_to_a_network(name), 'autostart': network.autostart() == 1, 'state': network.isActive() and "active" or "inactive"}

From: ShaoHe Feng <shaohef@linux.vnet.ibm.com> get all vms attach to a network Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com> --- src/kimchi/mockmodel.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/kimchi/mockmodel.py b/src/kimchi/mockmodel.py index 9488078..e928afc 100644 --- a/src/kimchi/mockmodel.py +++ b/src/kimchi/mockmodel.py @@ -473,8 +473,16 @@ class MockModel(object): except KeyError: raise NotFoundError("Network '%s'" % name) + def _get_vms_attach_to_a_network(self, network): + vms = [] + for name, dom in self._mock_vms.iteritems(): + if network in dom.networks: + vms.append(name) + return vms + def network_lookup(self, name): network = self._get_network(name) + network.info['vms'] = self._get_vms_attach_to_a_network(name) return network.info def network_activate(self, name): @@ -634,6 +642,7 @@ class MockVM(object): self.uuid = uuid self.name = name self.disk_paths = [] + self.networks = template_info['networks'] self.info = {'state': 'shutoff', 'stats': "{'cpu_utilization': 20, 'net_throughput' : 35, \ 'net_throughput_peak': 100, 'io_throughput': 45, \ -- 1.8.4.2

Reviewed-by: Aline Manera <alinefm@linux.vnet.ibm.com> On 01/07/2014 04:50 AM, shaohef@linux.vnet.ibm.com wrote:
From: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
get all vms attach to a network
Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com> --- src/kimchi/mockmodel.py | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/src/kimchi/mockmodel.py b/src/kimchi/mockmodel.py index 9488078..e928afc 100644 --- a/src/kimchi/mockmodel.py +++ b/src/kimchi/mockmodel.py @@ -473,8 +473,16 @@ class MockModel(object): except KeyError: raise NotFoundError("Network '%s'" % name)
+ def _get_vms_attach_to_a_network(self, network): + vms = [] + for name, dom in self._mock_vms.iteritems(): + if network in dom.networks: + vms.append(name) + return vms + def network_lookup(self, name): network = self._get_network(name) + network.info['vms'] = self._get_vms_attach_to_a_network(name) return network.info
def network_activate(self, name): @@ -634,6 +642,7 @@ class MockVM(object): self.uuid = uuid self.name = name self.disk_paths = [] + self.networks = template_info['networks'] self.info = {'state': 'shutoff', 'stats': "{'cpu_utilization': 20, 'net_throughput' : 35, \ 'net_throughput_peak': 100, 'io_throughput': 45, \

From: ShaoHe Feng <shaohef@linux.vnet.ibm.com> update test_rest and test_model Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com> --- tests/test_model.py | 1 + tests/test_rest.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/tests/test_model.py b/tests/test_model.py index c689bcc..0620501 100644 --- a/tests/test_model.py +++ b/tests/test_model.py @@ -410,6 +410,7 @@ class ModelTests(unittest.TestCase): self.assertEquals(args['subnet'], networkinfo['subnet']) self.assertEqual(args['connection'], networkinfo['connection']) self.assertEquals('inactive', networkinfo['state']) + self.assertEquals([], networkinfo['vms']) self.assertTrue(networkinfo['autostart']) inst.network_activate(name) diff --git a/tests/test_rest.py b/tests/test_rest.py index a960868..8732781 100644 --- a/tests/test_rest.py +++ b/tests/test_rest.py @@ -875,6 +875,7 @@ class RestTests(unittest.TestCase): networks = json.loads(request(host, port, '/networks').read()) self.assertEquals(1, len(networks)) self.assertEquals('default', networks[0]['name']) + self.assertEquals([], networks[0]['vms']) # Now add a couple of Networks to the mock model for i in xrange(5): @@ -885,6 +886,8 @@ class RestTests(unittest.TestCase): resp = request(host, port, '/networks', req, 'POST') self.assertEquals(201, resp.status) + network = json.loads(resp.read()) + self.assertEquals([], network["vms"]) networks = json.loads(request(host, port, '/networks').read()) self.assertEquals(6, len(networks)) -- 1.8.4.2

Reviewed-by: Aline Manera <alinefm@linux.vnet.ibm.com> On 01/07/2014 04:50 AM, shaohef@linux.vnet.ibm.com wrote:
From: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
update test_rest and test_model
Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com> --- tests/test_model.py | 1 + tests/test_rest.py | 3 +++ 2 files changed, 4 insertions(+)
diff --git a/tests/test_model.py b/tests/test_model.py index c689bcc..0620501 100644 --- a/tests/test_model.py +++ b/tests/test_model.py @@ -410,6 +410,7 @@ class ModelTests(unittest.TestCase): self.assertEquals(args['subnet'], networkinfo['subnet']) self.assertEqual(args['connection'], networkinfo['connection']) self.assertEquals('inactive', networkinfo['state']) + self.assertEquals([], networkinfo['vms']) self.assertTrue(networkinfo['autostart'])
inst.network_activate(name) diff --git a/tests/test_rest.py b/tests/test_rest.py index a960868..8732781 100644 --- a/tests/test_rest.py +++ b/tests/test_rest.py @@ -875,6 +875,7 @@ class RestTests(unittest.TestCase): networks = json.loads(request(host, port, '/networks').read()) self.assertEquals(1, len(networks)) self.assertEquals('default', networks[0]['name']) + self.assertEquals([], networks[0]['vms'])
# Now add a couple of Networks to the mock model for i in xrange(5): @@ -885,6 +886,8 @@ class RestTests(unittest.TestCase):
resp = request(host, port, '/networks', req, 'POST') self.assertEquals(201, resp.status) + network = json.loads(resp.read()) + self.assertEquals([], network["vms"])
networks = json.loads(request(host, port, '/networks').read()) self.assertEquals(6, len(networks))

I see quite valuable comments in previous versions of this patch, many thanks for team's discussion. 1. I see the future roadmap of network features. a) add a vms field in /networks uri to get how many vms are running on the network. for this attribute, we tend to tell user how many ip addresses are allocated and user can sniff something about the basic workload of the network from it. this will greatly decrease complexity at client side and improve performance. it is a quite light-weight field with only numbers of vms there, nothing unreasonable. b) add a parameter named "ip_subnet" to /vms uri to get the vms in a certain ip space. for this parameter, we tend to add some fancy feature to network. we can draw a network topology with a switch in center and vms around with all available information(name, interface, ip address...) of vm that is helpful. by this way, user can have a quite intuitive view of the network environment and do some convenient operation directly there. so two steps here, for this patch, only handle a), add a vms attribute to tell how many vms running on a network. let us discuss details of b) in next sprint as it is an advanced feature. 2. This drives us to think about the way to manage virtualization environment. Currently, we display vm, storage, network... in a quite flat way there, leave user to check individual attributes to get their relationships. I do not think this way is effective at all, I think these things are tightly connected to construct virtualized computing environment. So is it possible to manage virtualization by 'environment', in each 'environment', there are vms, images, storage pool & volumes and network connecting them. This is strategic, I would like to listen to team's opinion. On 1/7/2014 2:50 PM, shaohef@linux.vnet.ibm.com wrote:
From: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
V4 -> V5 fix typo in subject.
V3 -> V4 the subject of patch V3 3/3 is wrong. fix it.
V2 -> V3 update mockmodel and test case
V1 -> V2 set the flags argument of listAllDomains as 0 explicitly. For in some distros: $ pydoc libvirt.virConnect.listAllDomains libvirt.virConnect.listAllDomains = listAllDomains(self, flags) \ unbound libvirt.virConnect method
And in other distros: $ pydoc libvirt.virConnect.listAllDomains libvirt.virConnect.listAllDomains = listAllDomains(self, flags=0) \ unbound libvirt.virConnect method
ShaoHe Feng (3): network improvement: add vms field network improvement: update mockmodel to support vms field network improvement: update test case to support vms field
docs/API.md | 1 + src/kimchi/control/networks.py | 1 + src/kimchi/mockmodel.py | 9 +++++++++ src/kimchi/model.py | 15 +++++++++++++++ tests/test_model.py | 1 + tests/test_rest.py | 3 +++ 6 files changed, 30 insertions(+)

On 01/08/2014 11:40 AM, Yu Xin Huo wrote:
I see quite valuable comments in previous versions of this patch, many thanks for team's discussion.
1. I see the future roadmap of network features.
a) add a vms field in /networks uri to get how many vms are running on the network. for this attribute, we tend to tell user how many ip addresses are allocated and user can sniff something about the basic workload of the network from it. this will greatly decrease complexity at client side and improve performance. it is a quite light-weight field with only numbers of vms there, nothing unreasonable. ACK b) add a parameter named "ip_subnet" to /vms uri to get the vms in a certain ip space. for this parameter, we tend to add some fancy feature to network. we can draw a network topology with a switch in center and vms around with all available information(name, interface, ip address...) of vm that is helpful. by this way, user can have a quite intuitive view of the network environment and do some convenient operation directly there. ACK
so two steps here, for this patch, only handle a), add a vms attribute to tell how many vms running on a network. let us discuss details of b) in next sprint as it is an advanced feature.
2. This drives us to think about the way to manage virtualization environment. a good perspective.
Currently, we display vm, storage, network... in a quite flat way there, leave user to check individual attributes to get their relationships. I do not think this way is effective at all, I think these things are tightly connected to construct virtualized computing environment. So is it possible to manage virtualization by 'environment', in each 'environment', there are vms, images, storage pool & volumes and network connecting them.
This is strategic, I would like to listen to team's opinion.
more details. step 1: I have discussed with Yu Xin before. And at the beginning, Yu Xin and I think just need to show the numbers of vms. it is a quite light-weight field with only numbers of vms there. This is the first UI design of network. but for let last release, backend do not support VMS numbers, so yuxing remove the it. -------------------------------------------------------------------------------------------------------------------------------- | Network Name | VMS | State | Network Type | Interface | Address Space | Actions | -------------------------------------------------------------------------------------------------------------------------------- | default | 254 | o | NAT | virbr | 192.168.122.0/24 | Actions | -------------------------------------------------------------------------------------------------------------------------------- | net1 | 0 | o | NAT | virbr | 192.168.122.0/24 | Actions | -------------------------------------------------------------------------------------------------------------------------------- The number of vms is a quite intuitive view of the network environment and user can do some convenient operation directly. For example, if a user wants to delete a network, it is easy to do his choice by checking the number of this network. The vms of net1 is "0", user can delete this network safely. Also the vms of default is "254", user just can choose net1 attached to his VM. Also a VMs number greatly decrease complexity at client side and improve performance. After add this vms muber filed, UI can just get /networks once to finish network web page. step 2: we will draw a network topology with a switch in center and vms around with all available information(name, interface, ip address...) of vm that is helpful. by this way, user can have a quite intuitive view of the network environment and do some convenient operation directly there. --------- --------- --------- --------- | vm1 | | vm2 | | vm3 | | vm4| --------- --------- --------- --------- | | | | | | | | ---------------------------------------------------------------- | | | network1 | | | ---------------------------------------------------------------- | | | | | | | | --------- --------- --------- --------- | vm5 | | vm6 | | vm7 | | vm8| --------- --------- --------- --------- And the user click the vm5, the details will display: ---------------------------------------------------------------- | name | CPUS | memory | status | ... | ---------------------------------------------------------------- | VM1 | 1 | 1G | o | ... | ---------------------------------------------------------------- summary: we can design our URL by: a) 1. get the VMS numbers and network topology by: get /networks/ [ {''net1": {bridge: brg1, vms: [vm1, vm2]}, {''net2": {bridge: brg2, vms: [vm3, vm4, vm5]} ] The numbers field is: len(net1.vms) The network topology is: net1.vms 2. get the vms info get /vms/vm1 get /vms/vm2 b)get the VMS numbers 1. get /networks/ [ {''net1": {bridge: brg1, vms: 2}, {''net2": {bridge: brg2, vms: 3} ] 2. get the network topology and vms info: /vms?network='net1' [ "vm1": {"CPUS": 1, "memory": 1G, "status": "running"}, "vm2": {"CPUS": 1, "memory": 1G, "status": "running"}, ] the network topology is net1.keys() /vms?network='net2' [ "vm3": {"CPUS": 1, "memory": 1G, "status": "running"}, "vm4": {"CPUS": 1, "memory": 1G, "status": "running"}, "vm5": {"CPUS": 1, "memory": 1G, "status": "running"}, ] the network topology is net2.keys() But we will know the network is not a VM's attribute, it is just a VM's interface kind.
On 1/7/2014 2:50 PM, shaohef@linux.vnet.ibm.com wrote:
From: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
V4 -> V5 fix typo in subject.
V3 -> V4 the subject of patch V3 3/3 is wrong. fix it.
V2 -> V3 update mockmodel and test case
V1 -> V2 set the flags argument of listAllDomains as 0 explicitly. For in some distros: $ pydoc libvirt.virConnect.listAllDomains libvirt.virConnect.listAllDomains = listAllDomains(self, flags) \ unbound libvirt.virConnect method
And in other distros: $ pydoc libvirt.virConnect.listAllDomains libvirt.virConnect.listAllDomains = listAllDomains(self, flags=0) \ unbound libvirt.virConnect method
ShaoHe Feng (3): network improvement: add vms field network improvement: update mockmodel to support vms field network improvement: update test case to support vms field
docs/API.md | 1 + src/kimchi/control/networks.py | 1 + src/kimchi/mockmodel.py | 9 +++++++++ src/kimchi/model.py | 15 +++++++++++++++ tests/test_model.py | 1 + tests/test_rest.py | 3 +++ 6 files changed, 30 insertions(+)
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel
-- Thanks and best regards! Sheldon Feng(???)<shaohef@linux.vnet.ibm.com> IBM Linux Technology Center

On 01/08/2014 01:40 AM, Yu Xin Huo wrote:
I see quite valuable comments in previous versions of this patch, many thanks for team's discussion.
1. I see the future roadmap of network features.
a) add a vms field in /networks uri to get how many vms are running on the network. for this attribute, we tend to tell user how many ip addresses are allocated and user can sniff something about the basic workload of the network from it. this will greatly decrease complexity at client side and improve performance. it is a quite light-weight field with only numbers of vms there, nothing unreasonable.
OK.
b) add a parameter named "ip_subnet" to /vms uri to get the vms in a certain ip space. for this parameter, we tend to add some fancy feature to network. we can draw a network topology with a switch in center and vms around with all available information(name, interface, ip address...) of vm that is helpful. by this way, user can have a quite intuitive view of the network environment and do some convenient operation directly there.
I am not sure I understood it correctly but we can discuss more later.
so two steps here, for this patch, only handle a), add a vms attribute to tell how many vms running on a network. let us discuss details of b) in next sprint as it is an advanced feature.
2. This drives us to think about the way to manage virtualization environment.
Currently, we display vm, storage, network... in a quite flat way there, leave user to check individual attributes to get their relationships. I do not think this way is effective at all, I think these things are tightly connected to construct virtualized computing environment. So is it possible to manage virtualization by 'environment', in each 'environment', there are vms, images, storage pool & volumes and network connecting them.
This is strategic, I would like to listen to team's opinion.
On 1/7/2014 2:50 PM, shaohef@linux.vnet.ibm.com wrote:
From: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
V4 -> V5 fix typo in subject.
V3 -> V4 the subject of patch V3 3/3 is wrong. fix it.
V2 -> V3 update mockmodel and test case
V1 -> V2 set the flags argument of listAllDomains as 0 explicitly. For in some distros: $ pydoc libvirt.virConnect.listAllDomains libvirt.virConnect.listAllDomains = listAllDomains(self, flags) \ unbound libvirt.virConnect method
And in other distros: $ pydoc libvirt.virConnect.listAllDomains libvirt.virConnect.listAllDomains = listAllDomains(self, flags=0) \ unbound libvirt.virConnect method
ShaoHe Feng (3): network improvement: add vms field network improvement: update mockmodel to support vms field network improvement: update test case to support vms field
docs/API.md | 1 + src/kimchi/control/networks.py | 1 + src/kimchi/mockmodel.py | 9 +++++++++ src/kimchi/model.py | 15 +++++++++++++++ tests/test_model.py | 1 + tests/test_rest.py | 3 +++ 6 files changed, 30 insertions(+)
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel

discuss with most of us today: this patch set is what we need. most of us prefer: get /networks/ [ {''net1": {bridge: brg1, vms: [vm1, vm2]}, {''net2": {bridge: brg2, vms: [vm3, vm4, vm5]} ] not get /networks/ [ {''net1": {bridge: brg1, vms: 2}, {''net2": {bridge: brg2, vms: 3} ] On 01/07/2014 02:50 PM, shaohef@linux.vnet.ibm.com wrote:
From: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
V4 -> V5 fix typo in subject.
V3 -> V4 the subject of patch V3 3/3 is wrong. fix it.
V2 -> V3 update mockmodel and test case
V1 -> V2 set the flags argument of listAllDomains as 0 explicitly. For in some distros: $ pydoc libvirt.virConnect.listAllDomains libvirt.virConnect.listAllDomains = listAllDomains(self, flags) \ unbound libvirt.virConnect method
And in other distros: $ pydoc libvirt.virConnect.listAllDomains libvirt.virConnect.listAllDomains = listAllDomains(self, flags=0) \ unbound libvirt.virConnect method
ShaoHe Feng (3): network improvement: add vms field network improvement: update mockmodel to support vms field network improvement: update test case to support vms field
docs/API.md | 1 + src/kimchi/control/networks.py | 1 + src/kimchi/mockmodel.py | 9 +++++++++ src/kimchi/model.py | 15 +++++++++++++++ tests/test_model.py | 1 + tests/test_rest.py | 3 +++ 6 files changed, 30 insertions(+)
-- Thanks and best regards! Sheldon Feng(冯少合)<shaohef@linux.vnet.ibm.com> IBM Linux Technology Center
participants (4)
-
Aline Manera
-
shaohef@linux.vnet.ibm.com
-
Sheldon
-
Yu Xin Huo