@salt.utils.decorators.memoize
def _is_globalzone():
 if (not (__grains__['kernel'] == 'SunOS')):
  return False
 zonename = __salt__['cmd.run_all']('zonename')
 if zonename['retcode']:
  return False
 if (zonename['stdout'] == 'global'):
  return True
 return False

@ salt . utils . decorators . memoize def _is_globalzone ( ) : if ( not ( __grains__ [ 'kernel' ] == 'SunOS' ) ) : return False zonename = __salt__ [ 'cmd.run_all' ] ( 'zonename' ) if zonename [ 'retcode' ] : return False if ( zonename [ 'stdout' ] == 'global' ) : return True return False
check if we are running in the globalzone .