浏览代码

HPCC-20664 Change directory layout and component names

Changed component names to be more intuitive
Moved directories to enable adding CLI and common code easily

Signed-off-by: Ken Rowland <kenneth.rowland@lexisnexisrisk.com>
Ken Rowland 6 年之前
父节点
当前提交
01102664a0
共有 70 个文件被更改,包括 114 次插入384 次删除
  1. 1 1
      configuration/CMakeLists.txt
  2. 0 270
      configuration/config2/test.cpp
  3. 18 0
      configuration/configmgr/CMakeLists.txt
  4. 0 0
      configuration/configmgr/Test/MasterTestSchema.xsd
  5. 0 0
      configuration/configmgr/Test/TestEnvironment.xml
  6. 0 0
      configuration/configmgr/Test/types.xsd
  7. 7 9
      configuration/config2/CMakeLists.txt
  8. 0 0
      configuration/configmgr/configmgrlib/ConfigPath.cpp
  9. 0 0
      configuration/configmgr/configmgrlib/ConfigPath.hpp
  10. 0 0
      configuration/configmgr/configmgrlib/EnvSupportLib.cpp
  11. 0 0
      configuration/configmgr/configmgrlib/EnvSupportLib.hpp
  12. 0 0
      configuration/configmgr/configmgrlib/EnvironmentEventHandlers.cpp
  13. 0 0
      configuration/configmgr/configmgrlib/EnvironmentEventHandlers.hpp
  14. 0 0
      configuration/configmgr/configmgrlib/EnvironmentLoader.cpp
  15. 0 0
      configuration/configmgr/configmgrlib/EnvironmentLoader.hpp
  16. 0 0
      configuration/configmgr/configmgrlib/EnvironmentMgr.cpp
  17. 0 0
      configuration/configmgr/configmgrlib/EnvironmentMgr.hpp
  18. 0 0
      configuration/configmgr/configmgrlib/EnvironmentNode.cpp
  19. 0 0
      configuration/configmgr/configmgrlib/EnvironmentNode.hpp
  20. 0 0
      configuration/configmgr/configmgrlib/EnvironmentValue.cpp
  21. 0 0
      configuration/configmgr/configmgrlib/EnvironmentValue.hpp
  22. 0 0
      configuration/configmgr/configmgrlib/Exceptions.hpp
  23. 0 0
      configuration/configmgr/configmgrlib/InsertableItem.cpp
  24. 0 0
      configuration/configmgr/configmgrlib/InsertableItem.hpp
  25. 0 0
      configuration/configmgr/configmgrlib/NameValue.hpp
  26. 0 0
      configuration/configmgr/configmgrlib/SchemaItem.cpp
  27. 0 0
      configuration/configmgr/configmgrlib/SchemaItem.hpp
  28. 0 0
      configuration/configmgr/configmgrlib/SchemaParser.cpp
  29. 0 0
      configuration/configmgr/configmgrlib/SchemaParser.hpp
  30. 0 0
      configuration/configmgr/configmgrlib/SchemaType.hpp
  31. 0 0
      configuration/configmgr/configmgrlib/SchemaTypeIntegerLimits.cpp
  32. 0 0
      configuration/configmgr/configmgrlib/SchemaTypeIntegerLimits.hpp
  33. 0 0
      configuration/configmgr/configmgrlib/SchemaTypeLimits.cpp
  34. 0 0
      configuration/configmgr/configmgrlib/SchemaTypeLimits.hpp
  35. 0 0
      configuration/configmgr/configmgrlib/SchemaTypeStringLimits.cpp
  36. 0 0
      configuration/configmgr/configmgrlib/SchemaTypeStringLimits.hpp
  37. 0 0
      configuration/configmgr/configmgrlib/SchemaValue.cpp
  38. 0 0
      configuration/configmgr/configmgrlib/SchemaValue.hpp
  39. 0 0
      configuration/configmgr/configmgrlib/Status.cpp
  40. 0 0
      configuration/configmgr/configmgrlib/Status.hpp
  41. 0 0
      configuration/configmgr/configmgrlib/Utils.cpp
  42. 0 0
      configuration/configmgr/configmgrlib/Utils.hpp
  43. 0 0
      configuration/configmgr/configmgrlib/XMLEnvironmentLoader.cpp
  44. 0 0
      configuration/configmgr/configmgrlib/XMLEnvironmentLoader.hpp
  45. 0 0
      configuration/configmgr/configmgrlib/XMLEnvironmentMgr.cpp
  46. 0 0
      configuration/configmgr/configmgrlib/XMLEnvironmentMgr.hpp
  47. 0 0
      configuration/configmgr/configmgrlib/XSDComponentParser.cpp
  48. 0 0
      configuration/configmgr/configmgrlib/XSDComponentParser.hpp
  49. 0 0
      configuration/configmgr/configmgrlib/XSDSchemaParser.cpp
  50. 0 0
      configuration/configmgr/configmgrlib/XSDSchemaParser.hpp
  51. 0 0
      configuration/configmgr/configmgrlib/XSDValueSetParser.cpp
  52. 0 0
      configuration/configmgr/configmgrlib/XSDValueSetParser.hpp
  53. 0 0
      configuration/configmgr/hpcc_support/CMakeLists.txt
  54. 0 0
      configuration/configmgr/hpcc_support/HPCCConfigSupport.hpp
  55. 0 0
      configuration/configmgr/hpcc_support/add_required_instances/AddRequiredInstancesSupport.cpp
  56. 0 0
      configuration/configmgr/hpcc_support/add_required_instances/AddRequiredInstancesSupport.hpp
  57. 2 2
      configuration/config2/hpcc_support/add_required_instances/CMakeLists.txt
  58. 3 3
      esp/scm/espscm.cmake
  59. 3 3
      esp/scm/ws_config2.ecm
  60. 1 1
      esp/services/CMakeLists.txt
  61. 12 14
      esp/services/ws_config2/CMakeLists.txt
  62. 0 0
      esp/services/ws_configmgr/ws_configmgrError.hpp
  63. 42 42
      esp/services/ws_config2/ws_config2Service.cpp
  64. 9 9
      esp/services/ws_config2/ws_config2Service.hpp
  65. 2 2
      esp/services/ws_config2/ws_config2Session.hpp
  66. 4 4
      esp/services/ws_config2/ws_config2_binding.hpp
  67. 7 7
      esp/services/ws_config2/ws_config2_plugin.cpp
  68. 0 2
      initfiles/etc/DIR_NAME/config2mgr/CMakeLists.txt
  69. 0 8
      initfiles/etc/DIR_NAME/config2mgr/config2mgr.conf.in
  70. 3 7
      initfiles/etc/DIR_NAME/config2mgr/esp.xml.in

+ 1 - 1
configuration/CMakeLists.txt

@@ -14,4 +14,4 @@
 #    limitations under the License.
 ################################################################################
 
-HPCC_ADD_SUBDIRECTORY (config2)
+HPCC_ADD_SUBDIRECTORY (configmgr)

+ 0 - 270
configuration/config2/test.cpp

