(self, host)
Returns integer host ID (without padding) from a given hostname.
Returns integer host ID (without padding) from a given hostname.
Returns integer host ID ( without padding ) from a given hostname .
def get_host_id(self, host):
        '''Returns integer host ID (without padding) from a given hostname.'''
        try:
            short_hostname = host.split('.')[0]
            return int(re.findall("\\d+$", short_hostname)[-1])
        except IndexError:
            raise ValueError("Host name must end in an integer")
def get_host_id ( self , host ) : try : short_hostname = host . split ( '.' ) [ 0 ] return int ( re . findall ( "\\d+$" , short_hostname ) [ - 1 ] ) except IndexError : raise ValueError ( "Host name must end in an integer" )