Saggi Mizrahi has posted comments on this change. Change subject: Move fencing logic out of API.py ......................................................................
Patch Set 4: (3 inline comments) .................................................... File vdsm_api/vdsmapi-schema.json Line 305: # Line 306: # Since: 4.10.0 Line 307: ## Line 308: {'command': {'class': 'Global', 'name': 'fenceNode'}, Line 309: 'data': {'addr': 'str', 'bladePort': 'int', 'agent': 'str', 'username': 'str', I'll change the type, And for now I think that just having it being anything but "port" will make things far less confusing. Line 310: 'password': 'str', 'action': 'FenceNodeAction', '*secure': 'bool', Line 311: '*options': 'str'}, Line 312: 'returns': {'*power': 'FenceNodePowerStatus'}} Line 313: .................................................... File vdsm/fenceAgent.py Line 99: power = 'on' Line 100: elif p.returncode == 2: Line 101: power = 'off' Line 102: else: Line 103: power = 'unknown' That what the original code contained. I'm just moving it around. Line 104: Line 105: return power Line 106: Line 107: Line 108: def fenceNode(addr, port, agent, username, password, action, Line 109: secure=False, options='', cancelEvent=None): Line 110: Line 111: if action not in ('on', 'off', 'reboot'): Line 112: raise ValueError('illegal action ' + action) Log what? It's pretty obvious what happened here. Someone sent the wrong value. Line 113: Line 114: inp = _buildInput(addr, port, agent, username, password, action, secure, Line 115: options) Line 116: -- To view, visit http://gerrit.ovirt.org/7190 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I944c6548a42612f705a410fb4290215451bca035 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Saggi Mizrahi <smizr...@redhat.com> Gerrit-Reviewer: Adam Litke <a...@us.ibm.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Saggi Mizrahi <smizr...@redhat.com> Gerrit-Reviewer: Shu Ming <shum...@linux.vnet.ibm.com> Gerrit-Reviewer: oVirt Jenkins CI Server _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches