[one-users] Multiple REQUIREMENTS
Carlos Martín Sánchez
cmartin at opennebula.org
Tue Feb 19 01:31:37 PST 2013
Yes, from the docs:
http://opennebula.org/documentation:rel3.8:template#requirement_expression_syntax
The syntax of the requirement expressions is defined as:
>
stmt::= expr';'
> expr::= VARIABLE '=' NUMBER
> | VARIABLE '!=' NUMBER
> | VARIABLE '>' NUMBER
> | VARIABLE '<' NUMBER
> | VARIABLE '=' STRING
> | VARIABLE '!=' STRING
> | expr '&' expr
> | expr '|' expr
> | '!' expr
> | '(' expr ')'
>
Each expression is evaluated to 1 (TRUE) or 0 (FALSE). Only those hosts for
> which the requirement expression is evaluated to TRUE will be considered to
> run the VM.
> Logical operators work as expected ( less '<', greater '>', '&' AND, '|'
> OR, '!' NOT), '=' means equals with numbers (floats and integers). When you
> use '=' operator with strings, it performs a shell wildcard pattern
> matching.
Regards
--
Carlos Martín, MSc
Project Engineer
OpenNebula - The Open-source Solution for Data Center Virtualization
www.OpenNebula.org | cmartin at opennebula.org |
@OpenNebula<http://twitter.com/opennebula><cmartin at opennebula.org>
On Mon, Feb 18, 2013 at 11:20 PM, Steven Timm <timm at fnal.gov> wrote:
>
> What is the syntax if you want to use more than one REQUIREMENT
> in the REQUIREMENTS statement of an OpenNebula template.
> For instance
>
> suppose I want to have both
>
> REQUIREMENTS = "PARTTHREE=\"/dev/mapper/**fcl319sata-vm2t1\""
>
> and
>
> REQUIREMENTS = "HYPERVISOR=\"kvm\""
>
> are the && (and), || (or) operators supported?
>
> Steve Timm
>
>
> ------------------------------**------------------------------**------
> Steven C. Timm, Ph.D (630) 840-8525
> timm at fnal.gov http://home.fnal.gov/~timm/
> Fermilab Computing Division, Scientific Computing Facilities,
> Grid Facilities Department, FermiGrid Services Group, Group Leader.
> Lead of FermiCloud project.
> ______________________________**_________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/**listinfo.cgi/users-opennebula.**org<http://lists.opennebula.org/listinfo.cgi/users-opennebula.org>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20130219/2d66413a/attachment-0002.htm>
More information about the Users
mailing list