~sandy-walsh/nova/zones

« back to all changes in this revision

Viewing changes to nova/compute/manager.py

  • Committer: Sandy Walsh
  • Date: 2011-02-17 21:39:03 UTC
  • mfrom: (635.1.60 nova)
  • Revision ID: sandy.walsh@rackspace.com-20110217213903-swehe88wea8inxow
changed from 003-004 migration

Show diffs side-by-side

added added

removed removed

Lines of Context:
127
127
            info = self.driver.get_info(instance_ref['name'])
128
128
            state = info['state']
129
129
        except exception.NotFound:
130
 
            state = power_state.NOSTATE
 
130
            state = power_state.FAILED
131
131
        self.db.instance_set_state(context, instance_id, state)
132
132
 
133
133
    def get_console_topic(self, context, **_kwargs):
498
498
        instance_ref = self.db.instance_get(context, instance_id)
499
499
        return instance_ref['locked']
500
500
 
 
501
    @checks_instance_lock
 
502
    def reset_network(self, context, instance_id):
 
503
        """
 
504
        Reset networking on the instance.
 
505
 
 
506
        """
 
507
        context = context.elevated()
 
508
        instance_ref = self.db.instance_get(context, instance_id)
 
509
        LOG.debug(_('instance %s: reset network'), instance_id,
 
510
                                                   context=context)
 
511
        self.driver.reset_network(instance_ref)
 
512
 
501
513
    @exception.wrap_exception
502
514
    def get_console_output(self, context, instance_id):
503
515
        """Send the console output for an instance."""