Rename all not associated with LXC stuff. 40/39340/1
authorDariusz Michaluk <d.michaluk@samsung.com>
Tue, 12 May 2015 14:19:01 +0000 (16:19 +0200)
committerDariusz Michaluk <d.michaluk@samsung.com>
Wed, 13 May 2015 09:18:32 +0000 (11:18 +0200)
[Bug/Feature]   Rename all not associated with LXC stuff.
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests.

Change-Id: I40bf4156e5148dc3a6f3d81bc2e7edfe81c56596

33 files changed:
packaging/vasum.spec
server/configs/CMakeLists.txt
server/configs/daemon.conf.in
server/configs/templates/default.conf
server/configs/templates/template.sh [moved from server/configs/lxc-templates/template.sh with 100% similarity]
server/configs/templates/tizen-common-wayland.sh [moved from server/configs/lxc-templates/tizen-common-wayland.sh with 100% similarity]
server/zone-admin.cpp
server/zone-admin.hpp
server/zone-config.hpp
server/zone.cpp
server/zone.hpp
server/zones-manager-config.hpp
server/zones-manager.cpp
tests/unit_tests/CMakeLists.txt
tests/unit_tests/client/configs/ut-client/templates/console-dbus.conf.in
tests/unit_tests/client/configs/ut-client/templates/console-ipc.conf.in
tests/unit_tests/client/configs/ut-client/test-daemon.conf.in
tests/unit_tests/lxc/templates/CMakeLists.txt
tests/unit_tests/lxc/ut-zone.cpp
tests/unit_tests/server/configs/ut-server/templates/default.conf
tests/unit_tests/server/configs/ut-server/test-daemon.conf.in
tests/unit_tests/server/configs/ut-zone-admin/templates/buggy.conf
tests/unit_tests/server/configs/ut-zone-admin/templates/missing.conf
tests/unit_tests/server/configs/ut-zone-admin/templates/test-no-shutdown.conf
tests/unit_tests/server/configs/ut-zone-admin/templates/test.conf
tests/unit_tests/server/configs/ut-zone/templates/buggy.conf
tests/unit_tests/server/configs/ut-zone/templates/test-dbus.conf.in
tests/unit_tests/server/configs/ut-zone/templates/test.conf
tests/unit_tests/server/configs/ut-zones-manager/templates/console.conf
tests/unit_tests/server/configs/ut-zones-manager/test-daemon.conf.in
tests/unit_tests/server/ut-zone-admin.cpp
tests/unit_tests/server/ut-zone-provision.cpp
tests/unit_tests/server/ut-zone.cpp

index 606f535..0636c53 100644 (file)
@@ -41,10 +41,9 @@ between them. A process from inside a zone can request a switch of context
 %attr(755,root,root) %{_bindir}/vasum-server
 %dir /etc/vasum
 %dir /etc/vasum/zones
-%dir /etc/vasum/lxc-templates
 %dir /etc/vasum/templates
 %config /etc/vasum/daemon.conf
