09-02-2016 11:22 AM - edited 03-01-2019 04:31 AM
Howdy,
Where do we have documented the Uniq library? I know we have the CiscoDevNet/uniq on github.com but unless I am missing something, I can't find where all calls are documented. When I look under uniq/apis/nb/ I see some of the functions in the library but I don't see everything.
Any pointers would be highly appreciated.
Ivan Villalobos
Solved! Go to Solution.
09-02-2016 12:56 PM
This is generated from swagger.
You can look at swagger on the controller or use help() in Python.
Let me write up some examples.
Adam
Sent from my iPhone
09-02-2016 11:28 AM
I have the same question and I couldn't find ti either. But I found most of classes, functions have nice comments.
Wonder if there is a tool extract the comment as reference guide.
example:
class ClientManager(object): |
""" Client manager to interact with API Clients of various services. """ |
def __init__(self, server, username, password, base_url, protocol="https", port=None): |
""" Object initializer |
Initializer also authenticates using the credentials, and stores the generated |
authentication ticket/token. |
Args: |
server (str): cluster server name (routable DNS addess or ip) |
username (str): user name to authenticate with |
password (str): password to authenticate with |
port (str): port number |
service (str): service to which the api calls are to be made |
connect (bool): flag to authenticate and establish api client |
"""
09-02-2016 12:56 PM
This is generated from swagger.
You can look at swagger on the controller or use help() in Python.
Let me write up some examples.
Adam
Sent from my iPhone
09-02-2016 01:49 PM
I tried "pydoc" looks like easy to use.
clone uniq to my local
go to that directory the execute "pydoc -g"
Click on open browser, that bring us views of all modules then find "uniq" we will get the uniq package contents
Package Contents | |||||
|
Some links I got nice doc
for example
http://localhost:7464/uniq.utils.wait.html
but some I got the errors like the following.
problem in ./uniq/apis/client_manager.py - <type 'exceptions.SyntaxError'>: Non-ASCII character '\xe2' in file ./uniq/apis/client_manager.py on line 158, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (client_manager.py, line 157)
09-02-2016 02:16 PM
Update
So I was running pydoc 2.7 after running 3.5 thing getting better.
09-06-2016 11:21 AM
Thank you Adam,
This is basically the documentation on developer.cisco.com but it helps that I can test it directly on my server.
What I am missing is the name of the functions I can use in Python. For instance, from one of your scripts, I see this call:
pnpproject.getPnpSiteByRange()
I know that is call for GET /pnp-project. Also, pnpproject.getPnpSiteDevicesBySiteNameAndRange(), is that a call to GET /pnp-device? Where would I find this documentation?
yawchen, have you been able to figure this out?
09-06-2016 12:02 PM
04-19-2017 10:37 PM
hi all
I am trying to install uniq environment in virtualbox using github and trying to load maglev platform on that. But am getting below errors while updating recent packages.
build/temp.linux-x86_64-3.5/_openssl.c:434:30: fatal error: openssl/opensslv.h: No such file or directory
#include <openssl/opensslv.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
can anyone suggest me how to install the uniq environment with maglev platform. Any docs will be appreciated.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide