def _create_3par_vlun(self, volume, hostname):
     try:
         self.client.createVLUN(volume, hostname=hostname, auto=True)
     except hpexceptions.HTTPBadRequest as e:
         if 'must be in the same domain' in e.get_description():
             LOG.error(e.get_description())
             raise exception.Invalid3PARDomain(err=e.get_description())
Ejemplo n.º 2
0
 def _create_3par_vlun(self, volume, hostname):
     out = self._cli_run('createvlun %s auto %s' % (volume, hostname), None)
     if out and len(out) > 1:
         if "must be in the same domain" in out[0]:
             err = out[0].strip()
             err = err + " " + out[1].strip()
             raise exception.Invalid3PARDomain(err=err)
Ejemplo n.º 3
0
    def _create_3par_vlun(self, volume, hostname, nsp):
        try:
            if nsp is None:
                self.client.createVLUN(volume, hostname=hostname, auto=True)
            else:
                port = self.build_portPos(nsp)
                self.client.createVLUN(volume, hostname=hostname, auto=True,
                                       portPos=port)

        except hpexceptions.HTTPBadRequest as e:
            if 'must be in the same domain' in e.get_description():
                LOG.error(e.get_description())
                raise exception.Invalid3PARDomain(err=e.get_description())