components/openstack/neutron/files/agent/solaris/dhcp.py
branchs11u2-sru
changeset 3201 6839f7d1f036
parent 3178 77584387a894
child 3524 ad6a9e0880b9
child 3619 639868f63ef4
equal deleted inserted replaced
3198:46289f36c1ca 3201:6839f7d1f036
   370 
   370 
   371         # TODO(gmoodalb): prepend the env vars before command
   371         # TODO(gmoodalb): prepend the env vars before command
   372         utils.execute(cmd, self.root_helper)
   372         utils.execute(cmd, self.root_helper)
   373 
   373 
   374     def release_lease(self, mac_address, removed_ips):
   374     def release_lease(self, mac_address, removed_ips):
   375         # TODO(gmoodalb): we need to support dnsmasq's dhcp_release
   375         """Release a DHCP lease."""
   376         pass
   376         for ip in removed_ips or []:
       
   377             cmd = ['/usr/lib/inet/dhcp_release', self.interface_name,
       
   378                    ip, mac_address]
       
   379             utils.execute(cmd, self.root_helper)
   377 
   380 
   378     def reload_allocations(self):
   381     def reload_allocations(self):
   379         """Rebuild the dnsmasq config and signal the dnsmasq to reload."""
   382         """Rebuild the dnsmasq config and signal the dnsmasq to reload."""
   380 
   383 
   381         # If all subnets turn off dhcp, kill the process.
   384         # If all subnets turn off dhcp, kill the process.