diff options
author | Zuul <zuul@review.opendev.org> | 2022-07-22 00:54:38 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2022-07-22 00:54:38 +0000 |
commit | b7c71bdbb89b8fc158cd43375ee4a771b0b45694 (patch) | |
tree | eb899ae422e3c9cbe5d96408b2c8e9e9c19ebd94 /ironic/common | |
parent | 7673cb827b0ef247fa87c852f370b4f5d7f5e39a (diff) | |
parent | 79f82c0262c84f1e317991052d065259b3a4683d (diff) | |
download | ironic-b7c71bdbb89b8fc158cd43375ee4a771b0b45694.tar.gz |
Merge "[iRMC] Add SNMPv3 authentication functionality"
Diffstat (limited to 'ironic/common')
-rw-r--r-- | ironic/common/utils.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ironic/common/utils.py b/ironic/common/utils.py index fcf838965..e4d83c9b6 100644 --- a/ironic/common/utils.py +++ b/ironic/common/utils.py @@ -669,3 +669,15 @@ def fast_track_enabled(node): except ValueError as exc: raise exception.InvalidParameterValue( _("Invalid value of fast_track: %s") % exc) + + +def is_fips_enabled(): + """Check if FIPS mode is enabled in the system.""" + try: + with open('/proc/sys/crypto/fips_enabled', 'r') as f: + content = f.read() + if content == "1\n": + return True + except Exception: + pass + return False |