storage_pool, '-fastcache')
def CREATE_CONSISTENCYGROUP_CMD(self, cg_name, members=None):
- create_cmd = ('-np', 'snap', '-group', '-create',
+ create_cmd = ('snap', '-group', '-create',
'-name', cg_name, '-allowSnapAutoDelete', 'no')
if not members:
expect_cmd = [
mock.call(
*self.testData.CREATE_CONSISTENCYGROUP_CMD(
- cg_name))]
+ cg_name), poll=False)]
fake_cli.assert_has_calls(expect_cmd)
@mock.patch(
mock.call(*td.MIGRATION_VERIFY_CMD(6232), poll=True),
mock.call(*td.MIGRATION_VERIFY_CMD(6231), poll=True),
mock.call(*td.CREATE_CONSISTENCYGROUP_CMD(
- new_cg['id'], [6232, 6231])),
+ new_cg['id'], [6232, 6231]), poll=True),
mock.call(*td.DELETE_CG_SNAPSHOT(copied_snap_name))]
self.assertEqual(expect_cmd, fake_cli.call_args_list)
if rc != 0:
self._raise_cli_error(command_modify_lun, rc, out)
- def create_consistencygroup(self, cg_name, members=None):
+ def create_consistencygroup(self, cg_name, members=None, poll=False):
"""create the consistency group."""
- command_create_cg = ('-np', 'snap', '-group',
+ command_create_cg = ('snap', '-group',
'-create',
'-name', cg_name,
'-allowSnapAutoDelete', 'no')
command_create_cg += ('-res', ','.join(map(six.text_type,
members)))
- out, rc = self.command_execute(*command_create_cg)
+ out, rc = self.command_execute(*command_create_cg, poll=poll)
if rc != 0:
# Ignore the error if consistency group already exists
if VNXError.has_error(out, VNXError.CG_EXISTED):
def execute(self, client, group, *args, **kwargs):
LOG.debug('CreateConsistencyGroupTask.execute')
lun_ids = [kwargs[key] for key in self.lun_id_keys]
- client.create_consistencygroup(group['id'], lun_ids)
+ client.create_consistencygroup(group['id'], lun_ids,
+ poll=True)
class WaitMigrationsCompleteTask(task.Task):