Looks OK but keep a comment at the removed #if. E.g.
/* Following actions are done on procedure level
/* Online uninstallation of old software */
/* Delete SaAmfNodeSwBundle object */
/Bertil
-----Original Message-----
From: Ingvar Bergström
Sent: den 7 januari 2014 10:22
To: Bertil Engelholm
Cc: [email protected]
Subject: [PATCH 1 of 1] smfd: attribute saAmfSUMaintenanceCampaign is set for
restartable units [#703]
osaf/services/saf/smfsv/smfd/SmfStepTypes.cc | 179 +++-----------------------
1 files changed, 21 insertions(+), 158 deletions(-)
The attribute saAmfSUMaintenanceCampaign shall be set for the hosting entity in
case the entity is a a restartable unit i.e. a component
diff --git a/osaf/services/saf/smfsv/smfd/SmfStepTypes.cc
b/osaf/services/saf/smfsv/smfd/SmfStepTypes.cc
--- a/osaf/services/saf/smfsv/smfd/SmfStepTypes.cc
+++ b/osaf/services/saf/smfsv/smfd/SmfStepTypes.cc
@@ -114,22 +114,6 @@ SmfStepTypeSwInstall::execute()
return false;
}
-#if 0
-//Moved to the procedure
- /* Online uninstallation of old software */
- LOG_NO("STEP: Online uninstallation of old software");
- if (m_step->onlineRemoveOldBundles() == false) {
- LOG_ER("Failed to online remove bundles");
- return false;
- }
-
- /* Delete SaAmfNodeSwBundle object */
- LOG_NO("STEP: Delete old SaAmfNodeSwBundle objects");
- if (m_step->deleteSaAmfNodeSwBundlesOld() == false) {
- LOG_ER("Failed to delete old SaAmfNodeSwBundle objects");
- return false;
- }
-#endif
LOG_NO("STEP: Upgrade SW install step completed %s",
m_step->getDn().c_str());
TRACE_LEAVE();
@@ -173,23 +157,6 @@ SmfStepTypeSwInstall::rollback()
return false;
}
-#if 0
-//Moved to the procedure
- /* Online uninstallation of new software */
- LOG_NO("STEP: Online uninstallation of new software");
- if (m_step->onlineRemoveNewBundles() == false) {
- LOG_ER("Failed to online uninstall new bundles");
- return false;
- }
-
- /* Delete new SaAmfNodeSwBundle objects */
- LOG_NO("STEP: Delete new SaAmfNodeSwBundle objects");
- if (m_step->deleteSaAmfNodeSwBundlesNew() == false) {
- LOG_ER("Failed to delete new SaAmfNodeSwBundle objects");
- return false;
- }
-#endif
-
LOG_NO("STEP: Rolling back SW install step completed %s",
m_step->getDn().c_str());
TRACE_LEAVE();
@@ -449,23 +416,6 @@ SmfStepTypeAuLock::execute()
return false;
}
-#if 0
-//Moved to the procedure
- /* Online uninstallation of old software */
- LOG_NO("STEP: Online uninstallation of old software");
- if (m_step->onlineRemoveOldBundles() == false) {
- LOG_ER("Failed to online remove bundles in
step=%s",m_step->getRdn().c_str());
- return false;
- }
-
- /* Delete old SaAmfNodeSwBundle object */
- LOG_NO("STEP: Delete old SaAmfNodeSwBundle objects");
- if (m_step->deleteSaAmfNodeSwBundlesOld() == false) {
- LOG_ER("Failed to delete old SaAmfNodeSwBundle objects in
step=%s",m_step->getRdn().c_str());
- return false;
- }
-#endif
-
LOG_NO("STEP: Upgrade AU lock step completed %s",
m_step->getDn().c_str());
TRACE_LEAVE();
@@ -584,23 +534,6 @@ SmfStepTypeAuLock::rollback()
return false;
}
-#if 0
-//Moved to the procedure
- /* Online uninstallation of new software */
- LOG_NO("STEP: Online uninstallation of new software");
- if (m_step->onlineRemoveNewBundles() == false) {
- LOG_ER("Failed to online uninstall new bundles");
- return false;
- }
-
- /* Delete new SaAmfNodeSwBundle objects */
- LOG_NO("STEP: Delete new SaAmfNodeSwBundle objects");
- if (m_step->deleteSaAmfNodeSwBundlesNew() == false) {
- LOG_ER("Failed to delete new SaAmfNodeSwBundle objects");
- return false;
- }
-#endif
-
LOG_NO("STEP: Rolling back SW AU lock step completed %s",
m_step->getDn().c_str());
TRACE_LEAVE();
@@ -939,7 +872,11 @@ SmfStepTypeAuRestart::execute()
return false;
}
-//TODO: Shall maintenance status be set here for restartable units ??
+ /* Set maintenance status */
+ if (m_step->setMaintenanceStateActUnits() == false) {
+ LOG_ER("Failed to set maintenance state in
step=%s",m_step->getRdn().c_str());
+ return false;
+ }
/* Restartable activation units, restart them */
LOG_NO("STEP: Restart activation units"); @@ -955,23 +892,6 @@
SmfStepTypeAuRestart::execute()
return false;
}
-#if 0
-//Moved to the procedure
- /* Online uninstallation of old software */
- LOG_NO("STEP: Online uninstallation of old software");
- if (m_step->onlineRemoveOldBundles() == false) {
- LOG_ER("Failed to online remove bundles");
- return false;
- }
-
- /* Delete old SaAmfNodeSwBundle objects */
- LOG_NO("STEP: Delete old SaAmfNodeSwBundle objects");
- if (m_step->deleteSaAmfNodeSwBundlesOld() == false) {
- LOG_ER("Failed to delete old SaAmfNodeSwBundle objects");
- return false;
- }
-#endif
-
LOG_NO("STEP: Upgrade AU restart step completed %s",
m_step->getDn().c_str());
TRACE_LEAVE();
@@ -1016,7 +936,11 @@ SmfStepTypeAuRestart::rollback()
return false;
}
-//TODO: Shall maintenance status be set here for restartable units ??
+ /* Set maintenance status */
+ if (m_step->setMaintenanceStateActUnits() == false) {
+ LOG_ER("Failed to set maintenance state in
step=%s",m_step->getRdn().c_str());
+ return false;
+ }
/* Restartable activation units, restart them */
LOG_NO("STEP: Restart activation units"); @@ -1032,23 +956,6 @@
SmfStepTypeAuRestart::rollback()
return false;
}
-#if 0
-//Moved to the procedure
- /* Online uninstallation of new software */
- LOG_NO("STEP: Online uninstallation of new software");
- if (m_step->onlineRemoveNewBundles() == false) {
- LOG_ER("Failed to online uninstall new bundles");
- return false;
- }
-
- /* Delete new SaAmfNodeSwBundle objects */
- LOG_NO("STEP: Delete new SaAmfNodeSwBundle objects");
- if (m_step->deleteSaAmfNodeSwBundlesNew() == false) {
- LOG_ER("Failed to delete new SaAmfNodeSwBundle objects");
- return false;
- }
-#endif
-
LOG_NO("STEP: Rolling back AU restart step completed %s",
m_step->getDn().c_str());
TRACE_LEAVE();
@@ -1124,7 +1031,11 @@ SmfStepTypeAuRestartAct::execute()
return false;
}
-//TODO: Shall maintenance status be set here for restartable units ??
+ /* Set maintenance status */
+ if (m_step->setMaintenanceStateActUnits() == false) {
+ LOG_ER("Failed to set maintenance state in
step=%s",m_step->getRdn().c_str());
+ return false;
+ }
/* Restartable activation units, restart them */
LOG_NO("STEP: Restart activation units"); @@ -1185,8 +1096,6 @@
SmfStepTypeAuRestartAct::rollback()
return false;
}
-//TODO: Shall maintenance status be set here for restartable units ??
-
/* Online uninstallation of new software */
LOG_NO("STEP: Online uninstallation of new software");
if (m_step->onlineRemoveNewBundles() == false) { @@ -1208,6 +1117,12 @@
SmfStepTypeAuRestartAct::rollback()
return false;
}
+ /* Set maintenance status */
+ if (m_step->setMaintenanceStateActUnits() == false) {
+ LOG_ER("Failed to set maintenance state in
step=%s",m_step->getRdn().c_str());
+ return false;
+ }
+
/* Restartable activation units, restart them */
LOG_NO("STEP: Restart activation units");
if (m_step->restartActivationUnits() == false) { @@ -1449,24 +1364,6
@@ SmfStepTypeNodeReboot::execute()
return false;
}
-#if 0
-//Moved to the procedure
-
- /* Online uninstallation of old software (no reboot required) */
- LOG_NO("STEP: Online uninstallation of old software");
- if (m_step->onlineRemoveOldBundles() == false) {
- LOG_ER("Failed to online remove bundles in
step=%s",m_step->getRdn().c_str());
- return false;
- }
-
- /* Delete old SaAmfNodeSwBundle objects */
- LOG_NO("STEP: Delete old SaAmfNodeSwBundle objects");
- if (m_step->deleteSaAmfNodeSwBundlesOld() == false) {
- LOG_ER("Failed to delete old SaAmfNodeSwBundle objects in
step=%s",m_step->getRdn().c_str());
- return false;
- }
-#endif
-
LOG_NO("STEP: Upgrade node reboot step completed %s",
m_step->getDn().c_str());
TRACE_LEAVE();
@@ -1680,23 +1577,6 @@ SmfStepTypeNodeReboot::rollback()
return false;
}
-#if 0
-//Moved to the procedure
- /* Online uninstallation of new software */
- LOG_NO("STEP: Online uninstallation of new software");
- if (m_step->onlineRemoveNewBundles() == false) {
- LOG_ER("Failed to online uninstall new bundles");
- return false;
- }
-
- /* Delete new SaAmfNodeSwBundle objects */
- LOG_NO("STEP: Delete new SaAmfNodeSwBundle objects");
- if (m_step->deleteSaAmfNodeSwBundlesNew() == false) {
- LOG_ER("Failed to delete new SaAmfNodeSwBundle objects");
- return false;
- }
-#endif
-
LOG_NO("STEP: Rolling back node reboot step completed %s",
m_step->getDn().c_str());
TRACE_LEAVE();
@@ -2290,23 +2170,6 @@ SmfStepTypeClusterReboot::execute()
break;
-#if 0
-//Moved to the procedure
-
- /* Online uninstallation of old software (no reboot required) */
- LOG_NO("STEP: Online uninstallation of old software");
- if (m_step->onlineRemoveOldBundles() == false) {
- LOG_ER("SmfStepTypeClusterReboot::execute, fail to
online remove bundles in step=%s",m_step->getRdn().c_str());
- return false;
- }
-
- /* Delete old SaAmfNodeSwBundle objects */
- LOG_NO("STEP: Delete old SaAmfNodeSwBundle objects");
- if (m_step->deleteSaAmfNodeSwBundlesOld() == false) {
- LOG_ER("Failed to delete old SaAmfNodeSwBundle objects
in step=%s",m_step->getRdn().c_str());
- return false;
- }
-#endif
default:
LOG_ER("SmfStepTypeClusterReboot::execute, unknown reboot info
%d", singleStepRebootInfo);
return false;
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel