Script xalt_syshost_in_py
[hide private]
[frames] | no frames]

Script xalt_syshost_in_py

source code

Functions [hide private]
 
map_syshost(nameA)
Use the nameA array to report a system name
source code
 
level1_syshost(nameA)
Returns the 1st level xx of the xx.yy.zz.ww hostname name.
source code
 
level2_syshost(nameA)
Returns the 2nd level yy of the xx.yy.zz.ww hostname name.
source code
 
main()
This command tries to report the system name base on host name information.
source code
Variables [hide private]
  level1format = False
  __package__ = None
Function Details [hide private]

level1_syshost(nameA)

source code 

Returns the 1st level xx of the xx.yy.zz.ww hostname name.
Useful for naming conventions like
    machine1.dept.institute.edu
where you want to return the machine name without the number.

use the platform.node result provided in nameA array
  and strip off trailing numbers

level2_syshost(nameA)

source code 

Returns the 2nd level yy of the xx.yy.zz.ww hostname name.
Useful for naming conventions like
    login1.machine.site.edu
where you want to return the machine name.

main()

source code 

This command tries to report the system name base on host name information. It should return darter and not login1.darter.