removed model from nova-manage
This commit is contained in:
		| @@ -25,10 +25,10 @@ | |||||||
| import sys | import sys | ||||||
| import time | import time | ||||||
|  |  | ||||||
|  | from nova import db | ||||||
| from nova import flags | from nova import flags | ||||||
| from nova import utils | from nova import utils | ||||||
| from nova.auth import manager | from nova.auth import manager | ||||||
| from nova.compute import model |  | ||||||
| from nova.cloudpipe import pipelib | from nova.cloudpipe import pipelib | ||||||
| from nova.endpoint import cloud | from nova.endpoint import cloud | ||||||
|  |  | ||||||
| @@ -41,7 +41,6 @@ class VpnCommands(object): | |||||||
|  |  | ||||||
|     def __init__(self): |     def __init__(self): | ||||||
|         self.manager = manager.AuthManager() |         self.manager = manager.AuthManager() | ||||||
|         self.instdir = model.InstanceDirectory() |  | ||||||
|         self.pipe = pipelib.CloudPipe(cloud.CloudController()) |         self.pipe = pipelib.CloudPipe(cloud.CloudController()) | ||||||
|  |  | ||||||
|     def list(self): |     def list(self): | ||||||
| @@ -73,9 +72,8 @@ class VpnCommands(object): | |||||||
|  |  | ||||||
|     def _vpn_for(self, project_id): |     def _vpn_for(self, project_id): | ||||||
|         """Get the VPN instance for a project ID.""" |         """Get the VPN instance for a project ID.""" | ||||||
|         for instance in self.instdir.all: |         for instance in db.instance_get_all(): | ||||||
|             if ('image_id' in instance.state |             if (instance['image_id'] == FLAGS.vpn_image_id | ||||||
|                 and instance['image_id'] == FLAGS.vpn_image_id |  | ||||||
|                 and not instance['state_description'] in |                 and not instance['state_description'] in | ||||||
|                     ['shutting_down', 'shutdown'] |                     ['shutting_down', 'shutdown'] | ||||||
|                 and instance['project_id'] == project_id): |                 and instance['project_id'] == project_id): | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Vishvananda Ishaya
					Vishvananda Ishaya