Enhance SwaggerUI to support NAPALM methods #1982
Labels
status: accepted
This issue has been accepted for implementation
type: documentation
A change or addition to the documentation
Issue type
[X] Feature request
Environment
Description
I know how to use the NetBox API directly from the CLI to get info from devices using
NAPALM
(and the works great!). However, I can't do the same thing in the SwaggerUI and I'm hoping a small change could enable me to do that.What I'm trying to accomplish is to programatically query the devices I have in NetBox (via
NAPALM
) to see if theirmodel
matches thedevice_type
(or specificallypart_number
) that I have defined in NetBox.From what I can tell,
pynetbox
doesn't have this functionalty so I'm trying to usenetbox-pyswagger
(from @jeremyschulman) to accomplish this. However, that "client" is solely based on the output gathered from/api/docs/?format=openapi
.To clarify, under the
dcim
section of Swagger, there is this option:And when you expand it, you can only pass the
id
field.After entering an
id
there and clicking the "Try It Out!" button, I can confirm (with command logging on the device in question) thatNAPALM
does connect just fine, but doesn't run anything else (due to not be told otherwise) and then disconnects.The, the response seen in Swagger is the following:
I suppose what I'm looking for is the option to pass other
method
s (via Swagger) to get the same information as I can using the CLI. I hope that makes sense. If not, let me know and I can try to explain further.The text was updated successfully, but these errors were encountered: