Configuring GRPC

For information about this feature, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-installation-and-configuration-guides-list.html

Configuring the GRPC Port Number

Configuring the GRPC Port Number
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "grpcInst": {
          "attributes": {
            "port": "sample_value"
}}}]}}
{
    imdata:[]
}
<System>
  <grpc-items>
    <port>sample_value</port>
  </grpc-items>
</System>

Note: This example was added in Release 9.3(5).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

grpc port sample_value


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
topSystem sys
grpcInst sys/grpc


grpcInst Properties

The following table contains information about the grpcInst properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
portscalar:Uint32
Specifies the port number on which the grpc Agent listens
RANGE: [1024 , 65535]
DEFAULT: 50051


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting the GRPC Port Number

Deleting the GRPC Port Number
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "grpcInst": {
          "attributes": {
            "port": "DME_UNSET_PROPERTY_MARKER"
}}}]}}
{
    imdata:[]
}
      <System>
        <grpc-items>
          <port nc:operation="delete">sample_value</port>
        </grpc-items>
      </System>

Note:

  • When you delete the port, it falls back to its default value of 50051
  • This example was added in Release 9.3(5).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no grpc port sample_value


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
topSystem sys
grpcInst sys/grpc


grpcInst Properties

The following table contains information about the grpcInst properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
portscalar:Uint32
Specifies the port number on which the grpc Agent listens
RANGE: [1024 , 65535]
DEFAULT: 50051


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Configuring the Certificate Id

Configuring the Certificate Id
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "grpcInst": {
          "attributes": {
            "cert": "SampleString_123"
}}}]}}
{
    imdata:[]
}
<System>
  <grpc-items>
    <cert>SampleString_123</cert>
  </grpc-items>
</System>

Note:

  • This example was added in Release 9.3(5).
  • If grpc has a 1-Day certificate or a certificate configured in the conf file, in the model, "cert" property will be seen as empty. When grpc certificate is configured using the CLI, "cert" will have the value of the configured certificate .


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

grpc certificate SampleString_123


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
topSystem sys
grpcInst sys/grpc


grpcInst Properties

The following table contains information about the grpcInst properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
certos:OsString
(naming:Name)
Specifies the certificate to be used for TLS authentication
RANGE: The size of the certificate that can be accepted. The grpc certificate size should be between 0 and 64.


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting the Certificate Id

Deleting the Certificate Id
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "grpcInst": {
          "attributes": {
            "cert": "DME_UNSET_PROPERTY_MARKER"
}}}]}}
{
    imdata:[]
}
  <System>
    <grpc-items>
      <cert nc:operation="delete">SampleString_123</cert>
    </grpc-items>
  </System>

After you delete the certificate, it goes back to the default value.

Note:

  • This example was added in Release 9.3(5).
  • After delete, it falls back to the certificate configured using conf file if present or the default 1-Day certificate.


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no grpc certificate SampleString_123


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
topSystem sys
grpcInst sys/grpc


grpcInst Properties

The following table contains information about the grpcInst properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
certos:OsString
(naming:Name)
Specifies the certificate to be used for TLS authentication
RANGE: The size of the certificate that can be accepted. The grpc certificate size should be between 0 and 64.


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

GRPC Set VRF

GRPC Set VRF
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "grpcInst": {
          "attributes": {
            "useVrf": "default"
}}}]}}
{
    imdata:[]
}
  <System>
    <grpc-items>
      <useVrf>default</useVrf>
    </grpc-items>
  </System>

Note:

  • When feature grpc is enabled, by default grpc is enabled over "management" interface. In the model, "useVrf" property will be seen as empty, if grpc is enabled only for management interface. When grpc is enabled for default vrf, "useVrf" property will have the value "default".
  • This exampl e was added in Release 9.3(5).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

grpc use-vrf default


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
topSystem sys
grpcInst sys/grpc


grpcInst Properties

The following table contains information about the grpcInst properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
useVrfos:OsString(naming:Name)|Vrf to be used for grpc communication.The only value that useVrf can have is 'default'


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting the GRPC Set VRF

Deleting the GRPC Set VRF
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "grpcInst": {
          "attributes": {
            "useVrf": "DME_UNSET_PROPERTY_MARKER"
}}}]}}
{
    imdata:[]
}
  <System>
    <grpc-items>
      <useVrf nc:operation="delete">default</useVrf>
    </grpc-items>
  </System>

Note: This example was added in Release 9.3(5).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no grpc use-vrf default


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
topSystem sys
grpcInst sys/grpc


grpcInst Properties

The following table contains information about the grpcInst properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
useVrfos:OsString(naming:Name)|Vrf to be used for grpc communication.The only value that useVrf can have is 'default'


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Configuring the Max Concurrent Calls for GRPC GNMI

Configuring the Max Concurrent Calls for GRPC GNMI 
POST http://<mgmt0_IP>/api/mo/sys/grpc.json
{
  "grpcInst": {
    "children": [
      {
        "grpcGnmi": {
          "attributes": {
            "maxCalls": "sample_value"
}}}]}}
{
    imdata:[]
}
      <System>
        <grpc-items>
          <gnmi-items>
            <maxCalls>sample_value</maxCalls>
          </gnmi-items>
        </grpc-items>
      </System>

Note: This example was added in Release 9.3(5).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

grpc gnmi max-concurrent-calls sample_value


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
grpcInst sys/grpc
grpcGnmi sys/grpc/gnmi


grpcGnmi Properties

The following table contains information about the grpcGnmi properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
maxCallsscalar:Uint16
Specifies the maximum number of concurrent calls to gnmi.
RANGE: [1 , 16]
DEFAULT: 8


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting the Max Concurrent Calls for GRPC GNMI

Deleting the Max Concurrent Calls for GRPC GNMI 
POST http://<mgmt0_IP>/api/mo/sys/grpc.json
{
  "grpcInst": {
    "children": [
      {
        "grpcGnmi": {
          "attributes": {
           "maxCalls": "DME_UNSET_PROPERTY_MARKER"
}}}]}}
{
    imdata:[]
}
<System>
    <grpc-items>
      <gnmi-items>
        <maxCalls nc:operation="delete">sample_value</maxCalls>
      </gnmi-items>
    </grpc-items>
</System>

Note: This example was added in Release 9.3(5).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no grpc gnmi max-concurrent-calls sample_value


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
grpcInst sys/grpc
grpcGnmi sys/grpc/gnmi


grpcGnmi Properties

The following table contains information about the grpcGnmi properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
maxCallsscalar:Uint16
Specifies the maximum number of concurrent calls to gnmi.
RANGE: [1 , 16]
DEFAULT: 8


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html