summaryrefslogtreecommitdiff
path: root/ironic/api/controllers/v1/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'ironic/api/controllers/v1/utils.py')
-rw-r--r--ironic/api/controllers/v1/utils.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/ironic/api/controllers/v1/utils.py b/ironic/api/controllers/v1/utils.py
index 39ea32e5c..270ce48e7 100644
--- a/ironic/api/controllers/v1/utils.py
+++ b/ironic/api/controllers/v1/utils.py
@@ -602,6 +602,16 @@ def allow_node_rebuild_with_configdrive():
versions.MINOR_35_REBUILD_CONFIG_DRIVE)
+def allow_agent_version_in_heartbeat():
+ """Check if agent version is allowed to be passed into heartbeat.
+
+ Version 1.36 of the API added the ability for agents to pass their version
+ information to Ironic on heartbeat.
+ """
+ return (pecan.request.version.minor >=
+ versions.MINOR_36_AGENT_VERSION_HEARTBEAT)
+
+
def get_controller_reserved_names(cls):
"""Get reserved names for a given controller.