Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I create ip address by gnmi set? #170

Open
evanjack2002 opened this issue Oct 30, 2023 · 1 comment
Open

Can I create ip address by gnmi set? #170

evanjack2002 opened this issue Oct 30, 2023 · 1 comment
Assignees

Comments

@evanjack2002
Copy link

Hi Sirs,

I can get IP address from CONFIG_DB/INTERFACE.

root@sonic:/# gnmi_get -insecure -target_addr 127.0.0.1:50051 \
 -xpath /sonic-db:CONFIG_DB/INTERFACE
== getRequest:
prefix: <
>
path: <
  origin: "sonic-db"
  elem: <
    name: "CONFIG_DB"
  >
  elem: <
    name: "INTERFACE"
  >
>
encoding: JSON_IETF

== getResponse:
notification: <
  timestamp: 1698638295759206190
  prefix: <
  >
  update: <
    path: <
      origin: "sonic-db"
      elem: <
        name: "CONFIG_DB"
      >
      elem: <
        name: "INTERFACE"
      >
    >
    val: <
      json_ietf_val: "{\"Ethernet0\":{\"NULL\":\"NULL\"},\"Ethernet0|1.1.2.1/24\":{\"\":\"\",\"NULL\":\"NULL\"},\"Ethernet0|1.1.3.1/24\":{\"NULL\":\"NULL\"},\"Ethernet0|10.0.0.0/31\":{\"NULL\":\"NULL\"},\"Ethernet1\":{\"NULL\":\"NULL\"},\"Ethernet10\":{\"NULL\":\"NULL\"},\"Ethernet10|10.0.0.20/31\":{\"NULL\":\"NULL\"},\"Ethernet11\":{\"NULL\":\"NULL\"},\"Ethernet11|10.0.0.22/31\":{\"NULL\":\"NULL\"},\"Ethernet12\":{\"NULL\":\"NULL\"},\"Ethernet12|10.0.0.24/31\":{\"NULL\":\"NULL\"},\"Ethernet13\":{\"NULL\":\"NULL\"},\"Ethernet13|10.0.0.26/31\":{\"NULL\":\"NULL\"},\"Ethernet14\":{\"NULL\":\"NULL\"},\"Ethernet14|10.0.0.28/31\":{\"NULL\":\"NULL\"},\"Ethernet15\":{\"NULL\":\"NULL\"},\"Ethernet15|10.0.0.30/31\":{\"NULL\":\"NULL\"},\"Ethernet16\":{\"NULL\":\"NULL\"},\"Ethernet16|10.0.0.32/31\":{\"NULL\":\"NULL\"},\"Ethernet17\":{\"NULL\":\"NULL\"},\"Ethernet17|10.0.0.34/31\":{\"NULL\":\"NULL\"},\"Ethernet18\":{\"NULL\":\"NULL\"},\"Ethernet18|10.0.0.36/31\":{\"NULL\":\"NULL\"},\"Ethernet19\":{\"NULL\":\"NULL\"},\"Ethernet19|10.0.0.38/31\":{\"NULL\":\"NULL\"},\"Ethernet1|10.0.0.2/31\":{\"NULL\":\"NULL\"},\"Ethernet2\":{\"NULL\":\"NULL\"},\"Ethernet20\":{\"NULL\":\"NULL\"},\"Ethernet20|10.0.0.40/31\":{\"NULL\":\"NULL\"},\"Ethernet21\":{\"NULL\":\"NULL\"},\"Ethernet21|10.0.0.42/31\":{\"NULL\":\"NULL\"},\"Ethernet22\":{\"NULL\":\"NULL\"},\"Ethernet22|10.0.0.44/31\":{\"NULL\":\"NULL\"},\"Ethernet23\":{\"NULL\":\"NULL\"},\"Ethernet23|10.0.0.46/31\":{\"NULL\":\"NULL\"},\"Ethernet24\":{\"NULL\":\"NULL\"},\"Ethernet24|10.0.0.48/31\":{\"NULL\":\"NULL\"},\"Ethernet25\":{\"NULL\":\"NULL\"},\"Ethernet25|10.0.0.50/31\":{\"NULL\":\"NULL\"},\"Ethernet26\":{\"NULL\":\"NULL\"},\"Ethernet26|10.0.0.52/31\":{\"NULL\":\"NULL\"},\"Ethernet27\":{\"NULL\":\"NULL\"},\"Ethernet27|10.0.0.54/31\":{\"NULL\":\"NULL\"},\"Ethernet28\":{\"NULL\":\"NULL\"},\"Ethernet28|10.0.0.56/31\":{\"NULL\":\"NULL\"},\"Ethernet29\":{\"NULL\":\"NULL\"},\"Ethernet29|10.0.0.58/31\":{\"NULL\":\"NULL\"},\"Ethernet2|10.0.0.4/31\":{\"NULL\":\"NULL\"},\"Ethernet3\":{\"NULL\":\"NULL\"},\"Ethernet30\":{\"NULL\":\"NULL\"},\"Ethernet30|10.0.0.60/31\":{\"NULL\":\"NULL\"},\"Ethernet31\":{\"NULL\":\"NULL\"},\"Ethernet31|10.0.0.62/31\":{\"NULL\":\"NULL\"},\"Ethernet32\":{\"NULL\":\"NULL\"},\"Ethernet32|10.0.0.64/31\":{\"NULL\":\"NULL\"},\"Ethernet33\":{\"NULL\":\"NULL\"},\"Ethernet33|10.0.0.66/31\":{\"NULL\":\"NULL\"},\"Ethernet34\":{\"NULL\":\"NULL\"},\"Ethernet34|10.0.0.68/31\":{\"NULL\":\"NULL\"},\"Ethernet35\":{\"NULL\":\"NULL\"},\"Ethernet35|10.0.0.70/31\":{\"NULL\":\"NULL\"},\"Ethernet36\":{\"NULL\":\"NULL\"},\"Ethernet36|10.0.0.72/31\":{\"NULL\":\"NULL\"},\"Ethernet37\":{\"NULL\":\"NULL\"},\"Ethernet37|10.0.0.74/31\":{\"NULL\":\"NULL\"},\"Ethernet38\":{\"NULL\":\"NULL\"},\"Ethernet38|10.0.0.76/31\":{\"NULL\":\"NULL\"},\"Ethernet39\":{\"NULL\":\"NULL\"},\"Ethernet39|10.0.0.78/31\":{\"NULL\":\"NULL\"},\"Ethernet3|10.0.0.6/31\":{\"NULL\":\"NULL\"},\"Ethernet4\":{\"NULL\":\"NULL\"},\"Ethernet40\":{\"NULL\":\"NULL\"},\"Ethernet40|10.0.0.80/31\":{\"NULL\":\"NULL\"},\"Ethernet41\":{\"NULL\":\"NULL\"},\"Ethernet41|10.0.0.82/31\":{\"NULL\":\"NULL\"},\"Ethernet42\":{\"NULL\":\"NULL\"},\"Ethernet42|10.0.0.84/31\":{\"NULL\":\"NULL\"},\"Ethernet43\":{\"NULL\":\"NULL\"},\"Ethernet43|10.0.0.86/31\":{\"NULL\":\"NULL\"},\"Ethernet44\":{\"NULL\":\"NULL\"},\"Ethernet44|10.0.0.88/31\":{\"NULL\":\"NULL\"},\"Ethernet45\":{\"NULL\":\"NULL\"},\"Ethernet45|10.0.0.90/31\":{\"NULL\":\"NULL\"},\"Ethernet46\":{\"NULL\":\"NULL\"},\"Ethernet46|10.0.0.92/31\":{\"NULL\":\"NULL\"},\"Ethernet47\":{\"NULL\":\"NULL\"},\"Ethernet47|10.0.0.94/31\":{\"NULL\":\"NULL\"},\"Ethernet48\":{\"NULL\":\"NULL\"},\"Ethernet48|10.0.0.96/31\":{\"NULL\":\"NULL\"},\"Ethernet49\":{\"NULL\":\"NULL\"},\"Ethernet49|10.0.0.98/31\":{\"NULL\":\"NULL\"},\"Ethernet4|10.0.0.8/31\":{\"NULL\":\"NULL\"},\"Ethernet5\":{\"NULL\":\"NULL\"},\"Ethernet50\":{\"NULL\":\"NULL\"},\"Ethernet50|10.0.0.100/31\":{\"NULL\":\"NULL\"},\"Ethernet51\":{\"NULL\":\"NULL\"},\"Ethernet51|10.0.0.102/31\":{\"NULL\":\"NULL\"},\"Ethernet52\":{\"NULL\":\"NULL\"},\"Ethernet52|10.0.0.104/31\":{\"NULL\":\"NULL\"},\"Ethernet53\":{\"NULL\":\"NULL\"},\"Ethernet53|10.0.0.106/31\":{\"NULL\":\"NULL\"},\"Ethernet54\":{\"NULL\":\"NULL\"},\"Ethernet54|10.0.0.108/31\":{\"NULL\":\"NULL\"},\"Ethernet55\":{\"NULL\":\"NULL\"},\"Ethernet55|10.0.0.110/31\":{\"NULL\":\"NULL\"},\"Ethernet5|10.0.0.10/31\":{\"NULL\":\"NULL\"},\"Ethernet6\":{\"NULL\":\"NULL\"},\"Ethernet6|10.0.0.12/31\":{\"NULL\":\"NULL\"},\"Ethernet7\":{\"NULL\":\"NULL\"},\"Ethernet7|10.0.0.14/31\":{\"NULL\":\"NULL\"},\"Ethernet8\":{\"NULL\":\"NULL\"},\"Ethernet8|10.0.0.16/31\":{\"NULL\":\"NULL\"},\"Ethernet9\":{\"NULL\":\"NULL\"},\"Ethernet9|10.0.0.18/31\":{\"NULL\":\"NULL\"}}"
    >
  >
>

Can I create a new IP address into CONFIG_DB/INTERFACE?
For example: Ethernet0|2.2.2.2/24

gnmi_set -insecure -target_addr 127.0.0.1:50051 \
 -update /sonic-db:CONFIG_DB/INTERFACE:@./2.2.2.2.txt

Thanks.

@anand-kumar-subramanian
Copy link
Contributor

This is not an UMF issue as the path accessed here is the SONIC DB path. This needs to be root caused by the corresponding team that developed this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants