コード例 #1
0
ファイル: fixed_ip.py プロジェクト: wputra/MOS-centos
 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
ファイル: fixed_ip.py プロジェクト: vincentpanqi/nova
 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)