-%attr(755,root,root) /etc/vasum/lxc-templates/*.sh
+%attr(755,root,root) /etc/vasum/templates/*.sh
 %config /etc/vasum/templates/*.conf
 %{_unitdir}/vasum.service
 %{_unitdir}/vasum.socket
@@ -248,7 +247,7 @@ systemctl daemon-reload
 %attr(755,root,root) %{script_dir}/vsm_launch_test.py
 %{script_dir}/vsm_test_parser.py
 %config /etc/vasum/tests
-%attr(755,root,root) /etc/vasum/tests/lxc-templates
+%attr(755,root,root) /etc/vasum/tests/templates
 %{python_sitelib}/vsm_integration_tests
 %config /etc/dbus-1/system.d/org.tizen.vasum.tests.conf
 %{_unitdir}/vasum-socket-test.socket
index e34137e..0e7be41 100644 (file)
@@ -19,8 +19,8 @@
 
 MESSAGE(STATUS "Installing configs to " ${VSM_CONFIG_INSTALL_DIR})
 
-FILE(GLOB admin_CONF         lxc-templates/*.sh)
-FILE(GLOB template_CONF      templates/*.conf)
+FILE(GLOB template_CONF      templates/*.conf
+                             templates/*.sh)
 
 ## Generate ####################################################################
 CONFIGURE_FILE(systemd/vasum.service.in
@@ -43,9 +43,6 @@ INSTALL(FILES       ${CMAKE_BINARY_DIR}/dbus-1/system.d/org.tizen.vasum.host.con
 
 INSTALL(DIRECTORY   DESTINATION ${VSM_CONFIG_INSTALL_DIR}/zones) #TODO temporary solution
 
-INSTALL(PROGRAMS    ${admin_CONF}
-        DESTINATION ${VSM_CONFIG_INSTALL_DIR}/lxc-templates)
-
 INSTALL(PROGRAMS    ${template_CONF}
         DESTINATION ${VSM_CONFIG_INSTALL_DIR}/templates)
 
index a6359fa..0800124 100644 (file)
@@ -6,7 +6,7 @@
     "zoneTemplateDir" : "/etc/vasum/templates/",
     "runMountPointPrefix" : "/var/run/zones",
     "defaultId" : "",
-    "lxcTemplatePrefix" : "/etc/vasum/lxc-templates",
+    "zoneTemplatePrefix" : "/etc/vasum/templates",
     "availableVTs" : [3, 4, 5, 6],
     "inputConfig" : {"enabled" : true,
                      "device" : "gpio_keys.6",
index ce88c6e..b8eb5d5 100644 (file)
@@ -1,5 +1,5 @@
 {
-    "lxcTemplate" : "tizen-common-wayland.sh",
+    "zoneTemplate" : "tizen-common-wayland.sh",
     "initWithArgs" : [],
     "requestedState" : "stopped",
     "ipv4Gateway" : "10.0.~IP~.1",
index 0f831d7..473a11c 100644 (file)
@@ -46,7 +46,7 @@ const std::uint64_t DEFAULT_VCPU_PERIOD_MS = 100000;
 
 ZoneAdmin::ZoneAdmin(const std::string& zoneId,
                      const std::string& zonesPath,
-                     const std::string& lxcTemplatePrefix,
+                     const std::string& zoneTemplatePrefix,
                      const ZoneConfig& config,
                      const ZoneDynamicConfig& dynamicConfig)
     : mConfig(config),
@@ -60,9 +60,9 @@ ZoneAdmin::ZoneAdmin(const std::string& zoneId,
 
     if (!mZone.isDefined()) {
 
-        const std::string lxcTemplate = utils::getAbsolutePath(config.lxcTemplate,
-                                                               lxcTemplatePrefix);
-        LOGI(mId << ": Creating zone from template: " << lxcTemplate);
+        const std::string zoneTemplate = utils::getAbsolutePath(config.zoneTemplate,
+                                                               zoneTemplatePrefix);
+        LOGI(mId << ": Creating zone from template: " << zoneTemplate);
         utils::CStringArrayBuilder args;
         if (!dynamicConfig.ipv4Gateway.empty()) {
             args.add("--ipv4-gateway");
@@ -77,7 +77,7 @@ ZoneAdmin::ZoneAdmin(const std::string& zoneId,
             args.add("--vt");
             args.add(vt.c_str());
         }
-        if (!mZone.create(lxcTemplate, args.c_array())) {
+        if (!mZone.create(zoneTemplate, args.c_array())) {
             throw ZoneOperationException("Could not create zone");
         }
     }
index d1b179d..d154beb 100644 (file)
@@ -46,14 +46,14 @@ public:
     /**
      * ZoneAdmin constructor
      * @param zoneId zone id
-     * @param zonesPath directory where zones are defined (lxc configs, rootfs etc)
-     * @param lxcTemplatePrefix directory where templates are stored
+     * @param zonesPath directory where zones are defined (configs, rootfs etc)
+     * @param zoneTemplatePrefix directory where templates are stored
      * @param config zones config
      * @param dynamicConfig zones dynamic config
      */
     ZoneAdmin(const std::string& zoneId,
               const std::string& zonesPath,
-              const std::string& lxcTemplatePrefix,
+              const std::string& zoneTemplatePrefix,
               const ZoneConfig& config,
               const ZoneDynamicConfig& dynamicConfig);
     virtual ~ZoneAdmin();
