~usc-isi/nova/hpc-trunk

« back to all changes in this revision

Viewing changes to nova/compute/api.py

  • Committer: ISI Hudson Server
  • Date: 2011-09-03 07:03:24 UTC
  • mfrom: (662.621.243 nova)
  • Revision ID: isi_hudson_server-20110903070324-nqbwdrtz327xh1gg
merged nova trunk 1526

Show diffs side-by-side

added added

removed removed

Lines of Context:
383
383
        If you are changing this method, be sure to update both
384
384
        call paths.
385
385
        """
386
 
        instance = dict(launch_index=num, **base_options)
387
 
        instance = self.db.instance_create(context, instance)
388
 
        instance_id = instance['id']
389
 
 
390
386
        elevated = context.elevated()
391
387
        if security_group is None:
392
388
            security_group = ['default']
400
396
                    security_group_name)
401
397
            security_groups.append(group['id'])
402
398
 
 
399
        instance = dict(launch_index=num, **base_options)
 
400
        instance = self.db.instance_create(context, instance)
 
401
        instance_id = instance['id']
 
402
 
403
403
        for security_group_id in security_groups:
404
404
            self.db.instance_add_security_group(elevated,
405
405
                                                instance_id,