Exemplo n.º 1
0
 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")
Exemplo n.º 2
0
 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')
Exemplo n.º 3
0
 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')
Exemplo n.º 4
0
def handle_network_dhcp_access(plugin, context, network, action):
    nsx_svc.handle_network_dhcp_access(plugin, context, network, action)