Exemplo n.º 1
0
 def addresses(self):
     # Since range will stop one before the endpoint, passing it
     # self.bcast effectively means that the addresses run from
     # the network start to last_host.
     return [
         int_to_dq(i)
         for i in range(dq_to_int(self.ip), dq_to_int(self.bcast))
     ]
Exemplo n.º 2
0
 def addresses(self):
     # Since range will stop one before the endpoint, passing it
     # self.bcast effectively means that the addresses run from
     # the network start to last_host.
     return [int_to_dq(i) for i in range(dq_to_int(self.ip),
                                         dq_to_int(self.bcast))]
Exemplo n.º 3
0
 def last_host(self):
     return int_to_dq(dq_to_int(self.bcast)-1)
Exemplo n.º 4
0
 def first_host(self):
     return int_to_dq(dq_to_int(self.ip)+1)
Exemplo n.º 5
0
 def last_host(self):
     return int_to_dq(dq_to_int(self.bcast) - 1)
Exemplo n.º 6
0
 def first_host(self):
     return int_to_dq(dq_to_int(self.ip) + 1)