Closed dangleminh closed 3 months ago
Hi,
The error comes from the gnxi library we use, which checks the node name against a regex. As the code comment states, hat regex comes from RFC 6020 which states:
Identifiers are used to identify different kinds of YANG items by
name. Each identifier starts with an uppercase or lowercase ASCII
letter or an underscore character, followed by zero or more ASCII
letters, digits, underscore characters, hyphens, and dots.
Implementations MUST support identifiers up to 64 characters in
length. Identifiers are case sensitive. The identifier syntax is
formally defined by the rule "identifier" in [Section 12](https://datatracker.ietf.org/doc/html/rfc6020#section-12). Identifiers
can be specified as quoted or unquoted strings.
Note, spaces or whitespace are not included in this. There is a discussion about whitespace and escaping right before this section in 6.1.3. @srebhan will ask upstream for confirmation as to the support of whitespace.
@dangleminh I asked for clarification of the standard in https://github.com/openconfig/reference/issues/209, let's wait for an answer and then see how we continue...
steering away from this convo a bit but any reason why you cannot use the EOS native + the OpenConfig paths to read the same info, for instance EOS version information is stored in /Eos/image
gnmic -a 10.1.1.1:6030 -u admin -p admin --gzip --insecure get --path "eos_native:/Eos/image"
[
{
"source": "10.1.1.1:6030",
"timestamp": 1716995120650759369,
"time": "2024-05-29T16:05:20.650759369+01:00",
"prefix": "eos_native:Eos/image",
"updates": [
{
"Path": "serialNum",
"values": {
"serialNum": "65312759-2bab-4913-9769-0aebaaf046dc"
}
},
{
"Path": "version",
"values": {
"version": "4.31.3M"
}
},
{
"Path": "buildHost",
"values": {
"buildHost": "dhcp-244-252-129.sjc.aristanetworks.com"
}
},
{
"Path": "buildTime",
"values": {
"buildTime": 1714379144000000000
}
},
{
"Path": "name",
"values": {
"name": "image"
}
},
{
"Path": "flavor",
"values": {
"flavor": "DEFAULT"
}
},
{
"Path": "release",
"values": {
"release": "36737551.4313M"
}
},
{
"Path": "variant",
"values": {
"variant": "US"
}
},
{
"Path": "arch",
"values": {
"arch": "x86_64"
}
},
{
"Path": "blessed",
"values": {
"blessed": true
}
},
{
"Path": "displayVersion",
"values": {
"displayVersion": "4.31.3M"
}
}
]
}
]
serial number can be found in OC in /components/component/state/serial-no
system mac address in OC in /components/component/state/base-mac-address
MemAvailable
and MemUtilized
are in /components/component/state/memory
HTH!
Just wanted to add on here, as I am running into the same issue, however, there doesn't appear to be a eos_native or openconfig spec on the information I need.
gnmic -a 10.10.10.10:6030 -u admin -p admin --insecure get --gzip --encoding json --path "cli:/show dot1x hosts"
Output:
[
{
"source": "10.10.10.10:6030",
"timestamp": 1717620389701535774,
"time": "2024-06-05T15:46:29.701535774-05:00",
"updates": [
{
"Path": "cli:show dot1x hosts",
"values": {
"show dot1x hosts": {
"intfSupplicantsDict": {
"Ethernet10": {
"supplicants": {
"aa:aa:de:ad:be:ef": {
"authMethod": "EAPOL",
"authStage": "SUCCESS",
"cachedAuthAtLinkDown": false,
"fallback": "NONE",
"reauthTimeoutSeen": false,
"supplicantMac": "aa:aa:de:ad:be:ef",
"vlanId": ""
}
}
}
}
}
}
}
]
}
]
But I am receiving a similar error:
Error running agent: could not initialize input inputs.gnmi: invalid string path show dot1x hosts: invalid node name: "show dot1x hosts"
@josh-silvas you are running a get
but the plugin only supports subscriptions... Did you try with subscribing to that path?
Hello! I am closing this issue due to inactivity. I hope you were able to resolve your problem, if not please try posting this question in our Community Slack or Community Forums or provide additional details in this issue and reqeust that it be re-opened. Thank you!
Use Case
We are using gnmi input but seems space doesnt work for path, please see below:
Getting the error:
Expected behavior
path is required space as every cli in the network OS contains space. Openconfig gnmic can support space as below:
Actual behavior
Openconfig gnmic can support space as below:
Additional info
No response