components/openstack/neutron/files/evs/plugin.py
changeset 4902 d852c9504ffb
parent 4507 76c2e35382f6
child 4975 6445e44cfccd
equal deleted inserted replaced
4901:fef592cf5ac7 4902:d852c9504ffb
   294     def update_subnet(self, context, id, subnet):
   294     def update_subnet(self, context, id, subnet):
   295         LOG.debug(_("Updating Subnet: %s with %s") % (id, subnet))
   295         LOG.debug(_("Updating Subnet: %s with %s") % (id, subnet))
   296         evs_rpccall_sync = subnet.pop('evs_rpccall_sync', False)
   296         evs_rpccall_sync = subnet.pop('evs_rpccall_sync', False)
   297         if (set(subnet['subnet'].keys()) - set(('enable_dhcp',
   297         if (set(subnet['subnet'].keys()) - set(('enable_dhcp',
   298                                                 'allocation_pools',
   298                                                 'allocation_pools',
       
   299                                                 'dns_nameservers',
   299                                                 'ipv6_address_mode',
   300                                                 'ipv6_address_mode',
   300                                                 'ipv6_ra_mode'))):
   301                                                 'ipv6_ra_mode'))):
   301                 raise EVSOpNotSupported(_("only following subnet attributes "
   302                 raise EVSOpNotSupported(_("only following subnet attributes "
   302                                           "enable-dhcp, allocation-pool, "
   303                                           "enable-dhcp, allocation-pool, "
   303                                           "ipv6-address-mode, and "
   304                                           "dns-nameserver, ipv6-address-mode, "
   304                                           "ipv6-ra-mode can be updated"))
   305                                           "and ipv6-ra-mode can be updated"))
   305 
   306 
   306         poolstr = self._subnet_pool_to_evs_pool(subnet['subnet'])
   307         poolstr = self._subnet_pool_to_evs_pool(subnet['subnet'])
   307 
   308 
   308         with context.session.begin(subtransactions=True):
   309         with context.session.begin(subtransactions=True):
   309             # update subnet in DB
   310             # update subnet in DB