Brian,

You are correct;  the URL listed in the original email is the one for
network-topology, while the payload is the one for inventory.

Chenzhuowen,

Please try to use the payload described in the wiki article Andrej
suggested [1].

Regards,

Ryan Goulding

[1] https://wiki.opendaylight.org/view/OpenDaylight_Controller:
Config:Examples:Netconf#Spawning_netconf_connectors_
via_topology_configuration

<https://wiki.opendaylight.org/view/OpenDaylight_Controller:Config:Examples:Netconf#Spawning_netconf_connectors_via_topology_configuration>
On Tue, Sep 27, 2016 at 9:25 AM, FREEMAN, BRIAN D <[email protected]> wrote:

> For POST to Config:modules don’t you need a different path :  inventory
> not topology ?
>
>
>
> {{cfg}}/opendaylight-inventory:nodes/node/controller-config/yang-ext:
> mount/config:modules
>
>
>
> The network-topology path uses the newer payload not to the Config:modules
> payload.
>
>
>
> Of course I could be confused.
>
>
>
> Brian
>
>
>
>
>
>
>
> *From:* [email protected] [mailto:
> [email protected]] *On Behalf Of *Andrej Mak -X
> (andmak - PANTHEON TECHNOLOGIES at Cisco)
> *Sent:* Tuesday, September 27, 2016 5:32 AM
> *To:* 陈卓文; discuss; netconf-dev
> *Subject:* Re: [OpenDaylight Discuss] [netconf-dev] Cannot connect
> NETCONF [ Error sending request - : Data already exists for path:]
>
>
>
> Hi,
>
>
>
> I’ve tried your request directly via REST client (without Dlux) and it has
> worked fine.
>
> As far as I know, Dlux Custom API request accepts only json payload, but
> I’ve got the same error when I’ve transformed your payload to json.
>
> It seems, that there is an issue in Dlux, so please try to contact Dlux
> devs.
>
>
>
> You should also consider spawning netconf connectors via topology
> configuration. It is more convenient than using config subsystem.
>
> https://wiki.opendaylight.org/view/OpenDaylight_Controller:
> Config:Examples:Netconf#Spawning_netconf_connectors_
> via_topology_configuration
>
>
>
> Hope that helps
>
> Andrej Mak
>
>
>
> *From:* [email protected] [
> mailto:[email protected]
> <[email protected]>] *On Behalf Of *???
> *Sent:* 26. septembra 2016 10:20
> *To:* discuss <[email protected]>; netconf-dev <
> [email protected]>
> *Subject:* [netconf-dev] Cannot connect NETCONF [ Error sending request -
> : Data already exists for path:]
>
>
>
> Hi all:
>
>
>
> I am working on NETCONF in ODL. I used YangUI (in ODL Dlux Web) to POST a
> request to connect a device(notepeer).
>
>
>
> I custom a api "http://localhost:8181/restconf/config/network-
> topology:network-topology/topology/topology-netconf/
> node/controller-config/yang-ext:mount/config:modules", And API data:
>
> ```
>
> <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>new-netconf-device</name>
>
>   <address xmlns="urn:opendaylight:params:xml:ns:yang:controller:
> md:sal:connector:netconf">127.0.0.1</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">root</username>
>
>   <password xmlns="urn:opendaylight:params:xml:ns:yang:controller:
> md:sal:connector:netconf">root</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>
>
>   <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>
>
> ```
>
>
>
> When i send POST request , error happen "Error sending request - : Data
> already exists for path: /(urn:opendaylight:params:xml:
> ns:yang:controller:config?revision=2013-04-05)modules".
>
>
>
> How to fix it ?
>
>
>
>
>
> Thanks.
>
>
>
>
>
>
>
> _______________________________________________
> netconf-dev mailing list
> [email protected]
> https://lists.opendaylight.org/mailman/listinfo/netconf-dev
>
>
_______________________________________________
Discuss mailing list
[email protected]
https://lists.opendaylight.org/mailman/listinfo/discuss

Reply via email to