
from oslo_config import cfg

consoleauth_group = cfg.OptGroup(
    name='consoleauth',
    title='Console auth options')

consoleauth_opts = [
    cfg.IntOpt('token_ttl',
        default=600,
        min=0,
        deprecated_name='console_token_ttl',
        deprecated_group='DEFAULT',
        help="""
The lifetime of a console auth token.

A console auth token is used in authorizing console access for a user.
Once the auth token time to live count has elapsed, the token is
considered expired.  Expired tokens are then deleted.
""")
]


def register_opts(conf):
    conf.register_group(consoleauth_group)
    conf.register_opts(consoleauth_opts, group=consoleauth_group)


def list_opts():
    return {consoleauth_group: consoleauth_opts}


from oslo_config import cfg

consoleauth_group = cfg.OptGroup(
    name='consoleauth',
    title='Console auth options')

consoleauth_opts = [
    cfg.IntOpt('token_ttl',
        default=600,
        min=0,
        deprecated_name='console_token_ttl',
        deprecated_group='DEFAULT',
        help="""
The lifetime of a console auth token (in seconds).

A console auth token is used in authorizing console access for a user.
Once the auth token time to live count has elapsed, the token is
considered expired.  Expired tokens are then deleted.
""")
]


def register_opts(conf):
    conf.register_group(consoleauth_group)
    conf.register_opts(consoleauth_opts, group=consoleauth_group)


def list_opts():
    return {consoleauth_group: consoleauth_opts}

Add an additional description for 'token_ttl'
Add an additional description for 'token_ttl'

The unit of 'token_ttl' is not clear
in the help text in nova/conf/consoleauth.py.
So add the unit (in seconds) in the help text.

TrivialFix
Change-Id: Id6506b7462c303223bac8586e664e187cb52abd6

  
  from oslo_config import cfg
  
  consoleauth_group = cfg.OptGroup(
      name='consoleauth',
      title='Console auth options')
  
  consoleauth_opts = [
      cfg.IntOpt('token_ttl',
          default=600,
          min=0,
          deprecated_name='console_token_ttl',
          deprecated_group='DEFAULT',
          help="""
- The lifetime of a console auth token.
+ The lifetime of a console auth token (in seconds).
  
  A console auth token is used in authorizing console access for a user.
  Once the auth token time to live count has elapsed, the token is
  considered expired.  Expired tokens are then deleted.
  """)
  ]
  
  
  def register_opts(conf):
      conf.register_group(consoleauth_group)
      conf.register_opts(consoleauth_opts, group=consoleauth_group)
  
  
  def list_opts():
      return {consoleauth_group: consoleauth_opts}
  
Add an additional description for 'token_ttl'
## Code Before:

from oslo_config import cfg

consoleauth_group = cfg.OptGroup(
    name='consoleauth',
    title='Console auth options')

consoleauth_opts = [
    cfg.IntOpt('token_ttl',
        default=600,
        min=0,
        deprecated_name='console_token_ttl',
        deprecated_group='DEFAULT',
        help="""
The lifetime of a console auth token.

A console auth token is used in authorizing console access for a user.
Once the auth token time to live count has elapsed, the token is
considered expired.  Expired tokens are then deleted.
""")
]


def register_opts(conf):
    conf.register_group(consoleauth_group)
    conf.register_opts(consoleauth_opts, group=consoleauth_group)


def list_opts():
    return {consoleauth_group: consoleauth_opts}

## Instruction:
Add an additional description for 'token_ttl'
## Code After:

from oslo_config import cfg

consoleauth_group = cfg.OptGroup(
    name='consoleauth',
    title='Console auth options')

consoleauth_opts = [
    cfg.IntOpt('token_ttl',
        default=600,
        min=0,
        deprecated_name='console_token_ttl',
        deprecated_group='DEFAULT',
        help="""
The lifetime of a console auth token (in seconds).

A console auth token is used in authorizing console access for a user.
Once the auth token time to live count has elapsed, the token is
considered expired.  Expired tokens are then deleted.
""")
]


def register_opts(conf):
    conf.register_group(consoleauth_group)
    conf.register_opts(consoleauth_opts, group=consoleauth_group)


def list_opts():
    return {consoleauth_group: consoleauth_opts}
