Пример #1
0
 def bulk_create(self, context, fixed_ips):
     ips = []
     for fixedip in fixed_ips:
         ip = obj_base.obj_to_primitive(fixedip)
         if "id" in ip:
             raise exception.ObjectActionError(action="create", reason="already created")
         ips.append(ip)
     db.fixed_ip_bulk_create(context, ips)
Пример #2
0
 def bulk_create(self, context, fixed_ips):
     ips = []
     for fixedip in fixed_ips:
         ip = obj_base.obj_to_primitive(fixedip)
         if 'id' in ip:
             raise exception.ObjectActionError(action='create',
                                               reason='already created')
         ips.append(ip)
     db.fixed_ip_bulk_create(context, ips)