Question about container statement of openflow-extensible-match.yang file.


denghui huang
 

Hi all
  
    Recently, i read OpenFlow yang model file, when i read openflow-extensible-match.yang file, there is one section which use container statement, like the following:
   
      .....
      container oxm-container {
            uses oxm-fields;
        }
      .....

     RFC says:

   The "container" statement is used to define an interior data node in
   the schema tree.  It takes one argument, which is an identifier,
   followed by a block of substatements that holds detailed container
   information.

   A container node does not have a value, but it has a list of child
   nodes in the data tree.  The child nodes are defined in the
   container's substatements.

  So the upper yang section means that it defines a interior data node in the scheme tree named oxm-container, and it has child node from grouping oxm-fields,
  I can understand that. but when i check the generated java interface OxmContainer, seems that there is no reference in code base. So, my question is why we need to define
it?


--denghui


Michal Polkorab
 

Hi Denghui,


this container is used only for augmentation purposes. In order to augment structures you have to specify a path to the structure you want to augment. This way we can use "/oxm:oxm-container/oxm:match-entries" path, otherwise we would have to use match augmentations for all places, where the match is used (because of different paths). So instead of having 24 augmentations, we would have like 7 * 24 augmentations. Similarly, you can find same container usage in actions and instructions.


Regards

Michal Polkorab


From: denghui huang <huangdenghui@...>
Sent: 22 May 2014 17:35
To: openflowjava-dev@...
Subject: [openflowjava-dev] Question about container statement of openflow-extensible-match.yang file.
 
Hi all
  
    Recently, i read OpenFlow yang model file, when i read openflow-extensible-match.yang file, there is one section which use container statement, like the following:
   
      .....
      container oxm-container {
            uses oxm-fields;
        }
      .....

     RFC says:

   The "container" statement is used to define an interior data node in
   the schema tree.  It takes one argument, which is an identifier,
   followed by a block of substatements that holds detailed container
   information.

   A container node does not have a value, but it has a list of child
   nodes in the data tree.  The child nodes are defined in the
   container's substatements.

  So the upper yang section means that it defines a interior data node in the scheme tree named oxm-container, and it has child node from grouping oxm-fields,
  I can understand that. but when i check the generated java interface OxmContainer, seems that there is no reference in code base. So, my question is why we need to define
it?


--denghui

MichalPolkoráb

Software Developer


Mlynské Nivy 56 / 821 05 Bratislava / Slovakia
+421 918 378 907
/ michal.polkorab@...
reception: +421 2 206 65 111
/ www.pantheon.sk

logo


denghui huang
 

Hi Michal
    Thanks for your explanation, Yes, i saw this usage in openflow-augments.yang file.


--denghui


2014-05-23 14:32 GMT+08:00 Michal Polkoráb <michal.polkorab@...>:

Hi Denghui,


this container is used only for augmentation purposes. In order to augment structures you have to specify a path to the structure you want to augment. This way we can use "/oxm:oxm-container/oxm:match-entries" path, otherwise we would have to use match augmentations for all places, where the match is used (because of different paths). So instead of having 24 augmentations, we would have like 7 * 24 augmentations. Similarly, you can find same container usage in actions and instructions.


Regards

Michal Polkorab


From: denghui huang <huangdenghui@...>
Sent: 22 May 2014 17:35
To: openflowjava-dev@...
Subject: [openflowjava-dev] Question about container statement of openflow-extensible-match.yang file.
 
Hi all
  
    Recently, i read OpenFlow yang model file, when i read openflow-extensible-match.yang file, there is one section which use container statement, like the following:
   
      .....
      container oxm-container {
            uses oxm-fields;
        }
      .....

     RFC says:

   The "container" statement is used to define an interior data node in
   the schema tree.  It takes one argument, which is an identifier,
   followed by a block of substatements that holds detailed container
   information.

   A container node does not have a value, but it has a list of child
   nodes in the data tree.  The child nodes are defined in the
   container's substatements.

  So the upper yang section means that it defines a interior data node in the scheme tree named oxm-container, and it has child node from grouping oxm-fields,
  I can understand that. but when i check the generated java interface OxmContainer, seems that there is no reference in code base. So, my question is why we need to define
it?


--denghui

MichalPolkoráb

Software Developer


Mlynské Nivy 56 / 821 05 Bratislava / Slovakia
+421 918 378 907
/ michal.polkorab@...
reception: +421 2 206 65 111
/ www.pantheon.sk

logo