Browse Source

Add oslo.config compatibility attributes

In trying to get the OpenStack server projects to consume keystoneauth,
we ran in to the fact that they want to treat the things registered with
"register_conf_options" as oslo.config objects. It works fine that they
aren't - except that an oslo.config option has an attribute called
'deprecated_opts' while ours is called 'deprecated'. The same is true
of the other three attributes added.

Change-Id: I7d53c17d518b01946e091702a582648998c2ae17
Monty Taylor 3 years ago
parent
commit
25c8c5f484
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      keystoneauth1/loading/opts.py

+ 5
- 0
keystoneauth1/loading/opts.py View File

@@ -88,6 +88,11 @@ class Opt(object):
88 88
         self.deprecated = [] if deprecated is None else deprecated
89 89
         self.default = default
90 90
         self.metavar = metavar
91
+        # These are for oslo.config compat
92
+        self.deprecated_opts = self.deprecated
93
+        self.deprecated_for_removal = []
94
+        self.sample_default = None
95
+        self.group = None
91 96
 
92 97
     def __repr__(self):
93 98
         return '<Opt: %s>' % self.name

Loading…
Cancel
Save