diff options
| author | Renuka Apte <renuka.apte@citrix.com> | 2011-05-03 17:08:04 -0700 |
|---|---|---|
| committer | Renuka Apte <renuka.apte@citrix.com> | 2011-05-03 17:08:04 -0700 |
| commit | e171e7511c6b1a2baacf0ab9857643cc1fe82eb3 (patch) | |
| tree | 0a4b08b0112d67e2c5e270d89df618645fa8cc41 | |
| parent | bc953f37560b7353b9b8c86e8d0bdaa5672d3acd (diff) | |
Fix indentation.
| -rw-r--r-- | nova/virt/xenapi/volume_utils.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/nova/virt/xenapi/volume_utils.py b/nova/virt/xenapi/volume_utils.py index 819c48be5..55c11a4ad 100644 --- a/nova/virt/xenapi/volume_utils.py +++ b/nova/virt/xenapi/volume_utils.py @@ -246,19 +246,21 @@ def _get_target(volume_id): 1) volume_ref['host'] must resolve to something rather than loopback """ volume_ref = db.volume_get(context.get_admin_context(), - volume_id) + volume_id) result = (None, None) try: - (r, _e) = utils.execute('sudo', 'iscsiadm', '-m', 'discovery', - '-t', 'sendtargets', '-p', volume_ref['host']) + (r, _e) = utils.execute('sudo', 'iscsiadm', + '-m', 'discovery', + '-t', 'sendtargets', + '-p', volume_ref['host']) except exception.ProcessExecutionError, exc: LOG.exception(exc) else: volume_name = "volume-%08x" % volume_id for target in r.splitlines(): if FLAGS.iscsi_ip_prefix in target and volume_name in target: - (location, _sep, iscsi_name) = target.partition(" ") - break + (location, _sep, iscsi_name) = target.partition(" ") + break iscsi_portal = location.split(",")[0] result = (iscsi_name, iscsi_portal) return result |
