Boot (or activate) the specified zone.

    zone : string
        name or uuid of the zone
    single : boolean
        boots only to milestone svc:/milestone/single-user:default.
    altinit : string
        valid path to an alternative executable to be the primordial process.
    smf_options : string
        include two categories of options to control booting behavior of
        the service management facility: recovery options and messages options.

    CLI Example:

    .. code-block:: bash

        salt '*' zoneadm.boot clementine
        salt '*' zoneadm.boot maeve single=True
        salt '*' zoneadm.boot teddy single=True smf_options=verbose

def boot(zone, single=False, altinit=None, smf_options=None):
    '''
    Boot (or activate) the specified zone.

    zone : string
        name or uuid of the zone
    single : boolean
        boots only to milestone svc:/milestone/single-user:default.
    altinit : string
        valid path to an alternative executable to be the primordial process.
    smf_options : string
        include two categories of options to control booting behavior of
        the service management facility: recovery options and messages options.

    CLI Example:

    .. code-block:: bash

        salt '*' zoneadm.boot clementine
        salt '*' zoneadm.boot maeve single=True
        salt '*' zoneadm.boot teddy single=True smf_options=verbose
    '''
    ret = {'status': True}

    ## build boot_options
    boot_options = ''
    if single:
        boot_options = '-s {0}'.format(boot_options)
    if altinit:  # note: we cannot validate the path, as this is local to the zonepath.
        boot_options = '-i {0} {1}'.format(altinit, boot_options)
    if smf_options:
        boot_options = '-m {0} {1}'.format(smf_options, boot_options)
    if boot_options != '':
        boot_options = ' -- {0}'.format(boot_options.strip())

    ## execute boot
    res = __salt__['cmd.run_all']('zoneadm {zone} boot{boot_opts}'.format(
        zone='-u {0}'.format(zone) if _is_uuid(zone) else '-z {0}'.format(zone),
        boot_opts=boot_options,
    ))
    ret['status'] = res['retcode'] == 0
    ret['message'] = res['stdout'] if ret['status'] else res['stderr']
    ret['message'] = ret['message'].replace('zoneadm: ', '')
    if ret['message'] == '':
        del ret['message']

    return ret