COSC Learning Lab: 01_inventory_mounted.py


In [3]:
run ../learning_lab/01_inventory_mounted


Python Library Documentation: function inventory_mounted in module basics.inventory

inventory_mounted()
    Names of network devices mounted on the Controller.
    
    Output a list of names.
    Mounted devices are a subset of the inventory.
    Mounted devices can be connected or not.

['xrvr-511-53U', 'xrvr-531']

In [4]:
from basics.odl_http import http_history
from basics.http import http_history_to_html
from IPython.core.display import HTML
HTML(http_history_to_html(http_history()))


Out[4]:
Request
Method GET
URL http://127.0.0.1:8181/restconf/config/opendaylight-inventory:nodes
Headers
Accept application/xml
Accept-Encoding gzip, deflate, compress
Authorization Basic YWRtaW46YWRtaW4=
User-Agent python-requests/2.2.1 CPython/3.4.0 Linux/3.13.0-45-generic
Content
Response
Status Code 200
Headers
transfer-encoding chunked
content-type application/xml
server Jetty(8.1.14.v20131031)
Content
<?xml version='1.0' encoding='ASCII'?>
<nodes xmlns="urn:opendaylight:inventory">
  <node>
    <id>xrvr-511-53U</id>
  </node>
  <node>
    <id>xrvr-531</id>
  </node>
  <node>
    <id>controller-config</id>
  </node>
</nodes>