Beispiel #1
0
 def test_thin_clone_snap(self):
     snap = UnitySnap.get(_id='38654700002', cli=t_rest(version='4.2.0'))
     cloned = TCHelper.thin_clone(snap._cli, snap,
                                  name='test_thin_clone_snap',
                                  description='description',
                                  io_limit_policy=None)
     assert_that(cloned.id, equal_to('sv_5557'))
 def test_thin_clone_lun(self):
     lun = UnityLun.get(_id='sv_2', cli=t_rest(version='4.2.0'))
     cloned = TCHelper.thin_clone(lun._cli,
                                  lun,
                                  name='test_thin_clone_lun',
                                  description='description',
                                  io_limit_policy=None)
     assert_that(cloned.id, equal_to('sv_5555'))
Beispiel #3
0
 def test_thin_clone_snap_new_tc_base(self):
     TCHelper._tc_cache['sv_2'] = UnityLun.get(_id='sv_5605',
                                               cli=t_rest(version='4.2.0'))
     lun = UnityLun.get(_id='sv_2', cli=t_rest(version='4.2.0'))
     cloned = TCHelper.thin_clone(lun._cli, lun, name='test_thin_clone_lun',
                                  description='description',
                                  io_limit_policy=None)
     assert_that(cloned.id, equal_to('sv_5556'))
Beispiel #4
0
    def thin_clone(self, name, io_limit_policy=None, description=None):
        if self.is_cg_member:
            raise UnityCGMemberActionNotSupportError()

        if not self.is_thin_enabled:
            raise UnityThinCloneNotAllowedError()

        return TCHelper.thin_clone(self._cli, self, name, io_limit_policy,
                                   description)
Beispiel #5
0
    def thin_clone(self, name, io_limit_policy=None, description=None):
        """Creates a new thin clone from this snapshot.
        .. note:: this snapshot should not enable Auto-Delete.
        """
        if self.is_member_snap():
            raise UnityCGMemberActionNotSupportError()

        if self.lun and not self.lun.is_thin_enabled:
            raise UnityThinCloneNotAllowedError()

        return TCHelper.thin_clone(self._cli, self, name, io_limit_policy,
                                   description)
Beispiel #6
0
 def thin_clone(self, name, io_limit_policy=None, description=None):
     return TCHelper.thin_clone(self._cli, self, name, io_limit_policy,
                                description)
Beispiel #7
0
 def thin_clone(self, name, io_limit_policy=None, description=None):
     if self.is_cg_member:
         raise UnityCGLunActionNotSupportError()
     return TCHelper.thin_clone(self._cli, self, name, io_limit_policy,
                                description)
Beispiel #8
0
 def thin_clone(self, name, io_limit_policy=None, description=None):
     """Creates a new thin clone from this snapshot.
     .. note:: this snapshot should not enable Auto-Delete.
     """
     return TCHelper.thin_clone(self._cli, self, name, io_limit_policy,
                                description)
 def _inner():
     TCHelper.thin_clone(lun._cli,
                         lun,
                         name='test_thin_clone_limit_exceeded',
                         description='This is description.',
                         io_limit_policy=None)