Exemplo n.º 1
0
    def Fqdn(self) -> str:
        """Get the assigned FQDN string.

    Returns:
      The FQDN string assigned to this machine.
    """
        return spec.GetModule().GetFqdn()
Exemplo n.º 2
0
    def ComputerName(self) -> str:
        """Get the assigned computer name string.

    Returns:
      The name string assigned to this machine.
    """
        return spec.GetModule().GetHostname()
Exemplo n.º 3
0
    def ComputerOs(self) -> str:
        """Get the assigned computer OS string.

    Returns:
      The OS string assigned to this machine.
    """
        return spec.GetModule().GetOs()
Exemplo n.º 4
0
    def Lab(self) -> bool:
        """Get state of lab pin.

    Returns:
      Boolean state of lab pin.
    """
        if spec.GetModule().GetLab().lower() == 'true':
            return True
        return False
Exemplo n.º 5
0
 def ImageType(self) -> str:
     """ImageType returns a string based on the image_type spec setting."""
     t = spec.GetModule().GetImageType()
     return {
         'ffu': 'ffu',
     }.get(t.lower(), 'unknown')