parameters: ( self, build )
return_statement: return siteElement
docstring: Creates the top level CDash Site Element.
      
      Returns the <Site> element.
docstring_summary: Creates the top level CDash Site Element.
      
      Returns the <Site> element.
docstring_tokens: Creates the top level CDash Site Element . Returns the <Site > element .
function: def createSiteElement( self, build ):
      '''
      Creates the top level CDash Site Element.
      
      Returns the <Site> element.
      '''
  
      # grab the current xml structure
      xml = self.__xml
  
      # check if we run against a build tree
      if build:
        type = 'build'
      else:
        type = 'dev'
  
      #
      # create <Site>
      #
  
      # grab the system information
      os_platform = platform.uname()[0]
      os_version = platform.uname()[2]
      hostname = getfqdn()
  
      # grab the current buildtime
      buildtime = datetime.now().strftime( "%Y%m%d-%H%M" )
  
      siteElement = xml.createElement( 'Site' )
      # .. and the attributes for it
      siteElement.setAttribute( 'BuildName', os_platform + '-' + os_version + '-' + type )
      siteElement.setAttribute( 'BuildStamp', buildtime + '-${BUILDTYPE}' )
      siteElement.setAttribute( 'Hostname', hostname )
      siteElement.setAttribute( 'Name', hostname )
  
      return siteElement
function_tokens: def createSiteElement ( self , build ) : # grab the current xml structure xml = self . __xml # check if we run against a build tree if build : type = 'build' else : type = 'dev' # # create <Site> # # grab the system information os_platform = platform . uname ( ) [ 0 ] os_version = platform . uname ( ) [ 2 ] hostname = getfqdn ( ) # grab the current buildtime buildtime = datetime . now ( ) . strftime ( "%Y%m%d-%H%M" ) siteElement = xml . createElement ( 'Site' ) # .. and the attributes for it siteElement . setAttribute ( 'BuildName' , os_platform + '-' + os_version + '-' + type ) siteElement . setAttribute ( 'BuildStamp' , buildtime + '-${BUILDTYPE}' ) siteElement . setAttribute ( 'Hostname' , hostname ) siteElement . setAttribute ( 'Name' , hostname ) return siteElement