mesosmesosphereheatopenstack-heat

Would ( intValue ( "." intValue )? ) be read as 1.9 ?? Also, how to add attribute to Heat Template


Is this a regEx?

As per Mesos' documentation:

scalar : floatValue

floatValue : ( intValue ( "." intValue )? ) | ...

Would I read it the same way as I'd read the scalar via the documentation?

I'm trying to figure out how to add attribute to Mesos Cluster nodes, but the sample Heat Template I have has nothing to the tune of 'node attributes' in it, and I'm kind of shooting for the moon here.

As It goes into a HEAT template, would each attribute for a specific node be added into the preferences section? I have been trying to find this answer for days now, and all my attempts seem to fail when I deploy the template.

I have tried adding an attributes section, to no avail:

parameters:

  name:
    type: string

resources:

  # Boot script
  boot_script:
    etc, etc...

attributes:
  server_group:
    group_1

Solution

  • Would ( intValue ( “.” intValue )? ) be read as 1.9 ?

    Yes

    This definition is a formal grammar definiton of a scalar value. You can find similar definition for programming lanugage for example Golang looks like this (from antlr-4 examples)

    To read grammar this you need to take a look at whole definition

    scalar : floatValue
    
    floatValue : ( intValue ( "." intValue )? ) | ...
    
    intValue : [0-9]+
    

    and flatten it to following regexp (I do not know what ... means):

    scalar : [0-9]+(.[0-9]+)?
    

    regexp source

    How to add attribute to Heat Template

    Not enoutght information to answer this.