<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 01/08/2014 11:40 AM, Yu Xin Huo
wrote:<br>
</div>
<blockquote cite="mid:52CCC8AE.5090405@linux.vnet.ibm.com"
type="cite">I see quite valuable comments in previous versions of
this patch, many thanks for team's discussion.
<br>
<br>
1. I see the future roadmap of network features.
<br>
<br>
a) add a vms field in /networks uri to get how many vms
are running on the network.
<br>
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.
<br>
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.
<br>
</blockquote>
ACK<br>
<blockquote cite="mid:52CCC8AE.5090405@linux.vnet.ibm.com"
type="cite"> b) add a parameter named "ip_subnet" to /vms
uri to get the vms in a certain ip space.
<br>
for this parameter, we tend to add some fancy feature
to network.
<br>
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.
<br>
by this way, user can have a quite intuitive view of
the network environment and do some convenient operation directly
there.
<br>
</blockquote>
ACK
<blockquote cite="mid:52CCC8AE.5090405@linux.vnet.ibm.com"
type="cite">
<br>
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.
<br>
</blockquote>
<blockquote cite="mid:52CCC8AE.5090405@linux.vnet.ibm.com"
type="cite">
<br>
2. This drives us to think about the way to manage virtualization
environment.</blockquote>
<blockquote cite="mid:52CCC8AE.5090405@linux.vnet.ibm.com"
type="cite">a good perspective.<br>
</blockquote>
<blockquote cite="mid:52CCC8AE.5090405@linux.vnet.ibm.com"
type="cite">
<br>
Currently, we display vm, storage, network... in a quite flat
way there, leave user to check individual attributes to get their
relationships.
<br>
I do not think this way is effective at all, I think these
things are tightly connected to construct virtualized computing
environment.
<br>
So is it possible to manage virtualization by 'environment',
in each 'environment', there are vms, images, storage pool &
volumes and network connecting them.
<br>
<br>
This is strategic, I would like to listen to team's opinion.
<br>
<br>
</blockquote>
<br>
more details. <br>
<br>
step 1:<br>
I have discussed with Yu Xin before. And at the beginning, Yu Xin
and I think just need to show the numbers of vms.<br>
it is a quite light-weight field with only numbers of vms there.<br>
This is the first UI design of network. but for let last release,
backend do not support VMS numbers, so yuxing remove the it.<br>
--------------------------------------------------------------------------------------------------------------------------------
<div class="header"> <span class="column column-name">| Network
Name | VMS | </span><span class="column column-state">State</span><span
class="column column-type"> | Network Type</span><span
class="column column-interface"> | Interface</span><span
class="column column-space"> | Address Space | </span><span
class="column">Actions | <br>
</span>--------------------------------------------------------------------------------------------------------------------------------
</div>
<span class="column column-name cell">| default | 254
| <font color="#33cc00"> o </font> | </span><span
class="column column-state cell"><span class="network-state down"></span></span><span
class="column column-type cell"> NAT | </span><span
class="column column-interface cell">virbr | </span><span
class="column column-space cell">192.168.122.0/24</span><span
class="column-action"> | <span aria-disabled="false"
role="button" class="btn dropdown action-button ui-button
ui-widget ui-state-default ui-corner-all
ui-button-text-icon-secondary"><span class="ui-button-text">Actions
|</span></span></span><br>
--------------------------------------------------------------------------------------------------------------------------------
<br>
<span class="column column-name cell">| net1 | 0
| <font color="#33cc00"> <font color="#999999">o </font> </font>
| </span><span class="column column-state cell"><span
class="network-state down"></span></span><span class="column
column-type cell"> NAT | </span><span
class="column column-interface cell">virbr | </span><span
class="column column-space cell">192.168.122.0/24</span><span
class="column-action"> | <span aria-disabled="false"
role="button" class="btn dropdown action-button ui-button
ui-widget ui-state-default ui-corner-all
ui-button-text-icon-secondary"><span class="ui-button-text">Actions
|</span></span></span><br>
--------------------------------------------------------------------------------------------------------------------------------<br>
The number of vms is a quite intuitive view of the network
environment and user can do some convenient operation directly.<br>
For example, if a user wants to delete a network, it is easy to do
his choice by checking the number of this network. <br>
The vms of net1 is "0", user can delete this network safely. <br>
Also the vms of <span class="column column-name cell">default</span>
is "254", user just can choose net1 attached to his VM. <br>
<br>
Also a VMs number greatly decrease complexity at client side and
improve performance. <br>
After add this vms muber filed, UI can just get /networks once to
finish network web page. <br>
<br>
step 2:<br>
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. <br>
by this way, user can have a quite intuitive view of the network
environment and do some convenient operation directly there. <br>
<br>
--------- --------- ---------
---------<br>
| vm1 | | vm2 | | vm3 | | vm4| <br>
--------- --------- ---------
---------<br>
| |
| |<br>
| |
| |<br>
----------------------------------------------------------------<br>
|
|<br>
| network1
|<br>
|
|<br>
----------------------------------------------------------------<br>
| |
| |<br>
| |
| |<br>
--------- --------- ---------
---------<br>
| vm5 | | vm6 | | vm7 | | vm8| <br>
--------- --------- ---------
---------<br>
<br>
<br>
And the user click the vm5, the details will display:<br>
----------------------------------------------------------------<br>
| name | CPUS | memory | status | ... |<br>
----------------------------------------------------------------<br>
| VM1 | 1 | 1G | <span class="column
column-name cell"><font color="#33cc00"> o </font></span>|
... |<br>
----------------------------------------------------------------<br>
<br>
<br>
summary:<br>
we can design our URL by: <br>
a) <br>
1. get the VMS numbers and network topology by:<br>
<font size="3">get /networks/<br>
[ <br>
{''net1": {bridge: brg1, vms: [vm1, vm2]},<br>
{''net2": {bridge: brg2, vms: [vm3, vm4, vm5]}<br>
]</font><br>
The numbers field is: len(<font size="3">net1.vms)</font><br>
The network topology is: <font size="3">net1.vms</font><br>
2. get the vms info <br>
<font size="3">get /vms/vm1</font><br>
<font size="3">get /vms/vm2<br>
<br>
</font>b)get the VMS numbers <br>
1. <br>
<font size="3">get /networks/<br>
[ <br>
{''net1": {bridge: brg1, vms: 2},<br>
{''net2": {bridge: brg2, vms: 3}<br>
]<br>
</font><br>
2. get the network topology and vms info:<br>
/vms?network='net1'<br>
[<br>
"vm1": {"CPUS": 1, "memory": 1G, "status": "running"},<br>
"vm2": {"CPUS": 1, "memory": 1G, "status": "running"},<br>
]<br>
the network topology is net1.keys()<br>
/vms?network='net2'<br>
[<br>
"vm3": {"CPUS": 1, "memory": 1G, "status": "running"},<br>
"vm4": {"CPUS": 1, "memory": 1G, "status": "running"},<br>
"vm5": {"CPUS": 1, "memory": 1G, "status": "running"},<br>
]<br>
the network topology is net2.keys()<br>
<br>
But we will know the network is not a VM's attribute, it is just a
VM's interface kind. <br>
<br>
<br>
<blockquote cite="mid:52CCC8AE.5090405@linux.vnet.ibm.com"
type="cite">On 1/7/2014 2:50 PM, <a class="moz-txt-link-abbreviated" href="mailto:shaohef@linux.vnet.ibm.com">shaohef@linux.vnet.ibm.com</a> wrote:
<br>
<blockquote type="cite">From: ShaoHe Feng
<a class="moz-txt-link-rfc2396E" href="mailto:shaohef@linux.vnet.ibm.com"><shaohef@linux.vnet.ibm.com></a>
<br>
<br>
V4 -> V5
<br>
fix typo in subject.
<br>
<br>
V3 -> V4
<br>
the subject of patch V3 3/3 is wrong.
<br>
fix it.
<br>
<br>
V2 -> V3
<br>
update mockmodel and test case
<br>
<br>
V1 -> V2
<br>
set the flags argument of listAllDomains as 0 explicitly.
<br>
For in some distros:
<br>
$ pydoc libvirt.virConnect.listAllDomains
<br>
libvirt.virConnect.listAllDomains = listAllDomains(self, flags)
\
<br>
unbound libvirt.virConnect method
<br>
<br>
And in other distros:
<br>
$ pydoc libvirt.virConnect.listAllDomains
<br>
libvirt.virConnect.listAllDomains = listAllDomains(self,
flags=0) \
<br>
unbound libvirt.virConnect method
<br>
<br>
ShaoHe Feng (3):
<br>
network improvement: add vms field
<br>
network improvement: update mockmodel to support vms field
<br>
network improvement: update test case to support vms field
<br>
<br>
docs/API.md | 1 +
<br>
src/kimchi/control/networks.py | 1 +
<br>
src/kimchi/mockmodel.py | 9 +++++++++
<br>
src/kimchi/model.py | 15 +++++++++++++++
<br>
tests/test_model.py | 1 +
<br>
tests/test_rest.py | 3 +++
<br>
6 files changed, 30 insertions(+)
<br>
<br>
</blockquote>
<br>
_______________________________________________
<br>
Kimchi-devel mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Kimchi-devel@ovirt.org">Kimchi-devel@ovirt.org</a>
<br>
<a class="moz-txt-link-freetext" href="http://lists.ovirt.org/mailman/listinfo/kimchi-devel">http://lists.ovirt.org/mailman/listinfo/kimchi-devel</a>
<br>
<br>
<br>
<br>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Thanks and best regards!
Sheldon Feng(冯少合)<a class="moz-txt-link-rfc2396E" href="mailto:shaohef@linux.vnet.ibm.com"><shaohef@linux.vnet.ibm.com></a>
IBM Linux Technology Center</pre>
</body>
</html>