HWRF  trunk@4391
Public Member Functions | Public Attributes | List of all members
produtil.cluster.NOAAWCOSS Class Reference

Represents the NOAA WCOSS clusters, Tide, Gyre and the test system Eddy. More...

Detailed Description

Represents the NOAA WCOSS clusters, Tide, Gyre and the test system Eddy.

Automatically determines which WCOSS the program is on based on the first letter of socket.gethostname(). Will report no ACL support, and no group quotas. Hence, the cluster should use group IDs for access control.

The production accessor is no longer a public member variable: it is now a property, which may open the /etc/prod file. The result of the self.production property is cached for up to prod_cache_time seconds. That time can be specified in the constructor, and defaults to 30 seconds.

Definition at line 202 of file cluster.py.

Inheritance diagram for produtil.cluster.NOAAWCOSS:
produtil.cluster.Cluster produtil.cluster.WCOSSCray

Public Member Functions

def __init__
 Creates a NOAAWCOSS object, and optionally specifies the time for which the result of self.production should be cached. More...
 
def uncache (self)
 Clears the cached value of self.production so the next call will return up-to-date information. More...
 
def production (self)
 Is this the WCOSS production machine? More...
 
- Public Member Functions inherited from produtil.cluster.Cluster
def __init__
 Sets all public member variables. More...
 

Public Attributes

 name
 
- Public Attributes inherited from produtil.cluster.Cluster
 group_quotas
 True if group membership is used to manage disk quotas. More...
 
 acl_support
 True if the system uses Access Control Lists (ACLs) to control access to files. More...
 
 production
 True if this system is production (real-time forecasting) environment, and False otherwise. More...
 
 name
 a short name of this cluster. More...
 
 longname
 a long name of this cluster. More...
 
 use_acl_for_rstdata
 True if the scripts should use ACLs to protect restricted access data. More...
 

Constructor & Destructor Documentation

def produtil.cluster.NOAAWCOSS.__init__ (   self,
  prod_cache_time = 30,
  name = None 
)

Creates a NOAAWCOSS object, and optionally specifies the time for which the result of self.production should be cached.

Default: 30 seconds.

Parameters
prod_cache_timehow long to cache the prod vs. dev information, in seconds

Definition at line 216 of file cluster.py.

Member Function Documentation

def produtil.cluster.NOAAWCOSS.production (   self)

Is this the WCOSS production machine?

The return value may change during the execution of this program if a production switch happened. In addition, the check requires opening and parsing the /etc/prod file, so the runtime is likely several milliseconds when the cache times out. To force a refresh of this information, call self.uncache() first.

Definition at line 237 of file cluster.py.

def produtil.cluster.NOAAWCOSS.uncache (   self)

Clears the cached value of self.production so the next call will return up-to-date information.

Definition at line 231 of file cluster.py.


The documentation for this class was generated from the following file: