Ask is moving to Stack Overflow and Serverfault.com! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

Revision history [back]

click to hide/show revision 1
initial version

Could not connect physical network device by NETCONF

Hi all,

I want to connect physical network device by NETCONF in OpenDaylight. The physical network device is mx5, and I use the Boron.

I refer the following URL. http://docs.opendaylight.org/en/stable-boron/user-guide/netconf-user-guide.html

I issued the following API to establish NETCONF connection, and no errors outputed.

curl --user "admin":"admin" -H "Accept: application/xml" -H "Content-type: application/xml" -X POST http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules -d '
<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>mx5-1</name>
  <address xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">device address</address>
  <port xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">22</port>
  <username xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">admin</username>
  <password xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">password</password>
  <yang-module-capabilities xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
    <capability xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
      urn:ietf:params:xml:ns:yang:ietf-inet-types?module=ietf-inet-types&amp;revision=2010-09-24
    </capability>
  </yang-module-capabilities>
  <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>
  <keepalive-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:scheduled-threadpool</type>
    <name>global-netconf-ssh-scheduled-executor</name>
  </keepalive-executor>
</module>'

As long as watching network topology, it seemd to succeed in connection.

curl -u admin:admin -H "Content-Type: application/json" -X GET http://localhost:8181/restconf/operational/network-topology:network-topology/topology/topology-netconf/node/mx5-1/ -s | python -m json.tool
{
    "node": [
        {
            "netconf-node-topology:available-capabilities": {
                "available-capability": [
                    "http://xml.juniper.net/netconf/junos/1.0",
                    "urn:ietf:params:xml:ns:netconf:capability:candidate:1.0",
                    "urn:ietf:params:netconf:capability:confirmed-commit:1.0",
                    "http://xml.juniper.net/dmi/system/1.0",
                    "urn:ietf:params:netconf:capability:url:1.0?scheme=http,ftp,file",
                    "urn:ietf:params:netconf:capability:candidate:1.0",
                    "urn:ietf:params:xml:ns:netconf:capability:confirmed-commit:1.0",
                    "urn:ietf:params:netconf:capability:validate:1.0",
                    "urn:ietf:params:xml:ns:netconf:base:1.0",
                    "urn:ietf:params:xml:ns:netconf:capability:url:1.0?protocol=http,ftp,file",
                    "(urn:ietf:params:xml:ns:yang:ietf-inet-types?revision=2010-09-24)ietf-inet-types",
                    "urn:ietf:params:xml:ns:netconf:capability:validate:1.0",
                    "urn:ietf:params:netconf:base:1.0"
                ]
            },
            "netconf-node-topology:connection-status": "connected",
            "netconf-node-topology:host": "device address",
            "netconf-node-topology:port": 22,
            "netconf-node-topology:unavailable-capabilities": {},
            "node-id": "mx5-1"
        }
    ]
}

But, when I issued the API to get the configulation of the physical network device, an error occuered.

curl -u admin:admin -H "Content-Type: application/json" -X GET http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/mx5-1/yang-ext:mount -s | python -m json.tool
{
    "errors": {
        "error": [
            {
                "error-message": "Request could not be completed because the relevant data model content does not exist ",
                "error-tag": "data-missing",
                "error-type": "application"
            }
        ]
    }
}

Warnings were outputed in log of the OpenDaylight.

2016-12-27 15:18:58,842 | WARN  | oupCloseable-3-2 | NetconfDeviceCommunicator        | 302 - org.opendaylight.netconf.sal-netconf-connector - 1.4.1.Boron-SR1 | RemoteDevice{mx5-1}: Session terminated Session closed
2016-12-27 15:18:58,859 | WARN  | oupCloseable-3-2 | ReadOnlyTx                       | 302 - org.opendaylight.netconf.sal-netconf-connector - 1.4.1.Boron-SR1 | RemoteDevice{mx5-1}: Reading data failed
2016-12-27 15:19:01,129 | WARN  | sing-executor-19 | NetconfDevice                    | 302 - org.opendaylight.netconf.sal-netconf-connector - 1.4.1.Boron-SR1 | RemoteDevice{mx5-1}: Netconf device does not provide all yang models reported in hello message capabilities, required but not provided: [(urn:ietf:params:xml:ns:yang:ietf-inet-types?revision=2010-09-24)ietf-inet-types]
2016-12-27 15:19:01,131 | WARN  | sing-executor-19 | NetconfDevice                    | 302 - org.opendaylight.netconf.sal-netconf-connector - 1.4.1.Boron-SR1 | RemoteDevice{mx5-1}: Attempting to build schema context from required sources