@@ -85,7 +85,7 @@ public:
 
     /**
      * Check if the zone is stopped. It's NOT equivalent to !isRunning,
-     * because it checks different internal lxc states. There are other states,
+     * because it checks different internal zone states. There are other states,
      * (e.g. paused) when the zone isn't running nor stopped.
      *
      * @return Is the zone stopped?
index b845ef9..aad9159 100644 (file)
@@ -38,9 +38,9 @@ namespace vasum {
 struct ZoneConfig {
 
     /**
-     * Lxc template name (relative to lxcTemplatePrefix)
+     * Zone template name (relative to zoneTemplatePrefix)
      */
-    std::string lxcTemplate;
+    std::string zoneTemplate;
 
     /**
      * Init program with args (empty means default /sbin/init)
@@ -96,7 +96,7 @@ struct ZoneConfig {
 
     CONFIG_REGISTER
     (
-        lxcTemplate,
+        zoneTemplate,
         initWithArgs,
         privilege, // TODO not needed?
         switchToDefaultAfterTimeout, // TODO move to dynamic and add an API to change
index 8a1aa0b..a19fc6a 100644 (file)
@@ -56,7 +56,7 @@ Zone::Zone(const std::string& zoneId,
            const std::string& zonesPath,
            const std::string& zoneTemplatePath,
            const std::string& dbPath,
-           const std::string& lxcTemplatePrefix,
+           const std::string& zoneTemplatePrefix,
            const std::string& baseRunMountPointPath)
     : mDbPath(dbPath)
 {
@@ -75,7 +75,7 @@ Zone::Zone(const std::string& zoneId,
         mRunMountPoint = fs::absolute(mDynamicConfig.runMountPoint, baseRunMountPointPath).string();
     }
 
-    mAdmin.reset(new ZoneAdmin(zoneId, zonesPath, lxcTemplatePrefix, mConfig, mDynamicConfig));
+    mAdmin.reset(new ZoneAdmin(zoneId, zonesPath, zoneTemplatePrefix, mConfig, mDynamicConfig));
 
     const fs::path zonePath = fs::path(zonesPath) / zoneId;
     mRootPath = (zonePath / fs::path("rootfs")).string();
index 6d13d85..ee1bf43 100644 (file)
@@ -46,17 +46,17 @@ public:
     /**
      * Zone constructor
      * @param zoneId zone id
-     * @param zonesPath directory where zones are defined (lxc configs, rootfs etc)
+     * @param zonesPath directory where zones are defined (configs, rootfs etc)
      * @param zoneTemplatePath path for zones config template
      * @param dbPath path to dynamic config db file
-     * @param lxcTemplatePrefix directory where templates are stored
+     * @param zoneTemplatePrefix directory where templates are stored
      * @param baseRunMountPointPath base directory for run mount point
      */
     Zone(const std::string& zoneId,
          const std::string& zonesPath,
          const std::string& zoneTemplatePath,
          const std::string& dbPath,
-         const std::string& lxcTemplatePrefix,
+         const std::string& zoneTemplatePrefix,
          const std::string& baseRunMountPointPath);
     Zone(const Zone&) = delete;
     Zone& operator=(const Zone&) = delete;
@@ -141,7 +141,7 @@ public:
 
     /**
      * Check if the zone is stopped. It's NOT equivalent to !isRunning,
-     * because it checks different internal LXC states. There are other states,
+     * because it checks different internal zone states. There are other states,
      * (e.g. paused) when the zone isn't running nor stopped.
      *
      * @return Is the zone stopped?
index bfc1b25..b59cfc2 100644 (file)
@@ -60,9 +60,9 @@ struct ZonesManagerConfig {
     std::string zoneTemplateDir;
 
     /**
-     * Path prefix for lxc templates
+     * Path prefix for zone templates
      */
