-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
It seems that non required parameters are actually required, since the agent will throw an exception if they are missing.
Adding a filter to parse_parameters fixes it for me:
--- /usr/lib/python2.7/site-packages/ocfagent/agent.py 2018-04-17 23:58:29.672919240 +0000
+++ - 2018-04-17 23:58:34.093745968 +0000
@@ -239,7 +239,7 @@
def parse_parameters(self):
"""Parse parameters (given with OCF_RESKEY_ prefix)"""
assert len(self.OCF_ENVIRON) > 0
- for param_cls in self.parameter_spec:
+ for param_cls in [x for x in self.parameter_spec if x.required]:
cls_name = param_cls.name
env_name = "%s%s" % (OCF_RESKEY_PREFIX, cls_name)
if param_cls.type_def == types.IntType: # nopep8
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels