In [1]:
run ../learning_lab/01_device_mount.py
Python Library Documentation: function device_mount in module basics.inventory
device_mount(device_name, device_address, device_port, device_username, device_password)
Add the specified network device to the inventory of the Controller.
device_mount(xrvr-2, 172.16.1.75, cisco, 830, cisco)
In [2]:
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[2]:
HTTP request/response: 1 2
Request
Method
GET
URL
http://127.0.0.1:8181/restconf/config/opendaylight-inventory:nodes
Headers
User-Agent
python-requests/2.2.1 CPython/3.4.0 Linux/3.13.0-45-generic
Accept-Encoding
gzip, deflate, compress
Authorization
Basic YWRtaW46YWRtaW4=
Accept
application/xml
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-1</id>
</node>
<node>
<id>controller-config</id>
</node>
</nodes>
HTTP request/response: 1 2
Request
Method
POST
URL
http://127.0.0.1:8181/restconf/config/opendaylight-inventory:nodes/node/controller-config/yang-ext:mount/config:modules
Headers
User-Agent
python-requests/2.2.1 CPython/3.4.0 Linux/3.13.0-45-generic
Content-Type
application/xml
Accept
*/*
Accept-Encoding
gzip, deflate, compress
Authorization
Basic YWRtaW46YWRtaW4=
Content-Length
2380
Content
<?xml version='1.0' encoding='ASCII'?>
<module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">prefix:sal-netconf-connector</type>
<name>xrvr-2</name>
<address xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">172.16.1.75</address>
<port xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">830</port>
<username xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">cisco</username>
<password xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">cisco</password>
<tcp-only xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">false</tcp-only>
<event-executor xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netty">prefix:netty-event-executor</type>
<name>global-event-executor</name>
</event-executor>
<binding-registry xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">prefix:binding-broker-osgi-registry</type>
<name>binding-osgi-broker</name>
</binding-registry>
<dom-registry xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">prefix:dom-broker-osgi-registry</type>
<name>dom-broker</name>
</dom-registry>
<client-dispatcher xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:config:netconf">prefix:netconf-client-dispatcher</type>
<name>global-netconf-dispatcher</name>
</client-dispatcher>
<processing-executor xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:threadpool">
prefix:threadpool</type>
<name>global-netconf-processing-executor</name>
</processing-executor>
</module>
Response
Status Code
204
Headers
server
Jetty(8.1.14.v20131031)
Content
Content source: SivagnanamCiena/cosc-learning-labs
Similar notebooks: