~ubuntu-branches/ubuntu/saucy/nova/saucy-proposed

« back to all changes in this revision

Viewing changes to nova/volume/san.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-09-25 10:54:59 UTC
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: package-import@ubuntu.com-20120925105459-33p2j4m5w7fgnkxk
Tags: upstream-2012.2~rc2
ImportĀ upstreamĀ versionĀ 2012.2~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
86
86
    remote protocol.
87
87
    """
88
88
 
89
 
    def __init__(self):
90
 
        super(SanISCSIDriver, self).__init__()
 
89
    def __init__(self, *args, **kwargs):
 
90
        super(SanISCSIDriver, self).__init__(*args, **kwargs)
91
91
        self.run_local = FLAGS.san_is_local
92
92
 
93
93
    def _build_iscsi_target_name(self, volume):
120
120
            return utils.execute(*cmd, **kwargs)
121
121
        else:
122
122
            check_exit_code = kwargs.pop('check_exit_code', None)
123
 
            command = ' '.join(*cmd)
 
123
            command = ' '.join(cmd)
124
124
            return self._run_ssh(command, check_exit_code)
125
125
 
126
126
    def _run_ssh(self, command, check_exit_code=True):
211
211
 
212
212
    def _execute(self, *cmd, **kwargs):
213
213
        new_cmd = ['pfexec']
214
 
        new_cmd.extend(*cmd)
215
 
        return super(SolarisISCSIDriver, self)._execute(self,
216
 
                                                        *new_cmd,
 
214
        new_cmd.extend(cmd)
 
215
        return super(SolarisISCSIDriver, self)._execute(*new_cmd,
217
216
                                                        **kwargs)
218
217
 
219
218
    def _view_exists(self, luid):
579
578
        iscsi_portal = cluster_vip + ":3260," + cluster_interface
580
579
 
581
580
        model_update = {}
582
 
        model_update['provider_location'] = ("%s %s" %
 
581
 
 
582
        # NOTE(jdg): LH volumes always at lun 0 ?
 
583
        model_update['provider_location'] = ("%s %s %s" %
583
584
                                             (iscsi_portal,
584
 
                                              iscsi_iqn))
 
585
                                              iscsi_iqn,
 
586
                                              0))
585
587
 
586
588
        return model_update
587
589