[oVirt][Quantum] question about quantum CLI

Gary Kotton gkotton at redhat.com
Wed Jun 13 06:02:15 UTC 2012


Hi Kris,
Please see my answers and questions below.
Thanks
Gary

On 06/13/2012 07:31 AM, Kris zhang wrote:
> Hi Kotton,
>
> In the file ovirt.sh, there is a line:

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:
1. Logical Network Management:
     Create:
         ovirt.sh network create <name>
             - the name is the name of the logical network (in the POC 
this is prefixed by "Q_"
             - this invokes the cli to create a network called <name>
             - the UUID returned by the quantum service will be save in 
/tmp/network.<name>
             - the above UUID is read when this logical network is used 
(this in the future will be save in the oVirt data base)
     Delete:
         ovirt.sh network remove <name>
             - the name is the name of the logical network (in the POC 
this is prefixed by "Q_"
             - this invokes the cli to delete a network called <name>
             - the file /tmp/network.<name> is deleted
2. VM Port management
     Create:
         ovirt.sh port create <net_name> <vmid>
             - the network name and the vm id are input (the VM id is a 
key to be able to delete it all :))
             - the script does the following:
                 - creates a port on the network. saves the port id in 
/tmp/network.<name>.<vmid>.port
                 - sets the state of the port to ACTIVE
                 - creates an attachment ID (this is the line that you 
had problems with). This is saved in /tmp/network.<name>.<vmid>.attachment
                 - saves the network name in a file /tmp/network.<vmid>
                 - the UUID's are read when the VM is started so that 
they can be passed to VDSM
     Delete:
         ovirt.sh port remove <vmid>
             - using the vmid the network name is read => enables us to 
get all of the ID's to delete port in quantum
             - cleans all of the files
The script is called from the ovirt engine. Sorry for the long winded 
explanation.

> quantum update_port default $NET_UUID $PORT_UUID state=ACTIVE
>                 uuidgen > /tmp/network.$3.$4.port.attach
> ATTACH_UUID=`cat /tmp/network.$3.$4.port.attach`

In Quantum the attachment ID is generated by the user. The code above 
generates the attachment ID for the port.
>
>
> But i run this command, i found there is no any uuid generated, so 
> what's the value of the ATTACH_UUID?
Do you run the script from the shell or is this run via oVirt?
There is a log of all of the script command - can you please look in 
/tmp/ovirt.txt - this may give us some clues.
You can run the script commands as described above. This may also help.
Thanks
Gary
> Best regards,
> Kris
>
>
> On Tue, Jun 12, 2012 at 7:15 PM, Gary Kotton <gkotton at redhat.com 
> <mailto:gkotton at redhat.com>> wrote:
>
>     On 06/12/2012 12:36 PM, Itamar Heim wrote:
>
>         On 06/12/2012 11:47 AM, Gary Kotton wrote:
>
>             Hi Kris,
>             Thanks for the questions. Please see my inline answers. I
>             have also
>             cc'ed the ovirt arch mailing list.
>             Thanks
>             Gary
>
>             On 06/12/2012 11:21 AM, Kris zhang wrote:
>
>                 Hi Gkotton,
>
>                 I have some questions:
>
>                 1) In the file "ovirt.sh", i found the command quantum
>                 always use the
>                 tenant "default", so if the ovirt don't support
>                 multi-tenant?
>
>             oVirt does not support multi tenancy at the moment. Maybe
>             there are
>             people on the list who can provide more details about
>             this. The initial
>             plan was to use the "default" tenant.
>
>
>         ovirt supports multiple users and an RBAC model for
>         permissions between these users.
>         what exactly are you looking for?
>
>     Quantum support multi tenancy. The integration with oVirt was done
>     with the "default" tenant. This is a different model to that of oVirt.
>     Thanks
>     Gary
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/arch/attachments/20120613/b3f6f7da/attachment.html>


More information about the Arch mailing list