Merge "Sync periodic_task module from oslo-incubator"

This commit is contained in:
Jenkins 2014-12-23 20:42:52 +00:00 committed by Gerrit Code Review
commit 50615d94f6

View File

@ -11,13 +11,14 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
import copy
import random import random
import time import time
from oslo.config import cfg from oslo.config import cfg
import six 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 from cinder.openstack.common import log as logging
@ -36,6 +37,11 @@ LOG = logging.getLogger(__name__)
DEFAULT_INTERVAL = 60.0 DEFAULT_INTERVAL = 60.0
def list_opts():
"""Entry point for oslo.config-generator."""
return [(None, copy.deepcopy(periodic_opts))]
class InvalidPeriodicTaskArg(Exception): class InvalidPeriodicTaskArg(Exception):
message = _("Unexpected argument for periodic task creation: %(arg)s.") message = _("Unexpected argument for periodic task creation: %(arg)s.")