@@ -1,270 +0,0 @@
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <memory.h>
-#include <string>
-#include <exception>
-#include <iostream>
-
-#include "Exceptions.hpp"
-
-//#include "libxml/parser.h"
-//#include "libxml/tree.h"
-
-
-// namespace pt = boost::property_tree;
-
-const std::string c_path = "..\\..\\initfiles\\componentfiles\\configschema\\xsd"; ///opt/HPCCSystems/componentfiles/configschema/xsd";
-
-// void parseComponentXSD(pt::ptree &xsdTree);
-// void parseIncludes(pt::ptree &xsdTree);
-
-#include "SchemaItem.hpp"
-#include "XSDSchemaParser.hpp"
-#include "XMLEnvironmentMgr.hpp"
-#include "InsertableItem.hpp"
-
-
-int main()
-{
-
-    try
-    {
-        //std::shared_ptr<ConfigItem> pConfig = std::make_shared<ConfigItem>("root");
-
-        //ConfigParser *pCfgParser = new XSDConfigParser("", pConfig);
-        //std::string fpath = c_path + "types.xsd";  //dafilesrv.xsd";
-        // std::shared_ptr<ConfigParser> pCfgParser = std::make_shared<XSDConfigParser>("");
-        // std::shared_ptr<ConfigItem> pNull;
-        // std::shared_ptr<ConfigItem> pConfig = std::make_shared<ConfigItem>("myconfig", pNull);
-
-        //pCfgParser->parseEnvironmentConfig("newenv.xsd", "");
-
-        EnvironmentMgr *pEnvMgr = getEnvironmentMgrInstance(EnvironmentType::XML);
-        std::vector<std::string> cfgParms;
-        cfgParms.push_back("buildset.xml");  // not used right now
-        pEnvMgr->loadSchema(c_path, "environment.xsd", cfgParms);
-        pEnvMgr->loadEnvironment(c_path + "/environment.xml");
-
-        std::vector<std::shared_ptr<EnvironmentNode>> nodes;
-        pEnvMgr->fetchNodes("/Environment/Software/EspService@buildSet=espsmc", nodes);
-
-        // 158
-        //auto pNode = envMgr.getNodeFromPath("158");
-        // auto pNode = pEnvMgr->getEnvironmentNode("74");     // 29 is Hardware/Computer
-        //auto pNode = pEnvMgr->getEnvironmentNode("35");
-
-        //auto x = pNode->getAllFieldValues("name");
-
-        //auto list = pNode->getInsertableItems();
-
-        Status status;
-        //auto pNewNode = pEnvMgr->addNewEnvironmentNode("108", "espsmc", status);
-        //auto newList = pNewNode->getInsertableItems();
-        //pEnvMgr->addNewEnvironmentNode("35", "ws_ecl", status);
-        //pEnvMgr->addNewEnvironmentNode("35", "ws_ecl", status);
-
-        auto pNode = pEnvMgr->getEnvironmentNode("138");
-        std::vector<InsertableItem> espBindingItems;
-        pNode->getInsertableItems(espBindingItems);
-
-        /*for (auto it = espBindingItems.begin(); it != espBindingItems.end(); ++it)
-        {
-            if ((*it).m_pSchemaItem->getProperty("insertChoice") != "")
-            {
-                std::string choice = (*it).m_pSchemaItem->getProperty("insertChoice");
-                std::shared_ptr<SchemaValue> pSchemaValue = (*it).m_pSchemaItem->getAttribute(choice);
-                std::vector<AllowedValue> allowedValues;
-                pSchemaValue->getAllowedValues(allowedValues);
-            }
-        }*/
-
-
-
-        Status status2;
-        //pNewNode = pEnvMgr->addNewEnvironmentNode("138", "espbinding@service=EclWatch1", status2);  // todo: when valildating, look at required flag first
-
-
-        /*auto attributes = pNode->getAttributes();
-        for (auto it = attributes.begin(); it != attributes.end(); ++it)
-        {
-            if ((*it)->getName() == "service")
-            {
-                std::shared_ptr<EnvironmentValue> pEnvValue = *it;
-                const std::shared_ptr<ConfigValue> &pCfgValue = pEnvValue->getCfgValue();
-                auto values = pCfgValue->getAllowedValues(pEnvValue.get());
-                int i = 3;
-            }
-        }*/
-
-
-        // keyref needs to look local first, then search the config tree, but field is ALWAYS local
-        // Used during validation.
-
-        //
-        // Validate the environment
-
-
-
-
-        //
-        // Value set test
-        //std::vector<EnvironmentMgr::NameValue> newValues;
-        //newValues.push_back({ "name", "namehasbeenchanged" });
-        //pEnvMgr->setAttributeValues("158", newValues, "", false);
-
-        //pEnvMgr->saveEnvironment("testout.xml", status);
-
-        //auto results = pEnvMgr->getEnvironmentNode(".");
-
-    }
-    catch (ParseException &e)
-    {
-        std::cout << "Error: " << e.what() << "\n";
-    }
-
-    //pt::ptree xsdTree;
-
-    // try
-    // {
-    //     std::string fpath = c_path + "types.xsd";  //dafilesrv.xsd";
-    //     pt::read_xml(fpath, xsdTree);
-
-    //     // throw(ParseException("exception throw test"));
-
-    //     parseComponentXSD(xsdTree);
-
-
-        //
-        // Let's try iterating
-        // for (pt::ptree::const_iterator it=xsdTree.begin(); it!=xsdTree.end(); ++it)
-        // {
-        //     std::cout << "here: " << it->first << std::endl;
-        // }
-
-        // auto it = xsdTree.find("xs:schema");
-        // bool isEnd = (it == xsdTree.not_found());
-        // std::cout << "here " << it->first << "  " << it->second.get_value<std::string>() << std::endl;
-
-        // parseIncludes(it->second);
-
-        // const pt::ptree &attributes = it->second.get_child("<xmlattr>", pt::ptree());
-        // for (auto attrIt=attributes.begin(); attrIt!=attributes.end(); ++attrIt)
-        // {
-        //     std::cout << "attr = " << attrIt->first.data() << " second = " << attrIt->second.get_value<std::string>() << std::endl;
-        // }
-
-
-        // std::cout << "First level keys: " << std::endl;
-        // const pt::ptree &keys = it->second.get_child("", pt::ptree());
-
-        // std::string val = it->second.get_value<std::string>("xs:include.<xmlattr>.schemaLocation");
-        // std::cout << "value: " << val << std::endl;
-
-        // for (auto keyIt=keys.begin(); keyIt!=keys.end(); ++keyIt)
-        // {
-        //     std::cout << "key = >>" << keyIt->first << "<< " << std::endl;
-        //     if (keyIt->first == "xs:include")
-        //     {
-        //         int i = 5;
-        //         std::string val = keyIt->second.get("<xmlattr>.schemaLocation", "not found");
-        //         std::cout << "   schema Location = " << val << std::endl;
-        //     }
-        //     //if (keyIt->first.get_value())
-        // }
-
-
-
-        std::cout << "Success\n";
-
-        // std::cout << std::endl << "Using Boost "
-        //   << BOOST_VERSION / 100000     << "."  // major version
-        //   << BOOST_VERSION / 100 % 1000 << "."  // minor version
-        //   << BOOST_VERSION % 100                // patch level
-        //   << std::endl;
-    // }
-    // catch (const ParseException &e)
-    // {
-    //     std::cout << "Error: " << e.what() << "\n";
-    // }
-    // catch (std::exception &e)
-    // {
-    //     std::cout << "Error: " << e.what() << "\n";
-    // }
-    // return 0;
-}
-
-
-
-// void parseComponentXSD(pt::ptree &xsdTree)
-// {
-//     //
-//     // Get to the schema
-//     auto schemaIt = xsdTree.find("xs:schema");
-
-//     //
-//     // Since we only support includes for a component schema at the top level, look for includes first and process them.
-//     // Note that these includes may NOT define elements or anything like that. Only types, attribute groups, keyrefs
-//     const pt::ptree &keys = schemaIt->second.get_child("", pt::ptree());
-//     for (auto it=keys.begin(); it!=keys.end(); ++it)
-//     {
-//         if (it->first == "xs:include")
-//         {
-//             std::string schema = it->second.get("<xmlattr>.schemaLocation", "not found");
-//             std::cout << "Parsing found include: " << schema << std::endl;
-//         }
-//     }
-
-//     std::vector<std::string> vec;
-//     vec.push_back("Hello");
-//     vec.push_back("There");
-
-
-    //
-    // Now look for any special sections we support
-    // for (auto it=keys.begin(); it!=keys.end(); ++it)
-    // {
-        // if (it->first == "xs:attributeGroup")
-        // {
-        //     std::string groupName = it->second.get("<xmlattr>.name", "not found");
-        //     std::cout << "Attribute group name: " << groupName << std::endl;
-
-        //     //
-        //     // Lets parse the attributes now
-        //     const pt::ptree &attrs = it->second.get_child("", pt::ptree());
-        //     for (auto attributeIt = attrs.begin(); attributeIt != attrs.end(); ++attributeIt)
-        //     {
-        //         auto ss = attributeIt->first;
-        //         if (attributeIt->first == "xs:attribute")
-        //         {
-        //             std::cout << "found attribute" << groupName << std::endl;
-        //             XSDAttribute attr;
-        //             attr.parse(attributeIt->second);
-        //         }
-        //     }
-//         // }
-//         if (it->first == "xs:simpleType")
-//         {
-//             //std::string typeName = it->second.get("<xmlattr>.name", "not found");
-//             //int i = 4;
-//             std::shared_ptr<CfgType> pType = XSDTypeParser::parseSimpleType(it->second);
-//         }
-//     }
-
-
-// }
-
-
-
-// void parseIncludes(pt::ptree &xsdTree)
-// {
-//     const pt::ptree &keys = xsdTree.get_child("", pt::ptree());
-//     for (auto it=keys.begin(); it!=keys.end(); ++it)
-//     {
-//         if (it->first == "xs:include")
-//         {
-//             std::string schema = it->second.get("<xmlattr>.schemaLocation", "not found");
-//             std::cout << "Parsing found include: " << schema << std::endl;
-//         }
-//     }
-// }

