+++ /dev/null
-/*
- * ============LICENSE_START========================================================================
- * ONAP : tr-069-adapter
- * =================================================================================================
- * Copyright (C) 2020 CommScope Inc Intellectual Property.
- * =================================================================================================
- * This tr-069-adapter software file is distributed by CommScope Inc under the Apache License,
- * Version 2.0 (the "License"); you may not use this file except in compliance with the License. You
- * may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
- * either express or implied. See the License for the specific language governing permissions and
- * limitations under the License.
- * ===============LICENSE_END=======================================================================
- */
-
-package org.commscope.tr069adapter.mapper;\r
-\r
-import java.io.File;\r
-import java.io.IOException;\r
-\r
-import org.apache.commons.io.FileUtils;\r
-import org.commscope.tr069adapter.acs.common.DeviceRPCRequest;\r
-import org.commscope.tr069adapter.acs.common.dto.TR069OperationCode;\r
-import org.commscope.tr069adapter.mapper.util.MOMetaDataUtil;\r
-import org.commscope.tr069adapter.mapper.util.NetconfToTr069MapperUtil;\r
-import org.w3c.dom.Element;\r
-\r
-public class Test {\r
-\r
- public static final String INDEX_STR = "index";\r
- public static final String INDEX_REGEX = "[0-9]{1,}";\r
-\r
- public static void main(String[] args) throws IOException {\r
- File file = new File("rpc_set_input.xml");\r
- String requestXML = FileUtils.readFileToString(file, "UTF-8");\r
-\r
-\r
- StringBuilder buff = new StringBuilder();\r
- for (int i = 6400; i <= 9600; i++) {\r
- buff.append(i).append(",");\r
- }\r
- System.out.println(buff.toString());\r
-\r
- MOMetaDataUtil util = new MOMetaDataUtil();\r
- util.loadMetaData();\r
- Element el = NetconfToTr069MapperUtil.convertStringToDocument(requestXML);\r
-\r
- DeviceRPCRequest req = NetconfToTr069MapperUtil.prepareTR069Request("0005B9AAAAA3", el, "rpc",\r
- TR069OperationCode.GET_PARAMETER_VALUES);\r
- req.getOpDetails()\r
- .setParmeters(util.getSupportedChildParameters(req.getOpDetails().getParmeters()));\r
-\r
- System.out.println(req);\r
-\r
- }\r
-\r
-}\r