def dhcp_allocate(self, context, network_id, subnet): """Allocate dhcp resources for the subnet.""" # Create LSN resources network_data = {"id": network_id} nsx.handle_network_dhcp_access(self.plugin, context, network_data, "create_network") if subnet: subnet_data = {"subnet": subnet} self.notifier.notify(context, subnet_data, "subnet.create.end") # Get DHCP host and metadata entries created for the LSN port = {"network_id": network_id, "fixed_ips": [{"subnet_id": subnet["id"]}]} self.notifier.notify(context, {"port": port}, "port.update.end")
def dhcp_allocate(self, context, network_id, subnet): """Allocate dhcp resources for the subnet.""" # Create LSN resources network_data = {'id': network_id} nsx.handle_network_dhcp_access(self.plugin, context, network_data, 'create_network') if subnet: subnet_data = {'subnet': subnet} self.notifier.notify(context, subnet_data, 'subnet.create.end') # Get DHCP host and metadata entries created for the LSN port = { 'network_id': network_id, 'fixed_ips': [{'subnet_id': subnet['id']}] } self.notifier.notify(context, {'port': port}, 'port.update.end')
def dhcp_allocate(self, context, network_id, subnet): """Allocate dhcp resources for the subnet.""" # Create LSN resources network_data = {'id': network_id} nsx.handle_network_dhcp_access(self.plugin, context, network_data, 'create_network') if subnet: subnet_data = {'subnet': subnet} self.notifier.notify(context, subnet_data, 'subnet.create.end') # Get DHCP host and metadata entries created for the LSN port = { 'network_id': network_id, 'fixed_ips': [{ 'subnet_id': subnet['id'] }] } self.notifier.notify(context, {'port': port}, 'port.update.end')
def handle_network_dhcp_access(plugin, context, network, action): nsx_svc.handle_network_dhcp_access(plugin, context, network, action)