ODL version: distribution-karaf-0.4.0-Beryllium
NETCONF server: OVS 2.3.1 + of-config server (https://github.com/openvswitch/of-config/)
Steps:
1. Create a netconf-connector for the NETCONF server. Verify it's been successfully created:
Issue GET http://10.74.113.18:8181/restconf/operational/network-topology:network-topology/topology/topology-netconf/
And get response:
{
"topology": [
{
"topology-id": "topology-netconf",
"node": [
{
"node-id": "controller-config",
"netconf-node-topology:connection-status": "connected",
"netconf-node-topology:unavailable-capabilities": {},
"netconf-node-topology:available-capabilities":
{
"available-capability": [
"(urn:opendaylight:params:xml:ns:yang:controller:config:actor-system-provider:impl?revision=2015-10-05)actor-system-provider-impl",
"(urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?revision=2013-10-28)opendaylight-md-sal-binding",
"(urn:opendaylight:params:xml:ns:yang:controller:config:cluster-admin-provider?revision=2015-10-13)cluster-admin-provider",
"urn:ietf:params:netconf:capability:candidate:1.0",
"(urn:opendaylight:netconf-node-inventory?revision=2014-01-08)netconf-node-inventory",
"urn:ietf:params:netconf:capability:exi:1.0",
"(urn:opendaylight:params:xml:ns:yang:controller:md:sal:clustering:entity-owners?revision=2015-08-04)entity-owners",
"(urn:opendaylight:params:xml:ns:yang:controller:md:sal:cluster:admin?revision=2015-10-13)cluster-admin",
"(urn:ietf:params:xml:ns:netconf:notification:1.0?revision=2008-07-14)notifications",
"(urn:opendaylight:params:xml:ns:yang:controller:netconf:northbound:notification?revision=2015-08-06)netconf-northbound-notification",
"(urn:ietf:params:xml:ns:yang:ietf-restconf?revision=2013-10-19)ietf-restconf",
"(urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf?revision=2015-08-03)odl-sal-netconf-connector-cfg",
"(urn:opendaylight:params:xml:ns:yang:ofconfig:southbound:v12:api:impl?revision=2015-09-01)ofconfig-southbound-v12-api-impl",
"(urn:opendaylight:params:xml:ns:yang:controller:netconf:northbound:tcp?revision=2015-04-23)netconf-northbound-tcp",
"(urn:opendaylight:inventory?revision=2013-08-19)opendaylight-inventory",
"(urn:ietf:params:xml:ns:yang:ietf-inet-types?revision=2010-09-24)ietf-inet-types",
"(urn:ietf:params:xml:ns:yang:iana-afn-safi?revision=2013-07-04)iana-afn-safi",
"(urn:onf:config:yang?revision=2015-02-11)of-config",
"(urn:opendaylight:l2:types?revision=2013-08-27)opendaylight-l2-types",
"(urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:pingpong?revision=2014-11-07)opendaylight-pingpong-broker",
"(config:aaa:authn:h2:store?revision=2015-11-28)aaa-h2-store",
"(urn:opendaylight:params:xml:ns:yang:controller:netconf:mdsal:notification?revision=2015-08-03)netconf-mdsal-notification",
"(urn:TBD:params:xml:ns:yang:ospf-topology?revision=2013-10-21)ospf-topology",
"(urn:opendaylight:yang:extension:yang-ext?revision=2013-07-09)yang-ext",
"(urn:opendaylight:params:xml:ns:yang:controller:threadpool:impl:fixed?revision=2013-12-01)threadpool-impl-fixed",
"(urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl?revision=2013-10-28)opendaylight-sal-binding-broker-impl",
"(urn:opendaylight:params:xml:ns:yang:controller:netty:eventexecutor?revision=2013-11-12)netty-event-executor",
"(urn:opendaylight:params:xml:ns:yang:controller:md:sal:remote?revision=2014-01-14)sal-remote",
"(urn:opendaylight:params:xml:ns:yang:ofconfig:southbound:impl?revision=2015-09-01)ofconfig-southbound-impl",
"(urn:ietf:params:xml:ns:yang:ietf-network-topology?revision=2015-06-08)ietf-network-topology",
"(urn:opendaylight:params:xml:ns:yang:controller:config:distributed-datastore-provider?revision=2014-06-12)distributed-datastore-provider",
"(config:aaa:authn:idmlight?revision=2015-12-04)aaa-idmlight",
"(urn:ietf:params:xml:ns:yang:ietf-network?revision=2015-06-08)ietf-network",
"(urn:ietf:params:xml:ns:netmod:notification?revision=2008-07-14)nc-notifications",
"(urn:opendaylight:params:xml:ns:yang:controller:shutdown:impl?revision=2013-12-18)shutdown-impl",
"(urn:opendaylight:params:xml:ns:yang:controller:netconf:north:mapper?revision=2015-01-14)netconf-northbound-mapper",
"(urn:opendaylight:params:xml:ns:yang:ofconfig12?revision=2015-09-01)odl-ofconfig12",
"(urn:ietf:params:xml:ns:yang:ospf-topology?revision=2013-07-12)ospf-topology",
"(urn:ietf:params:xml:ns:yang:ietf-netconf-notifications?revision=2012-02-06)ietf-netconf-notifications",
"(urn:opendaylight:params:xml:ns:yang:controller:config:distributed-entity-ownership-service?revision=2015-08-10)distributed-entity-ownership-service",
"(urn:opendaylight:params:xml:ns:yang:controller:config:concurrent-data-broker?revision=2014-11-24)odl-concurrent-data-broker-cfg",
"(config:aaa:authn:netconf:plugin?revision=2015-07-15)aaa-authn-netconf-plugin",
"(urn:opendaylight:params:xml:ns:yang:controller:config:netconf:auth?revision=2015-07-15)netconf-auth",
"(urn:opendaylight:params:xml:ns:yang:controller:netconf:mdsal:mapper?revision=2015-01-14)netconf-mdsal-mapper",
"(urn:opendaylight:params:xml:ns:yang:controller:netconf:mdsal:monitoring?revision=2015-02-18)netconf-mdsal-monitoring",
"(urn:opendaylight:params:xml:ns:yang:ofconfig:topology?revision=2015-09-01)odl-ofconfig-topology",
"urn:ietf:params:netconf:capability:notification:1.0",
"(urn:opendaylight:params:xml:ns:yang:controller:config:netconf?revision=2014-04-08)odl-netconf-cfg",
"(urn:opendaylight:params:xml:ns:yang:controller:md:sal:core:spi:config-dom-store?revision=2014-06-17)opendaylight-config-dom-datastore",
"(urn:ietf:params:xml:ns:yang:rpc-context?revision=2013-06-17)rpc-context",
"(urn:opendaylight:params:xml:ns:yang:controller:protocol:framework?revision=2014-03-13)protocol-framework",
"(urn:ietf:params:xml:ns:yang:ietf-inet-types?revision=2013-07-15)ietf-inet-types",
"(urn:opendaylight:params:xml:ns:yang:controller:md:sal:common?revision=2013-10-28)opendaylight-md-sal-common",
"(urn:opendaylight:netconf-node-topology?revision=2015-01-14)netconf-node-topology",
"(urn:opendaylight:params:xml:ns:yang:controller:threadpool:impl:flexible?revision=2013-12-01)threadpool-impl-flexible",
"(urn:opendaylight:params:xml:ns:yang:controller:threadpool:impl?revision=2013-04-05)threadpool-impl",
"(urn:opendaylight:params:xml:ns:yang:controller:config?revision=2013-04-05)config",
"(urn:ietf:params:xml:ns:yang:iana-if-type?revision=2014-05-08)iana-if-type",
"(urn:opendaylight:params:xml:ns:yang:controller:shutdown?revision=2013-12-18)shutdown",
"(urn:opendaylight:params:xml:ns:yang:controller:netconf:topology:shared:schema:repository?revision=2015-07-27)shared-schema-repository",
"(urn:opendaylight:params:xml:ns:yang:ofconfig:ver12:api?revision=2015-09-01)odl-ofconfig-ver12-api",
"(urn:TBD:params:xml:ns:yang:nt:l3-unicast-igp-topology?revision=2013-07-12)l3-unicast-igp-topology",
"(urn:opendaylight:params:xml:ns:yang:controller:config:netconf:northbound?revision=2015-01-14)netconf-northbound",
"(urn:TBD:params:xml:ns:yang:network:isis-topology?revision=2013-10-21)isis-topology",
"(urn:opendaylight:params:xml:ns:yang:controller:md:sal:core:general-entity?revision=2015-08-20)general-entity",
"(urn:opendaylight:params:xml:ns:yang:controller:config:netconf:northbound:impl?revision=2015-01-12)netconf-northbound-impl",
"(urn:opendaylight:params:xml:ns:yang:controller:netconf:northbound:ssh?revision=2015-01-14)netconf-northbound-ssh",
"(urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom?revision=2013-10-28)opendaylight-md-sal-dom",
"(urn:sal:restconf:event:subscription?revision=2014-07-08)sal-remote-augment",
"(urn:opendaylight:params:xml:ns:yang:controller:config:netconf:client:dispatcher?revision=2014-04-08)odl-netconfig-client-cfg",
"(urn:opendaylight:params:xml:ns:yang:controller:netconf:northbound:notification:impl?revision=2015-08-07)netconf-northbound-notification-impl",
"(urn:opendaylight:params:xml:ns:yang:controller:netty:threadgroup?revision=2013-11-07)threadgroup",
"(urn:opendaylight:params:xml:ns:yang:controller:md:sal:core:spi:operational-dom-store?revision=2014-06-17)opendaylight-operational-dom-datastore",
"(urn:opendaylight:params:xml:ns:yang:controller:threadpool:impl:scheduled?revision=2013-12-01)threadpool-impl-scheduled",
"(urn:opendaylight:params:xml:ns:yang:controller:threadpool?revision=2013-04-09)threadpool",
"(urn:opendaylight:params:xml:ns:yang:aaa:credential-store?revision=2015-02-26)credential-store",
"(urn:opendaylight:params:xml:ns:yang:controller:netty?revision=2013-11-19)netty",
"(urn:TBD:params:xml:ns:yang:network:ted?revision=2013-07-12)ted",
"(urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring-extension?revision=2013-12-10)ietf-netconf-monitoring-extension",
"(urn:opendaylight:params:xml:ns:yang:ofconfig:base?revision=2015-09-01)odl-ofconfig-base",
"(urn:ietf:params:xml:ns:yang:ietf-yang-types?revision=2010-09-24)ietf-yang-types",
"(urn:opendaylight:params:xml:ns:yang:controller:inmemory-datastore-provider?revision=2014-06-17)opendaylight-inmemory-datastore-provider",
"(urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:impl?revision=2013-10-28)opendaylight-sal-dom-broker-impl",
"(urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)network-topology",
"(urn:opendaylight:params:xml:ns:yang:ofconfig:types?revision=2015-09-01)odl-ofconfig-types",
"(urn:opendaylight:params:xml:ns:yang:controller:md:sal:rest:connector?revision=2014-07-24)opendaylight-rest-connector",
"(urn:TBD:params:xml:ns:yang:network:ted?revision=2013-10-21)ted",
"(urn:opendaylight:params:xml:ns:yang:controller:config:actor-system-provider:service?revision=2015-10-05)actor-system-provider-service",
"(urn:opendaylight:params:xml:ns:yang:ofconfig:southbound:base:api:impl?revision=2015-09-01)ofconfig-southbound-base-api-impl",
"(urn:TBD:params:xml:ns:yang:network-topology?revision=2013-07-12)network-topology",
"(urn:opendaylight:params:xml:ns:yang:controller:sal:restconf:service?revision=2015-07-08)sal-restconf-service",
"(urn:opendaylight:params:xml:ns:yang:controller:netty:timer?revision=2013-11-19)netty-timer",
"(urn:ietf:params:xml:ns:yang:ietf-interfaces?revision=2014-05-08)ietf-interfaces",
"(urn:opendaylight:params:xml:ns:yang:ofconfig:ver12:api:types?revision=2015-09-01)odl-ofconfig-ver12-api-types",
"(urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)ietf-netconf",
"(urn:opendaylight:params:xml:ns:yang:controller:md:sal:core:spi:entity-ownership-service?revision=2015-08-10)opendaylight-entity-ownership-service",
"urn:ietf:params:netconf:base:1.0",
"(urn:opendaylight:params:xml:ns:yang:controller:clustered:netconf:topology?revision=2015-11-04)clustered-netconf-topology",
"(urn:TBD:params:xml:ns:yang:network:isis-topology?revision=2013-07-12)isis-topology",
"(urn:opendaylight:params:xml:ns:yang:controller:config:remote-rpc-connector?revision=2014-07-07)remote-rpc-connector",
"(urn:opendaylight:params:xml:ns:yang:ofconfig:base:types?revision=2015-09-01)odl-ofconfig-base-api-types",
"(urn:opendaylight:params:xml:ns:yang:ofconfig:base:api?revision=2015-09-01)odl-ofconfig-api",
"(urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring?revision=2010-10-04)ietf-netconf-monitoring",
"(urn:ietf:params:xml:ns:yang:ietf-yang-types?revision=2013-07-15)ietf-yang-types",
"(urn:TBD:params:xml:ns:yang:nt:l3-unicast-igp-topology?revision=2013-10-21)l3-unicast-igp-topology",
"(urn:opendaylight:params:xml:ns:yang:controller:netconf:topology?revision=2015-07-27)netconf-topology",
"urn:ietf:params:netconf:base:1.1"
]
}
,
"netconf-node-topology:host": "127.0.0.1",
"netconf-node-topology:port": 1830
},
{
"node-id": "myovs",
"netconf-node-topology:connection-status": "connected",
"netconf-node-topology:unavailable-capabilities": {},
"netconf-node-topology:available-capabilities":
{
"available-capability": [
"(urn:ietf:params:xml:ns:netconf:notification:1.0?revision=2008-07-14)notifications",
"urn:ietf:params:netconf:capability:interleave:1.0",
"urn:ietf:params:netconf:capability:candidate:1.0",
"(urn:ietf:params:xml:ns:yang:ietf-netconf-server?revision=2014-01-24)ietf-netconf-server",
"(urn:ietf:params:xml:ns:yang:ietf-inet-types?revision=2010-09-24)ietf-inet-types",
"(urn:onf:config:yang?revision=2015-02-11)of-config",
"urn:ietf:params:netconf:capability:rollback-on-error:1.0",
"(urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-03-08)ietf-netconf",
"urn:ietf:params:netconf:capability:validate:1.0",
"urn:ietf:params:netconf:capability:validate:1.1",
"(urn:ietf:params:xml:ns:netmod:notification?revision=2008-07-14)nc-notifications",
"urn:ietf:params:netconf:capability:url:1.0?scheme=scp,file",
"urn:ietf:params:netconf:capability:startup:1.0",
"(urn:ietf:params:xml:ns:yang:ietf-netconf-acm?revision=2012-02-22)ietf-netconf-acm",
"urn:ietf:params:netconf:capability:notification:1.0",
"(urn:ietf:params:xml:ns:yang:ietf-netconf-notifications?revision=2011-08-07)ietf-netconf-notifications",
"(urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults?revision=2010-06-09)ietf-netconf-with-defaults",
"urn:ietf:params:netconf:capability:with-defaults:1.0?basic-mode=explicit&also-supported=report-all,report-all-tagged,trim,explicit",
"urn:ietf:params:netconf:capability:writable-running:1.0",
"(urn:ietf:params:xml:ns:yang:ietf-x509-cert-to-name?revision=2013-03-26)ietf-x509-cert-to-name",
"urn:ietf:params:netconf:base:1.0",
"(urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring?revision=2010-10-04)ietf-netconf-monitoring",
"(urn:ietf:params:xml:ns:yang:ietf-yang-types?revision=2013-07-15)ietf-yang-types",
"urn:ietf:params:netconf:base:1.1"
]
}
,
"netconf-node-topology:host": "10.74.113.26",
"netconf-node-topology:port": 830
},
{
"node-id": "ofconfig-device",
"netconf-node-topology:connection-status": "connecting",
"netconf-node-topology:host": "127.0.0.1",
"netconf-node-topology:port": 830
}
]
}
]
2. Create a logical switch by calling handle_logic_switch:
Issue POST http://10.74.113.18:8181/restconf/operations/odl-ofconfig-ver12-api:handle_logic_switch
{
"input":
{
"handle_mode":"put",
"topo-capable-switch-node-id":"myovs",
"switch":[
{
"id":"mybridge1",
"datapath-id":"AA:AA:AA:AA:AA:AA:AA:01"
}
]
}
}
And then use GET http://10.74.113.18:8080/restconf/config/network-topology:network-topology/topology/topology-netconf/node/myovs/yang-ext:mount/ to verify the logical switch has been created, the response is:
{
"of-config:capable-switch": {
"logical-switches": {
"switch": [
{
"id": "mybridge1",
"lost-connection-behavior": "failSecureMode",
"datapath-id": "aa:aa:aa:aa:aa:aa:aa:01"
}
]
},
"id": "openvswitch"
}
}
3. Next want to call handle_controllers to configure controller info for this logical switch. But I cannot retrieve topo-logical-switch-node-id by GET http://10.74.113.18:8181/restconf/operational/network-topology:network-topology/topology/topology-netconf/, the response does not contain the logical switch as a node.