Is there the point that is wrong by issuing of API? Or, I added Yang module at the time of the establishment of the NETCONF connection, but was the method of adding Yang module wrong?

Thanks, Wataru

Could not connect physical network device by NETCONF

Hi all,

I want to connect physical network device by NETCONF in OpenDaylight. The physical network device is mx5, and I use the Boron.

I refer the following URL. http://docs.opendaylight.org/en/stable-boron/user-guide/netconf-user-guide.html

I issued the following API to establish NETCONF connection, and no errors outputed.

curl --user "admin":"admin" -H "Accept: application/xml" -H "Content-type: application/xml" -X POST http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules -d '
<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>mx5-1</name>
  <address xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">device address</address>
  <port xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">22</port>
  <username xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">admin</username>
  <password xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">password</password>
  <yang-module-capabilities xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
    <capability xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
      urn:ietf:params:xml:ns:yang:ietf-inet-types?module=ietf-inet-types&amp;revision=2010-09-24
    </capability>
  </yang-module-capabilities>
  <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>
  <keepalive-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:scheduled-threadpool</type>
    <name>global-netconf-ssh-scheduled-executor</name>
  </keepalive-executor>
</module>'
...

As long as watching network topology, it seemd to succeed in connection.

curl -u admin:admin -H "Content-Type: application/json" -X GET http://localhost:8181/restconf/operational/network-topology:network-topology/topology/topology-netconf/node/mx5-1/ -s | python -m json.tool
{
    "node": [
        {
            "netconf-node-topology:available-capabilities": {
                "available-capability": [
                    "http://xml.juniper.net/netconf/junos/1.0",
                    "urn:ietf:params:xml:ns:netconf:capability:candidate:1.0",
                    "urn:ietf:params:netconf:capability:confirmed-commit:1.0",
                    "http://xml.juniper.net/dmi/system/1.0",
                    "urn:ietf:params:netconf:capability:url:1.0?scheme=http,ftp,file",
                    "urn:ietf:params:netconf:capability:candidate:1.0",
                    "urn:ietf:params:xml:ns:netconf:capability:confirmed-commit:1.0",
                    "urn:ietf:params:netconf:capability:validate:1.0",
                    "urn:ietf:params:xml:ns:netconf:base:1.0",
                    "urn:ietf:params:xml:ns:netconf:capability:url:1.0?protocol=http,ftp,file",
                    "(urn:ietf:params:xml:ns:yang:ietf-inet-types?revision=2010-09-24)ietf-inet-types",
                    "urn:ietf:params:xml:ns:netconf:capability:validate:1.0",
                    "urn:ietf:params:netconf:base:1.0"
                ]
            },
...
            "netconf-node-topology:connection-status": "connected",
            "netconf-node-topology:host": "device address",
            "netconf-node-topology:port": 22,
            "netconf-node-topology:unavailable-capabilities": {},
            "node-id": "mx5-1"
        }
    ]
}

But, when I issued the API to get the configulation of the physical network device, an error occuered.

curl -u admin:admin -H "Content-Type: application/json" -X GET http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/mx5-1/yang-ext:mount -s | python -m json.tool
{
    "errors": {
        "error": [
            {
                "error-message": "Request could not be completed because the relevant data model content does not exist ",
                "error-tag": "data-missing",
                "error-type": "application"
            }
        ]
    }
}

Warnings were outputed in log of the OpenDaylight.

2016-12-27 15:18:58,842 | WARN  | oupCloseable-3-2 | NetconfDeviceCommunicator        | 302 - org.opendaylight.netconf.sal-netconf-connector - 1.4.1.Boron-SR1 | RemoteDevice{mx5-1}: Session terminated Session closed
2016-12-27 15:18:58,859 | WARN  | oupCloseable-3-2 | ReadOnlyTx                       | 302 - org.opendaylight.netconf.sal-netconf-connector - 1.4.1.Boron-SR1 | RemoteDevice{mx5-1}: Reading data failed
2016-12-27 15:19:01,129 | WARN  | sing-executor-19 | NetconfDevice                    | 302 - org.opendaylight.netconf.sal-netconf-connector - 1.4.1.Boron-SR1 | RemoteDevice{mx5-1}: Netconf device does not provide all yang models reported in hello message capabilities, required but not provided: [(urn:ietf:params:xml:ns:yang:ietf-inet-types?revision=2010-09-24)ietf-inet-types]
2016-12-27 15:19:01,131 | WARN  | sing-executor-19 | NetconfDevice                    | 302 - org.opendaylight.netconf.sal-netconf-connector - 1.4.1.Boron-SR1 | RemoteDevice{mx5-1}: Attempting to build schema context from required sources

