Eli Mesika has posted comments on this change.

Change subject: core: add support for custom fencing
......................................................................


Patch Set 4:

(5 comments)

http://gerrit.ovirt.org/#/c/28621/4/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/pm/FenceConfigHelper.java
File 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/pm/FenceConfigHelper.java:

Line 18: 
Line 19:    private static void init() {
Line 20:        if (!initialized) {
Line 21:            log = LogFactory.getLog(FenceConfigHelper.class);
Line 22:            keyValidatorMap = new HashMap<String, String>();
> please use constants here, as it is repeating (regex, delimiters, etc.)
Done
Line 23:            keyValidatorMap.put("FenceAgentMapping", 
"((\\w)+[=](\\w)+[,]{0,1})+");
Line 24:            keyValidatorMap.put("FenceAgentDefaultParams", 
"([\\w]+([=][\\w]+){0,1}[,]{0,1})+");
Line 25:            keyValidatorMap.put("VdsFenceOptionMapping", 
"([\\w]+[:]([\\w]*[=][\\w]*[,]{0,1}[;]{0,1}){0,3}[;]{0,1})+");
Line 26:            keyValidatorMap.put("VdsFenceType", "((\\w)+[,]{0,1})+");


Line 26:            keyValidatorMap.put("VdsFenceType", "((\\w)+[,]{0,1})+");
Line 27:            keyValidatorMap.put("CustomFenceAgentMapping", 
"((\\w)+[=](\\w)+[,]{0,1})+");
Line 28:            keyValidatorMap.put("CustomFenceAgentDefaultParams", 
"([\\w]+([=][\\w]+){0,1}[,]{0,1})+");
Line 29:            keyValidatorMap.put("CustomVdsFenceOptionMapping", 
"([\\w]+[:]([\\w]*[=][\\w]*[,]{0,1}[;]{0,1}){0,3}[;]{0,1})+");
Line 30:            keyValidatorMap.put("CustomVdsFenceType", 
"((\\w)+[,]{0,1})+");
> please use constants here, as it is repeating.
Done
Line 31:            keyValidatorExampleMap = new HashMap<String, String>();
Line 32:            keyValidatorExampleMap.put("CustomFenceAgentMapping", 
"agent1=agent2,agent3=agent4");
Line 33:            keyValidatorExampleMap.put("CustomFenceAgentDefaultParams", 
"agent1=key1=val1,flag;key2=val2");
Line 34:            keyValidatorExampleMap.put("CustomVdsFenceOptionMapping", 
"agent1:secure=secure;agent2:port=ipport,slot=slot");


Line 34:            keyValidatorExampleMap.put("CustomVdsFenceOptionMapping", 
"agent1:secure=secure;agent2:port=ipport,slot=slot");
Line 35:            keyValidatorExampleMap.put("CustomVdsFenceType", 
"agent1,agent2");
Line 36: 
Line 37:            keySeparatorMap = new HashMap<String, String>();
Line 38:            keySeparatorMap.put("FenceAgentMapping", ",");
> please use constants here, as it is repeating.
Done
Line 39:            keySeparatorMap.put("FenceAgentDefaultParams", ";");
Line 40:            keySeparatorMap.put("VdsFenceOptionMapping", ";");
Line 41:            keySeparatorMap.put("VdsFenceType", ",");
Line 42:            initialized = true;


Line 36: 
Line 37:            keySeparatorMap = new HashMap<String, String>();
Line 38:            keySeparatorMap.put("FenceAgentMapping", ",");
Line 39:            keySeparatorMap.put("FenceAgentDefaultParams", ";");
Line 40:            keySeparatorMap.put("VdsFenceOptionMapping", ";");
> please use constants here, as it is repeating.
Done
Line 41:            keySeparatorMap.put("VdsFenceType", ",");
Line 42:            initialized = true;
Line 43:        }
Line 44:      }


http://gerrit.ovirt.org/#/c/28621/4/packaging/etc/engine-config/engine-config.properties
File packaging/etc/engine-config/engine-config.properties:

Line 397: PMHealthCheckIntervalInSec.description="The interval in which the 
Power Management Health Check is running."
Line 398: # Reports link
Line 399: RedirectServletReportsPage.description="Redirection target for 
Reports link"
Line 400: RedirectServletReportsPage.type=String
Line 401: # Custome fence agents configurations
> please also give an example in each entry here.
Done
Line 402: CustomFenceAgentMapping.description="Maps a fencing agent to other 
agent implicitly. Format : ((\\w)+[=](\\w)+[,]{0,1})+"
Line 403: CustomFenceAgentMapping.type=FenceConfig
Line 404: CustomFenceAgentDefaultParams.description="Default parameters per 
agent. Format ([\\w]+([=][\\w]+){0,1}[,]{0,1})+"
Line 405: CustomFenceAgentDefaultParams.type=FenceConfig


-- 
To view, visit http://gerrit.ovirt.org/28621
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie887b9025d0813c4d101a886614364127aea75a0
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Martin Peřina <mper...@redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to