Пример #1
0
  /**
   * Sets the config's value to all leaf if leaf's config statement is not specified.
   *
   * @param leaves list of leaf attributes of container
   * @param leafLists list of leaf-list attributes of container
   */
  private void setDefaultConfigValueToChild(List<YangLeaf> leaves, List<YangLeafList> leafLists) {

    /*
     * If "config" is not specified, the default is the same as the parent
     * schema node's "config" value.
     */
    if (leaves != null) {
      for (YangLeaf leaf : leaves) {
        if (leaf.isConfig() == null) {
          leaf.setConfig(isConfig);
        }
      }
    }

    /*
     * If "config" is not specified, the default is the same as the parent
     * schema node's "config" value.
     */
    if (leafLists != null) {
      for (YangLeafList leafList : leafLists) {
        if (leafList.isConfig() == null) {
          leafList.setConfig(isConfig);
        }
      }
    }
  }