@utils.arg('<STR_LIT:id>', metavar='<STR_LIT>',<EOL>help='<STR_LIT>')<EOL>@utils.arg('<STR_LIT:name>', metavar='<STR_LIT>',<EOL>help='<STR_LIT>')<EOL>@utils.arg('<STR_LIT:type>', metavar='<STR_LIT>',<EOL>help='<STR_LIT>')<EOL>@utils.arg('<STR_LIT:address>', metavar='<STR_LIT>',<EOL>help='<STR_LIT>')<EOL>@utils.arg('<STR_LIT>', metavar='<STR_LIT>', type=int,<EOL>help='<STR_LIT>')<EOL>def do_notification_update(mc, args):
fields = {}<EOL>fields['<STR_LIT>'] = args.id<EOL>fields['<STR_LIT:name>'] = args.name<EOL>fields['<STR_LIT:type>'] = args.type<EOL>fields['<STR_LIT:address>'] = args.address<EOL>if not _validate_notification_period(args.period, args.type.upper()):<EOL><INDENT>return<EOL><DEDENT>fields['<STR_LIT>'] = args.period<EOL>try:<EOL><INDENT>notification = mc.notifications.update(**fields)<EOL><DEDENT>except (osc_exc.ClientException, k_exc.HttpError) as he:<EOL><INDENT>raise osc_exc.CommandError('<STR_LIT>' % (he.message, he.details))<EOL><DEDENT>else:<EOL><INDENT>print(jsonutils.dumps(notification, indent=<NUM_LIT:2>))<EOL><DEDENT>
Update notification.