Description

Some customers use orchestration tools that communicate via NETCONF to manage virtual-network-functions (VNFs) on NFX devices. 

This article explains how to determine what NETCONF XML RPC tags to use to stop or start a VNF.

 

Symptoms

Need to configure netconf command that would stop or start a VNF

 

Solution

To issue Junos OS commands via NETCONF, first determine the XML tag that is needed, from the NETCONF interface. The following steps show you how to stop the vSRX VNF.

  1. SSH to the device, and then issue the following command with display xml rpc :

root@jdm> request virtual-network-functions vsrx stop | display xml rpc
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/18.4R1/junos">
    <rpc>
        <request-virtual-network-functions>
                <vnf-name>vsrx
                <stop/>
        
    
    <cli>
        <banner>{master:0}
    
  1. When you actually apply the netconf command, specify the following tags:

<request-virtual-network-functions>
<vnf-name>vsrx
<stop/>
  1. Apply the following from the SSH client:

localhost:/mnt/c/Users/rng/Documents/2018$ ssh [email protected] -s netconf
[email protected]'s password:


<nc:hello xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <nc:capabilities>
    <nc:capability>urn:ietf:params:netconf:base:1.0
    <nc:capability>urn:ietf:params:netconf:capability:candidate:1.0
    <nc:capability>urn:ietf:params:netconf:capability:confirmed-commit:1.0
    <nc:capability>urn:ietf:params:netconf:capability:validate:1.0
    <nc:capability>urn:ietf:params:netconf:capability:url:1.0?protocol=http,ftp,file
    <nc:capability>urn:ietf:params:xml:ns:netconf:base:1.0?module=ietf-netconf&revision=2011-06-01
    <nc:capability>urn:ietf:params:xml:ns:netconf:capability:candidate:1.0
    <nc:capability>urn:ietf:params:xml:ns:netconf:capability:confirmed-commit:1.0
    <nc:capability>urn:ietf:params:xml:ns:netconf:capability:validate:1.0
    <nc:capability>urn:ietf:params:xml:ns:netconf:capability:url:1.0?protocol=http,ftp,file
    <nc:capability>urn:ietf:params:xml:ns:yang:ietf-inet-types?module=ietf-inet-types&revision=2013-07-15
    <nc:capability>urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring
  
  <nc:session-id>2740

]]>]]>
  1. At this point, paste the tag as follows:

<rpc>
    <request-virtual-network-functions>
      <vnf-name>vsrx
        <stop/>
    
  1. The NETCONF client will then respond with the following:

<<nc:rpc-reply xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/18.4R1/junos">
 <request-vnf-information>
 <message-string>vsrx stopped
 
  ]]>
 ]]>]]>
  1. To close the NETCONF connection, apply the following tags:

<rpc> <close-session/> 
<rpc><close-session/>
<nc:rpc-reply xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/18.4R1/junos">
<nc:ok/>

]]>]]>
  1. To start the VNF vSRX, SSH to the device, and then issue the following command with display xml rpc :

root@jdm> request virtual-network-functions start vsrx | display xml rpc   
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/18.4R1/junos">
    <rpc>
        <request-virtual-network-functions>
                <vnf-name>vsrx
                <start/>
        
    
    <cli>
        <banner>{master:0}
    
  1. The tags below can be applied to the netconf command to start the VNF vSRX. The same procedure can be followed, which was done to stop the VNF vSRX.

<request-virtual-network-functions>
<vnf-name>vsrx
<start/>

For more information, refer to NETCONF XML Management Protocol Developer Guide .

 

Modification History

2020-07-16: Modified verbiage along with response output to make it flow better