def _create_consistencygroup( self, ctxt=None, name='test_consistencygroup', description='this is a test consistency group', volume_type_id='123456', availability_zone='az1', host='fakehost', status=fields.ConsistencyGroupStatus.CREATING): """Create a consistency group object.""" ctxt = ctxt or self.ctxt consistencygroup = objects.ConsistencyGroup(ctxt) consistencygroup.user_id = 'fake' consistencygroup.project_id = 'fake' consistencygroup.availability_zone = availability_zone consistencygroup.name = name consistencygroup.description = description consistencygroup.volume_type_id = volume_type_id consistencygroup.host = host consistencygroup.status = status consistencygroup.create() return consistencygroup
def _create_consistencygroup( self, ctxt=None, name="test_consistencygroup", description="this is a test consistency group", volume_type_id="123456", availability_zone="az1", host="fakehost", status=fields.ConsistencyGroupStatus.CREATING, ): """Create a consistency group object.""" ctxt = ctxt or self.ctxt consistencygroup = objects.ConsistencyGroup(ctxt) consistencygroup.user_id = "fake" consistencygroup.project_id = "fake" consistencygroup.availability_zone = availability_zone consistencygroup.name = name consistencygroup.description = description consistencygroup.volume_type_id = volume_type_id consistencygroup.host = host consistencygroup.status = status consistencygroup.create() return consistencygroup
def _create_consistencygroup( self, ctxt=None, name='test_consistencygroup', description='this is a test consistency group', volume_type_id=fake.VOLUME_TYPE_ID, availability_zone='az1', host='fakehost', status=fields.ConsistencyGroupStatus.CREATING, **kwargs): """Create a consistency group object.""" ctxt = ctxt or self.ctxt consistencygroup = objects.ConsistencyGroup(ctxt) consistencygroup.user_id = fake.USER_ID consistencygroup.project_id = fake.PROJECT_ID consistencygroup.availability_zone = availability_zone consistencygroup.name = name consistencygroup.description = description consistencygroup.volume_type_id = volume_type_id consistencygroup.host = host consistencygroup.status = status consistencygroup.update(kwargs) consistencygroup.create() return consistencygroup