def _create_group(self, ctxt=None, name='test_group', description='this is a test group', group_type_id=fake.GROUP_TYPE_ID, volume_type_ids=[fake.VOLUME_TYPE_ID], availability_zone='az1', host='fakehost', status=fields.GroupStatus.CREATING, **kwargs): """Create a group object.""" ctxt = ctxt or self.ctxt group = objects.Group(ctxt) group.user_id = fake.USER_ID group.project_id = fake.PROJECT_ID group.availability_zone = availability_zone group.name = name group.description = description group.group_type_id = group_type_id group.volume_type_ids = volume_type_ids group.host = host group.status = status group.update(kwargs) group.create() return group
def _create_group( self, ctxt=None, name='test_group', description='this is a test group', group_type_id=fake.GROUP_TYPE_ID, volume_type_ids=[fake.VOLUME_TYPE_ID], availability_zone='az1', host='fakehost', status=fields.GroupStatus.CREATING, **kwargs): """Create a group object.""" ctxt = ctxt or self.ctxt group = objects.Group(ctxt) group.user_id = fake.USER_ID group.project_id = fake.PROJECT_ID group.availability_zone = availability_zone group.name = name group.description = description group.group_type_id = group_type_id group.volume_type_ids = volume_type_ids group.host = host group.status = status group.update(kwargs) group.create() return group