diff options
| author | Vishvananda Ishaya <vishvananda@gmail.com> | 2010-06-24 04:11:57 +0100 |
|---|---|---|
| committer | andy <github@anarkystic.com> | 2010-06-24 04:11:57 +0100 |
| commit | bb2af5d05e1d5aae3ac643ea110cf51c9702b37c (patch) | |
| tree | eb0d03b9c5a9d31a8b89a2495f98c5ec652fc63d /nova/compute | |
| parent | f7464875752b60b1c1713d7034478bc5e6b83aac (diff) | |
fix default state to be 0 instead of pending
Diffstat (limited to 'nova/compute')
| -rw-r--r-- | nova/compute/model.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nova/compute/model.py b/nova/compute/model.py index 14f2461da..6477ac571 100644 --- a/nova/compute/model.py +++ b/nova/compute/model.py @@ -115,7 +115,8 @@ class Instance(object): if self.state: self.initial_state = self.state else: - self.state = {'state': 'pending', + self.state = {'state': 0, + 'state_description': 'pending', 'instance_id': instance_id, 'node_name': 'unassigned', 'project_id': 'unassigned', @@ -138,13 +139,13 @@ class Instance(object): for item in self.keys(): copyDict[item] = self[item] return copyDict - + def get(self, item, default): return self.state.get(item, default) def update(self, update_dict): return self.state.update(update_dict) - + def setdefault(self, item, default): return self.state.setdefault(item, default) |