+ 18 - 0
configuration/configmgr/CMakeLists.txt

@@ -0,0 +1,18 @@
+################################################################################
+#    HPCC SYSTEMS software Copyright (C) 2018 HPCC Systems.
+#
+#    Licensed 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
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License 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.
+################################################################################
+
+HPCC_ADD_SUBDIRECTORY (configmgrlib)
+HPCC_ADD_SUBDIRECTORY (hpcc_support)

configuration/config2/Test/MasterTestSchema.xsd → configuration/configmgr/Test/MasterTestSchema.xsd


configuration/config2/Test/TestEnvironment.xml → configuration/configmgr/Test/TestEnvironment.xml


configuration/config2/Test/types.xsd → configuration/configmgr/Test/types.xsd


+ 7 - 9
configuration/config2/CMakeLists.txt

@@ -15,9 +15,7 @@
 #    limitations under the License.
 ##############################################################################
 
-project ( config2 )
-
-HPCC_ADD_SUBDIRECTORY (hpcc_support)
+project ( configmgr )
 
 if (USE_BOOST_REGEX)
 
@@ -50,17 +48,17 @@ if (USE_BOOST_REGEX)
         ${HPCC_SOURCE_DIR}/deployment/deploy
         ${CMAKE_PREFIX_PATH}/mkspecs/linux-g++
         ${CMAKE_CURRENT_SOURCE_DIR}
-        ${CMAKE_CURRENT_SOURCE_DIR}/hpcc_support
+        ${CMAKE_CURRENT_SOURCE_DIR}/../hpcc_support
         ${CMAKE_BINARY_DIR}
         ${CMAKE_BINARY_DIR}/oss
     )
 
-    ADD_DEFINITIONS( -D_USRDLL -DCONFIG2_LIB)
-    HPCC_ADD_LIBRARY( config2 SHARED ${SRCS} )
-    TARGET_LINK_LIBRARIES( config2 jlib ${BOOST_REGEX_LIBRARIES})
+    ADD_DEFINITIONS( -D_USRDLL -DCONFIGMGR_LIB)
+    HPCC_ADD_LIBRARY( configmgr SHARED ${SRCS} )
+    TARGET_LINK_LIBRARIES( configmgr jlib ${BOOST_REGEX_LIBRARIES})
 
-    INSTALL ( TARGETS config2 RUNTIME DESTINATION ${EXEC_DIR} LIBRARY DESTINATION ${LIB_DIR} )
+    INSTALL ( TARGETS configmgr RUNTIME DESTINATION ${EXEC_DIR} LIBRARY DESTINATION ${LIB_DIR} )
 
 else ()
-    message(warning "skipping config2 - USE_BOOST_REGEX not defined")
+    message(warning "skipping configmg - USE_BOOST_REGEX not defined")
 endif ()

configuration/config2/ConfigPath.cpp → configuration/configmgr/configmgrlib/ConfigPath.cpp


configuration/config2/ConfigPath.hpp → configuration/configmgr/configmgrlib/ConfigPath.hpp


configuration/config2/EnvSupportLib.cpp → configuration/configmgr/configmgrlib/EnvSupportLib.cpp


configuration/config2/EnvSupportLib.hpp → configuration/configmgr/configmgrlib/EnvSupportLib.hpp


configuration/config2/EnvironmentEventHandlers.cpp → configuration/configmgr/configmgrlib/EnvironmentEventHandlers.cpp


configuration/config2/EnvironmentEventHandlers.hpp → configuration/configmgr/configmgrlib/EnvironmentEventHandlers.hpp


configuration/config2/EnvironmentLoader.cpp → configuration/configmgr/configmgrlib/EnvironmentLoader.cpp


configuration/config2/EnvironmentLoader.hpp → configuration/configmgr/configmgrlib/EnvironmentLoader.hpp


configuration/config2/EnvironmentMgr.cpp → configuration/configmgr/configmgrlib/EnvironmentMgr.cpp


configuration/config2/EnvironmentMgr.hpp → configuration/configmgr/configmgrlib/EnvironmentMgr.hpp


configuration/config2/EnvironmentNode.cpp → configuration/configmgr/configmgrlib/EnvironmentNode.cpp


configuration/config2/EnvironmentNode.hpp → configuration/configmgr/configmgrlib/EnvironmentNode.hpp


configuration/config2/EnvironmentValue.cpp → configuration/configmgr/configmgrlib/EnvironmentValue.cpp


configuration/config2/EnvironmentValue.hpp → configuration/configmgr/configmgrlib/EnvironmentValue.hpp


configuration/config2/Exceptions.hpp → configuration/configmgr/configmgrlib/Exceptions.hpp


configuration/config2/InsertableItem.cpp → configuration/configmgr/configmgrlib/InsertableItem.cpp


configuration/config2/InsertableItem.hpp → configuration/configmgr/configmgrlib/InsertableItem.hpp


configuration/config2/NameValue.hpp → configuration/configmgr/configmgrlib/NameValue.hpp


configuration/config2/SchemaItem.cpp → configuration/configmgr/configmgrlib/SchemaItem.cpp


configuration/config2/SchemaItem.hpp → configuration/configmgr/configmgrlib/SchemaItem.hpp


configuration/config2/SchemaParser.cpp → configuration/configmgr/configmgrlib/SchemaParser.cpp


configuration/config2/SchemaParser.hpp → configuration/configmgr/configmgrlib/SchemaParser.hpp


configuration/config2/SchemaType.hpp → configuration/configmgr/configmgrlib/SchemaType.hpp


configuration/config2/SchemaTypeIntegerLimits.cpp → configuration/configmgr/configmgrlib/SchemaTypeIntegerLimits.cpp


configuration/config2/SchemaTypeIntegerLimits.hpp → configuration/configmgr/configmgrlib/SchemaTypeIntegerLimits.hpp


