def create_from_template(zone, template):
 ret = {'status': True}
 res = __salt__['cmd.run_all']('zonecfg -z {zone} create -t {tmpl} -F'.format(zone=zone, tmpl=template))
 ret['status'] = (res['retcode'] == 0)
 ret['message'] = (res['stdout'] if ret['status'] else res['stderr'])
 ret['message'] = ret['message'].replace('zonecfg: ', '')
 if (ret['message'] == ''):
  del ret['message']
 return ret

def create_from_template ( zone , template ) : ret = { 'status' : True } res = __salt__ [ 'cmd.run_all' ] ( 'zonecfg -z {zone} create -t {tmpl} -F' . format ( zone = zone , tmpl = template ) ) ret [ 'status' ] = ( res [ 'retcode' ] == 0 ) ret [ 'message' ] = ( res [ 'stdout' ] if ret [ 'status' ] else res [ 'stderr' ] ) ret [ 'message' ] = ret [ 'message' ] . replace ( 'zonecfg: ' , '' ) if ( ret [ 'message' ] == '' ) : del ret [ 'message' ] return ret
create an in-memory configuration from a template for the specified zone .