-    std::string lxcTemplatePrefix;
+    std::string zoneTemplatePrefix;
 
     /**
      * VTs available for zones
@@ -90,7 +90,7 @@ struct ZonesManagerConfig {
         zonesPath,
         zoneImagePath,
         zoneTemplateDir,
-        lxcTemplatePrefix,
+        zoneTemplatePrefix,
         availableVTs,
         inputConfig,
         runMountPointPrefix,
index 953fad0..c05b1be 100644 (file)
@@ -323,7 +323,7 @@ void ZonesManager::insertZone(const std::string& zoneId, const std::string& zone
                                         mConfig.zonesPath,
                                         zoneTemplatePath,
                                         mConfig.dbPath,
-                                        mConfig.lxcTemplatePrefix,
+                                        mConfig.zoneTemplatePrefix,
                                         mConfig.runMountPointPrefix));
 
     mZones.push_back(std::move(zone));
index 889dd91..500e7af 100644 (file)
@@ -72,9 +72,9 @@ TARGET_LINK_LIBRARIES(${SOCKET_TEST_CODENAME} ${UT_SERVER_DEPS_LIBRARIES} ${Boos
 
 ## Subdirectories ##############################################################
 SET(VSM_TEST_CONFIG_INSTALL_DIR ${VSM_CONFIG_INSTALL_DIR}/tests)
-SET(VSM_TEST_LXC_TEMPLATES_INSTALL_DIR ${VSM_CONFIG_INSTALL_DIR}/tests/lxc-templates)
+SET(VSM_TEST_TEMPLATES_INSTALL_DIR ${VSM_CONFIG_INSTALL_DIR}/tests/templates)
 ADD_DEFINITIONS(-DVSM_TEST_CONFIG_INSTALL_DIR="${VSM_TEST_CONFIG_INSTALL_DIR}")
-ADD_DEFINITIONS(-DVSM_TEST_LXC_TEMPLATES_INSTALL_DIR="${VSM_TEST_LXC_TEMPLATES_INSTALL_DIR}")
+ADD_DEFINITIONS(-DVSM_TEST_TEMPLATES_INSTALL_DIR="${VSM_TEST_TEMPLATES_INSTALL_DIR}")
 
 ADD_SUBDIRECTORY(dbus/configs)
 ADD_SUBDIRECTORY(server/configs)
index 2ff5998..c47dfaa 100644 (file)
@@ -1,5 +1,5 @@
 {
-    "lxcTemplate" : "minimal-dbus.sh",
+    "zoneTemplate" : "minimal-dbus.sh",
     "initWithArgs" : ["/bin/sh", "-c", "trap exit SIGTERM; /usr/bin/dbus-daemon --config-file=@VSM_TEST_CONFIG_INSTALL_DIR@/server/ut-zones-manager/ut-dbus.conf --fork; read"],
     "requestedState" : "running",
     "ipv4Gateway" : "",
index b7b103a..7b48420 100644 (file)
@@ -1,5 +1,5 @@
 {
-    "lxcTemplate" : "minimal-dbus.sh",
+    "zoneTemplate" : "minimal-dbus.sh",
     "initWithArgs" : ["/bin/sh", "-c", "trap exit SIGTERM; read"],
     "requestedState" : "running",
     "ipv4Gateway" : "",
index 6346df3..848366a 100644 (file)
@@ -6,7 +6,7 @@
     "zoneImagePath" : "",
     "zoneTemplateDir" : "@VSM_TEST_CONFIG_INSTALL_DIR@/client/ut-client/templates/",
     "runMountPointPrefix" : "",
-    "lxcTemplatePrefix" : "@VSM_TEST_LXC_TEMPLATES_INSTALL_DIR@",
+    "zoneTemplatePrefix" : "@VSM_TEST_TEMPLATES_INSTALL_DIR@",
     "availableVTs" : [],
     "inputConfig" : {"enabled" : false,
                      "device" : "/dev/doesnotexist",
index 43db4d9..c7b98c5 100644 (file)
@@ -17,7 +17,7 @@
 # @author Piotr Bartosiewicz (p.bartosiewi@partner.samsung.com)
 #
 
-FILE(GLOB LXC_TEMPLATES *.sh)
+FILE(GLOB ZONE_TEMPLATES *.sh)
 
-INSTALL(PROGRAMS     ${LXC_TEMPLATES}
-        DESTINATION  ${VSM_TEST_LXC_TEMPLATES_INSTALL_DIR})
+INSTALL(PROGRAMS     ${ZONE_TEMPLATES}
+        DESTINATION  ${VSM_TEST_TEMPLATES_INSTALL_DIR})
index 194a2a6..e2683d6 100644 (file)
@@ -39,16 +39,16 @@ namespace {
 using namespace vasum;
 using namespace vasum::lxc;
 
-const std::string LXC_PATH = "/tmp/ut-lxc/";
+const std::string ZONE_PATH = "/tmp/ut-zone/";
 const std::string ZONE_NAME = "ut-zone";
-const std::string TEMPLATE = VSM_TEST_LXC_TEMPLATES_INSTALL_DIR "/minimal.sh";
+const std::string ZONE_TEMPLATE = VSM_TEST_TEMPLATES_INSTALL_DIR "/minimal.sh";
 const char* TEMPLATE_ARGS[] = {NULL};
 
 struct Fixture {
     utils::ScopedDir mLxcDirGuard;
 
     Fixture()
-        : mLxcDirGuard(LXC_PATH)
+        : mLxcDirGuard(ZONE_PATH)
     {
         cleanup();
     }
@@ -60,7 +60,7 @@ struct Fixture {
 
     void cleanup()
     {
-        LxcZone lxc(LXC_PATH, ZONE_NAME);
+        LxcZone lxc(ZONE_PATH, ZONE_NAME);
         if (lxc.isDefined()) {
             if (lxc.getState() != LxcZone::State::STOPPED) {
                 lxc.stop();
@@ -82,18 +82,18 @@ BOOST_FIXTURE_TEST_SUITE(LxcZoneSuite, Fixture)
 
 BOOST_AUTO_TEST_CASE(ConstructorDestructor)
 {
-    LxcZone lxc(LXC_PATH, ZONE_NAME);
+    LxcZone lxc(ZONE_PATH, ZONE_NAME);
 }
 
 BOOST_AUTO_TEST_CASE(CreateDestroy)
 {
-    LxcZone lxc(LXC_PATH, ZONE_NAME);
+    LxcZone lxc(ZONE_PATH, ZONE_NAME);
     BOOST_CHECK(!lxc.isDefined());
 
-    BOOST_CHECK(lxc.create(TEMPLATE, TEMPLATE_ARGS));
+    BOOST_CHECK(lxc.create(ZONE_TEMPLATE, TEMPLATE_ARGS));
 
     BOOST_CHECK(lxc.isDefined());
-    BOOST_CHECK_EQUAL(lxc.getConfigItem("lxc.rootfs"), LXC_PATH + ZONE_NAME + "/rootfs");
+    BOOST_CHECK_EQUAL(lxc.getConfigItem("lxc.rootfs"), ZONE_PATH + ZONE_NAME + "/rootfs");
     BOOST_CHECK_EXCEPTION(lxc.getConfigItem("xxx"), LxcException, WhatEquals("Key not found"));
 
     BOOST_CHECK(lxc.destroy());
@@ -104,10 +104,10 @@ BOOST_AUTO_TEST_CASE(CreateDestroy)
 BOOST_AUTO_TEST_CASE(StartShutdown)
 {
     {
-        LxcZone lxc(LXC_PATH, ZONE_NAME);
-        BOOST_CHECK(lxc.create(TEMPLATE, TEMPLATE_ARGS));
+        LxcZone lxc(ZONE_PATH, ZONE_NAME);
+        BOOST_CHECK(lxc.create(ZONE_TEMPLATE, TEMPLATE_ARGS));
     }
-    LxcZone lxc(LXC_PATH, ZONE_NAME);
+    LxcZone lxc(ZONE_PATH, ZONE_NAME);
     BOOST_CHECK(lxc.getState() == LxcZone::State::STOPPED);
     const char* argv[] = {
         "/bin/sh",
@@ -127,10 +127,10 @@ BOOST_AUTO_TEST_CASE(StartShutdown)
 BOOST_AUTO_TEST_CASE(StartStop)
 {
     {
-        LxcZone lxc(LXC_PATH, ZONE_NAME);
-        BOOST_CHECK(lxc.create(TEMPLATE, TEMPLATE_ARGS));
+        LxcZone lxc(ZONE_PATH, ZONE_NAME);
+        BOOST_CHECK(lxc.create(ZONE_TEMPLATE, TEMPLATE_ARGS));
     }
-    LxcZone lxc(LXC_PATH, ZONE_NAME);
+    LxcZone lxc(ZONE_PATH, ZONE_NAME);
     BOOST_CHECK(lxc.getState() == LxcZone::State::STOPPED);
     const char* argv[] = {
         "/bin/sh",
@@ -152,10 +152,10 @@ BOOST_AUTO_TEST_CASE(StartStop)
 BOOST_AUTO_TEST_CASE(StartHasStopped)
 {
     {
-        LxcZone lxc(LXC_PATH, ZONE_NAME);
-        BOOST_CHECK(lxc.create(TEMPLATE, TEMPLATE_ARGS));
+        LxcZone lxc(ZONE_PATH, ZONE_NAME);
+        BOOST_CHECK(lxc.create(ZONE_TEMPLATE, TEMPLATE_ARGS));
     }
-    LxcZone lxc(LXC_PATH, ZONE_NAME);
+    LxcZone lxc(ZONE_PATH, ZONE_NAME);
     BOOST_CHECK(lxc.getState() == LxcZone::State::STOPPED);
     const char* argv[] = {
         "/bin/sh",
@@ -172,8 +172,8 @@ BOOST_AUTO_TEST_CASE(StartHasStopped)
 
 BOOST_AUTO_TEST_CASE(FreezeUnfreeze)
 {
-    LxcZone lxc(LXC_PATH, ZONE_NAME);
-    BOOST_CHECK(lxc.create(TEMPLATE, TEMPLATE_ARGS));
+    LxcZone lxc(ZONE_PATH, ZONE_NAME);
+    BOOST_CHECK(lxc.create(ZONE_TEMPLATE, TEMPLATE_ARGS));
     const char* argv[] = {
         "/bin/sh",
         "-c",
@@ -195,8 +195,8 @@ BOOST_AUTO_TEST_CASE(FreezeUnfreeze)
 
 BOOST_AUTO_TEST_CASE(FreezeStop)
 {
-    LxcZone lxc(LXC_PATH, ZONE_NAME);
-    BOOST_CHECK(lxc.create(TEMPLATE, TEMPLATE_ARGS));
+    LxcZone lxc(ZONE_PATH, ZONE_NAME);
+    BOOST_CHECK(lxc.create(ZONE_TEMPLATE, TEMPLATE_ARGS));
     const char* argv[] = {
         "/bin/sh",
         "-c",
@@ -218,9 +218,9 @@ BOOST_AUTO_TEST_CASE(FreezeStop)
 
 BOOST_AUTO_TEST_CASE(Repeat)
 {
-    LxcZone lxc(LXC_PATH, ZONE_NAME);
-    BOOST_CHECK(lxc.create(TEMPLATE, TEMPLATE_ARGS));
-    BOOST_CHECK(!lxc.create(TEMPLATE, TEMPLATE_ARGS));// forbidden
+    LxcZone lxc(ZONE_PATH, ZONE_NAME);
+    BOOST_CHECK(lxc.create(ZONE_TEMPLATE, TEMPLATE_ARGS));
+    BOOST_CHECK(!lxc.create(ZONE_TEMPLATE, TEMPLATE_ARGS));// forbidden
     const char* argv[] = {
         "/bin/sh",
         "-c",
index 5261493..646fcb1 100644 (file)
@@ -1,5 +1,5 @@
 {
-    "lxcTemplate" : "minimal.sh",
+    "zoneTemplate" : "minimal.sh",
     "initWithArgs" : ["/bin/sh", "-c", "trap exit SIGTERM; read"],
     "requestedState" : "running",
     "ipv4Gateway" : "",
index 8fb9ee2..1d59bdc 100644 (file)
@@ -6,7 +6,7 @@
     "zoneTemplateDir" : "@VSM_TEST_CONFIG_INSTALL_DIR@/server/ut-server/templates/",
     "runMountPointPrefix" : "",
     "defaultId" : "",
-    "lxcTemplatePrefix" : "@VSM_TEST_LXC_TEMPLATES_INSTALL_DIR@",
+    "zoneTemplatePrefix" : "@VSM_TEST_TEMPLATES_INSTALL_DIR@",
     "availableVTs" : [],
     "inputConfig" : {"enabled" : false,
                      "device" : "gpio-keys.4",
index 99bc05e..cff3576 100644 (file)
@@ -1,5 +1,5 @@
 {
-    "lxcTemplate" : "minimal.sh",
+    "zoneTemplate" : "minimal.sh",
     "initWithArgs" : ["/foo"],
     "requestedState" : "running",
     "ipv4Gateway" : "",
index 6c7ce34..9a37d54 100644 (file)
@@ -1,5 +1,5 @@
 {
-    "lxcTemplate" : "missing.sh",
+    "zoneTemplate" : "missing.sh",
     "initWithArgs" : ["/bin/sh", "-c", "trap exit SIGTERM; read"],
     "requestedState" : "running",
     "ipv4Gateway" : "",
index e4f2bf9..e0aec5b 100644 (file)
@@ -1,5 +1,5 @@
 {
-    "lxcTemplate" : "minimal.sh",
+    "zoneTemplate" : "minimal.sh",
     "initWithArgs" : ["/bin/sh"],
     "requestedState" : "running",
     "ipv4Gateway" : "",
index 8af8d42..fea418d 100644 (file)
@@ -1,5 +1,5 @@
 {
-    "lxcTemplate" : "minimal.sh",
+    "zoneTemplate" : "minimal.sh",
     "initWithArgs" : ["/bin/sh", "-c", "trap exit SIGTERM; read"],
     "requestedState" : "running",
     "ipv4Gateway" : "",
index 5c98cfd..d89364d 100644 (file)
@@ -1,5 +1,5 @@
 {
-    "lxcTemplate" : "/buggy/path",
+    "zoneTemplate" : "/buggy/path",
     "initWithArgs" : ["/bin/sh", "-c", "trap exit SIGTERM; read"],
     "requestedState" : "running",
     "ipv4Gateway" : "",
index d2fea11..0dd101a 100644 (file)
@@ -1,5 +1,5 @@
 {
-    "lxcTemplate" : "minimal-dbus.sh",
+    "zoneTemplate" : "minimal-dbus.sh",
     "initWithArgs" : ["/bin/sh", "-c", "trap exit SIGTERM; /usr/bin/dbus-daemon --config-file=@VSM_TEST_CONFIG_INSTALL_DIR@/server/ut-zone/ut-dbus.conf --fork; read"],
     "requestedState" : "running",
     "ipv4Gateway" : "",
index 38907a0..115307d 100644 (file)
@@ -1,5 +1,5 @@
 {
-    "lxcTemplate" : "minimal.sh",
+    "zoneTemplate" : "minimal.sh",
     "initWithArgs" : ["/bin/sh", "-c", "trap exit SIGTERM; read"],
     "requestedState" : "running",
     "ipv4Gateway" : "",
index 02a7dc6..2537e16 100644 (file)
@@ -1,5 +1,5 @@
 {
-    "lxcTemplate" : "minimal.sh",
+    "zoneTemplate" : "minimal.sh",
     "initWithArgs" : ["/bin/sh", "-c", "trap exit SIGTERM; read"],
     "requestedState" : "running",
     "ipv4Gateway" : "",
index adea9b6..a388e6d 100644 (file)
@@ -6,7 +6,7 @@
     "zoneImagePath" : "",
     "zoneTemplateDir" : "@VSM_TEST_CONFIG_INSTALL_DIR@/server/ut-zones-manager/templates/",
     "runMountPointPrefix" : "",
-    "lxcTemplatePrefix" : "@VSM_TEST_LXC_TEMPLATES_INSTALL_DIR@",
+    "zoneTemplatePrefix" : "@VSM_TEST_TEMPLATES_INSTALL_DIR@",
     "availableVTs" : [],
     "inputConfig" : {"enabled" : false,
                      "device" : "/dev/doesnotexist",
index 3aa38d1..72bc2e6 100644 (file)
@@ -43,7 +43,7 @@ const std::string TEST_NO_SHUTDOWN_CONFIG_PATH = TEMPLATES_DIR + "/test-no-shutd
 const std::string BUGGY_CONFIG_PATH = TEMPLATES_DIR + "/buggy.conf";
 const std::string MISSING_CONFIG_PATH = TEMPLATES_DIR + "/missing.conf";
 const std::string ZONES_PATH = "/tmp/ut-zones";
-const std::string LXC_TEMPLATES_PATH = VSM_TEST_LXC_TEMPLATES_INSTALL_DIR;
+const std::string TEMPLATES_PATH = VSM_TEST_TEMPLATES_INSTALL_DIR;
 
 struct Fixture {
     utils::ScopedGlibLoop mLoop;
@@ -62,7 +62,7 @@ struct Fixture {
         config::loadFromJsonFile(configPath, mDynamicConfig);
         return std::unique_ptr<ZoneAdmin>(new ZoneAdmin("zoneId",
                                                         ZONES_PATH,
-                                                        LXC_TEMPLATES_PATH,
+                                                        TEMPLATES_PATH,
                                                         mConfig,
                                                         mDynamicConfig));
     }
index a79a260..d6a5955 100644 (file)
@@ -51,7 +51,7 @@ namespace {
 const std::string TEST_CONFIG_PATH = VSM_TEST_CONFIG_INSTALL_DIR "/server/ut-zone-provision/test.conf";
 const std::string ZONE = "ut-zone-provision-test";
 const fs::path ZONES_PATH = "/tmp/ut-zones";
-const fs::path LXC_TEMPLATES_PATH = VSM_TEST_LXC_TEMPLATES_INSTALL_DIR;
+const fs::path TEMPLATES_PATH = VSM_TEST_TEMPLATES_INSTALL_DIR;
 const fs::path ZONE_PATH = ZONES_PATH / fs::path(ZONE);
 const fs::path SOME_FILE_PATH = ZONE_PATH / "file.txt";
 const fs::path ROOTFS_PATH = ZONE_PATH / "rootfs";
index b4938b4..2aed285 100644 (file)
@@ -57,7 +57,7 @@ const std::string TEST_DBUS_CONFIG_PATH = TEMPLATES_DIR + "/test-dbus.conf";
 const std::string BUGGY_CONFIG_PATH = TEMPLATES_DIR + "/buggy.conf";
 const std::string MISSING_CONFIG_PATH = TEMPLATES_DIR + "/missing.conf";
 const std::string ZONES_PATH = "/tmp/ut-zones";
-const std::string LXC_TEMPLATES_PATH = VSM_TEST_LXC_TEMPLATES_INSTALL_DIR;
+const std::string TEMPLATES_PATH = VSM_TEST_TEMPLATES_INSTALL_DIR;
 const std::string DB_PATH = ZONES_PATH + "/vasum.db";
 const std::string BRIDGE_NAME = "brtest01";
 const std::string ZONE_NETDEV = "netdevtest01";
@@ -88,7 +88,7 @@ struct Fixture {
                                               ZONES_PATH,
                                               configPath,
                                               DB_PATH,
-                                              LXC_TEMPLATES_PATH,
+                                              TEMPLATES_PATH,
                                               ""));
     }
 
@@ -146,7 +146,7 @@ BOOST_AUTO_TEST_CASE(StartStop)
 
 BOOST_AUTO_TEST_CASE(DbusConnection)
 {
-    mRunGuard.create("/tmp/ut-run"); // the same path as in lxc template
+    mRunGuard.create("/tmp/ut-run"); // the same path as in zone template
 
     auto c = create(TEST_DBUS_CONFIG_PATH);
     c->start();