configuration/config2/SchemaTypeLimits.cpp → configuration/configmgr/configmgrlib/SchemaTypeLimits.cpp


configuration/config2/SchemaTypeLimits.hpp → configuration/configmgr/configmgrlib/SchemaTypeLimits.hpp


configuration/config2/SchemaTypeStringLimits.cpp → configuration/configmgr/configmgrlib/SchemaTypeStringLimits.cpp


configuration/config2/SchemaTypeStringLimits.hpp → configuration/configmgr/configmgrlib/SchemaTypeStringLimits.hpp


configuration/config2/SchemaValue.cpp → configuration/configmgr/configmgrlib/SchemaValue.cpp


configuration/config2/SchemaValue.hpp → configuration/configmgr/configmgrlib/SchemaValue.hpp


configuration/config2/Status.cpp → configuration/configmgr/configmgrlib/Status.cpp


configuration/config2/Status.hpp → configuration/configmgr/configmgrlib/Status.hpp


configuration/config2/Utils.cpp → configuration/configmgr/configmgrlib/Utils.cpp


configuration/config2/Utils.hpp → configuration/configmgr/configmgrlib/Utils.hpp


configuration/config2/XMLEnvironmentLoader.cpp → configuration/configmgr/configmgrlib/XMLEnvironmentLoader.cpp


configuration/config2/XMLEnvironmentLoader.hpp → configuration/configmgr/configmgrlib/XMLEnvironmentLoader.hpp


configuration/config2/XMLEnvironmentMgr.cpp → configuration/configmgr/configmgrlib/XMLEnvironmentMgr.cpp


configuration/config2/XMLEnvironmentMgr.hpp → configuration/configmgr/configmgrlib/XMLEnvironmentMgr.hpp


configuration/config2/XSDComponentParser.cpp → configuration/configmgr/configmgrlib/XSDComponentParser.cpp


configuration/config2/XSDComponentParser.hpp → configuration/configmgr/configmgrlib/XSDComponentParser.hpp


configuration/config2/XSDSchemaParser.cpp → configuration/configmgr/configmgrlib/XSDSchemaParser.cpp


configuration/config2/XSDSchemaParser.hpp → configuration/configmgr/configmgrlib/XSDSchemaParser.hpp


configuration/config2/XSDValueSetParser.cpp → configuration/configmgr/configmgrlib/XSDValueSetParser.cpp


configuration/config2/XSDValueSetParser.hpp → configuration/configmgr/configmgrlib/XSDValueSetParser.hpp


configuration/config2/hpcc_support/CMakeLists.txt → configuration/configmgr/hpcc_support/CMakeLists.txt


configuration/config2/hpcc_support/HPCCConfigSupport.hpp → configuration/configmgr/hpcc_support/HPCCConfigSupport.hpp


configuration/config2/hpcc_support/add_required_instances/AddRequiredInstancesSupport.cpp → configuration/configmgr/hpcc_support/add_required_instances/AddRequiredInstancesSupport.cpp


configuration/config2/hpcc_support/add_required_instances/AddRequiredInstancesSupport.hpp → configuration/configmgr/hpcc_support/add_required_instances/AddRequiredInstancesSupport.hpp


+ 2 - 2
configuration/config2/hpcc_support/add_required_instances/CMakeLists.txt

@@ -28,13 +28,13 @@ INCLUDE_DIRECTORIES(
     ${CMAKE_PREFIX_PATH}/mkspecs/linux-g++
     ${CMAKE_CURRENT_SOURCE_DIR}
     ${CMAKE_CURRENT_SOURCE_DIR}/..
-    ${CMAKE_CURRENT_SOURCE_DIR}/../..
+    ${CMAKE_CURRENT_SOURCE_DIR}/../../configmgrlib
     ${CMAKE_BINARY_DIR}
     ${CMAKE_BINARY_DIR}/oss
 )
 
 ADD_DEFINITIONS( -D_USRDLL -DCFGSUPPORT_DAFILESRV_LIB)
 HPCC_ADD_LIBRARY( cfgsupport_addrequiredinstances SHARED ${SRCS} )
-TARGET_LINK_LIBRARIES( cfgsupport_addrequiredinstances config2 jlib )
+TARGET_LINK_LIBRARIES( cfgsupport_addrequiredinstances jlib )
 
 INSTALL ( TARGETS cfgsupport_addrequiredinstances RUNTIME DESTINATION ${EXEC_DIR} LIBRARY DESTINATION ${LIB_DIR} )

+ 3 - 3
esp/scm/espscm.cmake

@@ -40,7 +40,7 @@ set ( ESPSCM_SRCS
       ws_esdlconfig.ecm
       ws_loggingservice.ecm
       ws_espcontrol.ecm
-      ws_config2.ecm
+      ws_configmgr.ecm
       ws_elk.ecm
     )
 
@@ -64,9 +64,9 @@ foreach ( loop_var ${ESPSCM_SRCS} )
     set_source_files_properties(${ESPSCM_GENERATED_DIR}/${result}_esp.ipp PROPERTIES GENERATED TRUE)
     set_source_files_properties(${ESPSCM_GENERATED_DIR}/${result}.xml PROPERTIES GENERATED TRUE)
     set ( ESP_GENERATED_INCLUDES ${ESP_GENERATED_INCLUDES} ${ESPSCM_GENERATED_DIR}/${result}.esp ${ESPSCM_GENERATED_DIR}/${result}.hpp ${ESPSCM_GENERATED_DIR}/${result}.int ${ESPSCM_GENERATED_DIR}/${result}.ipp ${ESPSCM_GENERATED_DIR}/${result}_esp.ipp ${ESPSCM_GENERATED_DIR}/${result}.xml )
-    if ( PLATFORM )    
+    if ( PLATFORM )
         Install( FILES ${ESPSCM_GENERATED_DIR}/${result}.xml DESTINATION componentfiles/esdl_files COMPONENT Runtime )
-    endif ( PLATFORM )    
+    endif ( PLATFORM )
 endforeach ( loop_var ${ESPSCM_SRCS} )
 
 include_directories ( ${ESPSCM_GENERATED_DIR} )

+ 3 - 3
esp/scm/ws_config2.ecm

@@ -401,7 +401,7 @@ ESPresponse [exceptions_inline] FetchNodesResponse
 };
 
 
