docs: def do_metric_create(mc, args):
      '''Create metric.'''
      fields = {}
      fields['name'] = args.name
      if args.dimensions:
          fields['dimensions'] = utils.format_parameters(args.dimensions)
      fields['timestamp'] = args.time
      fields['value'] = args.value
      if args.value_meta:
          fields['value_meta'] = utils.format_parameters(args.value_meta)
      if args.project_id:
          fields['tenant_id'] = args.project_id
      try:
          mc.metrics.create(**fields)
      except (osc_exc.ClientException, k_exc.HttpError) as he:
          raise osc_exc.CommandError('%s\n%s' % (he.message, he.details))
      else:
          print('Successfully created metric')