Opendaylight-如何控制哪些数据进入哪个分片

时间:2018-09-11 06:43:25

标签: java akka opendaylight ietf-netmod-yang ietf-netconf

我正在开发一个应用程序,该应用程序需要一些输入,运行一些算法,并根据结果,使用Opendaylight建立到Netconf服务器的连接。我正在遵循《 ODL Netconf用户指南》,并且一切正常。

以下是我的yang模块之一:

module openroadm-config {
namespace "urn:opendaylight:openroadm-config";
prefix "openroadm-config";

import device-cluster { prefix device-cluster; revision-date 2017-01-08; }
import ietf-yang-types { prefix ietf-yang-types; revision-date 2013-07-15; }
import ietf-inet-types { prefix ietf-inet-types; revision-date 2013-07-15; }
import ietf-netconf { prefix ietf-nc; revision-date 2011-06-01; }
import org-openroadm-common-types { prefix org-openroadm-common-types; revision-date 2017-09-29; }
import org-openroadm-resource-types { prefix org-openroadm-resource-types; revision-date 2017-09-29; }
import org-openroadm-physical-types { prefix org-openroadm-physical-types; revision-date 2017-09-29; }
import org-openroadm-user-mgmt { prefix org-openroadm-user-mgmt; revision-date 2017-09-29; }
import org-openroadm-port-types { prefix org-openroadm-port-types; revision-date 2017-09-29; }
import org-openroadm-interfaces { prefix org-openroadm-interfaces; revision-date 2017-06-26; }
import org-openroadm-swdl { prefix org-openroadm-swdl; revision-date 2017-09-29; }
import org-openroadm-equipment-states-types { prefix org-openroadm-equipment-states-types; revision-date 2017-06-26; }
import org-openroadm-device { prefix org-openroadm-device; revision-date 2017-09-29; }

revision 2018-04-12 {
    description "Initial revision";
}

grouping openroadm-device-common-details {
    uses org-openroadm-device:device-common;

    leaf max-degrees {
        config false;
        type uint16;
        description
                    "Max. number of degrees supported by device";
    }

    leaf max-srgs {
        config false;
        type uint16;
        description
                    "Max. number of SRGs in an add/drop group";
    }

    leaf max-num-bin-15min-historical-pm {
        config false;
        type uint16;
        description
                    "Max. number of bin the NE support for 15min historical PM";
    }

    leaf max-num-bin-24hour-historical-pm {
        config false;
        type uint16;
        description
                    "Max. number of bin the NE support for 24hour historical PM";
    }
}

grouping openroadm-list {

    list openroadm-device-list {
        key node-id;
        uses openroadm-device-common-details;
    }

}

container openroadm-device-list-container {
    uses openroadm-list;
}

container openroadm-data {
    uses openroadm-device-common-details;
}

rpc openroadm-set {
    input {
        uses openroadm-list;
    }
    output {
        uses device-cluster:rpc-response-status;
    }
}

rpc openroadm-get {
    input {
        list openroadm-ids {
            key openroadm-device-id;
            leaf openroadm-device-id {
                description "The openroadm device id";
                type string;
            }
        }
    }
    output {
        uses openroadm-list;
    }
}

}

默认情况下,opendaylight中有4个分片-默认,烤面包机,库存和拓扑,还有2个数据存储-操作和配置。所有与拓扑有关的信息(例如Netconf连接器凭据)都存储在拓扑碎片中(我认为)。

我的问题是,应用程序中定义的数据存储在哪个分片中?是否可以控制我的数据进入的分片?如果是,该怎么办?它与我的yang文件中定义的名称空间有关吗?

1 个答案:

答案 0 :(得分:2)

您的数据存储在默认分片中。分片由yang模块名称空间控制-请参阅configuration / initial / modules.conf和configuration / initial / module-shards.conf文件。任何未专门放置在其自己的分片中的yang模块都将放入默认分片中。