With this tutorial you'll do this:

create in the top view a ChamferCyl with these parameters (This primitive is in Extended primitives)

Convert it to Editable poly
select these poly and delete them

in the front view, move these
range of vertex
as shown here

select these edges

do a
to split the edges

after select these
and apply them a slice plane

select slice plane,
move the plane of the
section, than click on "Slice"
click on slice plane to deactivate the tool

Select these polys

do a soft bevel with negative value

delete these polys

on the side view
go on the vertex level
and move the vertex with a uniform scale

at the end, select
these edges
at the bottom of the caps
capsule with the tool

extrude them 2 times inside by using the shift + uniform scale ,
finihed by applying a smooth of 2