<div>Thanks for you detail answer, and please see the result of the command quantum update_port,</div><div><br></div><div><img src="cid:ii_137e50ce18d5d9d8" alt="Inline image 1"><br></div><div><br></div><div>I run this script from the shell, and you can see there is no an attachment UUID created. Can you show me your testing result?</div>
<div><br></div><div>BR,</div><div>Kris</div><br><br><div class="gmail_quote">On Wed, Jun 13, 2012 at 2:02 PM, Gary Kotton <span dir="ltr"><<a href="mailto:gkotton@redhat.com" target="_blank">gkotton@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div bgcolor="#ffffff" text="#000000">
Hi Kris,<br>
Please see my answers and questions below.<br>
Thanks<br>
Gary<div class="im"><br>
<br>
On 06/13/2012 07:31 AM, Kris zhang wrote:
<blockquote type="cite">
<div>Hi Kotton,</div>
<div><br>
</div>
<div>In the file ovirt.sh, there is a line:</div>
</blockquote>
<br></div>
A bit of background regarding the script. The purpose of the POC was
to show that Quantum can be run in oVirt. It would have been ideal
to write a REST client that could interface with the Quantum
service. Due to the fact that I was not familiar with the oVirt code
I felt that a quicker and more productive means was to invoke a bash
script from the oVirt engine code. The script would invoke the
quantum cli (this is a client that configures the quantum server).
In addition to this I did not want to make any changes to the
database schema. The result was a script that does the following:<br>
1. Logical Network Management:<br>
Create:<br>
ovirt.sh network create <name><br>
- the name is the name of the logical network (in the
POC this is prefixed by "Q_"<br>
- this invokes the cli to create a network called
<name><br>
- the UUID returned by the quantum service will be save
in /tmp/network.<name><br>
- the above UUID is read when this logical network is
used (this in the future will be save in the oVirt data base)<br>
Delete:<br>
ovirt.sh network remove <name><br>
- the name is the name of the logical network (in the
POC this is prefixed by "Q_"<br>
- this invokes the cli to delete a network called
<name><br>
- the file /tmp/network.<name> is deleted<br>
2. VM Port management<br>
Create:<br>
ovirt.sh port create <net_name> <vmid><br>
- the network name and the vm id are input (the VM id is
a key to be able to delete it all :))<br>
- the script does the following:<br>
- creates a port on the network. saves the port id
in /tmp/network.<name>.<vmid>.port<br>
- sets the state of the port to ACTIVE<br>
- creates an attachment ID (this is the line that
you had problems with). This is saved in
/tmp/network.<name>.<vmid>.attachment<br>
- saves the network name in a file
/tmp/network.<vmid><br>
- the UUID's are read when the VM is started so that
they can be passed to VDSM<br>
Delete:<br>
ovirt.sh port remove <vmid><br>
- using the vmid the network name is read => enables
us to get all of the ID's to delete port in quantum<br>
- cleans all of the files<br>
The script is called from the ovirt engine. Sorry for the long
winded explanation.<div class="im"><br>
<br>
<blockquote type="cite">
<div>
<div>quantum update_port default $NET_UUID $PORT_UUID
state=ACTIVE</div>
<div> uuidgen > /tmp/network.$3.$4.port.attach</div>
<div><span style="white-space:pre-wrap"> </span>ATTACH_UUID=`cat
/tmp/network.$3.$4.port.attach`</div>
</div>
</blockquote>
<br></div>
In Quantum the attachment ID is generated by the user. The code
above generates the attachment ID for the port. <br><div class="im">
<blockquote type="cite">
<div><br>
</div>
<div><br>
</div>
<div>But i run this command, i found there is no any uuid
generated, so what's the value of the ATTACH_UUID?</div>
</blockquote></div>
Do you run the script from the shell or is this run via oVirt? <br>
There is a log of all of the script command - can you please look in
/tmp/ovirt.txt - this may give us some clues.<br>
You can run the script commands as described above. This may also
help.<br>
Thanks<span class="HOEnZb"><font color="#888888"><br>
Gary</font></span><div class="im"><br>
<blockquote type="cite">
<div>Best regards,</div>
<div>Kris</div>
<br>
<br>
<div class="gmail_quote">On Tue, Jun 12, 2012 at 7:15 PM, Gary
Kotton <span dir="ltr"><<a href="mailto:gkotton@redhat.com" target="_blank">gkotton@redhat.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div>On 06/12/2012 12:36 PM, Itamar Heim wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
On 06/12/2012 11:47 AM, Gary Kotton wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hi Kris,<br>
Thanks for the questions. Please see my inline
answers. I have also<br>
cc'ed the ovirt arch mailing list.<br>
Thanks<br>
Gary<br>
<br>
On 06/12/2012 11:21 AM, Kris zhang wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hi Gkotton,<br>
<br>
I have some questions:<br>
<br>
1) In the file "ovirt.sh", i found the command
quantum always use the<br>
tenant "default", so if the ovirt don't support
multi-tenant?<br>
</blockquote>
oVirt does not support multi tenancy at the moment.
Maybe there are<br>
people on the list who can provide more details about
this. The initial<br>
plan was to use the "default" tenant.<br>
</blockquote>
<br>
ovirt supports multiple users and an RBAC model for
permissions between these users.<br>
what exactly are you looking for?<br>
</blockquote>
</div>
</div>
Quantum support multi tenancy. The integration with oVirt was
done with the "default" tenant. This is a different model to
that of oVirt.<br>
Thanks<span><font color="#888888"><br>
Gary<br>
</font></span></blockquote>
</div>
<br>
</blockquote>
<br>
</div></div>
</blockquote></div><br>