Is there the point that is wrong by issuing of API? Or, I added Yang module at the time of the establishment of the NETCONF connection, but was the method of adding Yang module wrong?

Thanks, Wataru

Could not connect physical network device by NETCONF

Hi all,

I want to connect physical network device by NETCONF in OpenDaylight. The physical network device is mx5, and I use the Boron.

Boron. I refer the following this URL. http://docs.opendaylight.org/en/stable-boron/user-guide/netconf-user-guide.html

I issued the following API to establish NETCONF connection, and no errors outputed.

curl --user "admin":"admin" -H "Accept: application/xml" -H "Content-type: application/xml" -X POST http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules -d '
<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>mx5-1</name>
  <address xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">device address</address>
  <port xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">22</port>
  <username xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">admin</username>
  <password xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">password</password>
  <yang-module-capabilities xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
    <capability xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
      urn:ietf:params:xml:ns:yang:ietf-inet-types?module=ietf-inet-types&amp;revision=2010-09-24
    </capability>
  </yang-module-capabilities>
  <tcp-only xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">false</tcp-only>
  ...

As long as watching network topology, it seemd to succeed in connection.

curl -u admin:admin -H "Content-Type: application/json" -X GET http://localhost:8181/restconf/operational/network-topology:network-topology/topology/topology-netconf/node/mx5-1/ -s | python -m json.tool
...
            "netconf-node-topology:connection-status": "connected",
            "netconf-node-topology:host": "device address",
            "netconf-node-topology:port": 22,
            "netconf-node-topology:unavailable-capabilities": {},
            "node-id": "mx5-1"
        }
    ]
}

But, when I issued the API to get the configulation of the physical network device, an error occuered.

curl -u admin:admin -H "Content-Type: application/json" -X GET http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/mx5-1/yang-ext:mount -s | python -m json.tool
{
    "errors": {
        "error": [
            {
                "error-message": "Request could not be completed because the relevant data model content does not exist ",
                "error-tag": "data-missing",
                "error-type": "application"
            }
        ]
    }
}

Warnings were outputed in log of the OpenDaylight.

2016-12-27 15:18:58,842 | WARN  | oupCloseable-3-2 | NetconfDeviceCommunicator        | 302 - org.opendaylight.netconf.sal-netconf-connector - 1.4.1.Boron-SR1 | RemoteDevice{mx5-1}: Session terminated Session closed
2016-12-27 15:18:58,859 | WARN  | oupCloseable-3-2 | ReadOnlyTx                       | 302 - org.opendaylight.netconf.sal-netconf-connector - 1.4.1.Boron-SR1 | RemoteDevice{mx5-1}: Reading data failed
2016-12-27 15:19:01,129 | WARN  | sing-executor-19 | NetconfDevice                    | 302 - org.opendaylight.netconf.sal-netconf-connector - 1.4.1.Boron-SR1 | RemoteDevice{mx5-1}: Netconf device does not provide all yang models reported in hello message capabilities, required but not provided: [(urn:ietf:params:xml:ns:yang:ietf-inet-types?revision=2010-09-24)ietf-inet-types]
2016-12-27 15:19:01,131 | WARN  | sing-executor-19 | NetconfDevice                    | 302 - org.opendaylight.netconf.sal-netconf-connector - 1.4.1.Boron-SR1 | RemoteDevice{mx5-1}: Attempting to build schema context from required sources

Is there the point that is wrong by issuing of API? Or, I added Yang module at the time of the establishment of the NETCONF connection, but was the method of adding Yang module wrong?

Thanks, Wataru

Could not connect physical network device by NETCONF

Hi all,

I want to connect physical network device by NETCONF in OpenDaylight. The physical network device is mx5, and I use the Boron. I refer this URL. http://docs.opendaylight.org/en/stable-boron/user-guide/netconf-user-guide.html

