The periodic_task module hasn't been sync'd since the middle of the
Juno release cycle. This patch brings it up to date with the
latest oslo-incubator code.
Current HEAD in OSLO:
---------------------
commit
36b0e8570b449129d6d474c03b02ceb62edb78df
Date: Thu Dec 11 11:27:08 2014 +0100
We shouldn't replace `oslo-incubator` in comments
Changes merged with this patch:
---------------------
5d40e143 - Remove code that moved to oslo.i18n
a3220c51 - add list_opts to all modules with configuration options
Change-Id: I0d68ba54617be550244969b7672e95158126f64a
# License for the specific language governing permissions and limitations
# under the License.
+import copy
import random
import time
from oslo.config import cfg
import six
-from cinder.openstack.common.gettextutils import _, _LE, _LI
+from cinder.openstack.common._i18n import _, _LE, _LI
from cinder.openstack.common import log as logging
DEFAULT_INTERVAL = 60.0
+def list_opts():
+ """Entry point for oslo.config-generator."""
+ return [(None, copy.deepcopy(periodic_opts))]
+
+
class InvalidPeriodicTaskArg(Exception):
message = _("Unexpected argument for periodic task creation: %(arg)s.")