~0x44/nova/bug838466

« back to all changes in this revision

Viewing changes to nova/compute/api.py

  • Committer: Tushar Patil
  • Date: 2011-09-01 00:30:11 UTC
  • Revision ID: tushar.vitthal.patil@gmail.com-20110901003011-9s5r3o9crlox9bl9
Fix for LP Bug #838466

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,