I issued the following API to establish NETCONF connection, and no errors outputed.

curl --user "admin":"admin" -H "Accept: application/xml" -H "Content-type: application/xml" -X POST http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules -d '
<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>mx5-1</name>
  <address xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">device address</address>
  <port xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">22</port>
  <username xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">admin</username>
  <password xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">password</password>
  <yang-module-capabilities xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
    <capability xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
      urn:ietf:params:xml:ns:yang:ietf-inet-types?module=ietf-inet-types&amp;revision=2010-09-24
    </capability>
  </yang-module-capabilities>
  ...

As long as watching network topology, it seemd to succeed in connection.

curl -u admin:admin -H "Content-Type: application/json" -X GET http://localhost:8181/restconf/operational/network-topology:network-topology/topology/topology-netconf/node/mx5-1/ http://172.26.201.109:8181/restconf/operational/network-topology:network-topology/topology/topology-netconf/node/mx5-1/ -s | python -m json.tool
...
{
    "node": [
        {
            "netconf-node-topology:available-capabilities": {
                "available-capability": [
                    "http://xml.juniper.net/netconf/junos/1.0",
                    "urn:ietf:params:xml:ns:netconf:capability:candidate:1.0",
                    "urn:ietf:params:netconf:capability:confirmed-commit:1.0",
                    "http://xml.juniper.net/dmi/system/1.0",
                    "urn:ietf:params:netconf:capability:url:1.0?scheme=http,ftp,file",
                    "urn:ietf:params:netconf:capability:candidate:1.0",
                    "urn:ietf:params:xml:ns:netconf:capability:confirmed-commit:1.0",
                    "urn:ietf:params:netconf:capability:validate:1.0",
                    "urn:ietf:params:xml:ns:netconf:base:1.0",
                    "urn:ietf:params:xml:ns:netconf:capability:url:1.0?protocol=http,ftp,file",
                    "(urn:ietf:params:xml:ns:yang:ietf-inet-types?revision=2010-09-24)ietf-inet-types",
                    "urn:ietf:params:xml:ns:netconf:capability:validate:1.0",
                    "urn:ietf:params:netconf:base:1.0"
                ]
            },
            "netconf-node-topology:connection-status": "connected",
            "netconf-node-topology:host": "device address",
"172.26.218.237",
            "netconf-node-topology:port": 22,
830,
            "netconf-node-topology:unavailable-capabilities": {},
            "node-id": "mx5-1"
        }
    ]
}

But, when I issued the API to get the configulation of the physical network device, an error occuered.

curl -u admin:admin -H "Content-Type: application/json" -X GET http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/mx5-1/yang-ext:mount -s | python -m json.tool
{
    "errors": {
        "error": [
            {
                "error-message": "Request could not be completed because the relevant data model content does not exist ",
                "error-tag": "data-missing",
                "error-type": "application"
            }
        ]
    }
}

Warnings were outputed in log of the OpenDaylight.

2016-12-27 15:18:58,842 | WARN  | oupCloseable-3-2 | NetconfDeviceCommunicator        | 302 - org.opendaylight.netconf.sal-netconf-connector - 1.4.1.Boron-SR1 | RemoteDevice{mx5-1}: Session terminated Session closed
2016-12-27 15:18:58,859 | WARN  | oupCloseable-3-2 | ReadOnlyTx                       | 302 - org.opendaylight.netconf.sal-netconf-connector - 1.4.1.Boron-SR1 | RemoteDevice{mx5-1}: Reading data failed
2016-12-27 15:19:01,129 | WARN  | sing-executor-19 | NetconfDevice                    | 302 - org.opendaylight.netconf.sal-netconf-connector - 1.4.1.Boron-SR1 | RemoteDevice{mx5-1}: Netconf device does not provide all yang models reported in hello message capabilities, required but not provided: [(urn:ietf:params:xml:ns:yang:ietf-inet-types?revision=2010-09-24)ietf-inet-types]
2016-12-27 15:19:01,131 | WARN  | sing-executor-19 | NetconfDevice                    | 302 - org.opendaylight.netconf.sal-netconf-connector - 1.4.1.Boron-SR1 | RemoteDevice{mx5-1}: Attempting to build schema context from required sources

Is there the point that is wrong by issuing of API? Or, I added Yang module at the time of the establishment of the NETCONF connection, was the method of adding Yang module wrong?

Thanks, Wataru