如何从OpenDaylight中删除操作节点?

时间:2015-01-14 17:19:13

标签: xml rest opendaylight

尝试添加netconf服务器挂载点,打破了我的OpenDaylight安装。我相信如果我可以删除我添加到操作清单中的节点(/ restconf / operational / opendaylight-inventory:nodes / node / netconfserver),我可以修复系统。怎么能删除?关于我如何破坏ODL的详细信息如下。


我尝试按照示例OpenDaylight Controller:Config:Examples:Netconf将OpenDaylight连接到netconf服务器。我将以下curl请求发送到正在运行的opendaylight服务器:

curl -v -X POST -H" Content-Type:application / xml" -T ./mount_netconfserver.xml -u admin:admin http://localhost:8181/restconf/config/opendaylight-inventory:nodes/node/controller-config/yang-ext:mount/config:modules

mount_netconfserver.xml:

<snapshot>
 <configuration>
  <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
   <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
    <module>
     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">prefix:sal-netconf-connector</type>
     <name>netconf_server</name>
     <port xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">8181</port>
     <username xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">admin</username>
     <address xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">*address_removed_for_privacy*</address>
     <tcp-only xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">false</tcp-only>
     <password xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">admin</password>
     <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>
   </modules>
  </data>
 </configuration>
 <required-capabilities>
  <![CDATA[urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf?module=odl-sal-netconf-connector-cfg&revision=2013-10-28]]>
 </required-capabilities>
</snapshot>

之后,OpenDaylight的命令行开始给我这个错误,dlux接口会没有响应,如果我尝试发送命令,命令行将开始抛出空指针异常。当我重新启动ODL时,ODL会暂时运行。

!ENTRY org.apache.oltu.oauth2.resourceserver 4 0 2015-01-13 15:53:18.047
!MESSAGE FrameworkEvent ERROR
!STACK 0
java.io.IOException: Exception in opening zip file: /opt/distribution-karaf-0.2.1-Helium-SR1/data/cache/org.eclipse.osgi/bundles/207/1/bundlefile
    at org.eclipse.osgi.framework.util.SecureAction.getZipFile(SecureAction.java:291)
    ...

1 个答案:

答案 0 :(得分:0)

你在找这个吗?

控制器正在运行时销毁Netconf连接器

使用RESTCONF还可以销毁模块的实例。在netconf连接器的情况下,模块将被销毁,netconf连接被丢弃并且所有资源都将被清除。为此,只需向以下URL发出DELETE请求:  http://localhost:8181/restconf/config/opendaylight-inventory:nodes/node/controller-config/yang-ext:mount/config:modules/module/odl-sal-netconf-connector-cfg:sal-netconf-connector/new-netconf-device