-ESPservice [auth_feature("DEFERRED"),version("2.0"), default_client_version("2.0"), exceptions_inline("xslt/exceptions.xslt")] ws_config2
+ESPservice [auth_feature("DEFERRED"),version("2.0"), default_client_version("2.0"), exceptions_inline("xslt/exceptions.xslt")] ws_configmgr
 {
     ESPMethod
         [
@@ -478,6 +478,6 @@ ESPservice [auth_feature("DEFERRED"),version("2.0"), default_client_version("2.0
 };
 
 
-SCMexportdef(ws_config2);
+SCMexportdef(ws_configmgr);
 
-SCMapi(ws_config2) IClientws_config2 *createws_config2Client();
+SCMapi(ws_configmgr) IClientws_configmgr *createws_configmgrClient();

+ 1 - 1
esp/services/CMakeLists.txt

@@ -19,7 +19,7 @@ IF (USE_OPENLDAP)
 ENDIF(USE_OPENLDAP)
 HPCC_ADD_SUBDIRECTORY (ws_account "PLATFORM")
 HPCC_ADD_SUBDIRECTORY (ws_config "PLATFORM")
-HPCC_ADD_SUBDIRECTORY (ws_config2 "PLATFORM")
+HPCC_ADD_SUBDIRECTORY (ws_configmgr "PLATFORM")
 HPCC_ADD_SUBDIRECTORY (ws_dfu "PLATFORM")
 HPCC_ADD_SUBDIRECTORY (ws_ecl "PLATFORM")
 HPCC_ADD_SUBDIRECTORY (ws_fileio "PLATFORM")

+ 12 - 14
esp/services/ws_config2/CMakeLists.txt

@@ -16,14 +16,14 @@
 #
 ###############################################################################
 
-project(ws_config2)
+project(ws_configmgr)
 
 include(${HPCC_SOURCE_DIR}/esp/scm/espscm.cmake)
 
 set(SRCS
-    ${ESPSCM_GENERATED_DIR}/ws_config2_esp.cpp
-    ws_config2Service.cpp
-    ws_config2_plugin.cpp
+    ${ESPSCM_GENERATED_DIR}/ws_configmgr_esp.cpp
+        ws_configmgrService.cpp
+        ws_configmgr_plugin.cpp
     )
 
 include_directories(
@@ -46,35 +46,33 @@ include_directories(
     ${HPCC_SOURCE_DIR}/esp/http/platform
     ${HPCC_SOURCE_DIR}/system/mp
     ${HPCC_SOURCE_DIR}/system/xmllib
-    ${HPCC_SOURCE_DIR}/configuration/config2
+    ${HPCC_SOURCE_DIR}/configuration/configmgr/configmgrlib
     ${CMAKE_BINARY_DIR}
     ${CMAKE_BINARY_DIR}/oss
-    ${CMAKE_BINARY_DIR}/esp/services/ws_config2
+    ${CMAKE_BINARY_DIR}/esp/services/ws_configmgr
     )
 
 add_definitions(-D_USRDLL)
 
-HPCC_ADD_LIBRARY(ws_config2 SHARED ${SRCS})
+HPCC_ADD_LIBRARY(ws_configmgr SHARED ${SRCS})
 install(
-    TARGETS ws_config2
+    TARGETS ws_configmgr
     RUNTIME DESTINATION ${EXEC_DIR}
     LIBRARY DESTINATION ${LIB_DIR}
     COMPONENT Runtime
     )
-add_dependencies(ws_config2 espscm config2)
-target_link_libraries(ws_config2
+add_dependencies(ws_configmgr espscm configmgr)
+target_link_libraries(ws_configmgr
     jlib
     xmllib
     esphttp
     environment
     dllserver
-    config2
+    configmgr
     )
 
 IF (USE_OPENSSL)
-    target_link_libraries ( ws_config2
+    target_link_libraries ( ws_configmgr
         securesocket
     )
 ENDIF()
-
-

esp/services/ws_config2/ws_config2Error.hpp → esp/services/ws_configmgr/ws_configmgrError.hpp


+ 42 - 42
esp/services/ws_config2/ws_config2Service.cpp

@@ -15,32 +15,32 @@
     limitations under the License.
 ############################################################################## */
 
-#include "ws_config2Service.hpp"
+#include "ws_configmgrService.hpp"
 #include "jfile.hpp"
 #include "SchemaItem.hpp"
 #include "InsertableItem.hpp"
 #include "jexcept.hpp"
-#include "ws_config2Error.hpp"
+#include "ws_configmgrError.hpp"
 #include "Exceptions.hpp"
 
-static const std::string CFG2_MASTER_CONFIG_FILE = "environment.xsd";
-static const std::string CFG2_CONFIG_DIR = COMPONENTFILES_DIR PATHSEPSTR "configschema" PATHSEPSTR "xsd" PATHSEPSTR;
-static const std::string CFG2_PLUGINS_DIR = COMPONENTFILES_DIR PATHSEPSTR "configschema" PATHSEPSTR "xsd" PATHSEPSTR "plugins" PATHSEPSTR;
-static const std::string CFG2_SOURCE_DIR = CONFIG_SOURCE_DIR;
+static const std::string CFGMGR_MASTER_CONFIG_FILE = "environment.xsd";
+static const std::string CFGMGR_CONFIG_DIR = COMPONENTFILES_DIR PATHSEPSTR "configschema" PATHSEPSTR "xsd" PATHSEPSTR;
+static const std::string CFGMGR_PLUGINS_DIR = COMPONENTFILES_DIR PATHSEPSTR "configschema" PATHSEPSTR "xsd" PATHSEPSTR "plugins" PATHSEPSTR;
+static const std::string CFGMGR_SOURCE_DIR = CONFIG_SOURCE_DIR;
 static const std::string ACTIVE_ENVIRONMENT_FILE = CONFIG_DIR PATHSEPSTR ENV_XML_FILE;
 
-Cws_config2Ex::Cws_config2Ex()
+Cws_configMgrEx::Cws_configMgrEx()
 {
     m_sessionKey = 0;
 }
 
 
-Cws_config2Ex::~Cws_config2Ex()
+Cws_configMgrEx::~Cws_configMgrEx()
 {
 }
 
 
-bool Cws_config2Ex::onOpenSession(IEspContext &context, IEspOpenSessionRequest &req, IEspOpenSessionResponse &resp)
+bool Cws_configMgrEx::onOpenSession(IEspContext &context, IEspOpenSessionRequest &req, IEspOpenSessionResponse &resp)
 {
     bool loaded = false;
     ConfigMgrSession *pNewSession = new ConfigMgrSession();
@@ -49,10 +49,10 @@ bool Cws_config2Ex::onOpenSession(IEspContext &context, IEspOpenSessionRequest &
     std::string inputSchemaPath = req.getSchemaPath();
     std::string inputSourcePath = req.getSourcePath();
     std::string inputActivePath = req.getActivePath();
-    pNewSession->masterConfigFile = !inputMasterFile.empty() ? inputMasterFile : CFG2_MASTER_CONFIG_FILE;
+    pNewSession->masterConfigFile = !inputMasterFile.empty() ? inputMasterFile : CFGMGR_MASTER_CONFIG_FILE;
     pNewSession->username = req.getUsername();
-    pNewSession->schemaPath = !inputSchemaPath.empty() ? inputSchemaPath : CFG2_CONFIG_DIR;
-    pNewSession->sourcePath = !inputSourcePath.empty() ? inputSourcePath : CFG2_SOURCE_DIR;
+    pNewSession->schemaPath = !inputSchemaPath.empty() ? inputSchemaPath : CFGMGR_CONFIG_DIR;
+    pNewSession->sourcePath = !inputSourcePath.empty() ? inputSourcePath : CFGMGR_SOURCE_DIR;
     pNewSession->activePath = !inputActivePath.empty() ? inputActivePath : ACTIVE_ENVIRONMENT_FILE;
 
     //
@@ -75,7 +75,7 @@ bool Cws_config2Ex::onOpenSession(IEspContext &context, IEspOpenSessionRequest &
     std::string inputSupportLibs = req.getSupportLibs();
     cfgParms["support_libs"] = inputSupportLibs.empty() ? "libcfgsupport_addrequiredinstances" : inputSupportLibs;
     std::string pluginsPath = req.getPluginPaths();
-    cfgParms["plugin_paths"] = !pluginsPath.empty() ? pluginsPath : CFG2_PLUGINS_DIR;
+    cfgParms["plugin_paths"] = !pluginsPath.empty() ? pluginsPath : CFGMGR_PLUGINS_DIR;
 
     if (pNewSession->initializeSession(cfgParms))
     {
@@ -94,7 +94,7 @@ bool Cws_config2Ex::onOpenSession(IEspContext &context, IEspOpenSessionRequest &
 }
 
 
-bool Cws_config2Ex::onCloseSession(IEspContext &context, IEspCloseSessionRequest &req, IEspEmptyResponse &resp)
+bool Cws_configMgrEx::onCloseSession(IEspContext &context, IEspCloseSessionRequest &req, IEspEmptyResponse &resp)
 {
     std::string sessionId = req.getSessionId();
     ConfigMgrSession *pSession = getConfigSession(sessionId);
@@ -112,7 +112,7 @@ bool Cws_config2Ex::onCloseSession(IEspContext &context, IEspCloseSessionRequest
 }
 
 
-bool Cws_config2Ex::onGetOpenSessions(IEspContext &context, IEspListOpenSessionsRequest &req, IEspListOpenSessionsResponse &resp)
+bool Cws_configMgrEx::onGetOpenSessions(IEspContext &context, IEspListOpenSessionsRequest &req, IEspListOpenSessionsResponse &resp)
 {
     IArrayOf<IEspOpenSessionInfo> openSessions;
     for (auto sessionIt=m_sessions.begin(); sessionIt != m_sessions.end(); ++sessionIt)
@@ -130,7 +130,7 @@ bool Cws_config2Ex::onGetOpenSessions(IEspContext &context, IEspListOpenSessions
 }
 
 
-bool Cws_config2Ex::onGetEnvironmentFileList(IEspContext &context, IEspGetEnvironmentFileListRequest &req, IEspGetEnvironmentListResponse &resp)
+bool Cws_configMgrEx::onGetEnvironmentFileList(IEspContext &context, IEspGetEnvironmentFileListRequest &req, IEspGetEnvironmentListResponse &resp)
 {
     std::string sessionId = req.getSessionId();
     ConfigMgrSession *pSession = getConfigSession(sessionId);
@@ -176,7 +176,7 @@ bool Cws_config2Ex::onGetEnvironmentFileList(IEspContext &context, IEspGetEnviro
 }
 
 
-bool Cws_config2Ex::onOpenEnvironmentFile(IEspContext &context, IEspOpenEnvironmentFileRequest &req, IEspOpenEnvironmentFileResponse &resp)
+bool Cws_configMgrEx::onOpenEnvironmentFile(IEspContext &context, IEspOpenEnvironmentFileRequest &req, IEspOpenEnvironmentFileResponse &resp)
 {
     bool doOpen = false;
     ConfigMgrSession *pSession = getConfigSession(req.getSessionId());
@@ -200,7 +200,7 @@ bool Cws_config2Ex::onOpenEnvironmentFile(IEspContext &context, IEspOpenEnvironm
 }
 
 
-bool Cws_config2Ex::onCloseEnvironmentFile(IEspContext &context, IEspCloseEnvironmentFileRequest &req, IEspEmptyResponse &resp)
+bool Cws_configMgrEx::onCloseEnvironmentFile(IEspContext &context, IEspCloseEnvironmentFileRequest &req, IEspEmptyResponse &resp)
 {
     bool doClose = false;
     ConfigMgrSession *pSession = getConfigSession(req.getSessionId());
@@ -222,7 +222,7 @@ bool Cws_config2Ex::onCloseEnvironmentFile(IEspContext &context, IEspCloseEnviro
 }
 
 
-bool Cws_config2Ex::onSaveEnvironmentFile(IEspContext &context, IEspSaveEnvironmentFileRequest &req, IEspEmptyResponse &resp)
+bool Cws_configMgrEx::onSaveEnvironmentFile(IEspContext &context, IEspSaveEnvironmentFileRequest &req, IEspEmptyResponse &resp)
 {
     // todo: If this envronment file is loaded by any other session, go mark that session that the environment has changed
     // and don't allow a save w/o reloading first. maybe add a reload request. Add relevant errors.
@@ -282,7 +282,7 @@ bool Cws_config2Ex::onSaveEnvironmentFile(IEspContext &context, IEspSaveEnvironm
 }
 
 
-bool Cws_config2Ex::onLockSession(IEspContext &context, IEspLockSessionRequest &req, IEspLockSessionResponse &resp)
+bool Cws_configMgrEx::onLockSession(IEspContext &context, IEspLockSessionRequest &req, IEspLockSessionResponse &resp)
 {
     std::string sessionId = req.getSessionId();
     ConfigMgrSession *pSession = getConfigSession(sessionId, true);
@@ -319,7 +319,7 @@ bool Cws_config2Ex::onLockSession(IEspContext &context, IEspLockSessionRequest &
 }
 
 
-bool Cws_config2Ex::onUnlockSession(IEspContext &context, IEspUnlockSessionRequest &req, IEspEmptyResponse &resp)
+bool Cws_configMgrEx::onUnlockSession(IEspContext &context, IEspUnlockSessionRequest &req, IEspEmptyResponse &resp)
 {
     ConfigMgrSession *pSession = getConfigSessionForUpdate(req.getSessionId(), req.getSessionLockKey());
 
@@ -337,7 +337,7 @@ bool Cws_config2Ex::onUnlockSession(IEspContext &context, IEspUnlockSessionReque
 }
 
 
-bool Cws_config2Ex::onGetNode(IEspContext &context, IEspGetNodeRequest &req, IEspGetNodeResponse &resp)
+bool Cws_configMgrEx::onGetNode(IEspContext &context, IEspGetNodeRequest &req, IEspGetNodeResponse &resp)
 {
     std::string sessionId = req.getSessionId();
     std::string id = req.getNodeId();
@@ -362,7 +362,7 @@ bool Cws_config2Ex::onGetNode(IEspContext &context, IEspGetNodeRequest &req, IEs
 }
 
 
-bool Cws_config2Ex::onGetCreateNodeInfo(IEspContext &context, IEspGetCreateNodeInfoRequest &req, IEspGetCreateNodeInfoResponse &resp)
+bool Cws_configMgrEx::onGetCreateNodeInfo(IEspContext &context, IEspGetCreateNodeInfoRequest &req, IEspGetCreateNodeInfoResponse &resp)
 {
     ConfigMgrSession *pSession = getConfigSession(req.getSessionId());
     Status status;
@@ -388,7 +388,7 @@ bool Cws_config2Ex::onGetCreateNodeInfo(IEspContext &context, IEspGetCreateNodeI
 }
 
 
-bool Cws_config2Ex::onInsertNode(IEspContext &context, IEspInsertNodeRequest &req, IEspGetNodeResponse &resp)
+bool Cws_configMgrEx::onInsertNode(IEspContext &context, IEspInsertNodeRequest &req, IEspGetNodeResponse &resp)
 {
     ConfigMgrSession *pSession = getConfigSessionForUpdate(req.getSessionId(), req.getSessionLockKey());
     Status status;
@@ -428,7 +428,7 @@ bool Cws_config2Ex::onInsertNode(IEspContext &context, IEspInsertNodeRequest &re
 }
 
 
-bool Cws_config2Ex::onRemoveNode(IEspContext &context, IEspRemoveNodeRequest &req, IEspStatusResponse &resp)
+bool Cws_configMgrEx::onRemoveNode(IEspContext &context, IEspRemoveNodeRequest &req, IEspStatusResponse &resp)
 {
     std::string sessionId = req.getSessionId();
     std::string key = req.getSessionLockKey();
@@ -450,7 +450,7 @@ bool Cws_config2Ex::onRemoveNode(IEspContext &context, IEspRemoveNodeRequest &re
 }
 
 
-bool Cws_config2Ex::onValidateEnvironment(IEspContext &context, IEspValidateEnvironmentRequest &req, IEspStatusResponse &resp)
+bool Cws_configMgrEx::onValidateEnvironment(IEspContext &context, IEspValidateEnvironmentRequest &req, IEspStatusResponse &resp)
 {
     Status status;
     std::string sessionId = req.getSessionId();
@@ -463,7 +463,7 @@ bool Cws_config2Ex::onValidateEnvironment(IEspContext &context, IEspValidateEnvi
 }
 
 
-bool Cws_config2Ex::onSetValues(IEspContext &context, IEspSetValuesRequest &req, IEspStatusResponse &resp)
+bool Cws_configMgrEx::onSetValues(IEspContext &context, IEspSetValuesRequest &req, IEspStatusResponse &resp)
 {
     Status status;
     std::string sessionId = req.getSessionId();
@@ -496,7 +496,7 @@ bool Cws_config2Ex::onSetValues(IEspContext &context, IEspSetValuesRequest &req,
 }
 
 
-bool Cws_config2Ex::onGetParents(IEspContext &context, IEspGetParentsRequest &req, IEspGetParentsResponse &resp)
+bool Cws_configMgrEx::onGetParents(IEspContext &context, IEspGetParentsRequest &req, IEspGetParentsResponse &resp)
 {
     std::string nodeId = req.getNodeId();
     std::string sessionId = req.getSessionId();
@@ -524,7 +524,7 @@ bool Cws_config2Ex::onGetParents(IEspContext &context, IEspGetParentsRequest &re
 }
 
 
-bool Cws_config2Ex::onGetNodeTree(IEspContext &context, IEspGetTreeRequest &req, IEspGetTreeResponse &resp)
+bool Cws_configMgrEx::onGetNodeTree(IEspContext &context, IEspGetTreeRequest &req, IEspGetTreeResponse &resp)
 {
     std::string nodeId = req.getNodeId();
     std::string sessionId = req.getSessionId();
@@ -544,7 +544,7 @@ bool Cws_config2Ex::onGetNodeTree(IEspContext &context, IEspGetTreeRequest &req,
 }
 
 
-bool Cws_config2Ex::onFetchNodes(IEspContext &context, IEspFetchNodesRequest &req, IEspFetchNodesResponse &resp)
+bool Cws_configMgrEx::onFetchNodes(IEspContext &context, IEspFetchNodesRequest &req, IEspFetchNodesResponse &resp)
 {
     std::string sessionId = req.getSessionId();
     std::string path = req.getPath();
@@ -593,7 +593,7 @@ bool Cws_config2Ex::onFetchNodes(IEspContext &context, IEspFetchNodesRequest &re
 }
 
 
-void Cws_config2Ex::buildStatusResponse(const Status &status, ConfigMgrSession *pSession, IEspStatusType &respStatus) const
+void Cws_configMgrEx::buildStatusResponse(const Status &status, ConfigMgrSession *pSession, IEspStatusType &respStatus) const
 {
     std::vector<statusMsg> statusMsgs = status.getMessages();
 
@@ -622,7 +622,7 @@ void Cws_config2Ex::buildStatusResponse(const Status &status, ConfigMgrSession *
 }
 
 
-ConfigMgrSession *Cws_config2Ex::getConfigSession(const std::string &sessionId, bool environmentRequired)
+ConfigMgrSession *Cws_configMgrEx::getConfigSession(const std::string &sessionId, bool environmentRequired)
 {
     ConfigMgrSession *pSession = nullptr;
 
@@ -645,7 +645,7 @@ ConfigMgrSession *Cws_config2Ex::getConfigSession(const std::string &sessionId,
 }
 
 
-ConfigMgrSession *Cws_config2Ex::getConfigSessionForUpdate(const std::string &sessionId, const std::string &lockKey)
+ConfigMgrSession *Cws_configMgrEx::getConfigSessionForUpdate(const std::string &sessionId, const std::string &lockKey)
 {
     ConfigMgrSession *pSession = getConfigSession(sessionId, true);
     if (!pSession->doesKeyFit(lockKey))
@@ -656,7 +656,7 @@ ConfigMgrSession *Cws_config2Ex::getConfigSessionForUpdate(const std::string &se
 }
 
 
-bool Cws_config2Ex::deleteConfigSession(const std::string &sessionId)
+bool Cws_configMgrEx::deleteConfigSession(const std::string &sessionId)
 {
     bool rc = false;
     ConfigMgrSession *pSession = getConfigSession(sessionId);
@@ -670,7 +670,7 @@ bool Cws_config2Ex::deleteConfigSession(const std::string &sessionId)
 }
 
 
-void Cws_config2Ex::getNodeResponse(const std::shared_ptr<EnvironmentNode> &pNode, IEspGetNodeResponse &resp) const
+void Cws_configMgrEx::getNodeResponse(const std::shared_ptr<EnvironmentNode> &pNode, IEspGetNodeResponse &resp) const
 {
     const std::shared_ptr<SchemaItem> &pNodeSchemaItem = pNode->getSchemaItem();
     std::string nodeDisplayName;
@@ -782,7 +782,7 @@ void Cws_config2Ex::getNodeResponse(const std::shared_ptr<EnvironmentNode> &pNod
 }
 
 
-void Cws_config2Ex::getCreateNodeInfoResponse(const std::shared_ptr<EnvironmentNode> &pNode, IEspGetCreateNodeInfoResponse &resp) const
+void Cws_configMgrEx::getCreateNodeInfoResponse(const std::shared_ptr<EnvironmentNode> &pNode, IEspGetCreateNodeInfoResponse &resp) const
 {
     const std::shared_ptr<SchemaItem> &pNodeSchemaItem = pNode->getSchemaItem();
     std::string nodeDisplayName;
@@ -834,7 +834,7 @@ void Cws_config2Ex::getCreateNodeInfoResponse(const std::shared_ptr<EnvironmentN
 
 
 
-void Cws_config2Ex::getNodeInfo(const std::shared_ptr<EnvironmentNode> &pNode, IEspNodeInfoType &nodeInfo) const
+void Cws_configMgrEx::getNodeInfo(const std::shared_ptr<EnvironmentNode> &pNode, IEspNodeInfoType &nodeInfo) const
 {
     const std::shared_ptr<SchemaItem> &pNodeSchemaItem = pNode->getSchemaItem();
     std::string nodeDisplayName;
@@ -847,7 +847,7 @@ void Cws_config2Ex::getNodeInfo(const std::shared_ptr<EnvironmentNode> &pNode, I
 }
 
 
-void Cws_config2Ex::getNodeInfo(const std::shared_ptr<SchemaItem> &pNodeSchemaItem, IEspNodeInfoType &nodeInfo) const
+void Cws_configMgrEx::getNodeInfo(const std::shared_ptr<SchemaItem> &pNodeSchemaItem, IEspNodeInfoType &nodeInfo) const
 {
     //
     // Fill in base node info struct
@@ -863,7 +863,7 @@ void Cws_config2Ex::getNodeInfo(const std::shared_ptr<SchemaItem> &pNodeSchemaIt
 }
 
 
-void Cws_config2Ex::getAttributes(const std::shared_ptr<EnvironmentNode> &pEnvNode, IArrayOf<IEspAttributeType> &nodeAttributes, bool includeMissing) const
+void Cws_configMgrEx::getAttributes(const std::shared_ptr<EnvironmentNode> &pEnvNode, IArrayOf<IEspAttributeType> &nodeAttributes, bool includeMissing) const
 {
     std::vector<std::shared_ptr<SchemaValue>> schemaValues;
     pEnvNode->getSchemaItem()->getAttributes(schemaValues);
@@ -997,7 +997,7 @@ void Cws_config2Ex::getAttributes(const std::shared_ptr<EnvironmentNode> &pEnvNo
 }
 
 
-void Cws_config2Ex::getNodeDisplayName(const std::shared_ptr<EnvironmentNode> &pNode, std::string &nodeDisplayName) const
+void Cws_configMgrEx::getNodeDisplayName(const std::shared_ptr<EnvironmentNode> &pNode, std::string &nodeDisplayName) const
 {
     const std::shared_ptr<SchemaItem> &pNodeSchemaItem = pNode->getSchemaItem();
     nodeDisplayName = pNodeSchemaItem->getProperty("displayName");
@@ -1012,7 +1012,7 @@ void Cws_config2Ex::getNodeDisplayName(const std::shared_ptr<EnvironmentNode> &p
 }
 
 
-void Cws_config2Ex::getNodeParents(const std::string &nodeId, ConfigMgrSession *pSession, StringArray &parentNodeIds) const
+void Cws_configMgrEx::getNodeParents(const std::string &nodeId, ConfigMgrSession *pSession, StringArray &parentNodeIds) const
 {
     std::shared_ptr<EnvironmentNode> pNode = pSession->m_pEnvMgr->findEnvironmentNodeById(nodeId);
     if (pNode)
@@ -1028,7 +1028,7 @@ void Cws_config2Ex::getNodeParents(const std::string &nodeId, ConfigMgrSession *
     }
 }
 
-void Cws_config2Ex::getNodeTree(const std::shared_ptr<EnvironmentNode> &pNode, IEspTreeElementType &treeElement, int levels, bool includeAttributes) const
+void Cws_configMgrEx::getNodeTree(const std::shared_ptr<EnvironmentNode> &pNode, IEspTreeElementType &treeElement, int levels, bool includeAttributes) const
 {
     //
     // Fill in this element

+ 9 - 9
esp/services/ws_config2/ws_config2Service.hpp

@@ -15,27 +15,27 @@
     limitations under the License.
 ############################################################################## */
 
-#ifndef _WSCONFIG2_HPP_
-#define _WSCONFIG2_HPP_
+#ifndef _WSCONFIGMGR_HPP_
+#define _WSCONFIGMGR_HPP_
 
-#include "ws_config2.hpp"
-#include "ws_config2_esp.ipp"
+#include "ws_configmgr.hpp"
+#include "ws_configmgr_esp.ipp"
 #include <string>
 #include "XSDSchemaParser.hpp"
 #include "EnvironmentMgr.hpp"
 #include "XMLEnvironmentMgr.hpp"
-#include "ws_config2Session.hpp"
+#include "ws_configmgrSession.hpp"
 
 
 class Status;
 
-class Cws_config2Ex : public Cws_config2
+class Cws_configMgrEx : public Cws_configmgr
 {
 public:
     IMPLEMENT_IINTERFACE
 
-    Cws_config2Ex();
-    virtual ~Cws_config2Ex();
+    Cws_configMgrEx();
+    virtual ~Cws_configMgrEx();
 
     virtual bool onGetNode(IEspContext &context, IEspGetNodeRequest &req, IEspGetNodeResponse &resp);
     virtual bool onSetValues(IEspContext &context, IEspSetValuesRequest &req, IEspStatusResponse &resp);
@@ -80,4 +80,4 @@ private:
     unsigned m_sessionKey;
 };
 
-#endif // _WSCONFIG2_HPP_
+#endif // _WSCONFIGMGR_HPP_

+ 2 - 2
esp/services/ws_config2/ws_config2Session.hpp

@@ -16,8 +16,8 @@
 ############################################################################## */
 
 
-#ifndef _CONFIG2SERVICE_SESSION_HPP_
-#define _CONFIG2SERVICE_SESSION_HPP_
+#ifndef _CONFIGMGRSERVICE_SESSION_HPP_
+#define _CONFIGMGRSERVICE_SESSION_HPP_
 
 
 #include "EnvironmentMgr.hpp"

+ 4 - 4
esp/services/ws_config2/ws_config2_binding.hpp

@@ -15,14 +15,14 @@
     limitations under the License.
 ############################################################################## */
 
-#include "ws_config2Service.hpp"
+#include "ws_configmgrService.hpp"
 
 
-class Cws_config2SoapBindingEx : public Cws_config2SoapBinding
+class Cws_configMgrSoapBindingEx : public Cws_configmgrSoapBinding
 {
 public:
-    Cws_config2SoapBindingEx(http_soap_log_level level=hsl_none) : Cws_config2SoapBinding(level)  { }
-    Cws_config2SoapBindingEx(IPropertyTree* cfg, const char *bindname, const char *procname, http_soap_log_level level=hsl_none) : Cws_config2SoapBinding(cfg, bindname, procname, level)   {  }
+    Cws_configMgrSoapBindingEx(http_soap_log_level level=hsl_none) : Cws_configmgrSoapBinding(level)  { }
+    Cws_configMgrSoapBindingEx(IPropertyTree* cfg, const char *bindname, const char *procname, http_soap_log_level level=hsl_none) : Cws_configmgrSoapBinding(cfg, bindname, procname, level)   {  }
     //virtual const char* getRootPage(IEspContext* ctx)  {  return "config2html";  }
 
 

+ 7 - 7
esp/services/ws_config2/ws_config2_plugin.cpp

@@ -17,14 +17,14 @@
 
 #pragma warning (disable : 4786)
 
-#include "ws_config2_esp.ipp"
+#include "ws_configmgr_esp.ipp"
 
 //ESP Bindings
 #include "http/platform/httpprot.hpp"
 
 //ESP Service
-#include "ws_config2Service.hpp"
-#include "ws_config2_binding.hpp"
+#include "ws_configmgrService.hpp"
+#include "ws_configmgr_binding.hpp"
 
 #include "espplugin.hpp"
 
@@ -33,9 +33,9 @@ extern "C"
 
 ESP_FACTORY IEspService * esp_service_factory(const char *name, const char* type, IPropertyTree *cfg, const char *process)
 {
-   if (strcmp(type, "ws_config2")==0)
+   if (strcmp(type, "ws_configmgr")==0)
    {
-      Cws_config2Ex* service = new Cws_config2Ex;
+      Cws_configMgrEx* service = new Cws_configMgrEx;
       service->init(cfg, process, name);
       return service;
    }
@@ -44,9 +44,9 @@ ESP_FACTORY IEspService * esp_service_factory(const char *name, const char* type
 
 ESP_FACTORY IEspRpcBinding * esp_binding_factory(const char *name, const char* type, IPropertyTree *cfg, const char *process)
 {
-   if (strcmp(type, "ws_config2SoapBinding")==0)
+   if (strcmp(type, "ws_configMgrSoapBinding")==0)
    {
-        return new Cws_config2SoapBindingEx(cfg, name, process);
+        return new Cws_configMgrSoapBindingEx(cfg, name, process);
    }
 
    return NULL;

+ 0 - 2
initfiles/etc/DIR_NAME/config2mgr/CMakeLists.txt

@@ -14,11 +14,9 @@
 #    See the License for the specific language governing permissions and
 #    limitations under the License.
 ################################################################################
-configure_file("config2mgr.conf.in" "config2mgr.conf")
 configure_file("esp.xml.in" "esp.xml")
 install(
     FILES ${CMAKE_CURRENT_BINARY_DIR}/esp.xml
-          ${CMAKE_CURRENT_BINARY_DIR}/config2mgr.conf
     DESTINATION etc/${DIR_NAME}/config2mgr
     COMPONENT Runtime
     )

+ 0 - 8
initfiles/etc/DIR_NAME/config2mgr/config2mgr.conf.in

@@ -1,8 +0,0 @@
-## Default configuration file for config2
-
-[components]
-configmgr=esp;${CONFIG_DIR}/config2
-brokenconntimeout=60
-buildset=buildset.xml
-wizardalgorithm=genenvrules.conf
-autodetectipscript=${ADMIN_PATH}/get_ip_address_wiz.sh

文件差异内容过多而无法显示
+ 3 - 7
initfiles/etc/DIR_NAME/config2mgr/esp.xml.in