@utils.arg('id', metavar='<ALARM_ID>',
           help='The ID of the alarm.')
@utils.arg('state', metavar='<ALARM_STATE>',
           help='ALARM_STATE is one of [UNDETERMINED, OK, ALARM].')
@utils.arg('lifecycle_state', metavar='<LIFECYCLE_STATE>',
           help='The lifecycle state of the alarm.')
@utils.arg('link', metavar='<LINK>',
           help='A link to an external resource with information about the alarm.')
def do_alarm_update(mc, args):
    fields = {}
    fields['alarm_id'] = args.id
    if args.state.upper() not in state_types:
            errmsg = 'Invalid state, not one of [' + \
                ', '.join(state_types) + ']'
            print(errmsg)
            return
    fields['state'] = args.state
    fields['lifecycle_state'] = args.lifecycle_state
    fields['link'] = args.link
    try:
        alarm = mc.alarms.update(**fields)
    except exc.HTTPException as he:
        raise exc.CommandError(
            'HTTPException code=%s message=%s' %
            (he.code, he.message))
    else:
        print(jsonutils.dumps(alarm, indent=2))
Requests supervisor process and all controlled services shutdown.
dataset/ETHPy150Open openstack/python-monascaclient/monascaclient/v2_0/shell.py/do_alarm_update--crossover with--dataset/ETHPy150Open ipeirotis/Mturk-Tracker/deployment/modules/supervisor.py/shutdown