cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3214
Views
5
Helpful
1
Replies

Does anyone have a comprehensive list of XML tags?

I have the below, are there any that I'm missing?

    • merge (default): the template changes will be merged with the existing template
    • replace: the template configuration will be replaced by the new configuration
    • create: the template will create those nodes which does not exist. If a node already exists this will result in an error.
    • nocreate: the merge will only affect configuration items that already exist in the template. It will never create the configuration with this tag, or any associated commands inside it. It will only modify existing configuration structures.
    • delete: delete anything from this point
1 Accepted Solution

Accepted Solutions

joepak
Cisco Employee
Cisco Employee

Please follow:

 

/install/doc/html/nso_development/ch11s03s07.html

 

and see that you have all the available template tags listed :) for ease of access, here is what the above reference shows:

 

Template tag operations

Templates allow for defining different behaviour when applying the template. This is accomplished by setting tags, as an attribute. Existing tags are: merge, replace, delete, create or nocreate on relevant nodes in the template. A tag in inherited to its sub-nodes until a new tag is introduced.

  • merge: Merge with a node if it exists, otherwise create the node. This is the default operation if no operation is explicitly set.

    ...
    <config tags="merge">
      <interface xmlns="urn:ios">
    ...

     

  • replace: Replace a node if it exists, otherwise create the node.

    ...
    <GigabitEthernet tags="replace">
      <name>{link/interface-number}</name>
      <description tags="merge">Link to PE</description>
    ...

     

  • create: Creates a node. The node can not already exist. An error is raised if the node exists.

    ...
    <GigabitEthernet tags="create">
      <name>{link/interface-number}</name>
      <description tags="merge">Link to PE</description>
    ...

     

  • nocreate: Merge with a node if it exists. If it does not exist, it will not be created.

    ...
    <GigabitEthernet tags="nocreate">
      <name>{link/interface-number}</name>
      <description tags="merge">Link to PE</description>
    ...

     

  • delete: Delete the node.

    ...
    <GigabitEthernet tags="delete">
      <name>{link/interface-number}</name>
      <description tags="merge">Link to PE</description>
    ...

View solution in original post

1 Reply 1

joepak
Cisco Employee
Cisco Employee

Please follow:

 

/install/doc/html/nso_development/ch11s03s07.html

 

and see that you have all the available template tags listed :) for ease of access, here is what the above reference shows:

 

Template tag operations

Templates allow for defining different behaviour when applying the template. This is accomplished by setting tags, as an attribute. Existing tags are: merge, replace, delete, create or nocreate on relevant nodes in the template. A tag in inherited to its sub-nodes until a new tag is introduced.

  • merge: Merge with a node if it exists, otherwise create the node. This is the default operation if no operation is explicitly set.

    ...
    <config tags="merge">
      <interface xmlns="urn:ios">
    ...

     

  • replace: Replace a node if it exists, otherwise create the node.

    ...
    <GigabitEthernet tags="replace">
      <name>{link/interface-number}</name>
      <description tags="merge">Link to PE</description>
    ...

     

  • create: Creates a node. The node can not already exist. An error is raised if the node exists.

    ...
    <GigabitEthernet tags="create">
      <name>{link/interface-number}</name>
      <description tags="merge">Link to PE</description>
    ...

     

  • nocreate: Merge with a node if it exists. If it does not exist, it will not be created.

    ...
    <GigabitEthernet tags="nocreate">
      <name>{link/interface-number}</name>
      <description tags="merge">Link to PE</description>
    ...

     

  • delete: Delete the node.

    ...
    <GigabitEthernet tags="delete">
      <name>{link/interface-number}</name>
      <description tags="merge">Link to PE</description>
    ...
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the NSO Developer community: