Example #1
0
 def _create_3par_iscsi_host(self, hostname, iscsi_iqn, domain, persona_id):
     cmd = 'createhost -iscsi -persona %s -domain %s %s %s' % \
           (persona_id, domain, hostname, iscsi_iqn)
     out = self.common._cli_run(cmd, None)
     if out and len(out) > 1:
         if "already used by host" in out[1]:
             err = out[1].strip()
             info = _("The hostname must be called '%s'") % hostname
             raise exception.Duplicate3PARHost(err=err, info=info)
Example #2
0
 def _create_3par_fibrechan_host(self, hostname, wwn, domain, persona_id):
     out = self.common._cli_run(
         'createhost -persona %s -domain %s %s %s' %
         (persona_id, domain, hostname, " ".join(wwn)), None)
     if out and len(out) > 1:
         if "already used by host" in out[1]:
             err = out[1].strip()
             info = _("The hostname must be called '%s'") % hostname
             raise exception.Duplicate3PARHost(err=err, info=info)